matthewandnathan
12 years ago
Okay, I know what map ini does, and I know a decent amount about worldbuilder, but how do you is map ini? Is there a tutorial somewhere?
If any one could explain map ini as simply as possible, I would really appreciate it.😄
"Overlord Moving."
Sponsor
Lengo
  • Lengo
  • 69.5% (Friendly)
  • Captain
12 years ago
map.ini is a text file in the same folder as your map. It is available to this map only. You may, however, copy your map.ini to another map's folder to use it again. A map.ini file is read by Zero Hour when the map starts. It is read once, and only once.

You create a map.ini file by right-clicking in the folder of the map you are working on, then choosing new, then text file. You open it by double clicking it. You then can either type or paste copied text into it. Once done, save it. Then rename the file to 'map.ini'. Windows will warn you "Are you sure you want to change the file extension?" Answer yes.

You can make Windows associate .ini files with notepad. You do this by double clicking an .ini file. Windows will tell you it doesn't know how to open it, and allow you to choose an application to open it with. Choose Notepad, and check the box that says 'always open this kind of file with this program'. After you've done this, you can double click any .ini file, and notepad will open it so that you can read/edit it.

With a map.ini file, you do these things and more:

Show snow or rain (the sound effects for thunder and lightning is a seperate script (an .scb file)
Define a train (it's speed, it's acceleration, it's stopping distance, it's sounds, etc.)
Color the water on your map (lakes, rivers and streams)

You can do all three of these things in one map.ini file. Each section has a section title that separates it from the other sections. For example, you can have it raining on your map, and have a train that you have defined.

A good way to organize separate .ini files is to create a folder under My Documents\Command and Conquer Generals Zero Hour Data. Make a new folder called MapIni Files. Then copy succcessful map.ini files to this folder and name them according to what they do:

snow.ini
rain.ini
traindefinition.ini
watercolor.ini

You can then copy the desired .ini to the map directory that you're working on. Just change the name to map.ini in your map's folder.

The train and weather map.ini files need scripts to go along with them. The rain needs a flash of lightning (usually) and sound effects (lightning and thunder), and the train needs script code to tell it when to sound it's horn. These scripts have the extension .scb. They are created when a user exports his successfully working code. The key word is successfully. Make sure it works before you export the scripts.

You can organize your .scb files too. Make a new folder under My Documents\Command and Conquer Generals Zero Hour Data and name it SCB files. You can then import the script from the Edit\Scripts menu item in Worldbuilder.

Name your scripts accordingly. For example, I have these weather .scb files

Rain - Distant thunder no lightning.scb
Rain - Full Thunder and lightning.scb
Rain - Just rain.scb
Snow light.scb
Snow thick.scb

To wrap it all up, map.ini files are local to your map. This means that the map.ini file must reside in the same folder as your map. You can organize them for reuse by copying them to a folder: My Documents\Command and Conquer Generals Zero Hour Data\MapIni Files. Name them here according to what they do so that you know which one to copy to a new map's folder, then rename it in that folder to map.ini

Script exports (.scb files) can be used again and again if they're generic enough. Simply create the folder: My Documents\Command and Conquer Generals Zero Hour Data\SCB Files, and export the scripts there with a name that tells you what they do.

One other thing. You've seen countless map.str files. These, too,are text files. Each item of text is listed this way:

MapIntro:Number (where number is an actual number), such as MapIntro:01.

You can do other things to display text strings. Include these in the map.str file. I have a map that has civilians placed in it. If one is killed, a script plays a sound and displays the appropriate string. For a working example, download my map LG GoldRushCanyon 3 and play it, then look at the map.str file. You'll find the MapIntro:Number items and you'll find strings named MinerKilled:Number. In other words, you're not limited to the name "MapIntro".

To my knowledge nobody has compiled a library of useful, generic map.ini files and .scb files. It would be nice if someone did this. I'd like to find a link: Map.ini files and .scb files, with a list of each, and a description of what the .ini or .scb file does.

CommieDog
12 years ago
Another thing you can do with map.ini is make a mod map. For instance, you could make a map where a Ranger has as much health as a Crusader.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
matthewandnathan
12 years ago
Okay, this makes sense, and I know how to extract big files; but if I want to make a ranger have as much life as a crusader, what do I change?
Or change the range of a crusader, or want to make a crusader build rangers, or make a crusader have a anti infantry gun, basically anything like that, that I would want to change, how do I do it? Is it like modding, only I just copy the files I want to change to a txt file? I really have no idea how to do this or modding, and I can't find any sort of tutorial for it. Thank you for the help you already gave me though.
"Overlord Moving."
Lengo
  • Lengo
  • 69.5% (Friendly)
  • Captain
12 years ago

......
Or change the range of a crusader, or want to make a crusader build rangers, or make a crusader have a anti infantry gun, basically anything like that, that I would want to change, how do I do it? .....

Originally Posted by: matthewandnathan 



Download other mods and look at what the author has done. Or find someone who has a mod and ask them. But be aware, people that know how to do things don't always know how to explain things.

matthewandnathan
12 years ago
Ok, thank you both for your help!
"Overlord Moving."
zulius
  • zulius
  • 50.25% (Neutral)
  • Private
4 years ago
hey guys
this thread came in my google when i search for help in a Map.Ini.
My dad and i played last 2 weeks a lot of AOD-Maps. For him (he is 65) the maps are to difficult and also for me. i like to play with my dad and i want to ask how can i change the lifepoints of the enemies? I did this in the INIZH.big and it worked, but how can i do this for one specific map? Can i rename the whole INIZH.big to map.ini and put it in the maps folder?
Or should i extract it first to the different ini's? and then which one must go to the folder of the map?