How can I modify AI?

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
bulrush
Trained
Trained
Posts: 32
Joined: 18 Nov 2012, 18:03

How can I modify AI?

Post by bulrush »

I'm a beginner at this game and I'd like to modify the AI of the computer to be more defensive and stop attacking me so much. How can I do this? I see several .wz files in the game dir. Are these renamed zip files?
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: How can I modify AI?

Post by aubergine »

Which AI? If nullbot, then download the latest nullbot and rename the .wz file to .zip then you can extract it. You'll find it's files inside the multiplay/skirmish/ folder.

If you need help, best place to ask is the Scripting forum, but here is a reference to the JS API that AIs use to get you started: https://warzone.atlassian.net/wiki/disp ... script+API
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
bulrush
Trained
Trained
Posts: 32
Joined: 18 Nov 2012, 18:03

Re: How can I modify AI?

Post by bulrush »

I wanted to modify the built-in computer AI, but I don't see anything that looks like AI files in my installation. I'll grab nullbot and look at it.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: How can I modify AI?

Post by aubergine »

The AIs bundled with the game, assuming you mean those used in Skirmish / Multiplayer games, will be packaged inside mp.wz (which is just a .zip file with extension changed to .wz).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: How can I modify AI?

Post by Shadow Wolf TJC »

@aubergine & bulrush: If you're running Windows XP (I don't know if this will work on your PC), you can open .wz files without having to rename them by right-clicking the file, selecting "open with...", then choosing your program (such as WinRAR or 7zip) from a list of programs. If the program doesn't appear on the list, then select "Browse...", and find the program on your computer. This same trick can also allow you to open and edit many kinds of files, including JavaScript, using simple programs such as Wordpad, though it'll only work if the data isn't encrypted, which, thankfully, isn't the case with Warzone 2100. :geek:
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: How can I modify AI?

Post by aubergine »

I'm on a mac and can just double click a .wz and it unarchives it :)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO