Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Strive for Power

Fantasy Slave Management/RPG Erotic Game · By Strive4Power

Modding help Sticky

A topic by Strive4Power created Aug 20, 2018 Views: 41,300 Replies: 98
Viewing posts 6 to 25 of 33 · Next page · Previous page · First page · Last page

is mod feateure in 519c broken?

I was able to apply my mod, randomportraits, fine.

However, modification of var is still broken.  Better regex i recommend is in there, but the code for AddTo is still broken, it's got .replacen("{", "").replacen("}", "") still so it breaks any nested {}'s by stripping them. This was broken in other versions in various ways though so i don't know anything new that is broken?

how to add class/var to globals.?

i mean with a new class or var to use it global with globals.newclass/globals.newvar
simple add the class/var to globals.gd dont work

(14 edits)

Hey all,

I've decided to give a shot at making a mod. I want to make a mod that adds a custom race to strive. Also, I could generalize it, so people can easily add their own races.

 

What I have so far:

A file which defines the new race. Located in …/roaming/strive/mods/ponyrace/newraces.gd

https://pastebin.com/5Zg9AwSR

An edited version of globals.gd which calls my races.gd mod and includes the new race in the race list. Located in /mods/ponyrace/globals.gd

https://pastebin.com/4Fc4LvCh

 (Note: these hyperlinks sometimes go to the wrong file. For correct the file, ensure the text above  matches the actual URL you land on. Edit 3: these pastebin links are kinda out of date. Use the project link in the next post).

Edit: just noticed the # comment mark in globals.gd. I therefore added the desired races inside \mods\ponyrace\scripts\variables.gd.


It doesn't work as intended:

After removing and adding all mods (including my mod, ponyrace), the pony race doesn't show up in game. Clearly, I'm not even close yet.


 

If anyone could point out what I'm doing wrong, that would be awesome. It someone who knows what they are doing can confirm that my code theoretically ought to work, that would also be helpful, because then I can go and look for missing comas or similar.

 

Thanks!

Edit 1:

Attempting to add the new race data inside will give a console error and crash the game. 

script error: parse error: unexpected assign. 

at: newraces.gd:2

where line 2 is the first like where I start defining the new race.


edit 2:

When I try to generate a new person, I see the new races available. However, when I click that option, a console error occurs. 

at /scripts/characters/constructor.gd:89

invalid get index 'beastkin pony' (on base: dictionary)

This error code makes me think 'beastkin pony' is not get registered everywhere correctly. But Three things I notice. 

  • 'Beastkin Pony' is indeed listed in \files\scripts\variables.gd
  • 'beastkin pony' is not listed in  \files\scripts\characters\races.gd
  • _init() is being changed  by my files in \mods\ponyrace\scripts\globals.gd. Console gives an error about unexpeted assign in newraces.gd: line 2.

Therefore, my edits have correctly updated variables.gd and globals.gd, but not races.gd or global.races.

It's late. Gotta sleep. Here's what I got so far. Help would be very nice.

https://dstu.itch.io/ponyrace

newraces.gd

