Page 1 of 1

crash

Posted: 28 Dec 2017, 16:14
by buteobuteo
Hi and happy 2018 all.

I want to create a mod that add a bot identical to Nexus but with different name.
So I copy-paste nexus.slo, nexus.vlo and nexus.json to warzone2100-3.2/mods/global/A/multiplay/skirmish/
I rename the files to A.slo, A.vlo and A.json.
I open A.json and I change the fields like below:

Code: Select all

{
    "AI": {
        "name": "A",
        "slo": "A.slo",
        "tip": "A",
        "vlo": "A.vlo"
    }
}
I open A.vlo and I change the first non-comment line like below:

Code: Select all

/////////////////////////////////////////////////////////////////////
// ai for skirmish game
/////////////////////////////////////////////////////////////////////

script "A.slo"
run
{
I run wz:

Code: Select all

$ warzone2100 --mod=A
Single player -> Start skirmish game -> start hosting game
From the list of bots I choose A and I click on ready button.
The game crashes.

Re: crash

Posted: 28 Dec 2017, 20:30
by Prot
..and where the log files?

Re: crash

Posted: 29 Dec 2017, 06:24
by NoQ
I strongly recommend against coding any new stuff in .slo/.vlo language ("wzscript"). This old scripting language used here is hopefully going to be eventually removed in favor of javascript, which is not only an easier and better language, but also it is much more well-documented - both the language itself and the game's programming interface, and with that you'd be getting sensible error reports in the console instead of crashes, well, most of the time. You can use the semperfi-js AI script as an entry-level tutorial, or see this subforum's sticky threads for more details.

I don't think putting stuff to the config directory this way was supposed to work. You can either make a mod out of them (make a directory with multiplay/skirmish/{your files} in it, zip said directory's contents, rename the .zip file to .wz, this is your mod, see the FAQ on how to install it - recommended), or copy your files into the game data directory and edit there (not recommended because it may accidentally break multiplayer compatibility in obscure ways if you edit stuff there).

And, as Prot mentioned, it is always a good idea to provide *more* details when asking for help.

Re: crash

Posted: 03 Jan 2018, 13:46
by buteobuteo
The log files are in attachment.
Does someone have tried to replicate the crash?