Jump to content

Mod fails to load, clearly I done something wrong.


drats

Recommended Posts

So I am a new modder. Example I haven't successful made a mod yet that utilizes xpaths. this was my first attempt but the game fails to load the mod even when it is in the mod folder. 

 

Mod Info

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

<xml>
<ModInfo>
    <Name value="Drats Skills" /> <!-- (Required) Internal name, like an ID, of the mod. Should be globally unique, like an author prefix + name. Only allowed chars: Numbers, latin letters, underscores, dash -->
    <DisplayName value="Drats Skills" /> <!-- (Required) Name used for display purposes, like shown in the mods UI at some point. Could be the same as you would later on use on workshop or wherever mods get distributed -->
    <Version value="0.1" /> <!-- (Required) SemVer version of the mod. Has to be in the format major.minor[.build[.revision]] (i.e. build and revision can be left out, recommend using them though as typically done with Semantic Versioning -->
    <Description value="Changes some perks" /> <!-- (Optional) More text to show on UIs -->
    <Author value="Drats666" /> <!-- (Optional) Name(s) of the author(s) -->
   	<Website value="N/A"/>
</ModInfo>
</xml>

 

and the mod itself.

Config\progression.xml

<configs>
      <!-- Changes lockpicking to be actually useful and make sense to spend points on. -->
      <set xpath="//perk[@name='perkLockPicking']//passive_effect[@name='LockPickTime']/@value">.25,.75</set>
      <set xpath="//perk[@name='perkLockPicking']//passive_effect[@name='LockPickBreakChance']/@value">.33,100</set>
	  
	  <!-- Changes robotics to be more useful -->
	  <set xpath="//perk[@name='perkTurrets']//passive_effect[@name='JunkTurretActiveCount']/@value">9</set>
      <set xpath="//perk[@name='perkTurrets']//passive_effect[@name='JunkTurretActiveRange']/@value">10,20,40,60,80,180</set>
</configs>

 

The values are basically placeholders until I figure out what my group wants them to be. I have tested them by giving myself EXP, buying the skills effected and testing them. However it is clear by my broken picklocks and my limit of 3 turrets that they arent working properly. any help would be appreciated as to why.

Link to comment
Share on other sites

First, do you know it's not loading. Looking at the console log you should see a message right near the beginning if it found the mod. If it didn't, it's not installed properly. Later there will be error messages if it's not working.

 

For the turret active count the xpath won't evaluate to a specific node. Here is my xpath to set the initial active count to 2, and it selects the right "value" with "@operation='base_set'.

 

<set xpath="/progression/perks/perk[@name='perkTurrets']/effect_group/passive_effect[@name='JunkTurretActiveCount' and @operation='base_set']/@value">1</set>

 

It's possible your values are too high as well. That's a lot of turrets, and 180m won't even be an adjacent chunk. Maybe start with values close to vanilla and expand when working.


I haven't done anything with lockpicking, but your lockpickbreakchance is reducing it by 33% up to 10000%. I think you want (.33, 1) which would be 33%,100%.

Link to comment
Share on other sites

Not sure why you started a second thread when you were receiving assistance in the first thread you posted

 

 

I did mention that the name of the mod should not have a space in it and suggested you use an underscore between Drats and Skills.  So instead of

 

<Name value="Drats Skills"/>

 

in your Modinfo file, you should do something like

 

<Name value="Drats_Skills" />

or 

<Name value="DratsSkills" />

 

If you notice in the description information for that specific line, it notes that you should only use:

 

Only allowed chars: Numbers, latin letters, underscores, dash

If your mod is not loading, that could be one of the causes (assuming you have the mod in the correct location)

 

Also your Modinfo structure might be causing the issue.  This is from one of my mods that I have had no issues getting it to load up properly

 

<?xml version="1.0" encoding="UTF-8"?>
<xml>
    <Name value="BFT2020_MCGA" /><!-- Unique name for your modlet --> 
    <DisplayName value="A21 Broken Items and Trader tweaks" />
    <Version value="21.0.1.001" compat="A21"/><!-- versioning number compat optional -->
    <Description value="Various changes to trader and drops to increase crafting importance" /> <!-- (Optional) More text to show on UIs -->
    <Author value="BFT2020" />
    <Website value=""/> 
</xml>

 

Note in my example I don't have a space in the Name line (I use an underscore).  In addition, my structure is just

<xml>
</xml>

 

Yours is 

 <xml>
   <ModInfo>
   </ModInfo>
</xml>

 

Not sure if that is your issue, but it is what I am seeing different from what you posted and the mod I am able to load up successfully on my computer.

 

Also, in the other thread, I mentioned that a good troubleshooting method is to go to the ConfigsDump folder where you game is saved as it writes into xml files the code for each one.  So when you modify Progression.xml through your mod, the game creates a Progression.xml file in the save game location that has the vanilla code and all changes made by any mods you installed.  So if I wanted to check my code, I would just open that file from the saved games location and search for BFT2020_MCGA in Notepad++.  It will then take me to every instance where the game made changes to the vanilla code based on this mod.

Link to comment
Share on other sites

 

Just wanted to add to the good advice that the log files often give clues as to what causing issues.

Your log file will be in

<drive>:\Users\<username>\AppData\Roaming\7DaysToDie\logs

Look for lines with warning (WRN) or error (ERR) tags.

 

as a side note,

<xml>
   <ModInfo>
   </ModInfo>
</xml>

was the old xml format before A21. It should still work for A21 but will generate warnings in the log files.

cheers

Link to comment
Share on other sites

Posted (edited)

Sorry for the late response, haven't had much time to work on this. I did manage to get the game to load the mods, turns out there was a missing / in it. 

On 5/3/2024 at 12:12 PM, BFT2020 said:

Not sure why you started a second thread when you were receiving assistance in the first thread you posted

Actually forgot I made that post.

 

On 5/3/2024 at 10:54 PM, JoeSloeMoe said:

as a side note,

<xml>
   <ModInfo>
   </ModInfo>
</xml>

was the old xml format before A21. It should still work for A21 but will generate warnings in the log files.

cheers

the game complained about the modinfo lines so I ended up removing them. a tool I was using wanted them in but I since ditched the tool.

 

On 5/3/2024 at 12:12 PM, BFT2020 said:

I did mention that the name of the mod should not have a space in it and suggested you use an underscore between Drats and Skills

 

Also, in the other thread, I mentioned that a good troubleshooting method is to go to the ConfigsDump folder where you game is saved as it writes into xml files the code for each one.  So when you modify Progression.xml through your mod, the game creates a Progression.xml file in the save game location that has the vanilla code and all changes made by any mods you installed.  So if I wanted to check my code, I would just open that file from the saved games location and search for BFT2020_MCGA in Notepad++.  It will then take me to every instance where the game made changes to the vanilla code based on this mod.

The modname both in the folder and in modinfo was changed to have a _ instead of a space. 

As fir the config dump, when I go to my saved games location I do not see any config really. I even went and deleted all my saved in game but yet  I had files in my saved games location. Currently it has just profiles and serveradmin in the save folder at C:\Users\drats\AppData\Roaming\7DaysToDie\Saves. It is weird because I also deleted all my worlds from C:\Users\drats\AppData\Roaming\7DaysToDie\GeneratedWorlds but yet the game registers that I have a world called myworld which is nothing but a flat world with trees..

and C:\Users\drats\AppData\Roaming\7DaysToDie\SavesLocal has a bunch of folders ranging from 2022 to January 2024. nothing newer. but yet I have made new saves and since erased all my saves except my current testing ones.

 

Since the mods are showing up in game now this thread is going to be closed as the issue is resolved. If I have any other issues I will use the thread I forgot about or make one using my mod's name so it is easier to keep track of.

 

Thank you all for your help.

Edited by drats
forgot to say thank you (see edit history)
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...