佳丽云

英雄无敌3-WoG中文站

 找回密码
 英雄注册|Register
查看: 3470|回复: 3

如何增加自定义 WoG 选项。

[复制链接]

该用户从未签到

906

回帖

9696

金币

2

精华

5级 Honorable Hero

Rank: 5Rank: 5

积分
4086

退役版主

发表于 2009-2-19 13:20:22 | 显示全部楼层 |阅读模式
[wiki]WoG[/wiki] 选项允许自定义一些功能的开启与关闭。

如果能够自己增加里面的选项,然后应用于自定义脚本就更好了,不知道有谁试过?

有些脚本在地图启动的时候弹出对话框,这样其实很不好,至少是非常不爽。我个人比较喜欢在WoG选项里面进行设置的方式。

有谁知道如何增加 WoG 选项?

 成长值: 30085

  • TA的每日心情
    无聊
    2020-5-27 00:09
  • 签到天数: 24 天

    连续签到: 2 天

    [LV.4]狂狼人

    5773

    回帖

    2696万

    金币

    42

    精华

    管理员

    精灵奇侠

    Rank: 12Rank: 12Rank: 12

    积分
    9245290

    社区QQ达人论坛创始人杰出贡献论坛元老

    发表于 2009-2-19 16:15:01 | 显示全部楼层
    Poet,wog自带的说明文档里介绍了如何自定义WoG选项,在..Data\Text Resources Copy文件夹中,有一个How to Edit Zsetup Files.txt的文本就是。懒得去翻的话,可以看我给出的引文:
    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 Mouse-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 again). 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.

    该用户从未签到

    906

    回帖

    9696

    金币

    2

    精华

    5级 Honorable Hero

    Rank: 5Rank: 5

    积分
    4086

    退役版主

     楼主| 发表于 2009-2-19 18:23:39 | 显示全部楼层
    太好了!这样可以把某些测试性东东搞成 WoG 选项。
  • TA的每日心情
    擦汗
    2020-8-29 10:50
  • 签到天数: 3 天

    连续签到: 1 天

    [LV.2]野猪

    1264

    回帖

    4万

    金币

    2

    精华

    5级 Honorable Hero

    Rank: 5Rank: 5

    积分
    6486

    退役版主

    发表于 2009-2-19 18:34:48 | 显示全部楼层
    http://bbs.h3wog.com/viewthread. ... &extra=page%3D1
    兄弟看一下吧用了一下你的[wiki]ERM[/wiki] 我的追随就变不回去了
    ahome_bigavatar:guest
    ahome_bigavatar:welcomelogin
    您需要登录后才可以回帖 登录 | 英雄注册|Register

    本版积分规则

    捐赠
    关注我们,英3Mod一网打尽!

    WoG中文站 ( 辽B2-20210485-10 )|辽公网安备 21128202000228 号

    GMT+8, 2024-11-1 10:27 , Processed in 0.532126 second(s), 13 queries , Gzip On, File On.

    Powered by Discuz! X3.4

    Copyright © 2004-2022, Beijing Second Sight Technology Co., LTD.

    快速回复 返回顶部 返回列表