Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jamaicancastle

#166
According to his reddit post about 1.0, the leather thing is on Tynan's radar, and the plan is to condense them into a small number of categories based on their current properties.

As for comparing items, what I'd like is actually not so much a direct item comparison as an in-game encyclopedia, like you'd find in a game like Civilization or Total War. If you could see what the base stats of an item were before you crafted it, and look through other items in a menu, I think it would be easy to compare across without needing an especially complex UI.
#167
Ideas / Re: Damage Resistance or Damage Threshhold
January 21, 2018, 03:47:13 PM
Conversely, you're supposed to have to manage your prisoners, not just lock them in a dungeon and throw away the key. If your prisoners didn't keep going berserk, you wouldn't have this problem.
#168
Looking at the code, it appears that (for reasons I cannot readily explain) PawnKindDef defines a backstory category, but it isn't actually used by the pawn generator.

HAR appears to override this, but only if the pawn's race is an alien race with the appropriate flag. (Assuming I'm following the patch right, at least.)
#169
Help / Re: Some traits don't have a TraitDef
January 20, 2018, 10:14:10 PM
I'm not sure what you mean, these traits seem to have normal TraitDefs to me. The TraitDefs in turn invoke a StatOffset that allows them to modify stats. For instance Nimble is the third from the bottom of Traits_Singular.XML and looks like so:

<TraitDef>
<defName>Nimble</defName>
<commonality>0.15</commonality>
<degreeDatas>
<li>
<label>nimble</label>
<description>NAME has remarkable kinesthetic intelligence. HECAP seems to dance around danger with preternatural grace.</description>
<statOffsets>
<MeleeDodgeChance>15</MeleeDodgeChance>
</statOffsets>
</li>
</degreeDatas>
</TraitDef>
#170
Is this not a core functionality? I just checked on the core defs, and the core PirateBase PawnKindDef has a <backstoryCategory> tab, clear as day.

The reason I checked was I was sure I was doing just this with my alien faction, and I wasn't sure if it was core or if HAR was somehow adding that function to a vanilla def, but it does seem to be core...
#171
Quote from: Shinzy on January 20, 2018, 12:24:30 PM
don't forget the situation where both killer and resurrector are the same person!
"You see, Frank, once again I'm going to have to kill you."
#172
No colonist checks for jobs except when directed by the job giver. For short jobs, this is normally at the end. For longer jobs, there are specific breakpoints at intervals where the pawn can decide to either keep doing what it's doing or do something higher-priority.

Idle pawns wandering or doing joy activities have a relatively long interval between new job ticks. This is deliberate, because if they don't, having too many idle pawns checking for new jobs too often really slows the game down - and especially frustratingly, because whereas most times the game slows down it's because too much is happening, and the player can at least see that, here it's because too little is happening.
#173
Unfortunately as best I can tell, the symbol resolver (the part of map generation that takes blueprints like ancient shrines and turns them into actual things on the map) doesn't take into account the commonality of materials when making walls. However, it won't make walls out of materials that:
- cost more than $5 per unit, or more than $.5 if it's a small-volume unit like silver or gold,
- or are more than 50% flammable.

If neither of those sounds appropriate for your material, your only option would unfortunately be to implement a C# patch.
#174
Maybe someone with more knowledge of C# can elucidate, but here's a theory.

Corpse is a subclass of Thing. Both Corpse and Thing have .Destroy methods, which are flagged public virtual. Corpse.Destroy specifically invokes Destroy on all of the equipment and inventory items of the pawn associated with the corpse (if there is one) as part of the PostCorpseDestroy method. Obviously Thing.Destroy doesn't do this.

The cremate recipe doesn't have it own code worker, it just uses the default behavior of all recipes with ingredients, which is to destroy those ingredients when it's done. This is handled by RecipeWorker.ConsumeIngredient, which calls Thing.Destroy. I'm pretty sure that means it won't call Corpse.Destroy even if the object is a corpse.

