how to edit zsetup files

3
How to Edit Zsetup Files - July 14, 2004. ** Important: Before attempting to edit these files, please read this document. ** There are two files used for displaying WoG Options: - Zsetup00.txt - Zsetup01.txt These files should be edited in a plain text editor such as Notepad or in the ER M Scripter. After editing the files, you must copy them to your Heroes3\Data folder where th ey will override the internal file defaults. To restore the defaults, simply del ete the files from the Data folder. These files are tab-delineated (each field is separated by a tab "space") so it' s often easier to edit them in table format. To do so, open the Zsetup file in t he scripter, click on the File menu and choose "Reopen as Table". Then, to autos ize the columns so they're easier to read, find the button with the double arrow and "A" above it, click on the little down arrow *next* to this, and choose "Au tosize all columns". First I will describe the contents of Zsetup00.txt and then Zsetup01.txt. ZSETUP00.TXT - This file stores the information for the WoGify introduction text , page names (numbered 0..7), and up to four group headers within each page (num bered 0..3). There can be up to eight pages of options, although only six are cu rrently used for WoG 3.58. Row 0 - This is a title line and should be left alone. Row 1 - Name of the WoG Options dialogue that appears at the top of the screen. Row 2 - Hint text for the name. Row 3 - Right-click text for the name (currently shows the intro. text). Row 4 - Full introduction text - displayed when you open the WoG Options dialogu e. Row 5 - Page 0 Name. Row 6 - Page 0 Hint Text. Row 7 - Page 0 Description. . . . Row 26 - Page 7 Name. Row 27 - Page 7 Hint Text. Row 28 - Page 7 Description. Row 29 - Page 0, Upper Left Group Name. Row 30 - Page 0, Upper Left Group Mouse-over Text (currently identical to Right- click Text). Row 31 - Page 0, Upper Left Group Right-click Text (currently identical to Mouse -over Text). Row 32 - Page 0, Lower Left Group Name. Row 33 - Page 0, Lower Left Group Mouse-over Text (currently identical to Right- click Text). Row 34 - Page 0, Lower Left Group Right-click Text (currently identical to Mouse -over Text). Row 35 - Page 0, Upper Right Group Name. Row 36 - Page 0, Upper Right Group Mouse-over Text (currently identical to Right -click Text). Row 37 - Page 0, Upper Right Group Right-click Text (currently identical to Mous

Upload: sara-dean

Post on 15-Apr-2017

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Edit Zsetup Files

How to Edit Zsetup Files - July 14, 2004.

** Important: Before attempting to edit these files, please read this document. **

There are two files used for displaying WoG Options:

- Zsetup00.txt - Zsetup01.txt

These files should be edited in a plain text editor such as Notepad or in the ERM Scripter.After editing the files, you must copy them to your Heroes3\Data folder where they will override the internal file defaults. To restore the defaults, simply delete the files from the Data folder.

These files are tab-delineated (each field is separated by a tab "space") so it's often easier to edit them in table format. To do so, open the Zsetup file in the scripter, click on the File menu and choose "Reopen as Table". Then, to autosize the columns so they're easier to read, find the button with the double arrow and "A" above it, click on the little down arrow *next* to this, and choose "Autosize all columns".

First I will describe the contents of Zsetup00.txt and then Zsetup01.txt.

ZSETUP00.TXT - This file stores the information for the WoGify introduction text, page names (numbered 0..7), and up to four group headers within each page (numbered 0..3). There can be up to eight pages of options, although only six are currently used for WoG 3.58.

Row 0 - This is a title line and should be left alone.Row 1 - Name of the WoG Options dialogue that appears at the top of the screen.Row 2 - Hint text for the name.Row 3 - Right-click text for the name (currently shows the intro. text).Row 4 - Full introduction text - displayed when you open the WoG Options dialogue.Row 5 - Page 0 Name.Row 6 - Page 0 Hint Text.Row 7 - Page 0 Description. . . .Row 26 - Page 7 Name.Row 27 - Page 7 Hint Text.Row 28 - Page 7 Description.

Row 29 - Page 0, Upper Left Group Name.Row 30 - Page 0, Upper Left Group Mouse-over Text (currently identical to Right-click Text).Row 31 - Page 0, Upper Left Group Right-click Text (currently identical to Mouse-over Text).Row 32 - Page 0, Lower Left Group Name.Row 33 - Page 0, Lower Left Group Mouse-over Text (currently identical to Right-click Text).Row 34 - Page 0, Lower Left Group Right-click Text (currently identical to Mouse-over Text).Row 35 - Page 0, Upper Right Group Name.Row 36 - Page 0, Upper Right Group Mouse-over Text (currently identical to Right-click Text).Row 37 - Page 0, Upper Right Group Right-click Text (currently identical to Mous

Page 2: How to Edit Zsetup Files

e-over Text).Row 38 - Page 0, Lower Right Group Name.Row 39 - Page 0, Lower Right Group Mouse-over Text (currently identical to Right-click Text).Row 40 - Page 0, Lower Right Group Right-click Text (currently identical to Mouse-over Text). . . .Row 113 - Page 7, Upper Left Group Name.Row 114 - Page 7, Upper Left Group Mouse-over Text (currently identical to Right-click Text).Row 115 - Page 7, Upper Left Group Right-click Text (currently identical to Mouse-over Text).Row 116 - Page 7, Lower Left Group Name.Row 117 - Page 7, Lower Left Group Mouse-over Text (currently identical to Right-click Text).Row 118 - Page 7, Lower Left Group Right-click Text (currently identical to Mouse-over Text).Row 119 - Page 7, Upper Right Group Name.Row 120 - Page 7, Upper Right Group Mouse-over Text (currently identical to Right-click Text).Row 121 - Page 7, Upper Right Group Right-click Text (currently identical to Mouse-over Text).Row 122 - Page 7, Lower Right Group Name.Row 123 - Page 7, Lower Right Group Mouse-over Text (currently identical to Right-click Text).Row 124 - Page 7, Lower Right Group Right-click Text (currently identical to Mouse-over Text).

Row 125..Row 133 - Save/Load Dialogue Messages.

ZSETUP01.TXT - This file stores the information for all WoGify script options. Options may be placed on any of the eight pages (0..7) and in any of the four groups on that page (0..3). With four groups, a maximum of 44 options can appear on any WoG Options page.

Row 1 - This is a title. Best to just leave it alone. The line must be included.Row 2 - Headings for each column for reference. The line can be edited but not removed.Row 3+ - Each row from number three on contains the specifications for one WoG Option.

Column 1 - Comment field. This can be anything but is usually the name or description of the script, and is used by the script writer as a reminder when editing the file.

Column 2 - Script number. e.g., 80 (meaning script80.erm). WoGify scripts must be in the Data\s folder and only scripts named "script##.erm" will be loaded when the map is WoGified. ## means "00" through "99". So script94.erm is a valid WoGify script, but script102.erm isn't (it would be ignored when the map is WoGified).

Note: some scripts also have accompanying ERT or ERS files (e.g., script80.ert or script80.ers). An ERT file is a file containing all message text from the script and is used to make translation into other languages easier (there's an auto-ERTification option in the ERM scripter as well as a way to de-ERTify a script a

Page 3: How to Edit Zsetup Files

gain). An ERS file is like a single line of a Zsetup01.txt and applies only to one WoG script. If a script has an entry in Zsetup01.txt it shouldn't also have an ERS file or you'll end up with two entries in the WoG Options screen instead of one.

Column 3 - Page number. This is the WoG Options page you're adding the option to. The pages are numbered 0..7 (only 0..5 are used in WoG 3.58).

Column 4 - Option group number. There are four options groups on each WoG Options page. They go in the sequence: 0=top left, 1=bottom left, 2=top right, 3=bottom right.

Column 5 - Item number. This is where the new option appears within the group on the page. Use -1 to add the option at the bottom of the list.

Column 6 - Initial state. This is the initial state of the option: on (1) or off (0) when the program loads.

Column 7 - Multiplayer state. This field is still required in 3.58, although it's no longer actually used. In 3.57 it was the state of the option if the Multiplayer button was clicked: on (1) or off (0). In 3.58, you should just set it to an identical value to column 6.

Column 8. - ERM number. This is a unique number that your script can check to see if the option has been turned on or off by the player. There are a total of 1000 ERM numbers available for 3.58, but some of them have already been used (more will be used in 3.59). ERM numbers below 11 and above 899 are used or reserved for hard-coded options. In general, most scripts use the same number as their script number, although some also use extra numbers if they have multiple options (e.g., the Map Rules script). To be safe, put the script number here (e.g., 80). Consult the Usage358.txt file for a full list of option numbers used in 3.58.

Column 9 - Option name. This is the text that appears beside the option checkbox.

Column 10 - Option mouse-over description. This is the text that appears at the bottom of the screen when you move the mouse over an option.

Column 11 - Option right-click description. This is text that appears when you right-click on the option.

If you want to include new lines in a particular field (say, a multi-line description), you'll need to either use use the script editor or manually copy a "new line" character.

In your script, you'll also need to check for the WoG Option setting. This is a UN:P command. There are various ERM numbers (UN:P numbers) available but many are already used. Most scripts above 10 use the same ERM number as the script number so script and ERM numbers 78 through 99 are currently available at the time of the WoG 3.58 release. Option numbers 250-899 are also unused at present.

Example: To check for script88 being enabled, you might use something like:

!#UN:P88/?v6500;

Then everywhere you have a trigger, you could simply add &v6500=1 to it and it would only work if the script was enabled.