[Help] Newbie going crazy with Lua Script [SOLVED]

Trying to apply the script on the right, was looking for a way to make it so a Savior’s Merit will be added to a new character on creation, found out it happens on GD League Season 2, went to their .dbr and .arc stuff and found gdleagues02.lua doing what I needed, except I just want the Merit. I bet I’m doing something wrong here since after compiling without any error I still don’t get the item with new characters.

Here is my “pack”, it’s working just fine (New Caravan & Inventory Extreme Edition, Shattered Affixes and changes on .dbr and stuff based on Path of Grim Dawn, Reign of Terror and Smash N Grab Unchained), all credits goes to the creators of the mods, they did the awesome work, I’m just messing around while learning.

Try deleting the word “local” (and the space after it) from line 13

1 Like

The first instance of the word “local” I should specify

Thank you for the reply, but sadly didn’t work, gonna keep trying though, been trying to do this for quite few hours already, can’t get over it till it’s done.

I know that feeling, good luck!

Did you create assets for those scripts in Asset Manager? Did you use the Archive->Build option in AM?

a few things you can try:

  • delete the scripts.arc file and right click on your script assets to build them
  • are you calling the script? League mod calls it from devilscrossing_spawnarea.dbr
  • the dbr file should include the entire function name: gd.GDLeague.GiveStartingItems , case sensitive
  • does not look like there are syntax errors, but Grim Internals enables messages in the console, so you will get some error message if there is something wrong.
1 Like

Thanks for the reply Stan, verified what you wrote and also tried to apply the script from GD League S2 without chaging a single line to see if it woud work but didn’t, trying to make it work the same way as it does for GD League and looking through the forum too, maybe there are other ways to achieve the same result.

Here’s my Custom Game right now, if you or someone who’s reading it may be able and want to assist me.

EDIT: Okay, okay, I did it! Thanks to this tutorial I had the idea to try to add the Savior’s Merit as a reward for the first quest with Jarvis on Normal, when I saw some lines on his quest about giving the Salt Bag to the player I chose to add a line to give a Merit too, result: it works. Thanks for the attention Snazzblaster and Serious_Stan.

Good to hear you solved it.
I took a look at your mod and could not find where you are calling the function.
You declare the the function in the file, but it has to be attach to an object in the world and when a certain event happens it will get invoked.
Here is an example where the function is called, whenever the player is standing in an area defined by a game object.

1 Like

I see, been learning a lot while chaging stuff here and there but still have tons to learn, ty Stan.