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

V2 of ModInfo.xml Template (for game V1.x)

I am using the following in my ModInfo

<?xml version="1.0" encoding="UTF-8" ?>
<xml>
    <Name value="EpicSpire's Quality ModSlot Boost" />
    <DisplayName value="EpicSpire's Quality ModSlot Boost" />
    <Version value="1.0.0.0" />
    <Description value="Increases the ModSlots based on Quality and Tier" />
    <Author value="TheEpicSpire" />
    <Website value="www.7daystodie.com" />
</xml>


but when i go to test my mod, I am getting a red line in my console saying : EpicSpire's Quality ModSlot Boost/ModInfo.xml does not define a valid non-empty Name (^[0-9a-zA-Z_\-]+$), ignoring

can someone explain to me what i am doing wrong?

 
Try a more boring Name value:  epicSpire_quality_modslot_boost


Thank you

ok, that works. is it because the name value has to be all one "word"/no spaces? or is it as simple as the name value has to be different than the display name?

 
Last edited by a moderator:
xyth said:
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
    <Name value=" " />
    <DisplayName value="   " />
    <Description value="    " />
    <Author value="   " />
    <Version value="1.0.0.1" />
    <Website value=" " />
</xml>
How does one go about using this to create a mod?

 
There is a good guide on xpath and xml to start with



I would recommend doing something small at first to learn the basics before trying something more complicated 
 
Turns out, there is a mod that exists that does what I want (and maybe it works fine for 1.0 . . . in which case I get an excuse to prolong procrastination on learning to mod Unity games  :)

https://www.nexusmods.com/7daystodie/mods/3145

But if not, between the resource you have provided and that mod I should be able to get my start. Thanks again!

 
Last edited by a moderator:
EpicSpire said:
EpicSpire's Quality ModSlot Boost/ModInfo.xml does not define a valid non-empty Name (^[0-9a-zA-Z_\-]+$), ignoring

can someone explain to me what i am doing wrong?


FWIW that error message is give you the RegEx that is telling you what is considered a valid name. You can drop ^[0-9a-zA-Z_\-]+$ into RegEx101.com for the explanation:

^ asserts position at start of a line


[SIZE=14.4px]Match a single character present in the list below[/SIZE]




[0-9a-zA-Z_\-]



+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
a-z matches a single character in the range between a (index 97) and z (index 122) (case sensitive)
A-Z matches a single character in the range between A (index 65) and Z (index 90) (case sensitive)
_ matches the character _ with index 9510 (5F16 or 1378) literally (case sensitive)
\- matches the character - with index 4510 (2D16 or 558) literally (case sensitive)



$ asserts position at the end of a line
So, letters (both cases), numbers, dashes and underscores are valid characters.

 
FWIW that error message is give you the RegEx that is telling you what is considered a valid name. You can drop ^[0-9a-zA-Z_\-]+$ into RegEx101.com for the explanation:

^ asserts position at start of a line


[SIZE=14.4px]Match a single character present in the list below[/SIZE]




[0-9a-zA-Z_\-]



+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
a-z matches a single character in the range between a (index 97) and z (index 122) (case sensitive)
A-Z matches a single character in the range between A (index 65) and Z (index 90) (case sensitive)
_ matches the character _ with index 9510 (5F16 or 1378) literally (case sensitive)
\- matches the character - with index 4510 (2D16 or 558) literally (case sensitive)



$ asserts position at the end of a line
So, letters (both cases), numbers, dashes and underscores are valid characters.
thanks, i figured out what my problem was but knowing what the error message means helps me for future mistakes. Thanks a ton

 
Back
Top