Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(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.