Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

globals.gd is a strange file that is used for far too many things simply because it can be accessed from any other file. Its primary usage is as a data hub that provides links to most of the other files where items and people are handled. Its secondary usage is a easy to access storage for data and functions that should actually be located somewhere else. It does handle loading and saving various files. I'm not sure if it can be said to set the game parameters, because that phrase is rather ambiguous and I don't feel that it matches the complexity of Strive's code.

The save file uses the JSON format and using an editor capable of handling that format will make things much more clear. I tend to use https://jsoneditoronline.org/. The save file has an object called "state" from class "progress", which stores most of the data. That includes "nonsexactions" and "sexactions", which are the remaining number of interactions available to to the player.  The game does not perform any kind of checks on these values so feel free to abuse them if you want; however, note that changing the type of these values to something besides a simple numeric type will break the game. The number of turns in an interaction are not saved but stored in variables.gd, and those values are best edited using the Constants mod, which comes with the game and ensures that the types of the values are not changed.

The game intentionally keeps some data about slaves even after they are gone, and unintentionally keeps other data (sometimes for slaves you have never had). There have been some improvements to that in the Bugfix mod, but refining that has only happened recently. I try not to spend too much time cleaning up things that aren't broken. Sex partners track ids simply to prevent double counting people, and the rest of the time the game just uses the length of the list. There's no reason for the sex partner lists to care about the current state of any of the slaves as it is simply a record of the past. The places where the current state of the slaves matters is the "relations" and "relativesdata", though both systems are designed to more or less deal with spontaneous disappearances.

Strive uses the gdscript language as part of the Godot Engine. This language uses whitespace(generally just tabs and new lines, but spaces are considered by the engine) to format most of the code so it expects code to be tabbed to specific levels in the appropriate places. Generally the code should only increase the level of tabbing after lines that end with a colon(":"). This increase in tabbing marks that code as being inside the section of code started by the line with the colon, and a line that reduces the level of tabbing marks the end of a section. Note, most code must be inside the appropriate section, so it cannot have zero tabs. The end of a function is the last line within the tabbing section created by the function's colon. Example("#" marks any text after it on that line to be a comment, or notes rather than code):

func example1(arg1):
    var roses = "red"
    var violets = "blue" # last line of function
    # safe place to add
func example2():
    # safe place to add outside of condition
    if "red" != "blue":
        print(null)
        # safe place to add inside of condition above
    # not a safe place to add, unless this line starts a new section for next line
        print("done") # last line of function
    # safe place to add

If you wish to learn more about coding in order to mess about on your own without breaking stuff as often, then I recommend taking an online tutorial for the basics of Python, which is very similar to gdscript. https://www.w3schools.com/python/python_syntax.asp