how to replace a campaign map?

For AI and campaign script related discussions and questions
Post Reply
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

how to replace a campaign map?

Post by DylanDog »

I am working on a mod to make campaign harder. I have managed to understand how the vlo and slo files work but I was not able to understand how to replace a campaign map. Assuming I would like to replace the map for the first campaign how should I include the new map in the mod?
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: how to replace a campaign map?

Post by lav_coyote25 »

you should look at the scripts for the original, its all there , what you need. :)
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

Re: how to replace a campaign map?

Post by DylanDog »

lav_coyote25 wrote:you should look at the scripts for the original, its all there , what you need. :)
Where? That is what I did already mate. I tried to compare the structure of any map.wz file created with FlaMe but it seems the structure of the maps in base.wz used in campaigns are totally different (wrf/cam1/cam1a ?????).

Sorry I am not able to understand this. Would you mind to show me (upload) a simple mod (*.wz) which has included only the map for the campaign 1?
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: how to replace a campaign map?

Post by lav_coyote25 »

well, i have never done a mod, started to , but ran into that old monster, LOK , lack of knowledge. :) here is something that "may" help. from the Documents Project files. you will have to read it all and then ask questions. :3 :3 :3 :3
just remember that the .WDG is now the .wz file.
-----------------------------------------------------------------------------------------------------------
LAV_Coyote25 ©Revised: April 09, 2006

By DancingMoogle
how to compile a mod including your new pie files follow this:
Step 1: Essentials

Create a new folder and name it to whatever you want. Inside this folder you will need to create more folders for whatever components and stats you decide to include with your mod. We’ll start with a simple mod, which includes a different body and weapon.

Create a folder called ‘Components’, and inside this folder create 2 new folders called ‘weapons’, and ‘bodies’.

