Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

You found one of the messier parts of the game's code. Godot provides the option to set custom getter and setter functions for variables in a class. In this case, the class "progress" is found in ".../files/globals.gd". 

var condition = 85 setget cond_set

This variable declaration establishes a custom setter function for "condition", so any attempt to assign a value to "condition" outside the setter function will call the setter function with the new value as the argument for the function. Simply changing "condition = -X" to "condition -= X" causes the resulting value of "condition" to be "condition*2-X".

In order to make the switch, you would need to remove the setter function and update every line in the game that assigns to "condition". Note that all changes to "condition" are multiplied by "conditionmod", which is 1.3, so you would need to include this multiplier in every line when updating them otherwise the value would be reduced.