There is an example in "binaries/data/mods/test.scriptinterface/module/modified/".
In your example you would write a file "mainmenu~local_rating.append.js".
In that file you can override the init-fuction or anything else.
init = function()
{
// new init code.
}
That's the point. If the directory gui/pregame was loaded by the xml - like it was before:
<script directory="gui/pregame/"/>
then one could create a file named mainmenu~MyMod.js and do all sort of scripting therein (for example making proxies of existing functions).
But this is not the case anymore for the pregame page. At first glance, this is the only page which changed behaviour. To make a comparison, session.xml is still loading the entire directory gui/session:
<script directory="gui/session/"/>
I wish I was! New release, new work for porting mods. I played my last game in 2023, but 0 A.D. is always in my heart.
Hey @Mentula
Nice to see you're still active!
Can't you add a file like autociv like so ~mainmenu.js to extend it ?
Else maybe you can wrap the module into something else and use that elsewhere. sounds inconvenient though @phosit
Update: I ended up deciding for "haimaz". I explained my thoughts about it here:
https://gitea.wildfiregames.com/0ad/0ad/pulls/8722#issuecomment-135305
I want thank you both for the research and debate, I think the debate itself is also valuable, not just the result. And let's stay on the ground and don't exaggerate the importance of this, after all it is just single term among hundreds in the game.
And for the future, let's act in such a way that we'll never have to remove the "No historians were harmed" disclaimer...