In the parent directory (where you created ‘components’), create a second folder called ‘wrf’. The .wrf files are what tell Warzone what to load and when; for example, piestats.wrf defines all the graphics to be loaded such as the bodies and weapons, while vidmem.wrf tells Warzone what to load into video memory. You can find the .wrf files as a zip file along with wdg explorer, obtained from the downloads page Home » Downloads » Editoren » Sonstige Moddingtools ( http://dc.warzone2100.de/dle/ )

For this mod you will need to extract piestats.wrf to your new wrf folder. Next you will need to go to your Warzone directory and copy the MakeWdg program from there to your parent directory; this is the program that will compile your mod.

Step 2: Creating a Batch file

In order to compile your wdg file you will need to ‘call’ the MakeWdg program. You can’t do this simply by double clicking it, so you need to create a batch file to tell the program what to do.
Create a new text document in notepad and call it whatever your new mod will be called; we’ll call it TestMod for the moment. Now you need to copy and paste the following into the new text document:

MakeWDG -v -o "???.wdg" -x 1001 b3d -s 11 nov -s 0 warzone -a multiplay\maps\*.* -a addon.lev -a wrf\multi\*.wrf -w wrf*.wrf > result.txt

The ??? represents what you will call the mod, in this case TestMod.wdg.

Save the text file with the .bat extension to create your batch file. Place the file in your parent directory along with the MakeWdg program and your ‘components’ and ‘wrf’ folders.

Step 3: Adding your pie files

You will obviously need a couple of new pie files to add to your mod so check out my guide to pie slicer guide part 1 and guide part 2 for how to do this, then create or modify a body and a weapon muzzle and mount .pie file.
Save the body to the bodies folder and both new weapon files to the weapons folder.

In order to get the new files into the game, you will need to name them the same as files already in the game. By doing this you are effectively forcing Warzone to replace the existing .pie files with your new custom ones.

Let’s say you’ve just created a new light body to replace the viper. The viper body is named DRLBOD01.pie (you can open the various bodies in pie slicer to find out which they are, or alternatively use Customizer kit and check what pie file corresponds to each body), so name your new body to this, not forgetting to add the .pie extension.

Weapons come in two parts; muzzle (barrel) and mount (turret). Choose a weapon to be replaced, let’s say the light cannon. The muzzle gfx for this weapon is GNLCAN.pie, and the mount gfx is TRLCAN.pie, so rename your two new weapon pies to match these. Drop them into your weapons directory and you’re nearly ready to compile.

Step 4: Editing the Piestats.wrf file

Currently there are a few lines missing from the end of the piestats.wrf file which will cause Warzone to throw up error messages when it tries to load a game. In order to stop this from happening you will need to add some extra lines. Open piestats.wrf in WordPad and add these to the end:

directory "components/weapons"
file IMD "TRMVTLEM.PIE"
file IMD "TRMVTLPL.PIE"
file IMD "TRHMG.PIE"
file IMD "GNHMG1.PIE"

directory "effects"
file IMD "FXLBMBE2.PIE"
file IMD "FXLBMBP2.PIE"

Save the file, remembering to add the .wrf extension so that it doesn’t just save as a standard txt file. Now you’re about ready to compile your new mod.

Step 5: Compiling your mod

To compile your mod simply double click the batch file you created and wait a second for it to finish. Three new files will be created:

Wdg.temp
Result.txt
‘Yourmod’.wdg


You don’t need to worry yourself with wdg.temp or result.txt, and can safely delete them. The third file is your new wdg file which will be used by Warzone. Simply copy it and drop it into your Warzone directory. Now start a game and check out your new stuff!

Some additional information

Adding custom Texpages:

If you’ve created a new texpage to accompany your new pie files you will need another folder named ‘texpages’. Put your new texpage in here.
To get your new page into Warzone you will need to add some more wrf files. There are 2 ways to do this depending on the texpage you are using.
If you have simply changed one of the existing Warzone texpages (maybe you’ve changed one of the body colours, or adjusted the appearance of one of the weapons), then all you need to do is add the following .wrf files to your wrf folder:

Vidmem.wrf
Vidmem2.wrf
Vidmem3.wrf
Adding these will make Warzone use your adjusted texpage instead of the standard version.

If, however, you have created a totally new texpage you will also need to add the new page to each of the vidmem wrf’s. Open each one in wordpad and add the name of your new page to the end of the list that is already there (example: page-1-my structures.pcx). The last texpage is ‘page-6-features.pcx’ so add your new one after this in the following format:

File TEXPAGE “page-1-my structures.pcx”

Your new page will now be used in the game to texture whatever new pie file you used it on. Be careful with how many new pages you add though as it can have undesirable effects if you overload Warzone with too many texpages (although if you’re using say a GeForce4 with 128mb RAM I don’t think you’ll be running out of texture memory in too much of a hurry lol).

Adjusting weapon and body stats:

The easiest way to adjust the stats of anything you add is to use customiser kit. Simply edit the stats for the file you are going to replace with your new file, and compile the wdg file. You won’t need the wdg file itself though, just the .txt files it creates.
Warzone stores all of it’s stats for the various weapons, bodies, etc as .txt files that can be opened and edited in notepad or wordpad. However, editing these by hand is a very long-winded process and can get very confusing, so by using customiser kit to edit the files you get rid of the need to manually edit.
When you compile the mod, a folder called ‘stats’ is created in the customiser kit MakeWDG directory. This contains all the .txt files for whatever you just edited (most likely to be weapons.txt, weapon sounds.txt and body.txt as these are the most frequently edited stats). All you need to do is copy the ‘stats’ folder into the parent directory of your new mod and the stats will be applied to your new pie files.

Making your new mod version 1.11 compatible:

You will need to add a few extra lines to the end of piestats.wrf to do this:

Directory “effects”

File IMD “fxblulaser.pie”
File IMD “fxredlaser.pie”
File IMD “fxgrnlaser.pie”

These are the new laser effects that were added to the 1.11 update.

Other folders you might need:

‘Structures’
‘Effects’
‘Texpages’

Sub-Folder in ‘Components’- Prop (for vehicle propulsions such as track or hover) ‘Messages’ with sub-folder ‘Strings’ (this is where Names.txt will go; this is the file that has all of the various names of weapons, bodies, etc plus information on the names of various templates for skirmish units and other such information).
User avatar
DylanDog
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany
Contact:

Re: how to replace a campaign map?

Post by DylanDog »

thanks for this but it is not helping. I know how to create a mod. I do not know is:

how to put in the campaign mode the files I get from FlaMe to replace the original ones (to allow to make campaign on new maps)

:-(
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: how to replace a campaign map?

Post by Buginator »

DylanDog wrote:I am working on a mod to make campaign harder. I have managed to understand how the vlo and slo files work but I was not able to understand how to replace a campaign map. Assuming I would like to replace the map for the first campaign how should I include the new map in the mod?
AFAIK, flaME can't export the correct map type for campaigns, you need editworld for that...
and it ends here.
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: how to replace a campaign map?

Post by KukY »

Buginator wrote:AFAIK, flaME can't export the correct map type for campaigns, you need editworld for that...
It can. Flail complicated the map compile screen to enable that.
User avatar
milo christiansen
Regular
Regular
Posts: 749
Joined: 02 Jun 2009, 21:23
Location: Perrinton Michigan

Re: how to replace a campaign map?

Post by milo christiansen »

I made a Proof of Concept mod to replace the fastplay, there shouldn't be much difference. It's listed in the challenges subforum under "Scav assault challenge/minicam"
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: how to replace a campaign map?

Post by lav_coyote25 »

Buginator wrote:
DylanDog wrote:I am working on a mod to make campaign harder. I have managed to understand how the vlo and slo files work but I was not able to understand how to replace a campaign map. Assuming I would like to replace the map for the first campaign how should I include the new map in the mod?
AFAIK, flaME can't export the correct map type for campaigns, you need editworld for that...
are you sure about that? i never tried it... editworld32bit. perhaps i should one day... with my luck it will crash. :annoyed:
Post Reply