Skip to main content

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

Where is the code that gives a character their name?  I can't seem to lay my hands on anything that looks like it actually makes use of those name lists, but they're clearly working (I keep getting "Joesph", one of the reasons I want to change them), so what am I missing?  I want to change how the game chooses names and surnames (based on ages as well as races, so it's easier for me to tell human children and teens apart from adults... and I might switch name lists based on class as well).  (I've already managed some build-it-yourself elven surnames, but the code wound up in an unusual place 'cuz I couldn't figure out how to reference names.gd.  Also, fairies are about to get super trendy weird baby names, lol.)

Also, how would I reference the race of the captive, in a "thugs" or "wolves with person" type encounter?  I wound up having it describe the captive using the race of the first thug -- whoops!  Dunno if there's any way to do this.

On the up side, I've finally gotten past the annoying-troubleshooting phase of the descriptions and dialogue, and those are working well; I've even split up the responses to a request for intimacy, so that we don't get a "meek nod" response from every possible character -- the request phrasing differs based on traits (Subs and Doms, slutty/pervy types, masochists, passive, etc.), and the reactions differ as well, and there's a different threshold by having various traits give a multiplier to either the Lust or the Resistance (e.g. Subs, Masochists, and Likes It Rough bump up the Lust part of the calculation, while Doms and Spoiled bump up the resistance, and at least one trait increases both).  Also, people who could get pregnant are a little more reluctant.  And because it's a multiplier instead of an addition/subtraction, it effectively increases the effect of the existing add/sub lines.  I'll need to refine it a bit (having a Passive character just shrug and go along with it despite being fairly rebellious was not very immersive, but I could change that by changing the threshold a bit and rephrasing the "acceptance").

Anyway, now I've moved on to refining the Encounters.  My Wimborn Outskirts now has random washerwomen, kids running around, and bullies that specifically target a child (or occasionally a teen) or a cat-girl or cat-boy, so it feels a bit more lively.  Frostborn Outskirts and the Forest both have people gathering firewood.  I hope to eventually dig into the code enough to change how many steps an area takes and how much energy it costs per step, so that there's more encounters for the same amount of energy.

One thing I've noticed is that the "bound tightly to prevent escape" stuff also shows up for the captive that was being bullied/attacked, which makes no sense.  Haven't yet figured out how to distinguish between the two types in code such that the captive gets a different description and it doesn't sound like I randomly tied up the person I've just rescued.

By the way, how would I go about making it that I can release captives in the wild in order to reuse that rope?  I once did this sort of thing and wound up with a phantom rope causing crash errors IIRC.  But there's plenty of times when I've got a passel of midling captives and I run across the type I'd really like to catch, but I'm out of rope; it seems like releasing a captive would get me that rope, but that's not how it works and it bugs me.

P.S. While trying to learn some of the string handling in Godot/GDScript, I noticed that "finds" is not the best choice when trying to see if a string merely contains a substring (e.g. "Beastkin" or "Halfkin").  I wound up with some errors using "contains" and eventually hit on:

if "Beast" in person.race

Anyway, is there any reason to favor "person.race.find("Beast") > 0" over "if X in string"?

Also, I've completely forgotten how to look up what sort of code (which edition of GDScript?) this game is using.

The code that gives characters their surnames is line 98 of ".../files/scripts/characters/constructor.gd".
The code that assigns surnames to races is found in ".../files/scripts/characters/races.gd", such as line 12.
The code that assigns first names to characters is line 81 of ".../files/scripts/assets.gd".
The script for "names.gd" can be accessed anywhere with "globals.names" and the function can be accessed anywhere with "globals.assets".

The races of the captives can be accessed using "enemygroup.captured[ <index> ].race" if you know the index or use zero to reference the first captive, which is what is used on line 1931 of .../files/scripts/exploration.gd".

The number of steps to travel through a region is set as "length" in ".../files/scripts/explorationregions.gd".
The energy cost per step of exploration is subtracted on at line 863 of ".../files/scripts/exploration.gd".

By "bound tightly to prevent escape" I assume you mean 'A tied and bound [color=yellow]$sex[/color] looks at you with fear and hatred. ' on line 202 of ".../files/scripts/characters/descriptions.gd". Unfortunately, there's no good way to differentiate between enemies and captives. That's not to say that it isn't possible, but you would need to reference the "enemygroup.captured" array in the exploration script which needs to be referenced through the mansion script which needs to be referenced through the globals script. Then you would need to search the array for a person with an ID that matches the person for the description.

To release a captive during exploration you would need to call the function "freetrue" at line 2521 of ".../files/scripts/outside.gd" by pressing the Control button during exploration (even with the post battle menu), selecting the Captured Slaves tab, pressing the red circle button (which is a very lame button), and agree to free this person. No errors with this functionality in the current version as far as I know, though a prior version did have errors. Note that this still counts as using the rope so it might wear out and break, but otherwise you will get the rope back.

The functions for the String type have improved a lot as the Godot Engine has been updated. Many of the convenient functions in the current version weren't available when this game was written and the code wasn't updated to use newer functions. There are newer versions of Godot available now that have even better functions, but simply updating the game to be compatible with it could take a few days. String.find() reports the position of the first character of the matched string and is useful for string editing or searching for multiple instances of a string, though the latter has String.count() in the latest version of Godot. The "in" keyword is basically a sideways access to String.contains() even though that function wasn't included in the API until 4.0.

Strive for Power uses a beta version of Godot 3.2, so it has some of the features and fixes of 3.3. The Debug mod displays the Godot version in the terminal when the game starts. Usually I get the docs I want by googling something like "godot 3.2 string".