Jump to content

Can't mod blocks entity in A20


Kayle_Silver

Recommended Posts

Hi

I've used to Mod this game since A16 to A19, however since the latest A20 release the game resets config files, specifically the blocks.xml file but not the progression.xml files - I've even tried to put the file in read-only mode but in that case the won't load at all; I've tried to mod both the general config files and the configsdump files specific of the saved game - no change, the game simply resets blocks.xml file every time it loads, removing any modifications I made.

 

Anyone knows a workaround for this? I play 7 Days to Die on Steam, thanks ~

Link to comment
Share on other sites

Yes, it's called making a modlet using xpath.  Then every time you load up the game, your modlet modifies the values in the files to what you want.  The game won't modify anything in the mods folder.

 

People in the forums can help you figure it out, but the link below is a good starting point on getting yourself up to speed on using xpath.

 

 

Link to comment
Share on other sites

Weird since I could "Simply" edit the xml files directly up until A19... also, I meant no disrespect, but that thread is really badly written, it assumes way too much stuff to be obvious and skips explanations everywhere, I couldn't really follow it at all, and I've done modding before on this and other games as well, but the way it "explains" is just... horrendous.

I'll look into some other resources, thx anyway

Link to comment
Share on other sites

You need to have a basic understanding of coding in order to do xpath.  The thread itself is not badly written, you just have to be at a specific level first.  I started creating my own mod about a few months ago and the link I provided was an excellent source of information to get me started.

 

Editing the games xml files themselves is not the best way of doing mods as they get updated by steam all the time (and at hotfixes).

 

This is an example of something I have written up to modify the items variables after the game loads up the original items.xml file and my items.xml file

 

<config>

<!-- ***************************************************************************************************************  -->
<!--  This section covers changes to weapons  -->
<!--  Changes to Rifles, including T0 changes   -->
    <append xpath="/items/item[@name='gunRifleT1HuntingRifle']/property[@name='Tags']/@value">,T1Rifle,T1Crafting</append>        
    <append xpath="/items/item[@name='gunRifleT2LeverActionRifle']/property[@name='Tags']/@value">,T2Rifle,T2Crafting,revolver</append>    
    <append xpath="/items/item[@name='gunRifleT3SniperRifle']/property[@name='Tags']/@value">,T3Rifle,T3Crafting</append>    
    <append xpath="/items/item[@name='gunRifleT0PipeRifle']/property[@name='Tags']/@value">,PipeRifle,noMods</append>            
    <set xpath="/items/item[@name='gunRifleT0PipeRifle']/effect_group/passive_effect[contains(@name,'ModSlots')]/@tier">0</set>    
    <set xpath="/items/item[@name='gunRifleT0PipeRifle']/effect_group/passive_effect[contains(@name,'ModSlots')]/@value">0</set>    
    <remove xpath="/items/item[@name='gunRifleT0PipeRifle']/property[@name='RepairTools']"/>
    <set xpath="/items/item[@name='gunRifleT0PipeRifle']/property[@class='Action0']/property[@name='Magazine_items']/@value">ammo762mmBulletBall</set>    
    <set xpath="/items/item[@name='gunRifleT2LeverActionRifle']/effect_group/passive_effect[contains(@name,'EntityDamage') and contains(@operation,'base_add')]/@value">-11</set>                    
    <set xpath="/items/item[@name='gunRifleT2LeverActionRifle']/property[@class='Action0']/property[@name='Magazine_items']/@value">ammo44MagnumBulletBall,ammo44MagnumBulletHP,ammo44MagnumBulletAP</set>    
    <setattribute xpath="/items/item[@name='gunRifleT0PipeRifle']/property[@name='DegradationBreaksAfter']" name="value">true</setattribute>

 

This snippet of code (along with code changes to the recipes and progression files) allowed me to limit aspects of the pipe rifles, change the ammo type of the lever action rifle, and introduce Q6 crafting ability through a gated approach.  Guppycur also has a discord channel where those who mod or start to mod can go for assistance and ask questions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...