Jump to content

Complete noob to modding help


Cirion

Recommended Posts

i suggest you to start with old fashion XML edits.

And only if the edits work make them a xpath modlet

 

If you directly start with a modlet you mostly have no idea if the issue is in the xpath or if it is the XML edit that dont work as intended.

I made many modifications over the time and i still test new edits first as a simple edit of the XML

(In your case i am not sure that the xml edit part will work as you think)

Link to comment
Share on other sites

Yes, you can change smelt time for rocksmall, it works when I manually edit it, tested and verified, but I hate manually fixing it every time the game updates, so I wanted to make a mod finally for it. SO it definitely works, here is the working code that needs to be into a modlet form now:

 

<item name="resourceRockSmall"> <!-- scrap material -->

<property name="HoldType" value="40"/>

<property name="Meshfile" value="Items/Crafting/rock_smallPrefab"/>

<property name="DropScale" value="6"/>

<property name="Material" value="MresourceRockSmall"/>

<property name="Stacknumber" value="6000"/> <!-- STK resource -->

<property name="RepairAmount" value="300"/>

<property name="RepairTime" value="0.5"/>

<property name="Weight" value="5"/>

<property name="MeltTimePerUnit" value="0.1"/>

<property name="EconomicValue" value="50"/>

<property name="EconomicBundleSize" value="50"/>

<property class="Action0">

<property name="Class" value="ThrowAway"/>

<property name="Delay" value="1.2"/> <!-- obsolete if rounds per minute exists -->

<property name="Throw_strength_default" value="8"/>

<property name="Throw_strength_max" value="25"/>

<property name="Max_strain_time" value="1.5"/>

<property name="Sound_start" value="swoosh"/>

</property>

<property name="ThrowableDecoy" value="true"/>

<property name="Group" value="Resources"/>

<property name="CraftingIngredientTime" value="0.5"/>

<property name="DistractionTags" value="zombie,requires_contact"/>

<effect_group name="Base Effects" tiered="false">

<passive_effect name="DistractionRadius" operation="base_set" value="25"/>

<passive_effect name="DistractionLifetime" operation="base_set" value="1"/>

<passive_effect name="DistractionStrength" operation="base_set" value="100"/>

</effect_group>

</item>

Link to comment
Share on other sites

Ok so I still can't get it to work, I guess I'm pretty dense lol

 

I hate to be the guy that asks for a hand holding, but I think at this point I need someone to solve it for me to help me to understand. I tried both append for melttime and also set for weight, neither seemed to work

 

<configs>

<set xpath="/items/item[@name=resourceRockSmall]/property[@name=Weight]/@value">1</set>

<append xpath="/items/item[@name=resourceRockSmall]/property[@name=MeltTimePerUnit]/@value">0.1</append>

</configs>

Link to comment
Share on other sites

Ok so I still can't get it to work, I guess I'm pretty dense lol

 

I hate to be the guy that asks for a hand holding, but I think at this point I need someone to solve it for me to help me to understand. I tried both append for melttime and also set for weight, neither seemed to work

 

<configs>

<set xpath="/items/item[@name=resourceRockSmall]/property[@name=Weight]/@value">1</set>

<append xpath="/items/item[@name=resourceRockSmall]/property[@name=MeltTimePerUnit]/@value">0.1</append>

</configs>

 

I am looking at the syntax ... had a similar issue with a mod i did ..

Link to comment
Share on other sites

Set the time you want, 0.25 is the default time. Everything extends from unit_iron including stone

 

<set xpath="/items/item[@name='unit_iron']/property[@name='MeltTimePerUnit']/@value">0.25</set>

 

I ran this and it loads with no errors ...

 

It works .. and it also reduces the time to smelt scrap iron too

 

<configs>

<!-- Everything extends from unit_iron including stone -->

<set xpath="/items/item[@name='unit_iron']/property[@name='MeltTimePerUnit']/@value">0.1</set>

<append xpath="/items/item[@name='resourceRockSmall']">
<property name='Weight' value="1"/>



</append>

</configs>

Link to comment
Share on other sites

If you just want stone to be faster, not iron,lead and all other stuff you need to assign it to unit_stone

 

<append xpath="/items/item/[@name='unit_stone']">
   <property name="MeltTimePerUnit" value="0.25"/> <!-- default melt time -->
</append>

 

 

I am still learning xpath myself but I think your append is wrong. This should work?

 

<append xpath="/items/item[@name='resourceRockSmall']">
   <property name="MeltTimePerUnit" value="0.25"/> <!-- default melt time -->
</append>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...