Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I've been out hunting slaves and ran into something odd, not sure if it has been reported before or if it is a known issue. 

In one trip I rescued and recruited the same person twice, like exactly the same. So much the same that after selling both to the market and click on either of them in the list of slaves for sale they both get highlighted. Looking through the list of slaves in the shop some more I see that it has happened at least once before as I have 2 copies of another person in there.

My best guess is that when you recruit them in the reward screen for rescuing a captive they aren't getting removed from the lists of people in the world. Which is kind of annoying, I am recruiting them to remove them from the pool and I don't want to ruin my reputation by killing them, or capturing them which would also make them less valuable unless I take the time to calm them down afterwards.

(1 edit)

Looking through the code I can confirm my suspicion the else starting at line 801 of exploration.gd in the AricsExpansion mod files is the part of code that recruits the rescued captive but doesn't seem to do anything to remove them from the world.

          else:
               rewardslave.obed = 85
               rewardslave.stress = 10
               globals.slaves = rewardslave
               text = "$name observes you for some time, measuring your words, but to your surprise, $he complies either out of symphathy, or out of the desperate life $he had to carry. "

(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!