crash

For AI and campaign script related discussions and questions
Post Reply
buteobuteo
New user
Posts: 2
Joined: 28 Dec 2017, 12:57

crash

Post by buteobuteo » 28 Dec 2017, 16:14

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.

User avatar
Prot
Trained
Trained
Posts: 166
Joined: 29 Nov 2010, 12:41

Re: crash

Post by Prot » 28 Dec 2017, 20:30

..and where the log files?

User avatar
NoQ
Special
Special
Posts: 6195
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: crash

Post by NoQ » 29 Dec 2017, 06:24

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.

buteobuteo
New user
Posts: 2
Joined: 28 Dec 2017, 12:57

Re: crash

Post by buteobuteo » 03 Jan 2018, 13:46

The log files are in attachment.
Does someone have tried to replicate the crash?
Attachments
logs.zip
log files
(26.48 KiB) Downloaded 39 times

Post Reply