Cultist Simulator

Cultist Simulator

Welcome to the Sixth History
"The Secret Histories are five in number. If there were an unsanctioned, unknown, unlawed Sixth History… it would be your playground."
Learn More
Affliction - how is it generated code-wise?
So I am trying to mod the Season of Affliction:
I want to make it draw and consume vitality, and then if that is not available draw in the other options (health or wound, etc.).
I am trying to figure how exactly does the code orders the Season to turn health into affliction, but I couldn't find the code it says 'affliction: 1' or something akin to it.

Any idea?
< >
Showing 1-5 of 5 comments
Chelnoque  [developer] 3 26 Jul, 2021 @ 9:34pm 
It happens in a recipe with "id": "sickness" ; it uses cross trigger "fallsick" (stated in "aspects" of the recipe) to change the present Health card. Cross triggers (also known as "xtriggers") allow to specify how the card will change if some another element or aspect is present in the same recipe (latter known as "catalysts"). You can then force a presence of a certain catalyst by stating its presece in the recipe aspects, even if there is no real catalyst card in the recipe. Hope that makes sense. You can learn more about them in the modding guide[docs.google.com].

Anyways, in Health's xtriggers, it's stated that it'll turn into Sickness when "fallsick" is also present. Since the "fallsick" is present in that recipe, this all happens.

(just in case, from what you've described you want to do - you don't need to modify the "sickness" recipe directly; you just need to overwrite "linked" recipes for "presickness" recipe to go into your custom Vatality-pulling recipe, and only then, if no Vitality is present, to link it into the "sickness")
MensIuguolo 15 26 Jul, 2021 @ 10:25pm 
Wow, this guide is priceless!
I wish I found it earlier, would have spared me a lot of brain-busting.
Thank you so much for the detailed explanation!
MensIuguolo 15 26 Jul, 2021 @ 10:28pm 
Originally posted by Mr. Chelnoque:
(just in case, from what you've described you want to do - you don't need to modify the "sickness" recipe directly; you just need to overwrite "linked" recipes for "presickness" recipe to go into your custom Vatality-pulling recipe, and only then, if no Vitality is present, to link it into the "sickness")

As I understand it, 1 slot gets filled once, by order of requirments. So if I simply alter this:
"slots": [
{
"id": "Affliction",
"label": "Health",
"required": {
"health": 1,
to be this:
"slots": [
{
"id": "Affliction",
"label": "Health",
"required": {
"vitality": 1,
"health": 1,
It would draw in Vitality as priority, and then the 'fallsick' won't be triggered because it does not appear in Vitality's definition?
Chelnoque  [developer] 3 26 Jul, 2021 @ 11:57pm 
As I understand it, 1 slot gets filled once, by order of requirments.
Sadly, this isn't true. Basically, if something is enclosed in "[ ]", that means it's a "list", and it keeps the order of definitions (linked recipes do, for example). But if something enclosed in "{ }", that means it's a "dictionary", a set of key/value pairs, and it doesn't keep the order. As you can see, "required" property of the slot is enclosed in { }, so it won't keep the order, and will pull things at random. So *sometimes* it will pull the vitality, and sometimes - Health. Maybe that's good enough for you.
But, as I said, to *guarantee* vitality being pulled first, you need to add an intermediary recipe in between "presickness" and "sickness", that'll have a slot specifically for Vitality, but not for Health.
MensIuguolo 15 27 Jul, 2021 @ 12:47am 
Originally posted by Mr. Chelnoque:
As I understand it, 1 slot gets filled once, by order of requirments.
Sadly, this isn't true. Basically, if something is enclosed in "[ ]", that means it's a "list", and it keeps the order of definitions (linked recipes do, for example). But if something enclosed in "{ }", that means it's a "dictionary", a set of key/value pairs, and it doesn't keep the order. As you can see, "required" property of the slot is enclosed in { }, so it won't keep the order, and will pull things at random. So *sometimes* it will pull the vitality, and sometimes - Health. Maybe that's good enough for you.
But, as I said, to *guarantee* vitality being pulled first, you need to add an intermediary recipe in between "presickness" and "sickness", that'll have a slot specifically for Vitality, but not for Health.

Hmm... Ok. Maybe I'll define it with sub-routines, the way of "deathofthewoundedfollower". Making it first draw on Vitality, then a sub-event drawing health when vitality isn't available. Thanks!

New Idea: add a slot for Vitality with alt
Last edited by MensIuguolo; 27 Jul, 2021 @ 12:48am
< >
Showing 1-5 of 5 comments
Per page: 1530 50