If it doesn't, the fix would seem to be a Harmony patch that would modify RecipeWorker.ConsumeIngredient such that, if the consumed ingredient was a corpse, it should invoke PostCorpseDestroy to clean up the leftovers.
#175
Quote from: docssy on January 18, 2018, 08:28:39 PM
Quoteat (wrapper dynamic-method) RimWorld.Pawn_DraftController.set_Drafted_Patch1 (object,bool) <0x000c0>

Fast forward to https://github.com/josh-m/RW-Decompile/blob/master/RimWorld/Pawn_DraftController.cs and set_Drafted_Patch1 doesn't exist in the rimworld decompiled source.
The _Patch1 indicates a Harmony patch that a mod is running that modifies that method. It won't show up in the original code because it's a separate method that is run either immediately before or immediately after the original one.

The immediate source of the problem tends to be the highest up on the list, although that can be deceptive if there's bad information being passed up the chain. In this case it looks like an invalid JobDriver is being called for, which is causing both Job.MakeDriver and PawnUtility.GetPosture to choke. (That, or the game has the supreme misfortune of having two critical errors pop up in the same tick...)

Unfortunately there doesn't seem to be an obvious way to determine what driver it thinks it's trying to call. I'd start with mods that add new work types or the like.
#176
Help / Re: Modifying basic needs
January 18, 2018, 11:48:03 AM
I'm not sure what your use case is, but I agree that's probably not the best way to go about it.

If you want to remove a basic need from a pawn, the best way would be the see if one of the configuration flags in its race properties (the <race> tag in its thingDef) can be set to negate that need. For instance, pawns with less than humanlike intelligence won't have thought-related human needs (mood, beauty, space, etc.). Pawns with the EatsFood and needsRest flags set to false won't have a food or rest need, respectively.

For more comprehensive needs changes you could try using Harmony, which is a library designed specifically for patching Rimworld's existing C# code safely and (relatively) painlessly. You would want to create a postfix on Pawn_NeedTracker.ShouldHaveNeed(), which as the name implies is the function that checks if a pawn should have a need by referencing the flags I discussed earlier. The postfix would allow you to compare any of the pawn's attributes, including its defName or any other convenient feature, and exclude or include specific needs.
#177
Not missing, but I feel like the "not enough resources" message that comes up when you try to prioritize a workbench (e.g. tailoring bench) could use more specificity. I especially see a lot of new players confused about needing all of one kind of stuff (particularly leather). If it could check and report on forbidden/unreachable items, that would also cut down on the number of confused players wondering what's going wrong.

I would envision the messages looking something like:
"Cannot prioritize tailoring at tailoring bench: cannot find components x4"
"Cannot prioritize tailoring at tailoring bench: cloth x70 is forbidden"
something along those lines.
#178
General Discussion / Re: Animals mining walls
January 17, 2018, 06:50:34 PM
Vanilla wild animals will break through walls if they need to leave the map (usually because of temperature, or they're somehow starving) and cannot do so. So will friendly faction pawns if you wall them in, so don't do that.

They shouldn't be doing that if they're tamed, though, nor should they break through walls just to eat.
#179
Normally, you would use the <thingCategories> tag inside of a thingDef to assign it to one or more categories. However, as you've probably discovered, the different types of meat don't have their own discrete thingDefs in XML; they're generated from the animals when the game launches.

In this case I think your best bet, since you're trying to target a relatively small number of different kinds of meat, is to use a StockGenerator_MultiDef instead of Category. The MultiDef expects a list of specific thingDefs instead of a category; it should otherwise work the same way. I believe the meat types are normally named [animal]_Meat, as in our perennial favorite Human_Meat.
#180
Ideas / Re: Grass Growth
January 17, 2018, 07:58:46 AM
Quote from: Zafety on January 16, 2018, 11:38:31 PM
Can it be possible to make grass grow without the presence of other grass tiles nearby?
This isn't a simple fix, but it is on the list of things to be changed for the next release.