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

I can't say that I've had any particular interest in the sex interaction text. Though your not the first to mention saving and restoring the daily reports, it was never added because it seemed like it would bloat the save file and could be tedious to implement. The text is rather easy to find and access, but there are no convenience functions for saving text to a file. The script files are plain text and can be edited with any decent text editor, though without the appropriate skills in coding that won't help much. Also, the Debug mod is extremely helpful if you edit scripts since it provides descriptive errors instead of simple crashes.

The file operations can be found in globals.gd. The sex text is found in "get_node("Panel/sceneeffects").text" of newsexsystem.gd, and the last function of the interaction is "func endencounter():". The daily reports are found in "text0.text", "text1.text", and "text2.text" of Mansion.gd, though only in the function "func _on_end_pressed():"

The simplest approach would add a function like this to globals.gd (but note that this site converts the leading tabs to spaces so you would have to convert them back):

func saveText(path, text):
    var file = File.new()
    var retCode = file.open(path, File.WRITE)
    if retCode == OK:
        file.store_line(text)
        file.close()
    else:
        printErrorCode("Writing file " + path, retCode)

Then whenever you want to save the text you add a line like one of these :

    globals.saveText("user://sexText.txt", get_node("Panel/sceneeffects").text)
    globals.saveText("user://dailyReport0.txt", text0.text)

The end of a function is a safe place to add it and it will need a tab. That will put the text into a text file in user data, near the save files. Each time it is saved it will replace the contents of that file.