- Jan 23, 2021
- 285
- 393
A dictionary is just a way to store a bunch of data in the code, such as a list of all positive traits. (although a dictionary is technically not a list, but let's not get into that)I'm thinking about adding some traits that fits my kinks...
So I'm opening the BKtraits.rpy and can simply add my traits in one of the three columns, right?
(I know there is a manual in the file but I was not able to find out was the dictionary means.)
Maybe some of you could help?
Yes, you can simply add new traits to the gold_traits, pos_traits, neg_traits parts of the code.
If you want to keep using trait king, then add your new traits to /Mods/Trait King/Trait King.rpy instead. (The mod kinda throws away the dictionaries from BKtraits.rpy and starts over from scratch)
Effects is the most difficult part to fully comprehend, because it's so broad and can be used to influence almost anything in the game. Traits are effects, Spells are effects, Consumables and items are effects, Perks are effects, etc. I recommend simply browsing through BKtraits.rpy or Trait King.rpy for inspiration. Below is a short introduction that's given where the Effect class is defined.
Code:
## Type defines how the effect work
# Boost applies a % increase (or decrease). Value is a float number
# Change applies a fixed value change which is not limited by stat max. Change can be reversed. Value is a number.
# Gain applies a one time permanent gain and is limited by stat max. Gain cannot be reversed. Value is a number.
# Set replaces a base value with the new value
# Allow unlocks a brothel option
# Special is hard-coded
## Value depends on the effect type. It is often used for checking the presence of an effect, so set it to 1 unless you need it to work differently
## Target defines what the effect affects
## Chance is the chance that the effect will happen. A float number.
## Scales_with is hard-coded for the moment and only concerns MC stats // <- I think this part is outdated, you can also use it on girls -neronero
## Scope is the scope of the effect: individual (None), brothel-wide ("brothel"), farm-wide ("farm"), free-girls ("city"), or "world" ("everywhere")