var races = {
"Beastkin Pony" : {
...


globals.gd

#  newrace mod
<AddTo 0>
func _init():
    var newRaces = load(setfolders.mods + "/ponyRace/newraces.gd").new()
    for cur_race in newRaces.races:
        races[cur_race] = newRaces.races[cur_race]
var longtails = ['cat','fox','wolf','demon','dragon','scruffy','snake tail','racoon', 'horse']
var alltails = ['cat','fox','wolf','bunny','bird','demon','dragon','scruffy','snake tail','racoon', 'horse']

- global newRaces not necessary
- <AddTo -1> dont work
- newRaces is the file, races is the dictionary
- AddTo on vars also does not seem to work (but if it does: should be before each var and have only the additional content)
- penistypearray is the same as in original file

(1 edit)

Anyone know how to make change what races appear in each slaver guild? 

I can already get my custom race to appear in custom character creation and random encounters in the wilds.

Edit: Fount it. It's in /scripts/ outside.gd and explorationregios.gd

(1 edit) (+1)

Forgot to add support for negative numbers in the AddTo regex.

`
var tag_regex = "<(\\w*)(\\s+\\d+)?(\\s\\d+)?>"
`
should be
`
var tag_regex = "<(\\w*)(\\s+[0-9\\-]+)?(\\s[0-9\\-]+)?>"
`

Really wish this had been fixed....

(1 edit)

Then congratulations your wish has been preemptively fulfilled, as that is what is currently used.  I addressed the actual problem on your post in the Bandit Tooltip Mod thread, just felt like poking fun.

Does anyone how to open the png.import files? If it's a compressed file, what do I need to unpack it?

They're encrypted.  They're not supposed to be opened.

You need the source code if you want the .png files.

Bummer. Alright, thanks for replying.

Hey, uh, I don't know where else I'd ask this, so... does anyone know if it's possible to have a futanari option for the player character in character creation, since you can have futanari characters in random encounters? Or maybe like, unlocked character customization, so one could play as, say, a dragonkin character with fur and equine parts? I imagine such features wouldn't suit everyone's playstyle, but I for one really enjoy it when a game lets you choose to "ignore the rules" and mess around. I have very little modding experience, though I'd be willing to learn; I want to be able to do that stuff eventually, but it can be pretty intimidating. What I mean by this is: I'm mostly curious as to whether it would be possible, and what it would entail. Please tell me if I'm doing anything wrong, socially; I'm awkward and don't know how to do stuff. Thanks in advance, and great game; I'm really enjoying it so far!

It's already possible to start the game as a futanari character.

Unlocked character customization would be a Big undertaking, almost too bothersome, you have something like that with the laboratory already, letting you add some mods and what not, so maybe an overhaul of the laboratory system would actually be easier to implement, but from the get go you would need to sink into the depths of coding in GDScript and trust me, takes time and patience. I myself am not even sure how I would even begin tackling that lol.

Is there documentation on aspects like specific properties/variable names, necessary directory structure, etc? I'm specifically thinking about doing some stuff from MacOS.

Follow up: I downloaded the Windows version of the game and see a lot of scripts aren't as packed up there, so I think I have more of a general idea of structure. However I'm still curious about some things. For example the "Faster pregnancies & growup" mod I have installed looks like it should work fine, but apparently doesn't. Have there been some changes in recent versions that might break things like var reassignment in scripts/variables.gd?

Mods currently do not work for MacOS as the mod system currently uses a crude text file parsing system(scripts/mods/modpanel.gd) to edit the files with matching relative paths.  It will not report any failures during the application of mods, nor warn of conflicts between mods.  Due to the fact that all the game's script files are stored in a .pck file for MacOS, the relative paths do not match and the appropriate changes are not made.

There have not been any recent changes that would break var reassignment.  The "Faster pregnancies & growup" mod works fine for me (Windows 7 x64); the changes to variables.gd match the mod.  If you managed to overcome of the .pck file issue, then verify that the mod folder is located correctly(Strive/mods/Faster pregnancies & growup/info.txt), as the mod system will only check the immediate sub-directory.

The community currently does not have any active MacOS modders, so we have not been able to overcome issues related to the OS.  There is a Discord(https://itch.io/t/284398/discord) where we modders and players discuss stuff.  I would appreciate any help you can give towards compatibility with MacOS.  If you can find a method of modding the game on MacOS, then I can create a mod system for it.

Question: I made a bunch of items, but my custom item images are not showing up. Do I have to do anything specific to make them visible?

The inventory system currently uses load() for item icons. Thus only images that use Godot's resource system can be used for items. Don't know how well this works, but someone made a tutorial for adding such images: https://f95zone.to/threads/strive-for-power-v0-5-25-maverik.1136/page-100#post-1...
Otherwise, your other option would be to change load() for image icons to globals.loadimage(), thus enabling the usage of normal image files for items.

(1 edit)

you can put your textures inside folder with mod and use something likes this:

var customImage = Image.new()

customImage.load(globals.modfolder + location of your custom textures

createcustomtexture.create_from_image (customImage)

i wasnt able to test it in practice because i only have ideas for custom potions, but whole potion system annoys me a little and i dont wanna mod without ideas i could consider as "good"

YAY! Works. I re-added the chainmail bikini and normalized some weapons ( dagger weighs the same as claymore??), added more (greatsword), made bauty pot give a tiny amount of permanent beauty and many other tweaks

You might want to check that your images persist through save and load. That gave me quite a lot of trouble.

I try to make an item that increase max stats but it fail.

I use the the following code

person.str_max = +1

The item can be used on slave but have no effect. What's wrong?

In items.gd, there are a series of functions with names like armor, agi, stren, maf, end, and courage. These functions are called by name when equiping items and determine which changes can occur. You will need to add new functions if you wish to change max stats. 

How can I add new zone into the map? I mean, make them visible in the map as red dot and show how it connects like those originals.

The red dots are TextureRects in the map.scn file. The tooltip text and which points connect are stored in explorationregions.gd. map.gd uses those2 files to determine where to draw the lines when you hover over a red dot.

.scn files are not text files and are best edited using the Godot Engine. A new project can be created and Strive can be copied into the project folder to allow basic access. Beyond that it gets rather complex.

Alternatively, once map.scn has been loaded by the game, any script file can be used to create new red dots by duplicating an existing TextureRect.

explorationregions.gd should be fairly straight forward as it is a simple text file . I'd recommend starting from a copy an existing region.

Please explain more on  how to do TextureRect on reddot things. I now successfully make a new zone. but it won't appear in map.  In explorationregions.gd there are no such thing that define position of each zone.

explorationregions.gd only defines the pairs of dots connected by lines on the map.

In map.gd, the function "showtooltip(node)" creates the lines for each exit listed for the zone. The dots are Images displayed by TextureRect GUI controls(https://docs.godotengine.org/en/3.1/classes/class_texturerect.html). The position of those controls is what determines where the dot is. The name of those controls needs to match the name of a zone. The only way to get a zone to appear on the map is to add a new control node to the map.scn scene tree.

The following can be added to the beginning of _ready() in map.gd, as a minimal setup for adding a new red dot node:

var newNode = find_node("sea").duplicate()
newNode.rect_position = Vector2(100,100)
newNode.name = "newZone"
find_node("roads").add_child(newNode)

It seems like adding code to map.gd anywhere lead to freeze of the map. Here is my code to the end of _ready()


extends Control

#warning-ignore:unused_class_variable
var mouse_in = false
#warning-

ignore:unused_class_variable
var dragging = false
onready var size = $TextureRect.get_size()
var
offset = Vector2()
var status = 'none'
var timer = 0

var currentloc = null

var newNode = find_node("sea").duplicate()
newNode.rect_position = Vector2(100,100)
newNode.name = "newZone"
find_node("roads").add_child(newNode)

func _ready():
    for i in get_node("TextureRect/roads").get_children() +
get_node("TextureRect/towns").get_children():
        i.connect

("mouse_entered",self,'showtooltip',[i])
        i.connect

("mouse_exited",self,'hidetooltip')

func _input(event):
    if self.is_visible_in_tree() == false:
    

    return
    if event.is_action_pressed("LMB"):
        var eventpos =
event.global_position
        var barpos = $TextureRect.get_global_position()
        size =
$TextureRect.get_size()
        var target_rect = Rect2(barpos.x, barpos.y, size.x, size.y)
    

    if target_rect.has_point(eventpos):
            status = 'clicked'
        

    offset = barpos - eventpos
    if event.is_action_released("LMB"):
        status
= 'none'
    if status == 'clicked' and event.is_class("InputEventMouseMotion"):
        

status = 'dragging'
    #centermap('frostford')
    if status == 'dragging':
        

$TextureRect.set_global_position(event.global_position+offset)

So I said "The following can be added to the beginning of _ready() in map.gd."

You have: "The following code added before the beginning of _ready() in map.gd."

Spot the difference? It freezes cause you put local-scope code in the file-scoped portion of the code, which is completely undefined behavior.  I tried to be quite precise with my description, because there are very few locations you can put this code in the file to get the expected behavior. Perhaps I was too concise, but I am going to sleep now. The code I gave you only works inside a function and not inside a for loop.

I want to make it harder to get pregnant.  Can anyone provide a link to a mod or fix or point me to somewhere in the scripts where I can make adjustments?  Thanks in advance!

In globals.gd, the function "impregnation" contains the core mechanics. Fertility is used as the chance to get pregnant.

Got it!  Thanks!!!

how to install Bugfix-V4a?

(1 edit)

My bugfix is a patch and not a mod, which means that the patch cannot be applied through the mod system.

Make sure that your Strive has no mods currently active. Copy the contents of the patch (minus the change log) into the "files" folder of your Strive program folder. The OS should prompt you to replace the files and merge the folders. If there is a "backup" folder in the Strive program folder, then delete it so that a new one will be made including the patch when Strive starts. 

Afterwards you can try to add other mods, though some may conflict with the patch due to the many changes, including to the mod system.

Edit: small mistake

How does do make armor craftable? I run into a ton of icon issues when playing. Will try to slap entire strive folder into a gd project and see how it goes.

Your question is not entirely clear, but I recommend using Leo's mod(https://itch.io/t/667993/leos-mod) as an example of how to add new items, especially with custom images as icons. The key to that is applying my bugfix patch first, as it fixes many problems related to custom icons. For more detailed help with modding I recommend the Discord (https://itch.io/t/284398/discord), as that is where the most active modders tend to gather.

Could somebody kindly point me to what file handles the racial traits (Taurus producing more milk etc.)? All I seem to be able to find are their descriptions, not the traits themselves ...

Unfortunately, some of these effects are scattered throughout the code. For example, the beastkin cat dodge bonus is handled in the combat code that calculates hit and miss.

I've done a quick search and the Tauran milk production seems to be set in mansion.gd during the milking process at end of day. You can change this value for your own version but the endofday() function is so big it is a bad function to start modding.

I see, that explains why I was having such a hard time locating them. Thanks a bunch for your answer! I guess I'll keep my eyes open then in all kinds of places and see which ones I happen to come across.

Viewing posts 6 to 25 of 33 · Next page · Previous page · First page · Last page