Ludeon Forums

RimWorld => Mods => Help => Topic started by: demeggy on October 17, 2016, 03:15:35 PM

Title: Forcing PawnDef apparel
Post by: demeggy on October 17, 2016, 03:15:35 PM
Evening all!

So I've noticed a quirk in my WIP: I've created a faction, setup PawnDefs spawned by that faction, all works swimmingly - with the exception that some of the PawnDefs refuse to wear the Armour and Helmet tagged in their ThingDef Apparel.xml tags, nor be equipped with the weapon as tagged in their ThingDef Apparel.xml tags.

I can see there's an Apparel costing element to apparel that if I understand, is picked up by the PawnDef's min/max money allowance.

Is there a much easier way to force them to wear specific outfits?

Thanks,

Demeggy
Title: Re: Forcing PawnDef apparel
Post by: kaptain_kavern on October 17, 2016, 03:51:25 PM
Have you tried :

<apparelRequired>
      <li>ThingDefName</li>
</apparelRequired>


Found it in /Core/Defs/PawnKindDefs_Humanlikes/PawnKinds_Mercenary.xml, line 212 (for forcing slasher to wear shield in Vanilla)
Title: Re: Forcing PawnDef apparel
Post by: demeggy on October 17, 2016, 04:15:41 PM
Quote from: kaptain_kavern on October 17, 2016, 03:51:25 PM
Have you tried :

<apparelRequired>
      <li>ThingDefName</li>
</apparelRequired>


Fantastic! Thanks :) I was hoping <weaponRequired> would do a similar thing, alas, it doesnt exist...
Found it in /Core/Defs/PawnKindDefs_Humanlikes/PawnKinds_Mercenary.xml, line 212 (for forcing slasher to wear shield in Vanilla)
Title: Re: Forcing PawnDef apparel
Post by: demeggy on October 18, 2016, 03:23:12 PM
Alas, weirdly, that forces them to equip a personal shield (despite them wearing the designated apparel).
What I did do as a temp workaround was to increase each pawns apparel money allocation to an insane amount, and lower the cost of the apparel.

    <apparelMoney>
      <min>100000</min>
      <max>1000000</max>
    </apparelMoney>

Still sometimes though, Pawns rock up partially nude. Any ideas?
Title: Re: Forcing PawnDef apparel
Post by: kaptain_kavern on October 18, 2016, 03:55:15 PM
Quote from: demeggy on October 18, 2016, 03:23:12 PM
Alas, weirdly, that forces them to equip a personal shield (despite them wearing the designated apparel).
What I did do as a temp workaround was to increase each pawns apparel money allocation to an insane amount, and lower the cost of the apparel.

    <apparelMoney>
      <min>100000</min>
      <max>1000000</max>
    </apparelMoney>

Still sometimes though, Pawns rock up partially nude. Any ideas?
Wait that's weird, are you sure you haven't by mistake let the personalshield reference when you copy paste ?

I mean you should have

<apparelRequired>
      <li>YOUR MODDED THINGDEF</li>
</apparelRequired>


and not
<apparelRequired>
      <li>Apparel_shield</li>
</apparelRequired>


right ?
Title: Re: Forcing PawnDef apparel
Post by: demeggy on October 18, 2016, 04:07:00 PM
Yup:

Free typed the tags in anyhoo rather than copy/paste, whacked my thingDef apparel in there - equips the apparel, but throws a personal shield over the top.
Title: Re: Forcing PawnDef apparel
Post by: kaptain_kavern on October 18, 2016, 04:47:37 PM
Wow that is strange. I can't explain how. Maybe inherited from the base/abstract parent ?  Care to share the code for us to have a look ?
Title: Re: Forcing PawnDef apparel
Post by: demeggy on October 19, 2016, 02:22:50 PM
Ah I removed it in the end! I'll add it back in shortly, see if it re-occurs, and if so, will pop the .xml up!