Skip to main content

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

The issue is exactly as you have guessed. This was an issue that I believed I had fixed at the start of February, but it seems that I made a mistake. There is code to filter out duplicates from the world, which will run whenever the save file's "modversion" does not match the value in the installed mod. Edit: the duplicates in the mansion will not be removed, but they will be given unique IDs.

The following code can be added below the last line of exploration.gd that you quoted. It should start with the same number of tabs as the as the quoted code. Note that you will need to use a decent text editor and replace the leading spaces with tabs as the forums automatically replaces them. If you change the mod file, then you will need to re-apply the mod; if you change the program file, then you are all set.

text = "$name observes you... #add after this line
for i in globals.state.allnpcs.duplicate():
    if str(rewardslave.id) == str(i.id):
        globals.state.allnpcs.erase(i)
        break

Thanks, I wasn't sure the exact code to remove them from the world.
I did change the code myself but instead of removing the duplicate, I set it up to prevent the slave granting a reward from being added to the world list until you don't (or fail to) recruit them after the fight.

There was already an if statement that primes the reward at line 539 of the mod file, I added an else and moved the code that adds the slave to the pools there.
Then I duplicated the code to add them to the world in the reward section at the end of every scenario other than successful recruitment.
It seems to have worked fine so far and has the added benefit of not posting a message about maybe seeing them again until after they leave.

Fix added moving forward. Thanks for identifying and helping fix that issue!