Problem when making changes to base.wz

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Problem when making changes to base.wz

Post by aubergine »

From what I understand, base.wz is a .zip file renamed to .wz

I can expand the zip, getting it's folder structure, etc. But, on a mac, if I then re-zip it and rename to a .wz I get a crash on game load (report attached).

Any ideas?

Alternatively, is there a way I can experiment with creating javascript AI files without modifying base.wz? For example, could I put it in my mods folder or will the game only look for AIs in the multiplayer/skirmish folder inside base.wz?
Attachments
Warzone_2012-01-01-065211.txt
Crash report
(31.93 KiB) Downloaded 316 times
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Problem when making changes to base.wz

Post by vexed »

There shouldn't be a need to re-zip it, datadir just needs to point to that data, and then it should be good to go.
However, I have no idea how the mac builds work being a dmg.

*edit, it seems whatever you changed, you did it incorrectly. That is why it crashed.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Problem when making changes to base.wz

Post by aubergine »

Steps to reproduce:

* Find WZ app in Applications folder
* Show package contents
* Locate base.wz and create a copy of it on desktop
* Double click base.wz to unzip it
* Right-click resulting folder and "compress" to get a base.zip
* Rename .zip to .wz
* Overwrite the base.wz in the "show package contents" game folder

So I hadn't changed anything in the base.wz as such. Should the base.wz zip file have a root folder called "base" or should it just have the files / subdirectories in there?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Problem when making changes to base.wz

Post by aubergine »

Also, I've been poking around some mods and from what I can see a mod is a .wz containing a folder structure that is the same as what's supplied with the game? So are mods sort of overwriting what's in the main game files/folders of same name?

I looked at http://developer.wz2100.net/wiki/ModsAndMaps but it wasn't clear what files/folders go in a mod?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Problem when making changes to base.wz

Post by Berg »

aubergine wrote:I looked at http://developer.wz2100.net/wiki/ModsAndMaps but it wasn't clear what files/folders go in a mod?
An example of a mod is to make a data/base/texture/new-texture.png
the new-texture.png using the name of a texture already in warzone data/base/textures folder
This then you compress and call yourmod.wz and place into the mods folder and run it using the commandline call for that mod..

if you want to change the base.wz content you can but if you do change names or add more content you will need to modify the wrf folder content to reflect your changes.

I use ubuntu to run warzone and have no need for the .wz files i just do my changes in the folders..

If you can compile warzone on your mac then it should remake your changes into a wz file...but as its a mac i know little about that

I made a sorta tutorial on models it has some insight into wrf files http://sourceforge.net/apps/phpbb/wzgra ... p?f=3&t=12


Note that you dont need the data/ folder for base.wz thats just how the structure is in linux...
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Problem when making changes to base.wz

Post by aubergine »

Thanks :)

While developing a mod, do I need to keep updating the .wz file, or can I just have a folder structure in the autoload dir? -- Just checked, I can just use folder structures while developing = nice :)

Also, is there any way to get WZ to refresh a mod without quitting/reloading 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
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Problem when making changes to base.wz

Post by aubergine »

Hrm, run in to a problem.

While the game indicates that it has found the mod (shows the mod name in top-left on main menu screen) it's not actually making the AI in the mod available unless I compress the folder structure in to a .wz :(

Any ideas?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Problem when making changes to base.wz

Post by cybersphinx »

Works for me, putting the files into mods/autoload/nullbot/multiplay/skirmish/...
We want information... information... information.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Problem when making changes to base.wz

Post by aubergine »

Could it be something to do with the /data folder mentioned earlier? Not sure if that comment was only about base.wz or whether it applies to mods also?

Found the problem.

I had this sort of path: autoload/multiplay/skirmish/ = bad

Instead of: autoload/whatever/multiplay/skirmish/ = good

I know cybersphinx mentioned that in the post above, but for some reason my brain didn't spot it.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
dak180
Trained
Trained
Posts: 288
Joined: 01 Nov 2009, 23:58
Location: Keeper of the Mac Builds

Re: Problem when making changes to base.wz

Post by dak180 »

aubergine wrote:Steps to reproduce:

* Find WZ app in Applications folder
* Show package contents
* Locate base.wz and create a copy of it on desktop
* Double click base.wz to unzip it
* Right-click resulting folder and "compress" to get a base.zip
* Rename .zip to .wz
* Overwrite the base.wz in the "show package contents" game folder

So I hadn't changed anything in the base.wz as such. Should the base.wz zip file have a root folder called "base" or should it just have the files / subdirectories in there?
The compress command may not give you the same folder structure as was in the original file, which would be why it would not work.

Vexed is right though, anywhere you see a .wz file you could instead have a folder of the same name (minus the .wz) and it should work.

That is in fact how it is tested on the mac; it is not until the dmg gets put together that they get zipped up.
User:dak180
Keeper of the Mac Builds
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Problem when making changes to base.wz

Post by aubergine »

Yup - the folders are working fine now - I must have had a "senior moment" when I was constructing my original folder paths lol.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Post Reply