Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Any idea why <AddTo -1> just throws a bunch of errors? I'm attempting to add a new function to the class combatant: in combat.gd and I don't particularly care where it is as long as its in there so adding it at the end would be great as it would be compatible with any mod (even with your changes). The modding help does say that this is perfectly valid but I could only get it to work by specifying a particular line which makes it vulnerable to other mods

Edit: Oh, apparently it was already brought up in the modding thread like a year+ ago and has just never been fixed.... That's super lame

The problem is that array[-1] successfully gets the last item, but array.insert("something", -1) gives an index out of bounds error.  For a language derived from Python it's quite unexpected for negative indexes to fail.  Thanks for finding it.  If you have any other troubles while modding be sure to say something, as I am currently fixing it and writing a more detailed modding guide.

Awesome! Sorry I haven't been involved with this game in quite a few years. How would I go about getting your fix?

(1 edit)

well if that helps <Remove from> is index 1 and <Addto> is index 0 so you need to <AddTo 0> to be in line 1 right after function

also mod system cant read 1st line in file, even if ank fixes will solve problems for you, most users might not have them instaled