chenzep 发表于 2007-6-21 19:34:16

请问几个基本ERM命令

刚学ERM,很多不懂,特来请教。
1:PI,看了yunings的教程了,他说在运行了所有的!#之后运行这个命令。
    问题:
    a:是不是运行了所有的!#命令之后就马上运行PI。
    b:是不是允许有多个PI,如果有多个PI,那么PI之间的执行顺序。
2:!!VRz482&y1=0:Sz144044;
   查了一下VR命令,不清楚z144044的意思。难道是z482=z144044,看起来不象。
3:下面是script44.erm中的代码:


!?TM38;
!!UN:P44/?y-1;
!!FU&y-1<>1:E;

!!UN:U63/65/?v1;
!!VRv1:S-1;
!!DO10910/1/v1/1&v1>0:P;
请问最后的一句: !!DO10910/1/v1/1&v1>0:P; 时候会执行。
我的理解是V1=-1,所以最后一句永远不会执行。

4:erm和ert文件有什么关系.

yunings 发表于 2007-6-21 20:43:17

1、
a.是
b.按照脚本编写顺序执行,其实应该是同步执行,反正程序是逐行解读你的命令的,你按顺序编写肯定没错
2、!!VRz482&y1=0:Sz144044;
这句脚本的意思是变量z482的值只有同时满足y1=0的情况,才能赋予其变量z144044的内容
3、请看程序注释,这句脚本的意思是遍历所有地图上的翡翠塔。第二段脚本主要想表达的意思是初始化v1的值——>遍历地图上的翡翠塔数目——>将获得的数目读入到变量v1中。将v1初始化为-1是为了配合最新的UN:U命令用法。
4、ert中主要是对应erm中的文本部分内容,比如宝物描述、技能增强描述、生物描述等,都可以在ert中设置和修改,因为erm中启用了对应的变量来控制,所以,你只要修改ert的内容,对应erm的文本就会发生变化,而无需再在erm中定位修改文本部分内容

chenzep 发表于 2007-6-22 09:37:04

多谢yunings,问题大部分都明白了。
问题2是ERM中说z变量只可以用到1000,就对z144044那么长的字符串变量有点疑惑。
问题4是居然没有想到用UltraEdit打开看一下,笨死......

但是问题3还是疑惑。
a: !!UN:U63/65/?v1;
b: !!VRv1:S-1;
c: !!DO10910/1/v1/1&v1>0:P;
上面a,b,c的意思分别是:
a:获得并保存Emerald Towers的数目到变量v1中。
b:v1=-1
c:如果v1>0,那么就for(i=1;i<=v1;i++){FU10910;}.
从上面看来,b中v1的数值把a中v1的值给修改了,那么v1中保存的就不是Emerald Towers的数目了, c的执行自然就没有任何意义了。
但是从实际效果看来a,b中的v1好像是各不相同的,怎么解释。

[ 本帖最后由 chenzep 于 2007-6-22 09:40 编辑 ]

zzy007 发表于 2007-6-23 00:23:16

有没有具体的ERM语法教程(不是ERM_Help_CN),那个例子太少了

chenzep 发表于 2007-6-23 09:51:47

昨天晚上试验了一下。上面的脚本好像是错的。
脚本来只论坛的"WoG358F免汉化一次性升级补丁"包中script44.erm.版本信息如下:
ZVSE
ERMS_ScriptDate=24.9(September).2004
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2004.6.29.918

** Emerald Tower Script Version 1.0 Created by Timothy Pulver
** with thanks to Steve Hanna for extra naming ideas
** Requires WoG version 3.58 or later using ERM version 2.7 or later.
** WoGify Name: script44.erm
** Updated: September 24, 2004, 2004

** This script makes all golden-green roofed towers in the game (object type 63,
** subtype 65) into Emerald Towers where the Wizard who dwells there will
** improve any creature type in your army for a price. The price is a lot of
** resources of a specific type, depending on the improvement. In addition,
** one of the creatures of the type being improved must also be left for the
** Wizard.

** The improvement number is usually a percentage of the existing score. For
** example, 50% growth bonus, or 25% health bonus. In addition to standard
** stat improvements, new special abilities may be added. Special abilities
** all cost mithril.

** Each Emerald Tower may only be visited once per day. A maximum of 12
** types of creatures may be improved in any game, but each creature type
** may have many improvements made to it. A creature cannot be improved
** during a "Week of" that creature type, if the "Week of Monsters" script
** is active.

** The AI can also use the Emerald Tower but not quite the same way that
** a human player can. Instead, each AI player may get one free random
** upgrade for the AI's most valuable stack when an AI visits the tower.
** If the ability can't be granted for any reason, no bonus is given the AI
** for that particular visit.

------------------------------------------------------------------------
页: [1]
查看完整版本: 请问几个基本ERM命令

捐赠