[Request] JSON-Cluster for Trait-Sets

Hello there!

Your game got some attention of mine, as a friend of mine asked me if I were able to mod the game for his own needs, as I am kinda skilled in creating/adjusting/manipulating and such with json logic and Unity after all.

I tried looking into the assembly but wasn’t able to find some json structures inside (no clue if they can be even saved inside a function anyways). Construction, furniture, configuration (global, gameworld settings) and so on ain’t an issue, since they were mostly available on the modding page.
The only thing we miss are adjusted traits to our likings.

I was able to find this segment of code:
public static int GetTraitPoints(TraitType trait)
{
switch (trait)
{
case TraitType.Pacifist:
return 6;
case TraitType.BattleHardened:
return -4;
case TraitType.Optimist:
return -3;
case TraitType.Pessimist:
return 3;
case TraitType.Killer:
case TraitType.Xenophobe:
case TraitType.Xenophile:
return 0;
case TraitType.GoodHealth:
return -3;
case TraitType.BadHealth:
return 3;
case TraitType.Overeater:
return 2;
case TraitType.Survivor:
return -5;
case TraitType.Insomnia:
return 2;
case TraitType.Tireless:
return -2;
case TraitType.Smart:
return -4;
case TraitType.Dumb:
return 4;
case TraitType.FavoriteFoodPumpkinStew:
case TraitType.FavoriteFoodFruitSalad:
case TraitType.FavoriteFoodAppleStrudel:
case TraitType.AnimalLover:
return -1;
case TraitType.AllergicToApples:
case TraitType.AllergicToPotatoes:
case TraitType.AllergicToTomatoes:
case TraitType.Vegetarian:
case TraitType.LactoseIntolerant:
return 1;
case TraitType.Limping:
return 4;
case TraitType.Diplomat:
return -3;
case TraitType.LovesSummer:
return -2;
case TraitType.LovesSpring:
return -2;
case TraitType.HatesWinter:
return 2;
case TraitType.HatesFall:
return 2;
default:
return 0;
}
}

But how to actually convert it into a logic-string?
"traitLogic/TraitType/HatesWinter/Cost": 1;? Like this?

Any help would be appreciated! Thank you! And continue with this amazing game and make it worth a while, as there are quite some stuff missing atm.

Thanks for the nice words! Check out our latest news post to read up on the state of the game.

About the code: This is what happens when we haven’t exposed stuff to modding. You won’t be able to change it by a simple configuration file. Instead, you can make a script mod and use Harmony to insert an if before the code that returns different values than the code would. Check out the modding tutorials if necessary. Also @Loikas has a bunch of experience with it.

1 Like

I just created a mod that does exactly this! You can find it in the workshop

1 Like

This is a great Mod :+1:

People playing on Calm can have some control on the worst of the negative points and eases the need to micro manage everyone all the time :sweat_smile:

Now all we need is for a web site for GOG users to get their downloads :stuck_out_tongue_winking_eye: