Open Nathan-MV opened 5 months ago
Joiplay calls this functionality postload scripts. The way they decide when to run them looks a little error prone to me, but it'd be a good starting point if you wanted to expand this to work for XP and VX.
You should also note in the config file that it's only for Ace games, unless you manage to fix that.
Joiplay calls this functionality postload scripts.
Alright then, if Joiplay did it first, I guess we should use the name they picked so that we don't cause unnecessary fragmentation. It's not a bad name either.
The way they decide when to run them looks a little error prone to me, but it'd be a good starting point if you wanted to expand this to work for XP and VX.
I'm not going to block this PR on XP/VX compatibility, but I would definitely be amenable to merging a follow-up PR that adds support for those. The Joiplay logic you linked looks rather scary; I'm guessing there's a less crazy way to do it, but maybe they know something I don't.
You should also note in the config file that it's only for Ace games, unless you manage to fix that.
Yes please note this.
The Joiplay logic you linked looks rather scary; I'm guessing there's a less crazy way to do it, but maybe they know something I don't.
$scene
appears to simply be an instance of a game-defined class with a main
method on it, so... I think the only "good" way of hooking it is to monkey patch the base class constructor. Here's an example written in ruby, because it was easier.
Scripts that load before rgss_main