Jump to content

modlet help


Recommended Posts

https://7daystodie.com/forums/showthread.php?112120-Melee maybe? Or under my modlets there are modifiable baseball bats

 

so I was looking and what I would like is a modlet that makes this <passive_effect name="ModSlots" operation="base_set" value="0,9" tier="1,6"/> a modlet. I cant remember how to wright it and I cant fined the thread about it.

Link to comment
Share on other sites

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

 

<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.

Link to comment
Share on other sites

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

 

<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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

<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

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

You have the example code posted earlier ;)

 

[contains(@name, 'melee')]

 

So replacing that with gun

 

<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.

Link to comment
Share on other sites

You have the example code posted earlier ;)

 

[contains(@name, 'melee')]

 

So replacing that with gun

 

<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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

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

 

From Drconfused modlet

<set xpath="/items/item[@name='meleeToolAuger']/effect_group/passive_effect[@name='ModSlots' and @operation='base_set']/@value">3,8</set>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

When you load the game up are you getting any warnings .. I have other UI Modlets installed and the Drconfused one would not load the windows.xml.

 

Its possible the windows.xml is not applying ...this will show up if you press F1 and scroll through the logs

Link to comment
Share on other sites

When you load the game up are you getting any warnings .. I have other UI Modlets installed and the Drconfused one would not load the windows.xml.

 

Its possible the windows.xml is not applying ...this will show up if you press F1 and scroll through the logs

 

yes I get this one

WRN XML patch for "XUi/windows.xml" from mod "More_Weapon_Mods" did not apply: <set xpath="/windows/window[@name=windowAssemble]/panel[@name=content]/rect[@depth=1]/grid[@name=parts]/@rows"

Link to comment
Share on other sites

yes I get this one

WRN XML patch for "XUi/windows.xml" from mod "More_Weapon_Mods" did not apply: <set xpath="/windows/window[@name=windowAssemble]/panel[@name=content]/rect[@depth=1]/grid[@name=parts]/@rows"

 

I get same with Drconfused modlet, I will look into this a bit more tonight when i get home ... its probabaly a conflict with another modlet or mod for my errors . Drconfused thread has no reports of his auger and chainsaw mods not working properly and they are using same code as yours.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...