Questions on backstory data

Started by AngleWyrm, May 24, 2017, 04:06:28 AM

Previous topic - Next topic

AngleWyrm

From this thread it is apparent that there are two classifications for work, <requiredWorkTags> and <requiredWorkTypes>.
  • What are the valid string enumerations for each of those fields?
  • There is a <workDisables> tag whose enumeration matches <requiredWorkTags>; is there a complementary but unused tag that might look like workTypesDisables?

My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Fluffy (l2032)

wouldn't required worktypes simply refer to WorkTypeDefs?

AngleWyrm

#2

Yeah, thanks!

Here's my current understanding of the way info is stored in a backstory in picture form.

I still have to sort out the relationship between those WorkTypeDefs and work tags, so that there aren't conflicting inputs. But it's getting there.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Xnope

#3
Aye, they would simply be WorkTypeDefs. From RimWorld.WorkTypeDefOf in the source code, you can glean these as valid vanilla work types:


public static WorkTypeDef Mining;

public static WorkTypeDef Growing;

public static WorkTypeDef Construction;

public static WorkTypeDef Warden;

public static WorkTypeDef Doctor;

public static WorkTypeDef Firefighter;

public static WorkTypeDef Hunting;

public static WorkTypeDef Handling;

public static WorkTypeDef Hauling;


Edit: I copy-pasted that without checking if the DefOf was complete. The complete list is in the WorkType.xml def list. Others include:


PatientEmergency
PatientBedRest
Flicker
Cooking
PlantCutting
Smithing
Tailoring
Art
Crafting
Cleaning
Research


My b.
My W.I.P. mods:
Carnivale: GitHub | Forum Post
XnopeCore: GitHub

Xnope

#4
Also, in response to your question about an equivalent disables list for work types -- yes, there is one and it is called <disabledWorkTypes>.

I assume you mean for traits, not backstories, right? Because the original post is about the GreenThumb trait def. Backstories do not have defs (although several mods create a BackstoryDef, one of mine included), but if they did they would only be able to work with WorkTags, not WorkTypes. As far as I've been able to figure.

Correct me if I'm wrong, people.
My W.I.P. mods:
Carnivale: GitHub | Forum Post
XnopeCore: GitHub

AngleWyrm

Thanks for the clarity, work to do  8)
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh