Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Strive for Power

Fantasy Slave Management/RPG Erotic Game · By Strive4Power

Modding help Sticky

A topic by Strive4Power created Aug 20, 2018 Views: 58,152 Replies: 178
Viewing posts 41 to 48 of 48 · Previous page · First page

...actually, where would I hook a name-change function, if I wanted to change the name only after the character is completely put together and I can look at all the pieces like a normal character?  That'd probably be an easier way for me to do it.

I'd love to give the Spoiled characters uppity names, lol.

Something like the "amnesiapoteffect" function on line 709 of ".../files/inventory.gd"?

Or something like the "_on_nickname_pressed" function on line 542 of ".../files/scripts/slave_tab.gd"?

I mean, where would I put the "actually, gimme a sec while I change your name before the player ever sees it" code redirect, when the slave is getting created in either (a) combat/exploration zone or (b) slaves at the auction zone.  I'd just want to have a moment when the name is already set (so the code doesn't expect it to be messed with anymore) but before the player gets to interact with the name (so the player doesn't see one name and then a different one later).

With that sort of redirect, I should be able to put together a "let's look through your Traits to see what sort of nameset would suit you" function for e.g. names like Prince, Princess, Ryan, Adora for Spoiled characters, names like Gunther, Viktor, and Rodrigo for Tough characters, a pool for names that sound faster vs. ones that sound stronger, or more delicate, or prettier / more handsome.

Now that you've told me how to reference globals.names I should be able to use arrays for cute fairy names, Western/Country centaur/taurus names, ocean-themed Nereid/Scylla names, etc.  But being able to change the names based on traits (especially for humans, who don't have a more interesting natural detail to work from) wouldn't really work from an array, unless I made a ton of arrays, and even so it'd wind up needing code to sort through which array to direct to (e.g. female_rich_beautiful_delicate).

The names are fully set after line 50 of ".../files/scripts/characters/constructor", so anything between there and the return will generally work, except for unique characters and mods like AricsExpansion, which set some traits afterwards.

Guilds slaves are added in the function at 339 of ".../files/scripts/outside.gd".

Is there a way to tell if the "mind break" (getting so stressed you dropped to 0 confidence etc.) happened on a given day?  Like, even just "was it today" would help, but "was it within the last three days" would be better.

If not, is there some simple way to rig this?  I'd like for the reaction to mind break to be incoherence for at least a couple of days.  It seems weird they'd be able to talk normally.

There's no records of mental breakdowns. It seems to me that the simplest way to implement this would be to add a timer variable to ".../files/scripts/person/person.gd". It could also be implemented as a new effect, but that system is a bit clunky so it would be more work to implement it correctly.

Oooh, I hadn't even thought of it being an effect (like "Captured").  That would actually be pretty useful.  Not sure I want to tackle it right now, though, if as you say it's a difficult thing.  I've been messing with enough systems lately that I'm just waiting for the whole thing to come crashing down around my ears and force me to restart, heh.

The only thing that has been known to force people to restart is when people make their edits directly to the game files and then they use the mod system to change the active mods, which resets all changes to the game files and erases their edits. As long as you are making your changes to files in the Mods folder you should be able to make progress forward. If you do get stuck on errors, feel free to hop on the Strive Discord and we can fix them quickly.

It's not so much that the code would be unsalvageable, as that at some point my brain will revolt over the sheer enormity and complexity of it all, and scream at me until I push the old version to the side and start a newer, cleaner version, using more of what I've learned.

Cycles of iteration and all.  It's been a fascinating journey so far.

Haven't yet tested this lastest round (still touching up major portions, and I have a Thing about not testing in small chucks due to sheer annoyance with load times), but I believe I've managed to let Omegas (Submissives) get pregnant, and possibly allowed Alphas (Dominants) to get turned into Submissives if they take it up the ass enough (heh).  Plus I've recently managed, let's see...

  • A kajillion birth scenes based on this or that trait -- a big difference in reaction between a Prude, Spoiled, Sex-crazed, Infirm, etc.; Passives dissociate unless they feel cared for, and there's even a nod to the mother's reaction if knowing they'll not get to keep the kid
  • A set of more subtle pregnancy signs for the player (you're about halfway through when you stop denying that you've got a baby bump, and near the end you're complaining about it taking too long and how you can't breathe), and I'll be putting together more subtle signs for slaves as well
  • Costume/Accessory effects have been dolled up, though I'm still in the middle of that -- but like, using a Maid costume on a male character who's not Pervert/Deviant or Submissive will stress him out (even more if he's forced to go out in public that way), but the obedience gain is a bit better too.  I've got a whole set of trait-based modifications for the Living Suit, should I ever get far enough into the game to find it.
  • More interesting groups of names, though I petered out partway through so it's basically just fairies and sea creatures, plus surnames for elves and herdfolk, and changing the human names so that I stop winding up with names that break my immersion (like "Elvis")

Eventually I'll see if I can't manage litters for Beastkin (especially bunnies) and Omegas, but that seems like it might be a bit of an undertaking.  I also want to get to the point where I can fork a bit of the sex scenes so as to make Alpha/Omega sex more interesting.  With the new Omega fertility boost, I expect to be playing those scenes a lot, lol.

where would the mod folder be in the files?

The Mods menu has a button to "Open Mod Folder", which will attempt to open the folder for you.

The location of the mod folder on your computer is dependent upon which OS you are using and tend to be hidden by the OS. As stated in the Help section of the Mods menu:

Replace USER_NAME with the value appropriate for your computer.
Windows:  C:/Users/USER_NAME/AppData/Roaming/Strive/mods
MacOSX:  Users/USER_NAME/Library/Application Support/Strive/mods
Linux:  ~/.local/share/Strive/mods
Note, if you are using the itch.io launcher to run the game, then your mod folder will be inside the data folder for the launcher.

Also, the folder ".../files/scripts/mods/" in the Strive program folder is strictly for the Constants mod that comes with the game.

thx im runinng on windows

when i do the windows os thing and go into the game and then go to the mods it just shows e.g: emptymod 100011110

ive extracted the mod and everything 

This game should never show anything like "emptymod" nor "10001110". Are you playing Strive: Conquest?

In Strive for Power, the mod is always named by the folder containing the mod, so only a mod in a folder named "emptymod" could appear with that name. A new folder named "New folder" in the mod folder with only sub-folder named "scripts", will appear as a mod named "New folder" not "emptymod".

yeah i was and didnt even realized it im downloading strive for power now

Browsing this sex code stuff is making my eyes cross.  I would like to include a desire to get bred, and have it met if the character gets ejaculated into.  I figured out the desire part, and how to add conditions (Submissive or Monogamous or Clingy, past a certain loyalty threshold, etc.), and how to make a category for breedable acts (one for MPreg, one for normal), so I can ask "was the last action a breedable action?" and probably also "was this character the receiving partner?"

But I can't see how to ask "did it involve ejaculation by the penetrator?"

There are no records of past orgasms/ejaculations in the unmodded game, so your options are to either add some type of record or add the relevant code from "func checkrequest" to "func orgasm". The latter approach is probably simpler.

Ah, that would do it!  Thanks for the idea!

So, I found this section, which appears to be where the Cleanliness of the house gets reduced: each slave reduces it by 1, except that shortstacks do 2/3, beastkin 4/3, and a few key races nearly twice the norm.

for person in globals.slaves:
    if person.away.duration == 0:
        if person.bodyshape == 'shortstack':
            globals.state.condition = -0.65
        elif person.race in ['Lamia','Arachna','Centaur', 'Harpy', 'Scylla']:
            globals.state.condition = -1.8
        elif person.race.find('Beastkin') >= 0:
            globals.state.condition = -1.3
        else:
            globals.state.condition = -1.0

But then I took a closer look, and it appears that each line is setting the variable, not changing the variable.  That is, the only loop that matters should be the final loop, in which the condition is set te a negative number related to that specific slave's race.

But since the mansion clearly appears to be getting dirty in a less consistent fashion, it appears that these lines do something I didn't expect.  So I hunted around some more and found this:

func cond_set(value):
    condition += value*conditionmod
    if condition > 100:
        condition = 100
    elif condition < 0:
        condition = 0

...which is defined as the way that this variable gets changed/set.  So I take it that elsewhere in the code, "globals.state.condition = X" gets reinterpreted as "cond_set(X)"?

Related question: If I change these statements to -= X instead of = -X, how would that affect the code, if at all?

You found one of the messier parts of the game's code. Godot provides the option to set custom getter and setter functions for variables in a class. In this case, the class "progress" is found in ".../files/globals.gd". 

var condition = 85 setget cond_set

This variable declaration establishes a custom setter function for "condition", so any attempt to assign a value to "condition" outside the setter function will call the setter function with the new value as the argument for the function. Simply changing "condition = -X" to "condition -= X" causes the resulting value of "condition" to be "condition*2-X".

In order to make the switch, you would need to remove the setter function and update every line in the game that assigns to "condition". Note that all changes to "condition" are multiplied by "conditionmod", which is 1.3, so you would need to include this multiplier in every line when updating them otherwise the value would be reduced.

Besides the Mansion's end-of-day stuff, how many sections would I need to modify to establish a new role, like Headgirl, for a Majordomo -- someone who keeps track of certain details and informs me of them (like to replace "You notice some of your food/gold is missing" as if the leader of an estate with multiple slaves would be the one personally inspecting the storehouses each day).  I mean I might want to add some additional details later, but mostly I want to start with "Sir, your gold seems to be dwindling faster than the books would account for.  I presume one of your slaves is sneaking into the treasury" or the like.

Character would be more effective in a Butler's Outfit, and less effective under some other conditions, and certain stats or traits would affect it too -- most obviously Wit.

If you are simply trying to add it as new behavior style to the Headgirl job, then you would simply need to add the role to the GUI, either through patching the Mansion.tscn or adding code to the "_ready" function of Mansion.gd to add the option to the OptionButton.

If you are trying to add it as a new job, then you need to add an entry to the jobdict in ".../files/scripts/jobs&specs.gd".

After either of those, you add your code to the end-of-day function.

Just two spots, huh?  That's a relief (after the other things I've been fixing up have bled out all over the place).

And yeah, I want a new job that a different character can be -- a Majordomo, the top butler, the Edwin Jarvis who keeps everything running aside from the slaves themselves.  A head girl is like the chief slave (focused on keeping the slaves in line), but a majordomo is like the chief butler (focused on the smooth running of the household, such that the master never has to bother himself with the little details and always finds his preferences accounted for and only has the actually important stuff brought before him while the rest gets handled secretly).

Long before I ran into this game, I ran into the concept of the Majordomo (in Marvel Comics), and the thought has stuck with me ever since.  Sure would be nice to have someone whose sole job is to ensure that I don't have to clog my easily distracted ADHD brain with all the little details of life, just the ones that actually require my attention.

Trying to figure out the logic in NextDayEvents()

if player.preg.duration > variables.pregduration && player.preg.baby != null:
    childbirth(player)
    checkforevents = true
    return
for i in globals.slaves:
    if i.preg.baby != null && (i.preg.duration > variables.pregduration ||
    (i.race == 'Goblin' && i.preg.duration > variables.pregduration/2)):
        if i.race == 'Goblin':
            i.away.duration = 2
        else:
            i.away.duration = 3
        i.away.at = 'in labor'
        childbirth(i)
        checkforevents = true
        return

Given that these checks end in Return, does that mean that the game only allows one birth per day, and the player's birth takes precedence?

Also, does this mean that if a birth happens, no other events happen?  Or what does checkforevents do?  (I'm getting a little overwhelmed by all the code lately.)

Also, the next section that's not commented out says "#Old scheduled event system" -- is it still functional, or am I looking at code that never activates, or...?

"checkforevents" is a variable in the mansion that essentially indicates whether the mansion should attempt to check for and display a new event. In practice, this value is only true while an event is being displayed, but it will be blocked from checking for new events until the first frame where the current event is no longer visible on screen. Thus "func nextdayevents" will be repeatedly called until the end of the function is reached without triggering an event.

The player gives birth first, followed by slaves giving birth in the order that they appear in the mansion list, followed by scheduled events, followed by random events, and followed by main quest story scenes. This order of presenting events is always maintained, though not every type of event occurs in a single day.

A new system was being planned to handle events in a more centralized manner, but the person contributing that code abandoned it for whatever reason. So the new system was removed from operation and the game uses the old system for events.

Gotcha.

I'm not finding any indication that having a nurse on staff helps characters heal overnight (in the end day process stuff).  Where is this code located?

Line 684 of ".../files/scripts/jobs&specs.gd".

Oh!  I missed that there's more to that file.

(Notepad++ lets me see all the times a search term comes up, but Scrivener just shows me the first and apparently expects me to hunt for the rest.  I've currently got the full code in Scrivener in sections so that I can easily hunt down which part to edit in NPP.)

Hmm... this might actually make part of what I'm doing easier.  Or possibly screw it all up again, depending.  Guess we'll see.

(1 edit)

I'm not sure if this is the right place to ask but I thought I'd try here first, does anyone know where/if it's possible to edit the pronouns for futa that are used during sex interactions in one of the gd files? I'm assuming there's still no mod that works with Aric's Expansion that allows us to set pronouns in-game or prevent their gender pronouns from changing from male to female when they become futa, and I was able to figure out how to change the code in the person gd file and have it reflect male pronouns on their overview in game but this doesn't seem to apply to the sex interactions. 

Also, the wrong participant always gets the 'Enjoys Anal' trait from Cowgirl Anal and Reverse Cowgirl Anal. How could I go about fixing this, or which gd file and what could I edit? 

Any change is possible if you put in the time and effort.
The flavor text provided during sexual interactions is created by ".../files/scripts/sexdescriptions.gd". The system converts pronoun tags into the most specific generalization for the group. Though it was designed for a simpler conception of pronouns, it should be relatively easy to adapt if you have already managed the change in person.gd.

The core of the sex interactions is ".../files/scripts/newsexsystem.gd". Search the file for the trait name. You will probably need to add exceptions for the action codes for those actions since the original system was designed with phallic-based assumptions about which side was the "giver" or "taker".

Mostly I've been finding solutions through trial and error, and interestingly changing the gender in the save file data sticks and the character doesn't revert back. Also I just ended up removing the actions from that trait group, which was in the newsexsystem file so thank you! 

Unrelated question, but is there an easy way to make certain sex actions add a specific item to inventory?  I've been poking around a lot of files and trying to look things up, but I'm pretty much an amateur and can't seem to figure how to not break the game every time I try to add a new line. Most of what I've come up with is just editing/overwriting existing code to tweak or adjust things, but I don't know how or where I would place this.  

Character sex/gender is only updated when the character undergoes a change which would be likely to change it. These changes are pretty much all driven by the player, though using too many potions too quickly can cause random mutations.

If the game crashes anytime you add a new line, even a blank one, then your editor is adding the wrong set of newline characters (the invisible characters that cause editors to put text on a new line) whenever you press the Enter/Return key.

If you don't have programming experience with Python, then I recommend taking a free online interactive tutorial for Python. GDScript is designed as a beginner friendly version of Python with some LUA, but since Python is a primary programming language it gets some better tutorials. A few hours with a tutorial will make things a lot clearer.

For simple debugging I recommend the Debug mod: https://itch.io/t/1137280/debugmod-v10d
I tend to do most of my programming in Sublime Text 3 with Python syntax highlighting and use the Debug mod to find out what breaks.
Otherwise get the Godot Editor version 3.3. It is needed if you want to work with the GUI, though it won't be much help for making mods.

Hello again! I am back with what I hope is my final question lol! Using Godot 3 made all the difference and I've been doing a lot of Googling and experimenting and had a lot of success, but I can't seem to figure out a simple way to make the text under func initiate() play in a specific order rather than randomly each time the action is clicked. Is this a situation where there's not really an easy way to do this without changing all the code and the way it functions (like without having to change temparray to something like const)? 

(1 edit)

Quick tip, it helps if you reference a file name when referring to code so the other person doesn't need to hunt for it.

In the sex action files, the game uses 2 separate types of randomization; one is relatively easy to replace with a specific order, one is somewhat complicated to order. Changing temparray to const would have no meaningful impact on the behavior of the array, as it only prevents you from changing the type of the variable to something that is not an array; it does not prevent changes to the contents of the array. 


text += temparray[randi()%temparray.size()]

This selects a random line of text within temparray and appends it to the text return variable. To change it to a specific order, the simplest approach is to replace the random integer generator "randi()" with a persistent variable storing an incrementing integer. If we keep most of the function unchanged we get:

var count1 = 0
func initiate():
    ...
    text += temparray[count1%temparray.size()]
    count1 += 1
    ...

However,  many sex actions use multiple layers of appended text to the text return variable and reusing count1 for every layer can restrict the number of combinations of text generated if the layers have the same number of lines of text in temparray. To fix that specific case we can use conditional increments.

var count1 = 0
var count2
func initiate():
    ...
    text += temparray[count1%temparray.size()] 
    count1 += 1
    temparray.clear()
    ...
    text += temparray[count2%temparray.size()]
    if count1%temparray.size() == 0:
        count2 += 1
    ...

The second type of randomization uses specific characters to mark the beginning, separations, and end of the set of randomly selected text:

{^gently:tenderly:carefully}

The first two characters "{^" mark the beginning of the randomized text, the individual texts are separated with colons, and the end is marked with another brace. This sounds straightforward and you might be tempted convert split those three words into separate lines to be handled by a layer of temparray, but consider this line from 100caress.gd:

temparray += ["[name1] {^gently:tenderly:carefully} {^stroke:fondle:cuddle:massage}[s/1] and {^caress[es/1]:rub[s/1]} [names2] [body2]"]

This single line provides 24 unique combinations of randomized text.

The code for this process is found in func splitrand(text) of sexdescriptions.gd. If we made the incorrect assumption that there are a minimal number of cases where these random sets of text are identical, then it's possible to use dictionary to implement an incrementing integer strategy similar to above.

var dictCounting = {}
func splitrand(text):
    var pos = text.find("{^")
    while pos >= 0:
        var targetText = text.substr(pos, text.find("}", pos)+1 - pos)
        var splitText = targetText.substr(2, targetText.length()-3).split(":")
        text = text.replace(targetText, splitText[ dictCounting.get(targetText,0) % splitText.size() ])
        dictCounting[targetText] = dictCounting.get(targetText,0) + 1
        pos = text.find("{^", pos)
    return text

It's been a while since I've coded, but I'm mostly certain this would work as long as I didn't make any typos. While this is an inaccurate solution as the assumption was incorrect, it's by far the least effort solution.

If you want any more control over the ordering of text than this, then you will probably have to create an array of all possible combinations of text for each sex action and then use the incrementing integer technique to walk through them one at a time.


Edit: Please note that itch.io converted all tabs to spaces, which will wreck havoc in Godot if you try to copy and paste my code.

Thank you so much for taking the time to type all that out! And apologies for not referencing the file name, I was trying to ask in a way that would hopefully be less work to answer but ended up doing the opposite and oversimplifying.

I was just not understanding what I needed to do with randi() and using count1 worked perfectly for what I needed. Thank you! 

Viewing posts 41 to 48 of 48 · Previous page · First page