Strive4power Wiki
Advertisement

This is a short guide for users and modders on the alpha mod system version.


Users

Only install the mods you know are safe. Strive team is not responsible for any damage caused by third party mods. (Note, you must run the game atleast once for the Strive folder to generate.)

How to install mods:

  1. Download and put the mods in the mod folder (%APPDATA%\Strive\mods)
  2. Click on the mods in the lists to add them to load and set their order
  3. Click "Apply" and restart the game after its closed.
  4. If game fails to load, reinstall the game and delete bugged mods

How to disable mods:

  1. Open mod menu and unselect mods you no longer wish to use
  2. Click "Apply" and restart the game after its closed

OR Click "Reset" to disable all mods and restart the game after its closed


Modders

New mod system does not provide any gui for easier modding yet, its main objective is to provide simple mod management for users and support for multiple mods. Multiple mods are stored in the mod folder which can be changed by user and by default goes to user://mods. That directory will have FileOrder.ini and allows any number of mod folders. Each folder will be counted as separate Mod and will be displayed in user's mod list.


The mod folder will have a file named info.txt (or you might want to make one preemptively), which will hold any description you wish to add for users to observe in mod menu.


Basics

Firstly, the game is done in GDScript. All moding will have to deal with it until any sort of GUI is introduced. This guide will pretend you are already familiar with syntax and game's structure.

Let's imagine you want to edit mainmenu.gd script, which path is files/scripts/mainmenu.gd. Create a folder in mod folder with your mod's name. Add folder 'scripts' to it, and make copy of mainmenu.gd in it. The path of it will be 'mods/your_mod_folder/scripts/mainmenu.gd'. Then you can edit anything you wish in it as normal and after activation it will be applied. However, this is only optimal if you want to work with the entire script or just make your old changes into a mod.

For higher efficiency a couple new tools can be used for native script editing.


How to edit existing .gd files (without actively overwriting them):

Create a .gd file with same name and same path as game's original file - This will make mod manager to read from the file and apply its contents on game's original files after backing them up.

Find the string(s) you want to change starting with the language syntax ('var', 'onready var', 'signal', 'function' or 'class') and add the whole object to your new mod file. Change it however you want, but keep object's name same. This object will be completely overwriten with data you provided on load.

Example:

Original file 'files://example.gd' has:

....
var a = 10
func b():
	print(10)
....

your file 'mods://your_mod_folder/example.gd' has:

var a = 5
func b():
	print(1)
	print(2)

Original file 'files://example.gd' will become:

...
var a = 5
func b():
	print(1)
	print(2)
...

Note, that other parts will be left intact.

This is the cornerstone of the mod system: overwrite original file but only the parts you want to.

However, in some cases you might want to edit just part of an object, (i.e. it is very long by itself, or other modders might also access it, like databases)

In that case, you can add a special tag <AddTo X> 1 line above the object. This will not overwrite whole object with new data, but instead only add data to the line X of an object. If x is 0, it will be added at the start, if x is -1, it will be added to the end.

Example:

Original file 'files://example.gd' has:

....
func a():
	print(10)

class b:
	var c = 5
	var d = 10
....

your file 'mods://your_mod_folder/example.gd' has:

<AddTo 0>
func a():
	print(1)
	print(2)

<AddTo 1>
class b:
	var e = 0

Original file 'files://example.gd' will become:

....
func a():
	print(1)
	print(2)
	print(10)

class b:
	var c = 5
	var e = 0
	var d = 10
....

Last tag available for easier modifications is <RemoveFrom X Y>. When added before the object, it will ignore the new text and will only remove lines from X to Y on the original object.

Example:

Original file 'files://example.gd' has:

....
func a():
	print(1)
	print(2)
	print(10)
....

your file 'mods://your_mod_folder/example.gd' has:

<RemoveFrom 1, 1>
func a():
	#literally anything

Original file 'files://example.gd' will become:...

func a():
	print(1)
	print(10)
...


Keep in mind, that doing so will shift line order for this object, which may result in unexpected behavior especially with other mods.


Custom files:

You can use any files, images and other data, not included in the game, by giving it an unique name or path. However, for it to be called from other places you will need a path. For path you should use globals.modfolder as reference to user's mod folder.


Example:

var new_custom_script = load(globals.modfolder + "/your_mod_path/new_custom_script.gd")


As you can see, this system is still revolves around gdscript, but should make mod management much easier.

Advertisement