Jump to content

30.000 items stack size


rewtgr

Recommended Posts

You just smacked in all the items.xml file, why? It's not hard to make modlets, here's a start:

<configs>
<set xpath="//item[@name='meleeToolTorch']/property[@name='Stacknumber']/@value">30000</set>
...
</configs>

Some guides by sphereii:

https://7daystodie.com/forums/showthread.php?94202-GUIDE-Mod-and-Modlet-Naming-Conventions-for-A17

https://7daystodie.com/forums/showthread.php?93816-XPath-Modding-Explanation-Thread

 

Alloc also mentioned, that you can't redistribute full xml files of the game with changes made to them directly, you have to make a modlet if you don't want to get in trouble. He probably won't enforce the rule, but others might.

Link to comment
Share on other sites

Yeah i know i can use modlets and save alot of work but we r still in experimental. I'll get into modlets eventually.

 

As far as the full xmls i didn't know that i can not post them.

 

Also i can not replace all values that have 'Stacknumber' cause there are items with stacknumber 1 and have quality values (1-6)

 

I must replace the usual vanilla stacks (50, 100 etc) but i also must also changed some that have stacknumber=1 and no quality for example the bellows.

 

I'll bring down my 2 mods and start "learning" the modlet method.

But it will take some time :)

 

Thanks for the "illegal" full xmls tip :)

Link to comment
Share on other sites

I fixed my initial modlet code snippet, it had a small spelling error:

/@value" />30000</set>

should have been:

/@value">30000</set>

 

I think what Alloc meant by not sharing full xmls is to encourage people start using modlets and not posting full xml files to increase compatibility between different mods :)

Link to comment
Share on other sites

<configs>
<set xpath="//item[@name='meleeToolTorch']/property[@name='Stacknumber']/@value">30000</set>
...
</configs>

 

A double slash at the start is not good for performance:

https://ludeon.com/forums/index.php?topic=32874.0

https://stackoverflow.com/questions/385272/slow-selectsinglenode

 

As the XML structure is know, just provide the full xpath.

  <!-- better performance with a full path -->
 <set xpath="/items/item[@name='meleeToolTorch']/property[@name='Stacknumber']/@value">30000</set>

 <!-- tweak all items with no item-name selector -->
 <set xpath="/items/item/property[@name='Stacknumber']/@value">30000</set>

 <!-- limit it to starting with resource-->
 <set xpath="/items/item[starts-with(@name,'resource')]/property[@name='Stacknumber']/@value">30000</set>

 

For testing you can use https://www.freeformatter.com/xpath-tester.html.

And if you replace the part that selects the Stacknumber with a item-name selector,

you see which items will be changed.

  <!-- not very interesting to filter by name and get the name -->
 <set xpath="/items/item[@name='meleeToolTorch']/@name">30000</set>

 <!-- no item-name selector, will list all item names of course -->
 <set xpath="/items/item/@name">30000</set>

 <!-- list all 'resource...' items -->
 <set xpath="/items/item[starts-with(@name,'resource')]/@name">30000</set>

Link to comment
Share on other sites

Not all blocks have a Stacknumber property. I appended it in the cooking pot. Also i didn't want to touch other blocks cause some ppl use the wood frames for firewood (example) and a 30K stack is a pain... split, split, split ;)

 

Ah, yes. Thank you for explaining.

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...