I've finally had the chance to use this plugin in my new project and, boy, it's awesome! Goodbye, restrictions of AGS scripts! Welcome, content that can be modified while running the game and reloaded with the press of a button (requires custom code, but still)! Thanks so much for the plugin, Denzil!
I don't know if you're still willing to maintain it after all these years but here are some things I've noticed:
EDITOR
- Renaming scripts results in duplicate files. (At least inside the editor.)
ENGINE
- Why aren't the game.variables available to the scripts?
- ags.getplayer() doesn't seem to work properly. I tried to get the current room number by calling ags.getplayer():Room() but it returned a table. Calling ags.cEgo:Room() worked just fine.
--edit--
And now suddenly, I keep getting an error that goes something like this: "[Lua] attempting to concatenate a table value". No line number, nothing. And it seems like the error happens after a successful function call from AGS to Lua and before the next call. Maybe it's a bug in the plugin? I'm out of ideas.
If it helps, I've created many different classes (table, metatable, etc.) before this but now that I'm trying to make an Inventory class, it just keeps crashing. Doesn't matter if it's a class or a plain table but sometimes I can define some functions into it and sometimes I can't. Sometimes the error goes away for a while after I comment out some class method call. Very weird.
--edit2--
Maybe it has something to do with the serialization of the Lua state? The crash has always occurred after game_start but before any other events that call the scripts. That's when the default restart point is saved, right?
--edit3--
Probably the same thing that happens sometimes with the editor. I try to compile the game and it says it can't write the exe since it's in use, even though it isn't. After one or more tries it works just fine. Just a moment ago I started the game and it crashed with the error (see above). Then I tried to start the game again. I didn't modify anything but now it started ok. So yeah, what the hell...
--edit4--
Worked around the crash by delaying script loading to the first on_event call. Saving the game produces the crash sometimes, so it's still a very big problem.
And one other thing.. How can I set ActiveInventory to null? ags.cEgo:ActiveInventory( nil / false ) crashes the game because the value isn't an InventoryItem.
I don't know if you're still willing to maintain it after all these years but here are some things I've noticed:
EDITOR
- Renaming scripts results in duplicate files. (At least inside the editor.)
ENGINE
- Why aren't the game.variables available to the scripts?
- ags.getplayer() doesn't seem to work properly. I tried to get the current room number by calling ags.getplayer():Room() but it returned a table. Calling ags.cEgo:Room() worked just fine.
--edit--
And now suddenly, I keep getting an error that goes something like this: "[Lua] attempting to concatenate a table value". No line number, nothing. And it seems like the error happens after a successful function call from AGS to Lua and before the next call. Maybe it's a bug in the plugin? I'm out of ideas.
If it helps, I've created many different classes (table, metatable, etc.) before this but now that I'm trying to make an Inventory class, it just keeps crashing. Doesn't matter if it's a class or a plain table but sometimes I can define some functions into it and sometimes I can't. Sometimes the error goes away for a while after I comment out some class method call. Very weird.
--edit2--
Maybe it has something to do with the serialization of the Lua state? The crash has always occurred after game_start but before any other events that call the scripts. That's when the default restart point is saved, right?
--edit3--
Probably the same thing that happens sometimes with the editor. I try to compile the game and it says it can't write the exe since it's in use, even though it isn't. After one or more tries it works just fine. Just a moment ago I started the game and it crashed with the error (see above). Then I tried to start the game again. I didn't modify anything but now it started ok. So yeah, what the hell...
--edit4--
Worked around the crash by delaying script loading to the first on_event call. Saving the game produces the crash sometimes, so it's still a very big problem.
And one other thing.. How can I set ActiveInventory to null? ags.cEgo:ActiveInventory( nil / false ) crashes the game because the value isn't an InventoryItem.