Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Also some strange bug with mods interaction.

For example, I create a testmod

<RemoveFrom 1 1>
var descriptions = {
    #    humanoid = '$His body is quite [color=yellow]normal[/color]. ',
}
<AddTo 1>
var descriptions = {
        humanoid = '$His body is [color=yellow]normal[/color]. ',
}


I apply BugFix v6b, restart the game, then apply my testmod and it works, output file description.gd is

var descriptions = { #Store descriptions for various body parts. Separate alternative with | sign to make description pick one at random
    bodyshape = {
        humanoid = '$His body is [color=yellow]normal[/color]. ',

I start from beginning, install bugfix, then your mod, there is lines in output that it adds

var newdescriptions = {
    bodyshape = {
        humanoid = '$His body is quite [color=yellow]normal[/color]. ',


I change my mod to edit lines added by yours

<RemoveFrom 1 1>
var newdescriptions = {
    #    humanoid = '$His body is quite [color=yellow]normal[/color]. ',
}
<AddTo 1>
var newdescriptions = {
        humanoid = '$His body is [color=yellow]normal[/color]. ',
}


And now output is broken

var newdescriptions = {
        humanoid = '$His body is [color=yellow]normal[/color]. ',
        humanoid = '$His body is quite [color=yellow]normal[/color]. ',
(+1)

The reason is fairly simple, and is not specific to this mod. When the mod system was updated for Strive version 1.0, leading comments were added to the syntax, however it had the unintended quirk of starting the line counting from the first line of the comments rather than the header. It had become a new standard before I was aware of the oversight and changing that standard would break all existing mods that have compensated for it. I try to avoid changes that break existing mods, and I also try to keep the mod system somewhat intuitive, but I haven't yet committed to breaking so many mods to fix this quirk. Since there is one line of leading comments attached to the definition for newdescriptions you will need to add one to your line count to compensate.

Headers are things like var, func and so on? And leading comments are #-comments right before the header with no lines between them, right?

#leading comment
var example = {
}
#not a leading comment
var example2 = { }

So when I use RemoveFrom and AddTo on usual header, the first line (0) is the next one after header, and with leading comment 0 line is the header itself?

(+1)

To be clear in this context, "header" is a term specific to the modding system which specifies the part of a definition that is used to identify a match from the mod files to the game files.

https://strive4power.fandom.com/wiki/Modding_Guide#Syntax_of_variables_and_their_variants:

Yes, the leading comments are limited to lines startings with a #.

https://strive4power.fandom.com/wiki/Modding_Guide#Leading_comments:

Yes, with one line of leading comment the first line is the header, and while not intended that is the only way to change or remove a header besides patching the file. Header lines were likely excluded from the count to prevent mistakes, though it does limit modding.

Okay, thanks for your help!