Contructed walls HP change from diferent materials

Started by diablz, January 01, 2017, 02:04:31 PM

Previous topic - Next topic

diablz

Hello guys i hope you can help me

I am building a small mod whit some new ores and ingots

i cannot figure out how to change the hp of the constructions whit that new item, it always stays whit the Hit points of the Metallic category.

How can i make an copper wall whit a diferent hp them the steel wall?
I dont mean separate that i do know, i want it on the same icon of the vanilla walls. ( right cliking and chosing material)
I hope i was clear in what i want, and that you guys can help me whit this, i would like that very much.

Thank you in advance and happy new year :)

Dave-In-Texas

excellent idea.. post this in the mods section though man..

Primal Lord

All items that are made with types rather than specific materials (doors, beds, walls, clothes, melee weapons, etc) share the same base stats as others in their catagories, it's the multipliers on the materials themselves (steel, wood, uranium, etc) that give it various amounts of health, damage, etc, if your copper wall has the same health as a steel wall it means your copper has the same hit point modifier that steel does. Take some time and study the statBases (Modifiers) in Item_Resource_Stuff.xml at Rimworld\Mods\Core\Defs\ThingDefs_Items for things you can use to improve your brass wall.

diablz

I figured it out

On the xml file there a line:

<statFactors>
        <MaxHitPoints>1.2</MaxHitPoints>
        <Beauty>1</Beauty>
</statFactors>

the 1.2 are 120% of the building maxhp, so i just chose the percentage i want and it changes, pretty easy and i was doing so hard stuff

example: if the maxhp is 350, 0.2 is 70