• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

help needed with mod slots

as I'm looking throw the items xml, I found that an item with Mparts have a weight to tell how much parts to give like the gunRifleT1HuntingRifle, I thank when we scrap it, we get 3 MRifleParts since the value starts at 0. so, it go's 0,1,2,3, exc.

where a weight value of 4 would give you 3 MRifleParts.

<property name="Material" value="MRifleParts"/> <property name="Weight" value="4"/>

but what I can't found is the Mresource  weight value to tell how mush resource to give like the 

gunRifleT0PipeRifle it has a Mmetal but no weight value, and you can scrap it, you get 30 scrap iron from it.

so what part of the code says its scrapable and how much MResources to giv?

 
First, what is not working exactly?  Do you have this code between <config> </config>?  Are you getting any errors in the console regarding mods when you load up a game?  Does your modlet have a ModInfo.xml file?

I copied and paste your code into my modlet and I saw the following:

  • No errors on loading
  • I picked three weapons out of creative menu:  one at Q1, one at Q5, and one at Q6 (hunting rifle, lever action rifle, pipe machine gun).
  • All 3 weapons had 6 mod slots.


The code is definitely changing the mod slots available, but it doesn't display more than 6.  This could either be a hard limit in the game or an UI (user interface) issue.  You might not be seeing more than 6 because there is not enough screen space.  If that is the case (and not because of a hard limit on mod slots which I doubt there is), you will also need to adjust the sizes of those slots to get more on the screen (kind of like the bigger backpack mods).
hello, im currently tying to add more mod slots to UndeadL mod, but i believe I'm having a UI limit issue. think you could point me in the right direction?

Max mod slots is 5, any more added after that, can't be seen when slotted into item.

 
hello, im currently tying to add more mod slots to UndeadL mod, but i believe I'm having a UI limit issue. think you could point me in the right direction?

Max mod slots is 5, any more added after that, can't be seen when slotted into item.
Darkness Falls added more than 5 mod slots so Khaine's mod has examples of modifying the UI to account for more than 5.

 
So I'm trying to fix my modslots mod, not sure what I need to change to get it to work, but this is what I have,

Items

<set xpath="/items/item/effect_group/passive_effect[contains(@name, 'ModSlots')][@value='1,1,2,2,3,4']/@value">2,3,4,5,6,7</set>

windows

<set xpath="/windows/window[@name='windowAssemble']/panel[@name='content']/rect/rect/grid[@name='parts']/@rows">6</set>

 
This

<set xpath="/items/item/effect_group/passive_effect[contains(@name, 'ModSlots')][@value='1,1,2,2,3,4']/@value">2,3,4,5,6,7</set>




should be

<set xpath="//passive_effect[@name='ModSlots' and @value='1,1,2,2,3,4']/@value">2,3,4,5,6,7</set>




This would direct your code only to change the lines that have both ModSlots as a passive effect and ones where the value is 1,1,2,2,3,4.  The And is the operation you need to do that

 
Last edited by a moderator:
Back
Top