Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi Thank you for producing this Mod. I have a Script error produced after selecting Finish Day (164 days in). Not sure what triggered it.

SCRIPT ERROR: set_genealogy: Invalid get index '-1' (on base: 'Dictionary').      At: res://files/scripts/characters/constructor.gd:548

Thanks.

(+1)

This ones a bit tricky, but basically it's complaining that a person was created with an id of '-1' and the code mentioned in the error tried to access a non-existant entry in relativesdata. '-1' is not a standard id as they should all be positive numbers, which means that it was set to '-1' by the mod. This leads us to globals.gd where essentially non-existent fathers, or fathers that are actually animals rather than people, are given ids of '-1' before calling the function that gives the error. In vanilla people do not get relativesdata unless they have relatives, but Aric's mod changes that in expansionsetup.gd by giving it to everyone (I would also note that it attempts to exclude the player, but this fails as "globals.player" is not set until after the person object has been returned, and it would've caused this error if it worked). As the non-existent fathers do not need relativesdata , I will conclude that the fault lies with the constructor code as it incorrectly assumes that everyone would have relativesdata.

The simplest fix is to alter the if statement on line 546 of constructor.gd from

if person.npcexpanded.mansionbred == false:

to

if person.npcexpanded.mansionbred == false && globals.state.relativesdata.has(person.id):

Hi. Maybe I'm blind but I don't see this line in the 1.1 version of the mod. in the Constructor.gd on line 546 I see:

if person.genealogy[temprace] == 0 && rand_range(0,100) <= globals.expansionsettings.secondarybeastracialchance + sametypeweight:

Its in your mod folder right? under directory:

Users\NAME\AppData\Roaming\Strive\mods\AricsExpansion\scripts\characters\constructor.gd

Closest line I can find that matches yours in the constructor.gd is under 406:

#Sibling Match Relatives

if person.npcexpanded.mansionbred == false:

(+1)

Sorry, I gave the line number for the script after it had been applied. Line 406 is indeed the correct line for the file in the mod folder.

Perfect. Thanks :)

Hi Thank you for looking at this and your advice.