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

modlet help

hay guys need some help, so a while ago I had a modlet that gave weapons more mods I cant fined it and im not sure of the name of it. if someone can point me in the right direction on finding it or making it. I would be grateful for it.

 
Ok I understand what you mean ... a mod/modlet that allows weapons to have more 'item modifier slots'.

Had a quick look not found one yet , I think this was early days of A17 when i saw something similar, if i find it i will post back.

 
so fare I got this

<append xpath="/items/item/property[@class=Action1]/passive_effect[@name=ModSlots]/@value">0,9

</append>

it loads but it will not apply it. can someone help please and thank you?

 
Last edited by a moderator:
Couple thoughts on this

not sure how the numbers you use are going to align with the tiers 1,6

but in order to get your code to work you will need to add a windows.xml with the following code

Code:
<dragonslayer770mod>
<set xpath="/windows/window[@name='windowAssemble']/panel[@name='content']/rect[@depth='1']/grid[@name='parts']/@rows">10</set>
</dragonslayer770mod>
I hope that works, it is working on my Auger and chainsaw in my Motor Tools mod.

you might not need 10 and just 9 and that should work as well.

 
when u make a new weapon lvl 2-6 the mod number should be random at least the one I had before was random.

I will give this a try. i'll let u know if it works or not.

 
Couple thoughts on this
not sure how the numbers you use are going to align with the tiers 1,6

but in order to get your code to work you will need to add a windows.xml with the following code

Code:
<dragonslayer770mod>
<set xpath="/windows/window[@name='windowAssemble']/panel[@name='content']/rect[@depth='1']/grid[@name='parts']/@rows">10</set>
</dragonslayer770mod>
I hope that works, it is working on my Auger and chainsaw in my Motor Tools mod.

you might not need 10 and just 9 and that should work as well.
so u got it working can you tell me what i'm doing wrong?

config

XUI

windows.xml

<configs> <set xpath="/windows/window[@name=windowAssemble]/panel[@name=content]/rect[@depth=1]

/grid[@name=parts]/@rows">10</set>

</configs>

items.xml

<configs>

<set xpath="/items/item/property[@class=Action1]/effect_group[@name=ModSlots]/@value">0,10</set>

</configs>

Modinfo.xml

<?xml version="1.0" encoding="UTF-8"?>

<xml>

-<ModInfo>

<Name value="More Weapon Mods"/>

<Description value="Adds More Modifier Slots "/>

<Author value="dragonslayer770"/>

<Version value="1.0"/>

<Website value=""/>

</ModInfo>

</xml>

it would help and thank you.

 
In items.xml you have to specify the 'item name' that you wish to apply the new 'ModSlots' Value too.

For single item for example

<set xpath="/items/item[@name=gun44Magnum] rest of path code here

To do things in a group of items such as melee you can use the 'contains' statement

<set xpath="/items/item[contains(@name, 'melee')] rest of path code here

Each tool and weapon is in its own node so you have to path through to the value you want to change

 
Last edited by a moderator:
This may help you get the syntax for the items and you have to be careful as some items such as 'meleeBoneShiv' have no modslots and using 'contains' can have its problems if used.

Code:
<set xpath="/items/item[@name='meleeToolStoneAxe']/effect_group[@name='Base Effects']/passive_effect[@name='ModSlots' and @operation='base_set']/@value" >0,10</set>
But the example I gave before for 'melee' in the contains after looking at the amount of item names you would have to change would be problematic in the above case example.

'gun' is a better choice for a contains statment as all have currently max 6 ModSlots I believe

 
Last edited by a moderator:
In items.xml you have to specify the 'item name' that you wish to apply the new 'ModSlots' Value too.
For single item for example

<set xpath="/items/item[@name=gun44Magnum] rest of path code here

To do things in a group of items such as melee you can use the 'contains' statement

<set xpath="/items/item[contains(@name, 'melee')] rest of path code here

Each tool and weapon is in its own node so you have to path through to the value you want to change
I tried this

<configs>

<set xpath="/items/item/contains(@name,'gun')]/property[@class=Action1]/@value">0,10</set>

</configs>

but no luck and the windows one will not apply .

 
You have the example code posted earlier ;)

[contains(@name, 'melee')]

So replacing that with gun

Code:
<set xpath="/items/item[contains(@name, 'gun')]/effect_group[@name='Base Effects']/passive_effect[@name='ModSlots' and @operation='base_set']/@value" >0,10</set>
I am not sure about the windows.xml as Drconfused has that code working in his modlets for power tools, perhaps download his modlet and have a look at the code ?

The best way to work on this is to choose 1 weapon/tool

work with the code on that and check to see if that works then work your way through the rest.

 
You have the example code posted earlier ;)
[contains(@name, 'melee')]

So replacing that with gun

Code:
<set xpath="/items/item[contains(@name, 'gun')]/effect_group[@name='Base Effects']/passive_effect[@name='ModSlots' and @operation='base_set']/@value" >0,10</set>
I am not sure about the windows.xml as Drconfused has that code working in his modlets for power tools, perhaps download his modlet and have a look at the code ?

The best way to work on this is to choose 1 weapon/tool

work with the code on that and check to see if that works then work your way through the rest.
I got it working thank you but it doesn't go up to 10 the highest I seen is 6 but lvl 2 has 2 and lvl 3 has 4 and lvl 4 has 5 and lvl 5 has 6 and lvl 6 has 6.

thank you and I'll look at Drconfused mod.

 
so I got the modifiers to show up but at lvl 2 there is 4 mods, lvl 3 there is 5, lvl 4, 5, 6 have 6 mods.

if it matters im put the mods at 3,9.

mod name More_weapon_mods

<More_Weapon_Mods>

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

</More_Weapon_Mods>

I looked at Drconfused mod and its set up the same way but mine doesn't work right.

 
Are the full 10 slots showing in the UI for the modifiers

Try this for the item/items this is the only difference i see in the Xpath code /effect_group/passive_effect

Code:
<set xpath="/items/item[contains(@name, 'gun')]/effect_group/passive_effect[@name='ModSlots' and @operation='base_set']/@value">3,8</set>
From Drconfused modlet

Code:
<set xpath="/items/item[@name='meleeToolAuger']/effect_group/passive_effect[@name='ModSlots' and @operation='base_set']/@value">3,8</set>
 
Last edited by a moderator:
no they don't only 6 modifers show.

here's the code for the guns

<set xpath="/items/item[contains(@name, 'gun')]/effect_group[@name=Base Effects]/passive_effect[@name=ModSlots' and @operation='base_set]/@value" >3,9</set>

and this on is for melee weapons

<set xpath="/items/item[@name=meleeToolStoneAxe]/effect_group[@name=Base Effects]/passive_effect[@name=ModSlots' and @operation='base_set]/@value" >3,9</set>

I used the same code for all melee weapons.

this is my mod if u need it

https://www.dropbox.com/sh/jm8gkr0so8tcvgh/AADGUX_WoYhT__85xn-XrWBfa?dl=0

 
Last edited by a moderator:
no they don't only 6 modifers show.
I have not tried the Drconfused modlet myself (shame on me ) I will install it and see what I can find out.

Unless you have the windows.xml in wrong place is the only other thing i can think of as to why the extra slots dont show up

Yourmodname\config\XUi

Well I installed Drconfused modlet , Auger shows six modifier slots also now I am confused lol

Update : Ok so I found this note in Drconfused modlet description

***note this will not update your existing items and requires them to either be crafted or found new

So because i spawned them in they don't show the changes ... should have read the small print :crushed:

 
Last edited by a moderator:
Back
Top