Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Strive for Power

Fantasy Slave Management/RPG Erotic Game · By Strive4Power

Editing Save and MC Questions

A topic by PerpetuallyAmiss created Oct 01, 2021 Views: 6,164 Replies: 24
Viewing posts 1 to 15

Complete Novice, I only "know" self evident things. I'm editing my save via the online save editor https://www.saveeditonline.com/ and am doing well enough copying the names and structure to get what I want, BUT still would like to cut down on my trial, error, and speculation if any ones willing to share what they know and answer some questions.

Question#1     Any harm in changing the MC's specialization. They're a permeant fixture in the party and I can't really theory craft and optimize them like I can with the slaves. Ideally, I'd like to have the starting spec and a slave spec, but if its one or the other with out any issues that's fine too.

Question#2      Been adding traits and effects to get some more custom slaves with out spending another half day on RNG, effects I add don't seem to actually be taking effect. For instance I'll add "Robust" to traits and it'll list on the character in game but when I add the effect, the bonus endurance doesn't apply, and I've no idea if the fear modifier applys. What effects can be added that actually take hold in game?

Question#3     My hair is permanently stuck in a bun. Is there any way to restyle the MC's hair or change hair types in game, and if not where do I edit them in save and what can put there?

The Discord(https://itch.io/t/284398/discord) is a better place for answers on the inner depths of the game, but it'll probably be me answering them either way. The game's script files (.gd) are plain text and can be opened and edited(it reads them during runtime) with any decent text editor. The save files are JSON formatted and quite easy to work with using online JSON editors or text editors with an add-on.

Answer#1: You called the player's specialization a "starting spec", but only some of them provide a starting bonus and all of them provide bonuses throughout the game. Due to old design quirks, the player has their spec stored in 2 locations. Though this is more an oversight than a feature, so there will be no means of changing it mid-game. As such it is most likely possible for the player to benefit from both a player and slave spec by editing the save file, though the game will probably only report having one. I may clean that up for the next version, but there is no policing of gameplay so feel free to exploit it if you wish. Specs can be edited at any time, but you have to match expected values. Spelling and case matters, but you generally won't know you got it wrong (if you mess up the state spec then it can crash if not using the debug mod). It's just used as a simple string check, so if you have the right spec, then you get a bonus for the current action. See bottom for file with list of slave specs.

Answer#2: Traits, items, and effects are complicated and have messy implementations, especially the stats. There is the simple part where actions simply check if a person has it or not to adjust the result. Then there are stat effects, which are applied to the person's values when they gain or lose a trait or effect. So when a person gains the "Strong" trait, it adds 2 to "str_mod" and -0.2 to "obed_mod" when they gain the trait, and those values are subtracted if they later lose that trait. However, they game will not perform the stat increases if you edit the person to add the "Strong" trait to them, you have to add all of that yourself. Note that not every stat is used; some are old and some are just quirks of the design. Also, there are several cases where stats have a bonus of zero, this usually happens when the min or max is changed to cause an update of the stat for the new limits. Some stats have hard limits on their values and some, like strength, can receive infinite bonuses.

Answer#3: Some attributes are simple strings and put on the screen with minimal formatting. Others use a dictionary lookup to convert the key string into a value string, which is put on the screen. "hairstyle" is the latter type and all the options can be easily found in ".../STRIVE_PROGRAM_FOLDER/scripts/characters/description.gd". Note that the simple strings are sometimes expected to match specific values for things like slave quests (the bugfix mod adds handling for changes in capitalization).

There is no need to fetch those effects from the save file, they are all listed in script files. 
Traits: ".../STRIVE_PROGRAM_FOLDER/scripts/traits.gd"
Specs: ".../STRIVE_PROGRAM_FOLDER/scripts/jobs&specs.gd"
Gear effects: ".../STRIVE_PROGRAM_FOLDER/scripts/items.gd"
Enchantments: ".../STRIVE_PROGRAM_FOLDER/scripts/enchantments.gd"
Various spell, usable item, and tattoo effects: ".../STRIVE_PROGRAM_FOLDER/scripts/effects.gd"

RIghtO, been playing with it after you gave me some more leads to go on. Haven't yet found any trait/effects that stay. For instance adding the effect of the tattoos doesn't actually do any thing or even change the interface. Seems to just count how many you got or some thing *shrug*. So mostly can just add traits for flavor in character description and if you're so inclined to can edit many of the values. I've no notion if adding traits like "pretty voice", with or with out effect changes job performance.

Looked around and found what influences detection I think. So off the bat and correct me if I'm wrong,  Wolf +4, Hunter+ 10, Tattoos +3-9, +Wit/10 (which since you can't increase as MC is probably a potential loss of 7, but you can also still edit wit in file so there's that) No doubt over kill, but min maxing is half my fun.

The two fields for MC spec, if I were to guess influence different things. If you replace one you lose your description in character sheet, with no benefits, if you replace the other, you gain the benefits, but the character sheet stays the same. I doubt I could ever find out if some thing some where read "description" one for benefits instead of the "stat" one.

Still its been useful for making suboptimal slaves that I like or are story related optimal as well as throwing some flavor traits around.

(1 edit)

Let me try to be more clear about the "effects" variables. Most of the time "effects" in person objects is used as a (mostly redundant) record of changes made to a person. There are limited cases where the values found in "effects" are actively used such as the duration of effects.

Thus let us roughly consider the steps to edit a save file to add a new trait, in this case "Pretty Voice",  to a person. First, by adding "Pretty Voice" to the "traits" list the person gains the job bonus and the interface listing but nothing else. Second, by adding the appropriate effect for the trait to "effects" the person gains nothing, but if they were to lose that trait then they would lose 20 charm. Third, by increasing the person's charm by 20(or less if it would exceed their "charm_max" or the limit for their current "origins", which is called slave grade in-game) they finally have the complete trait.

The reason changing the effect for tattoos did not change the person's stats is because you did not change the tattoo type count in game, as that is the only time that the effect changes the person(though the effect would be subtracted). Each person has a "tattoo" dictionary which stores the current tattoos which will change the interface and description. But even adding both the tattoos and the effect will not change the person's stats, you have to change the stats as well.

You are correct about the value of awareness being used for detection. Though the low wit of the player is usually not relevant since only the highest awareness of the entire combat team is used. Also, awareness tends to easily exceed all but the hardest enemies simply by having a moderate amount of agility.

You are incorrect about the MC spec. The game only checks the state value for player specs so there cannot be splitting of description and bonuses that you speak of. This also means that slave's cannot benefit from having a player spec. However, the game assumes that player will not have a slave spec thus does not specifically exclude the player from slave spec checks. Though in practice most slave specs do not work on the player because the player character is not usually checked for something they are not expected to have. This is why the Merchant spec doesn't work on the player. Executor doesn't work because the player doesn't work jobs. The player is only grouped with slaves during combat and sex, so those are the only active bonuses that can be gained.

(1 edit)

Alright lets see if I'm getting this. 

In your pretty voice example, Just adding the trait will give the non stat affect of increasing merchant performance? You'd have to add the stats your self and the "effect" is redundant, unless you were planning to later remove the trait.

So do all the traits work, apart from their effect stats for the purpose of being called on for jobs, or do I have to add the mostly redundant effect as well so it can be checked?

The MC's got a MC field for their spec that does nothing if given to a slave and they've got a slave spec which uses there mc spec but since its in the slave spot it does nothing and I was wrong to assume one was so it appear in the character sheet and the other was for its stats. You can use slave spec in the second spot but they're of course not usable in jobs, so only good for combat and exploration. Ones like assassin, body guard, ranger, and trapper would work I assume, but the rest nah.

The tattoos are irrelevant in terms of stats if you're only using save editing. You might for instance choose one for its effect and change them in the save for "aesthetic", or add them in game and remove them in save to add some more to receive multiple effects, but that's just excessive. (Not at all tested just speculating)

(1 edit)

Sounds like you understand the "Pretty Voice" case.

For traits, the effects are never used until the traits are removed. Bandages, potions, spells, and a few other things all use the duration field within the effect for expiration. All actions, events, jobs, interactions, exploration, combat, end-of-day updates, and so on simply check the "traits" list. Generally it looks similar to this:

if person.traits.has("Mentor"):

Checking for a trait through the effects is tedious. Though most other effects don't have easy lists like traits so they use the tedious method.

Almost right on the MC spec, I said combat and sex, not exploration. During those events all persons are encapsulated by another class and put in the same list. So assassin, trapper, and nympho. Ranger would do something if it was included in the general awareness calculation. Geisha would do something if stress effected the MC. Bodyguard would work... if the spec actually did something during combat, but right now it's just stat bonuses. The description isn't technically wrong since doubling zero additional damage reduction is still zero, though perhaps misleading.

You are right about the tattoos.

Thanks for the help; you've saved me alot of trial, error, and speculation. 

Think I'm reasonably clear on what can done for characters, but what of weapons? I looked at the enchantments.gd, and saw they're given equipment types, is that just for spawning or can any thing be put on any even outside parameters ? Was again looking through stuff, and modified weapon in script...crashed, presumably cuz I did it wrong but never mind that, I'm focusing on saves.

I'm thinking in the assumption the scripts are for creating the weapon but that the item in inventory so long as formatted correctly doesn't have to correlate to them almost at all. Starting presumption that you can add appropriate enchantments and maybe inappropriate enchantments, than wandering if you could for instance do what I was trying to do with the cursed blade, and replace the 20% chance to attack twice with ignoring protection like the hammer; could be done in save?

If you are going to edit scripts, then I recommend using the Debug mod as that makes finding error messages a bit more reliable. There are supposed to be log files anyways, but some crashes skip creating a log. The caveat is that the Debug mod will attempt to keep going even if a lot of things break, which can corrupt saves if you ignore them and save your game.

There are the obvious ways to break a script like wrong data or forgetting a comma or bracket. But there are also the less obvious ways like using 4 spaces instead of a tab or a carriage return instead of a newline. The error messages are usually helpful in pinning down what was wrong.

Item data has its own unique quirks and unstated formatting, which is made less obvious because they are in dynamic data structures rather than a class objects. Due to many cases of basically redundant data storage in items, you can indeed alter a lot of item data without needing to match the script. However, in some cases the item data must match the script because of dictionary lookups or similar code, like how some person attributes require using specific values.

Stackable items(rope, potions, and such) tend to be heavily restricted by the script and unstackable items(gear) tend to be less restricted. Equipping items behaves similar to adding traits, so it's best to unequip them before altering them. Not all "effectvalue" in gear effects are used, some are hard coded in the combat script. Some data fields, like "type" and "effect" must be paired correctly or the game could easily ignore it or crash. Otherwise there should be no problems with tweaking or exchanging effects between items, or adding enchantment effects.

As a sidenote, I recommend getting the Bugfix mod as the script for at least one of the item effects was wrong.

(1 edit)

Haven't been playing since I aint THAT into genealogy and resource accruement, but I'm a bit ocd so been revising a big ass portrait pack from many downloads to get rid of ones I didn't care for and or edit/replace ones with better version where I recognize them. Never mind that though part of my OCD bucket list of things to sort so I can put aside my obsessive nature is to find out if it can be made that sexual traits aren't inherited, and if regular traits could be excluded or have custom values for inheritance, farther more if you can set it to start the game with traits, since of course there isn't a field I can easily edit or copy there. You can get surprisingly far editing the save with little understanding if you just keep the format.

As contribution to the "war effort", here's a better image courtesy  of https://www.spriters-resource.com/pc_computer/kamidorialchemymeister/.

 

(7 edits)

Changing whether or not a trait is inherited is something that can be altered by changing the scripts, but it is not possible through save editing. The creation of a baby from its parents is handled in globals.gd in the "impregnation" function. The simplest way would be to filter traits by the "sexual" tag. A custom data field or custom tags could also be added to traits.gd and used as custom inheritance rates. A simple example of some possibilities:

for i in traitpool:
    var traitEntry = globals.origins.trait(i)
    if traitEntry == null || traitEntry.tags.has("never_inherit"):
        continue
    var roll = rand_range(0,100)
    var chance = variables.traitinheritchance
    for tag in traitEntry.tags:
        if tag.find("custom_inherit_") >= 0: #example "custom_inherit_50" for 50%
            chance = tag.replace("custom_inherit_","").to_int()
    if traitEntry.tags.has("always_inherit"):
        roll = 100
    elif traitEntry.tags.has("sexual"):
        continue
    elif traitEntry.tags.has("rarely_inherit"):
        roll /= 2.0
    elif traitEntry.tags.has("male_inherit"):
        roll = 100 if baby.sex == "male" else 0
    if roll >= 100 - chance:
        baby.add_trait(i)

I removed one tab from the beginning of each line for readability. The leading tabs are converted to spaces by the website, so it will not work if you simply copy and paste this code.

To add traits at the beginning of the game you would need to look at the end of mainmenu.gd in the function "_on_slaveconfirm_pressed".

Someone had a similar question on another forum, so I'm gonna add this here so that all the methods of adding a trait through editing can be found together.


You can edit the script files(.gd) to add a specific trait when you have a slave selected in game. You will need a decent text editor, most of the community uses either Notepad++ or Sublime Text 3 (the Godot editor can be used if the game is dropped into a blank project folder), and most likely the Debug mod. The editor will ensure that you can read the file and add newlines without crashing the game. The Debug mod will report any mistakes as errors rather than simply crashing the game. Though if you play through the errors then you may corrupt any saves made afterwards. If you mess up and are unsure how to recover simply replace the edited file with the original file from Strive's "backup" folder.

The best file to edit is ".../files/scripts/slave_tab.gd" in the program folder. "func _on_piercing_pressed" or "func _on_hairstyle_item_selected" are the best places to edit; they will trigger upon opening the tattoo menu or selecting a new hairstyle. Simply add a new line after one of those lines, then add a single tab(not spaces), and add this:

person.add_trait("trait_name")

Replace trait_name with whatever you want; the trait names are the same as in game.

(2 edits)

RightO, was taking a break from this for a while, but ready to sort that if you're still willing to help me in this largely unnecessary task.

So I tried the code you posted by first pasting it in the globals.script by placing it in the spot the was already identical to it. So I put overwrote  "or i in traitpool: to baby.add_trait(i) in the file where they naturally appeared and it looked mint but expectedly didn't work. Than i just dropped it in there were it looked pretty and added a tab to the beginining of each line, but that didn't pan out either and that's as far as I've gotten flailing in the last 10m.

Edit#1: Alright got it in the globals with out crashing going to test if it works out for me, than try for the adding traits on game start and maybe that piercing one you mentioned.


Edit#2: Made some babys. They inherited sexual traits and traits I edited to be never inherited. So while I don't crash with that throne into globals, it hasn't appeared to work.

I'm at work on break, so I can't check the specifics for a couple hours. Possible causes of your trait problem would be impregnation prior to the addition of the new code(traits decided at conception), misspelled tags(sensitive to capitals), or tags added to the wrong field (probably not, but it can happen).

I'm in no hurry (obviously).

(2 edits)

My bad, the line 

if tag.find("custom_inherit_"): #example "custom_inherit_50" for 50%

was supposed to be

if tag.find("custom_inherit_") >= 0: #example "custom_inherit_50" for 50%

since find() returns a position not a boolean. Also, a minor note,

roll = 0

for "sexual" should be

continue

to cover the small case when traitinheritchance is 100.0, since that allows the "sexual" block to be bypassed. Though it should be noted that for the same reason "custom_inherit_100" would bypass the "sexual" block, not that the 2 tags would be present together.

Fixed it in the post above.

(2 edits)

Updated it with the new code, made some another babeh. Still inherited a trait I'd marked "never_inherit", and got some sexual traits but that could have been incidental. Got homosexual which I'm not sure spawns independently of other stuff and prude which was an additional trait not an inherited one. Ganna have a couple more so I have a better metric there.


Edit#1: Alright Can confirm, sexual traits and traits marked never_inherit are still inherited. Might be I'm doing it wrong though of course. I just dropped the the code into globals and added a tab to each line and it didn't crash, I than went to the traits and added never_inherit to some; no crashing but every thing seems to be working as normal.

I found out what was going wrong with the code by testing it repeatedly, so unless you have altered something it should be working. Make sure you replaced all 3 lines from the original for loop.

If you have the Debug mod, then you can get some runtime feedback using detailed trace statements. I added

print("Attempt trait: ", i)

just under the for loop.

print("chance: ", chance, "  roll:", roll)

Just before the final if statement in the loop.

print("Inherited trait")

Just after the baby inherits a trait

I added a couple more trace statements for clarity.

An edited trait for testing. I start a sandbox custom game with a male MC and female starting slave. You can usually date and impregnate her on the first day.

(2 edits)

Alright got it to work. I pasted over for i in traitpool: to baby.add_trait(i) which I hadn't done since the first time I'd done it. Works great now. The next generation of children were not born degenerate. (What are they teaching them in that other dimension?)

Thanks again for the help. Going to try adding traits to char gen and some piercings later if you'll bear with me.

Edit#1: Got ones in slave_tab.gd to work, but not had luck with mainmenu.gd 

Edit#2 Found out how to add additional starting traits for your starting slave but not yet found out how to add any player traits.

(1 edit)
func _on_slaveconfirm_pressed():

is the appropriate function in which to add any traits to either the player or the starting slave as it is the last function called before a new progress begins. Though the start slave's traits are reset at the start of this function.

startSlave.cleartraits()

However, note that the player is not expected to have traits so they will not be displayed, and many have no effect on the player.

What I've found it you can add multiple traits to the starting slave by just adding lines

startSlave.add_trait(slaveTrait)

startSlave.add_trait("Natural Beauty")

for instance works just fine. I don't know how to add traits to the player though since like you said they're not expected to have traits so I don't have some thing to emulate. I tried adding some to 

func _on_slaveconfirm_pressed()

a couple of different ways but none of them panned out for me so If you've a method I'd be glad to steal it.

In a related note, traits added to the player work though generally only combat ones and maybe natural beauty have an effect, BUT they're also displayed in a couple places which makes them to me good not just for unnecessary optimizing but for flavor. 

I'll fiddle with it more later as is my nature. 

(1 edit)
player.add_trait("Strong")

works fine for me in the function I mentioned. I guess I forgot that the player's traits can be viewed while exploring through the "Control" menu.

The player never uses their beauty stat, though their children can benefit from the player having it. 

excuse me, i’m a bit lost here, what file was suposed to be the savefile again?

The save file is the one you create when you save your game, so the name and extension will depend on what you give it. The save files are located in the user data folder with with the default path ".../Strive/saves/", and can be accessed though the in-game button in the save/load menu found in the mansion. On Windows the path is "%appdata%/Strive/saves/".

well i'm late to the party so with taking into account what the people have say, and also check aric exansion mod, i would add that try to find a slave who have the trait, and everything you want to change and try to replicate it, it have work in my case for removing a troublesome trait, change the race % of my slave, or change some stat of my slave.