找回密码
 开放注册
搜索
查看: 2242|回复: 0

辐射2编辑器使用简介

  [复制链接]
发表于 2007-3-14 10:26:26 | 显示全部楼层 |阅读模式
辐射地图编辑器建设指南

绪论

这工具做成于六年前。在辐射1和2的开发过程中逐渐得以校正与增强,以今日的标准而言的确是过时了些,而且用这家伙来做地图需要有相当的耐心(译注:的确是很麻烦……),初做时就像是面对一个挑战,不过熟悉后就顺手些了。地图编辑器的主要问题就是找到所有你相要的素材片段。

编辑器中有六类不同的素材范畴,遗憾的是,它们并不是按档归类的—因为引擎不支持(译注:六年前也就是1997年,那时我偶然间拿到了F1的试玩,而且对这个游戏毫无感觉……);每一个在做成后都按顺序排在一列的最后,所以你可能会为了一个素材片段而不得不将列表翻到最后。幸运的是,这里有个书签可以让你在标记后比较容易的找到前个用过的素材。


宏观计划

制作一张地图所要用到的素材有6大类

砖瓦(Tiles)—你用来建设地图的最基本的材料,这类素材在“ROOF”选项关闭时作为地板,开启时作为瓦片。所以每垮砖瓦都可以用来做地板和屋顶。

墙片(Walls)—墙壁的片段。有分南/北向和东/西向两种方向,所有建筑的外观与内在都由其建构而成。

布景(Scenery)—背景细节如椅子,桌子,垃圾,废车等。用于装饰充实场景。门也包含于内。

道具(Items)—详细物品,枪啊治疗针啊什么的。用来放置在人畜,容器或地面。普通容器(译注:999W的书柜也有)也在这一栏中。

人畜(Critters)—你的玩家非玩家角色还有怪物。把他们置于场景中并且加上剧本以方便他们互动(译注:剧本是最恐怖的了,我这样认为)。

杂项(Misc)—所有老的素材如老旧的终端机等,脱离区域的颜色条等。

点击鼠标右键在素材条上就可以选定所需物件(见下图),然后在大地图上左键放置。要选择一个已放置物品,左键单击之。虽不会高亮标示但物品的名字却会出现在右下的信息栏中,有时你得一阵好点才能点到。你也可以将已放置的物品再拿起来移动看看,选中物件后左键点住不放拖动就能改变布景的位置。


菜单条(Menu Bar)—这个藏在屏幕顶部,用你的鼠标可以将其轰出来

书签(Bookmarks)—你可以为素材分别做标记以方便召回。1-9数字键可用来赋值给任何素材(讲通俗了就是编队,说明白了就是打标记)。

将鼠标指向素材条中的任一物件,选择“TOOLS/SET BOOKMARK”菜单,然后按下你想标记的数字键。

每张地图有三个层面,用左下的上/下箭头切换。这个是用来做类似地牢(DND的前一个D)地图用的,缩短玩家的读取时间(现在的电脑还要顾虑这个问题么……)

“H”键控制六边格的触发与关闭(六边格?就是那个,那个啊~),红色的格子代表PC和NPC都不可通过进入。多数的墙和布景都得把着项目

设成不可通过(心算下一面地图要有多少墙吧,简直是绣花……)。如果没这个,那么所有的墙就像开了洞一样可以使敌人穿墙暴你头。不可通行的格子在下有详细说明。

“F8”是用来切换游戏和编辑模式,你可通过其来测试你的角色的移动,看看墙有没有孔洞,卷轴到屏幕尽头后的效果如何等。这恐怕是编辑器中最好用最常用的键位了。

“F12”截图,这个就不废话了


基本编辑功能

图略,自己去看原文档

1,素材库(Art Categories)—可以用F1-F6的快捷键来代替点击菜单切换

2,六边格数量(Hex Number)—你在地图六边格(太麻烦了,以下简称为格子)里放下的素材物件数量。后面似乎在说这个和剧本(script)的挂钩有很大帮助。HU,剧本方面似乎很麻烦,本人没看过,就是这样。

3,素材物件数量(Art Object Number)—类上,素材的数量。

4,素材物件条(Art Object Bar)—显示选择栏中的素材物件。点双箭头是翻页,点单箭头是一次翻一个物件。右键选择,左键放置。

5,地图海拔(Map Level)—你可在一张地图文件中同时拥有三个场景。这样可以节约读取进度(地洞建筑内部等,现在也没什么关系了……)的时间。

6,素材物件触发器(Art Object Toggles)—设定砖瓦的放置,默认为屋顶,打开后即视为铺设地板。快捷键为“R”。 “Top Down”键在这个编辑器中是无效的。

7,人畜物件旋转(Critter Object Rotation)—用来摆放生物的面对方向。如果你设置的超级变种人老拿他们的屁股对你,那么就用这个来改变他们对你的态度。

8,物件处理(Object Functions)—
“Copy”选中所有同一类你目前选中的素材物件,如果你目前在砖瓦类下捣鼓,,那么只有砖瓦类会被选中。拖个框出来就可以选中更多的同类素材。你可在地图任何地方像盖邮戳一样到处复制你选中的素材,右键清除。
“Copy All”功能类似于COPY,但却是复制所有选中的砖瓦,人畜,布景等(也就是所有的素材物件),用来做一群人时很有用。
“Edit”改变选中素材的属性或干脆替代。
“Delete”永久抹除选中的所有素材。

9,介绍信息(Info Screen)—素材名字及其他情况一览。

10,指针(Cursor)—视方式或功能而变换外形。

11,隐藏菜单条(Hidden Menu Bar)—要用时鼠标移去顶部召唤。

菜单条

文件(File)

自然是有读、取、出。你知道该怎么做。

工具(Tools)

制造/使用图案(Create Pattern” / “Use Pattern)—允许你新建砖瓦并铺放它们。制新那项似乎罢工了。使用那项有个各种材料的选单可以比较方便的找到你想要铺设的原料,然后就去到处敲图章吧。“Plus” & “Minus”这两个键是用来改变材料的大小的。右键离开此模式。

移动全图(Move Map)—允许你转换地图的位置。万一你在地图边缘用光了空间,那么就可以用这个功能将地图移一下,甚至可以将原来边缘上的物件都变成居中于地图(参照物,想象力,哼恩。……)。那箭头键可以做到这一功能,但是这里实际云做起来似乎有点问题。

地图水平改变(Move Map Elevation)—将整个地图的层面都整个移动。

复制地图水平(Copy Map Elevation)—把整个地图复制去另一地图的某层面。如果你正要做两个类似的层面,这个就可以大幅度的节余时间。

备注:在用“Copy Map Elevation”那功能时似乎有点问题。在你复制粘贴时,一般都会带个“Program error”的信息跳回桌面。该死,你可能可以用,但我的就是死活不上。

触发阻塞物件一览(Toggle Block Object View)—地图上当然有各种看不见提示的组织PC移动与卷轴的物件了。这个可以使那些物件都变的可见,这样你就可以随意的编辑与移动它们—在游戏中它们是看不见的,除非你有个超现实限量版的游戏在你手里。在放置素材的很多时候,墙壁与布景上都有洞可窥。用这个补漏后PCNPC都不能按游戏作者所不想的那样穿越或隔墙射击。随便从F2里拖张图来看看原作者是怎么弄的,你就知道该怎么搞了。

墙阻(Wall Blocker)—暗绿的“W”键,阻隔穿越。在游戏图中以墙(淡绿色)的形式表现出来。原有两个版本,但看来只有一个标记着“Wall S.T.”的可以用 (在Walls category, tile第#621项)。

隐秘阻格(Secret Blocking Hex)—淡绿的“S”键。在游戏中以布景(暗绿)的形式表现出来(Scenery category, tile#66)。

自动隐型阻格(Block Hex Auto Inviso)—黄色的“SAI”键。在游戏中是不可见的。用来阻隔你不想在游戏中显示的地区。

光源(Light Source)—绿色的“Yellow Sun symbol”。这并不阻隔移动。将光源置于格子内,光的亮度可用“EDIT”来调整(Scenery category, tile#140)。

脱离地图标记(Exit Grid Map Marker)—兰色的“EG”。在游戏中以特殊的茶色显示出来。用来指引脱离口。

卷轴阻隔(Scroll Blocker)—白色的“S”。特殊的标记,用来限制屏幕的卷轴。当屏幕中间有这样的行或者列的阻隔时,屏幕就不在往前移动了。在地图边缘使用。注意两边都要标上(译注:好复杂的工作,看起来就是在一块绢上绣花,最后连边上都要打上蕾丝花边……)。不然如果你的PC不只何故出了边沿,你就再不能把卷轴卷回地图了(Misc. category, tile#11)。

多数的阻隔都是用在游戏内的布置的。游戏内将在墙内的物品显示为亮绿。布景是暗绿。要让游戏地图在不同的图案布景中能有效运做,那就要让建筑与布景分开来。所以当防止阻隔时,用墙阻来填墙壁素材里的孔洞。景阻用来填充布景上的可通行空间。隐秘阻格用来填充地图上的大型地区如湖泊,辐射废液等你不想显示在游戏地图中的物件。

脱离区域选项(Exit Grid Options)—分棕色和绿色两种,可供PC跳去其他地图。这两种素材在杂项类中(Misc)。绿色是用在跨越地图或地图层之间,棕色的可以进出世界地图(“进出”,这里表偏正)。这儿还有个黑色的区域设置,但在游戏中似乎无用。你会注意到,当放置区域块时,当格子都可见时每块的一面上都有淡兰色的边沿。兰色的格子是很重要的—要使得脱离格作用,玩家必须穿过那标记格。所以放脱离格时,务必使兰边沿对着玩家的来路。另外确保那脱离格连续摆放,以使得PC能顺利脱出。

设置脱离区资料(Set Exit Grid Data)—如题。设定完毕后你可以用另两个选项来标记之。入口—1在脱离区域地图(Exit Grid Dest Map)能让PC进入世界地图。

标记脱离区域(Mark Exit Grids)—这个可以让你进入上述命令并且标记它们的模式。逐一点击每一脱离片来标记它们。按“ESC”离开这个模式。请注意你在那模式中并没有什么特别的提示,你若不出来就不能做别的事了(注:切记……)

标记所有脱离区域(Mark All Exit Grids)—相对上面那个,标记所有的脱离区域。不同的是那将覆盖你先前的设置。

清楚地图平面(Clear Map Level)—抹消地图上的所有物件。

剩下的是剧本叙述部分,这个文档部分不会提到。


编者须知(Known Problems with the Editor)

这编辑器存在着如下问题:

地图作者在取消设置一个地图剧本时试图显示地图剧本时可能会导致当机。欲重现事故,选“Scripts -> Set Map Script”。两下“ESC”离开菜单,然后去“Scripts -> Show Map Script”显示地图剧本。这样的操作可能会导致程式跳回桌面。

你在读取所有地图时可能会遇到一些零碎的小问题—在片刻后,读出的地图可能会遁入黑暗。卷轴或移动鼠标可能可以使布景重现(注:F1在游戏时也有这个问题,切换去桌面看消息或论坛,再回来就要动鼠标了)。

有时你ALT+TAB切换去桌面后,编辑器的任务栏回消失不见—即使任务栏中仍显示编辑器是运做着的。作为一个警告,对于编者来说ALT+TAB是禁用为好。

在用“Copy Map Elevation”这项时也有些问题(问题真多,以上的问题都经译者尝试,完全没有幸免……)。尝试复制一层地图去别的层面时,编者将见到编辑器带着 “Program error” 的提示跳回桌面。


编者剧本指令(Script Commands for the Editor)

下一列表可能会在程序规划和脚本制作中用到,对于同好者团体则可以用来译释出对应作用。我不知道灰影轮廓阻隔(gray-shaded definition blocks)的含义,但那对你的匆匆一览应该有不少帮助(不解,剧本部分我没看,死也不想碰……)。也可能gray-shaded这指令是无效的,或者仅是不能运做,或是给截去了。摸索并找出关键,不然就等Red!和一些疯狂的组织如Team X Russians找出来罢。

咳恩,作为程序员怎么能不懂E文捏,既然懂我就不翻了(黑口黑面ING)

action_being_used
int Script Returns the current skill () being used on a script object.
add_obj_to_inven
void Inven
who (ObjectPtr)
item (ObjectPtr) Adds an object (item) to another object’s (who’s) inventory. Note that this only works with objects of type Item.
add_mult_objs_to_inven
void Inven
who (ObjectPtr)
item (ObjectPtr)
count (int) Adds (count) instances of an object (item) to another object’s (who’s) inventory. Note that this only works with objects of type Item.
add_timer_event
void Meta(Time)
obj (ObjectPtr)
time (int)
info (int) Adds a timed event call to the queue, at a given time offset, to call an object’s (obj) script. Info is used to let scripts differentiate between timed event calls so that they can be hooked in multiple times. Info is read back by the script using the fixed_param operator. Note that time is in ticks (you can use game_ticks(seconds_num) to get the time in ticks from time in seconds).
anim
void Anim
who (ObjectPtr)
anim (int)
direction (int) Sets up a single-frame animation (anim) for the object (who) that runs in the given direction.
anim_action_frame
int Anim
who (ObjectPtr)
frame (int) Returns the action frame of the given art frame on a given object (who). This can be used as the delay in an animation registration sequence.
anim_busy
int (boolean) Anim
who (ObjectPtr) Returns True if object (who) is currently animating, otherwise False. This can be used to determine if a given object has completed an animation.
animate_move_obj_to_tile
void Anim
who (ObjectPtr)
tile (int)
speed (int) Sets up an animation for a critter (who) to walk to a given tile (hex) at a given speed (speed). Speed (walk/run) can also have a flag attached (see define.h) to force the object (who) to stop it’s current animation (for instance, if it was already walking somewhere) and then walk/run to the new location (tile).
animate_rotation
void Anim
direction (0-5) Changes the orientation (facing) of the self-object to the given direction.
animate_run_to_tile
void Anim
tile (int) Sets up an animation for the self-object to RUN to a given tile (hex).
animate_set_frame
void Anim
newFrame (int) Changes the current animation frame of the self-object to the given frame # (newFrame). This can be used to make lights go to broken lights or to alarm/siren lights, for example. Should be used in place of animate_stand for 2-frame anims.
animate_stand
void Anim Sets up an animation for the currently focused object (self) to run it’s stand animation.
This can be used to open doors, open container items (Refridgerator, for example) or to run a critter’s fidget animation.
animate_stand_obj
void Anim
obj (ObjectPtr) Sets up an animation for an object (obj) to run it’s stand animation.
This can be used to open doors, open container items (Refridgerator, for example) or to run a critter’s fidget animation.
animate_stand_reverse
void Anim Sets up an animation for the currently focused object (self) to run it’s stand animation in reverse. This is used only for non-critters, to cause them to close (close doors, open containers, etc.)
animate_stand_reverse_obj
void Anim
obj (ObjectPtr) Sets up an animation for an object (obj) to run it’s stand animation in reverse. This is used only for non-critters, to cause them to close (close doors, open containers, etc.)
art_anim
void Anim
fid (int) Returns the animation that this fid represents (ANIM_stand, ANIM_pickup, etc.).
attack
void Combat
who (ObjectPtr) Causes the focused object (self) to attempt to attack an object (who). Note that this is a macro to attack_complex() below.
attack_complex
void Combat
who (ObjectPtr)
called_shot (int)
num_attacks (int)
bonus (int)
min_damage (int)
max_damage (int)
attacker_results (int)
target_results (int) Causes the current object (self – must be a critter) to attempt to attack a critter (who) with various parameters modifying the combat:
called_shot – 0/1/specific means none/random/specific (head, torso, etc.)
num_attacks – the # of extra attacks the self object gets before the target
bonus – the bonus to hit the target on the first turn only
min_damage – the minimum damage that will be done the first attack
max_damage – the maximum damage that will be done the first attack
attacker_results – what state the attacker ends in after the first attack
target_results – what state the target ends in after the first attack
attack_setup
void Combat
who (ObjectPtr)
victim (ObjectPtr) Sets up an attack from who on victim, without expecting this script to be involved. Can be used to setup attacks on critters from the map script.
car_current_town
int Map Returns the current town area the car can be found at. Area #’s can be found in scripts\headers\maps.h
car_give_to_party
int Map Gives the car to the party, and takes them to the worldmap.
car_give_gas
int Map
amount (int) Gives the car a given amount (amount) of gas.
combat_difficulty
int Returns the current Combat difficulty level of the game (defined in the options screen).
combat_is_initialized
int Returns True if the system is currently in combat mode, False otherwise.
create_object
int (?) Object
pid (int)
tile_num (int)
elev (0-2) Creates a new object of prototype (pid), placing it at a given tile # and at a given elevation. If the prototype indicates a script should be attached, then it will be.
create_object_sid
int (?) Object
pid (int)
tile_num (int)
elev (0-2)
sid (int) Creates a new object of prototype (pid), placing it at a given tile # and at a given elevation. If sid is not -1, then it indicates that the default script should be overriden by this new script #.
critter_add_trait
int Critter
who (ObjectPtr)
trait_type (int)
trait (int)
amount (int) Adds a particular trait (trait) of a given type (trait_type) to a particular critter (who). Possible traits under the SPECIAL system are limited to:
Perks
Traits
Object-instance information (such as team #’s, ai-packet #’s, etc.)
critter_attempt_placement
int Map
who (ObjectPtr)
hex (int)
elev (0-2) Attempts to place a critter at a given destination hex & elevation, if it fails, then it tries to find a nearby hex that is that is as near as possible to the start hex. No LONGER checks to see if the hex is visible on-screen.
critter_damage
void Critter
who (ObjectPtr)
dmg_amount (int) Inflicts damage on a critter (who) of a given amount, killing it if necessary.
critter_heal
void Critter
who (ObjectPtr)
amount (int) Heals a critter for a given amount up to maximum.
critter_injure
int Critter
who (ObjectPtr)
how (int) Injures a given critter (who) by crippling given limbs/body parts (defined by DAM_CRIP_ARM_LEFT, DAM_BLIND, etc. in define.h)
critter_inven_obj
(ObjectPtr) Critter/Inven
who (ObjectPtr)
where (int) Returns a pointer to an object that is in a given spot (NULL if none). The appropriate values for where are: INVEN_TYPE_WORN, INVEN_TYPE_RIGHT_HAND, and INVEN_TYPE_LEFT_HAND.
critter_is_fleeing
int Critter
who (ObjectPtr) Returns True if the critter object (who) has its FLEE flag set.
critter_mod_skill
int Critter
who (ObjectPtr)
skill (int)
amount (int) Modifies a given skill in a given critter object (who) by a given amount. Note: this currently is only valid on the player (obj_dude) object.
critter_rm_trait
int Critter
who (ObjectPtr)
trait_type (int)
trait (int)
amount (int) Removes a particular trait (trait) of a given type (trait_type) from a particular critter (who). (See critter_add_trait.)
critter_set_flee_state
int Critter
who (ObjectPtr)
flee_on (Boolean) Sets the FLEE flag on or off. This controls whether the critter flees during combat.
critter_skill_level
int Critter
who (ObjectPtr)
skillNum (int) Returns the current skill level of a particular object’s (who) skill (skillNum).
critter_state
int Critter
who (ObjectPtr) Returns the state of a given critter object (from combat data), used to determine if a critter is dead, unconscious, etc..
critter_stop_attacking
int Critter
who (ObjectPtr) Flags the critter object (who) as no longer wishing to be active in combat.
cur_map_index
int Map Returns the index # of the current map, to be matched with the define-constant in define.h.
cur_town
int Map Returns the index # of the current town, to be matched with the define-constant in define.h.
days_since_visited
int Map Returns the number of days since this map was last visited, or (-1) if it has never been visited before.
debug_msg
void Debug
text (string) Prints a string to the debug monitor. Should be used exclusively for debug information, instead of display_msg()!
destroy_object
int Object
obj (ObjectPtr) Destroys an object (obj), which will cause it’s script to be called in the destroy_proc section if the object is *NOT* the calling object.
destroy_mult_objs
int Object
item (ObjectPtr)
count (int) Destroys count number of instances of an item object. This function will figure out which inventory this item is in (if it isn’t on the ground). If it is on the ground, of course, there is only one instance of this object, so only one will be destroyed.
dialogue_reaction
void Dialog
mood (int) Set up a reaction animation in the dialogue system.
dialogue_system_enter
void Dialog Tells the dialog system that this object is requesting the talk system. This is used when the script wants to start dialog instead of waiting for the player to initiate it. The script will be called back in its talk_proc section.
difficulty_level
int Returns the current Game difficulty level of the game (defined in the options screen).
display_msg
void
message (string) Displays a string on the in-game PDA display (lower-left hand corner).
do_check
int (roll_result) Skill
who (ObjectPtr)
check (int)
modifier (int) Do a check/test-roll versus one of the various basic traits (strength, perception, etc.).
drop_obj
void Inven
obj (ObjectPtr) Causes the critter self-object to remove a given object (obj) from it’s inventory and place it on the ground at its hex. This animates the self_obj.
drug_influence
int Critter
who (ObjectPtr) Returns True if a given critter object (who) is currently under any drug influences, False otherwise.
dude_obj
(ObjectOtr) Returns a pointer to the dude object (the player).
elevation
int Map
obj (ObjectPtr) Returns the current elevation being displayed.
end_dialogue
void Dialog Terminates the dialogue system.
endgame_movie
void Meta Plays the endgame movie.
endgame_slideshow
void Meta Plays the endgame slideshow. The slideshow will fade in to its palette, so it is proper to call gfade_out(1) and then expect this command to fix the palette for you.
explosion
int Anim
where (int)
elevation (0-2)
damage (int) Sets up an explosion at a given tile number (where) on a given elevation, that will cause damage in a radius.
fixed_param
int Returns the value of the scripts fixed parameter. This is used with add_timer_event, for instance, to pass the info parameter back to the script.
float_msg
void
who (ObjectPtr)
msg (str)
type (int) Attempts to create a floating-text message (str) attached to an object (who) using colors dictated by type. There are two special types, WARNING and SEQUENTIAL. WARNING is used to print a message centered on the screen (such as for end-of-quest notifications), and SEQUENTIAL will cycle through the colors, in an attempt to give critters different-colored messages to differentiate them.
game_ticks
int Time
seconds (int) Returns the number of game ticks equal to a given # of seconds.
game_time
int Time Returns the current game time in ticks.
game_time_advance
void Time
amount (int) Advances the current game time by (amount) ticks.
game_time_hour
int Time Returns the current hour of the day in a normal format, but without the colon. For example, the current starting game time is 721 (which is 7:21 am).
game_ui_disable
void Meta Disables game user-interface input from the player (to ‘lock-out’ the player). You *MUST* make sure to re-enable the UI at some point afterwords.
game_ui_enable
void Meta Re-enables game user-interface input from the player. This *MUST* be called relatively soon after disabling the UI or the player will be stuck, unable to do anything.
game_ui_is_disabled
int Meta Returns True if the game UI is currently disabled (the player is currently ‘locked-out’), and False otherwise.
gdialog_barter
int Dialog Tells the dialog system to switch to the barter screen. (Sets the barter modifier to 0).
get_critter_stat
int Critter
who (ObjectPtr)
stat (int) Returns the value of a desired attribute/stat in a critter object (who).
get_day
int Time Returns the current day of the month.
gdialog_mod_barter
int Dialog
modifier (+/- percent) Tells the dialog system to switch to the barter screen, using a given modifier.
get_month
int Time Returns the current month of the year.
get_pc_stat
int Critter
pcStat (int) Returns the value of a desired pc-only stat of the obj_dude. These are found in define.h all starting with “PCSTAT_”.
get_poison
Critter
who (ObjectPtr) Returns the value of a given critters’ (who) poison level.
gdialog_set_barter_mod
void Dialog
mod (int) Sets the current modifier for barter to a given percentage (mod). Used to make barter easier/harder, even if the player initiates barter (as opposed to the script starting it.)
gfade_in
void Meta
time (int) Does a palette fade to black. The Time parameter is currently not actually used.
gfade_out
void Meta
time (int) Does a palette fade from black to the game palette. The Time parameter is currently not actually used.
giQ_Option
void Dialog
iq_test (int)
msg_list (int)
msg_num (int)
target (procedure)
reaction (int) Sets up an option-choice for a reply block if the player’s IQ statistic is equal to or greater than a given value (iq_test), getting the string from the message file (msg_list) and message number (msg_num), which will cause a given reaction (reaction), and if chosen will jump to the given (target) procedure.
give_exp_points
void
points (int) Adds experience points (points) to the player’s total. These points may then be used by the player to enhance skills, etc.
global_var
int Map
var_index (unsigned int) Returns the value of a global variable # (var_index).
goto_xy
Map
gSay_End
void Dialog
var_index (unsigned int) Ends a dialog sequence, which will bring up the sequence (actually display it).
gSay_Message
void Dialog
msg_list (int)
msg_num (int)
reaction (int) Sets up a sayMessage, which is a reply with just a [Done] option. The msg_list determines which message file to look in, and the msg_num determines which line to use from the file.
gSay_Option
void Dialog
msg_list (int)
msg_num (int)
target (procedure)
reaction (int) Sets up an option-choice for a reply block, getting the string from the message file (msg_list) and message number (msg_num), which will cause a given reaction (reaction), and if chosen will jump to the given (target) procedure.
gSay_Reply
void Dialog
msg_list (int)
msg_num (int) Sets up a reply block (what the *CRITTER* says).
gSay_Start
void Dialog Starts a new dialog sequence.
has_skill
int Skill
who (ObjectPtr)
skill (int) Determines if a critter (who) ‘knows’ a particular skill. Actually, this currently returns the level of the skill, which will include defaults.
has_trait
int Critter
trait_type (int)
who (ObjectPtr)
trait (int) Returns the value of a given critter object’s (who) trait of a given Trait_type (see define.h). This can be used to determine if the player has a particular Perk, AI Packet, team num, current rotation, or Trait (finesse, bruiser, etc.).
how_much
int Skill
val (int) Returns the value of a completed skill vs. skill contest (how much the rolls differed by). This requires that you first call one of the contest roll commands, such as roll_vs_skill, skill_contest, etc..
inven_count
int Critter
what (ObjectPtr) Returns the count of how many inventory slots are filled on a given object (what).
inven_ptr
(ObjectPtr) Critter
what (ObjectPtr)
slotNum (int) Returns a pointer to the object in slot # (slotNum) in a given object (what).
inven_unwield
void Critter Attempts to cause a critter to unwield any wielded weapons/items. If animations are currently disabled, it will just instantly change the art.
is_critical
int Skill
val (int) Returns True if a given contest roll result is a critical result, otherwise False.
is_loading_game
boolean Map Returns True if the game is currently loading, False otherwise. This is used so that bad things don’t happen on game load because a script is doing map_enter setup stuff.
is_skill_tagged
int Skill
skillNum (int) Returns True if a given skill is tagged.
is_success
int Skill
val (int) Returns True if a given contest roll result value is a success, otherwise False.
item_caps_adjust
int Inven
obj (ObjectPtr)
amount (int) Modifies the current caps count in an object (obj) by a given amount (amount).
item_caps_total
int Inven
obj (ObjectPtr) Returns the current caps total in a given object’s (obj) inventory.
jam_lock
int Object
lockableObj (ObjectPtr) Jams a lock, which prevents the player from picking the lock for approximately 24 hours. Meant to be used when a player critically fails to pick a lock.
kill_critter
void
obj (ObjectPtr)
death_frame (int) Kills a critter (obj) outright, placing it in the chosen death frame. Note: this does NOT animate the critter, and does NOT refresh the screen! It is meant to be used in scripts run when entering/exiting a map (map_init/map_exit).
kill_critter_type
void Map
pid (int) Kills all critters of a given type (pid) outright. See kill_critter above.
language_filter_is_on
int (boolean) Meta Returns True if the language filter is currently filtering harsh language, False otherwise.
load_map
void Map
map_name (string)
start_location (int) Loads a new map (map_name), removing all scripts currently running and passing on the entrance location (start_location) to the new map’s map_init script.
local_var
int Map
var_index (unsigned int) Returns the value of a local variable of given index # (var_index).
map_first_run
int Map Returns True if the current map is being run for the first time (in other words, this map was not loaded from a save-game).
map_is_known
int Meta
mapNum (int) Returns True if a given map index (mapNum) is known, False otherwise.
map_known
int Meta
mapNum (int) Returns True if a given map # (mapNum) is known, False otherwise.
map_var
int Map
var_index (unsigned int) Returns the value of a map-global variable of a given index # (var_index).
message_str
char *
list (int)
msg_num (int) Returns a string from the message module for a given list and a given # (msg_num).
move_to
int Map
obj (ObjectPtr)
tile_num (int)
elev (0-2) Immediately moves an object (obj) to the given tile number and elevation on the current map.
move_obj_inven_to_obj
int Inven
srcObj (ObjectPtr)
destObj (ObjectPtr) Moves an object’s (srcObj) inventory into another object’s (destObj) inventory.
obj_art_fid
(ObjectPtr) Object
obj (ObjectPtr) Returns the fid # (used to index art) of a given object (obj).
obj_being_used_with
(ObjectPtr) Object Returns a pointer to the object being used on another object.
obj_can_hear_obj
boolean Map
src_obj (ObjectPtr)
dst_obj (ObjectPtr) Returns True if the source object (src_obj) is capable of hearing the destination object (dst_obj). This includes distance factors, current activity (standing/walking/running), and skill use (stealth/etc.).
obj_can_see_obj
boolean Map
src_obj (ObjectPtr)
dst_obj (ObjectPtr) Returns True if the source object (src_obj) has line-of-sight (LOS) with the destination object (dst_obj). This also takes into account perception & stealth rolls of the objects are critters.
obj_carrying_pid_obj
(ObjectPtr) Object
who (ObjectPtr)
pid (int) Returns an Object pointer to an instance of an object of type pid if an object (who) is carrying an object of that type.
obj_close
void Object
what (ObjectPtr) Attempts to close a given object (what) if it is of an openable type.
obj_drop_everything
void Inven
who (ObjectPtr) Causes a critter object (who) to drop all objects in it’s inventory and drop it on the ground at it’s feet.

obj_is_carrying_obj_pid
boolean Object
obj (ObjectPtr)
pid (int) Returns the quantity of objects with matching prototype index #’s (pid) carried in the inventory of another object (obj).
obj_is_locked
int Object
what (ObjectPtr) Returns True if a given object (what) is a locked object, False if it is unlocked or not a lockable object.
obj_is_visible_flag
int Object
who (ObjectPtr) Returns True if a given object (who) is turned on (visible), False otherwise.
obj_is_open
int Object
what (ObjectPtr) Returns True if a given object (what) is an open object, False if it is closed or not an openable object.
obj_item_subtype
int Object
obj (ObjectPtr) Returns the subtype of an object of type 'item'. Examples would be food, armor, weapons, etc.
obj_lock
void Object
what (ObjectPtr) Attempts to lock a given object (what) if it is of a lockable type.
obj_name
void Object
what (ObjectPtr) Returns a string representing the name of the given object (what).
obj_on_screen
int Object
what (ObjectPtr) Returns True if a given object (what) is currently being drawn on-screen, False if it is not.
obj_open
void Object
what (ObjectPtr) Attempts to open a given object (what) if it is of an openable type.
obj_pid
int Object
obj (ObjectPtr) Returns the prototype id # (pid) of an object (obj).
obj_set_light_level
void Object
obj (ObjectPtr)
intensity (1-100)
distance (0 - 8) Set the light level for an object to a given intensity (percentage of possible maximum intensity), and distance of light in hexes.
obj_type
int Object
obj (ObjectPtr) Returns the type of an object (obj). This would be ‘Item’, ‘Wall’, ‘Scenery’, etc.
obj_unlock
void Object
what (ObjectPtr) Attempts to unlock a given object (what) if it is of a lockable type.
override_map_start
void Map
x (int)
y (int)
elev (0-2)
rot (0-5) Used when loading a new map, this forces the player (obj_dude) to start at a particular location and rotation when first coming up.
party_add
void Party
who (ObjectPtr) Adds a given critter (who) into the list of party members. This will also setup those objects so that they will not be saved in maps, and certain other things.
party_member_obj
ObjectPtr Party
pid (int) Returns an ObjectPtr to a party member that matches a given pid. If that critter isn’t currently a member of the party, then it will return NULL.
party_member_count
ObjectPtr Party
countHidden (int) Returns the count of the currently in-party party members. (countHidden) determines whether or not to count the hidden members (hangers-on).
party_remove
void Party
who (ObjectPtr) Removes a given critter (who) from the list of party members. This will also change those objects so that certain object- and map-level things will respond differently to them.
pickup_obj
void Inven
obj (ObjectPtr) Causes the critter self-object to animate and attempt to pick up a given object (obj).
play_gmovie
Meta Plays one of the Fallout movies (full-screen, compressed, etc.).
play_sfx
Sound Starts a new sound effect to be played on the queue.
poison
Critter
who (ObjectPtr)
amount (int) Increases the a critters’ poison level by a given amount.
proto_data
int OR string Object
pid (int)
data_member (int) Returns the value of a data-member of a given prototype (pid).
radiation_dec
Critter
who (ObjectPtr)
amount (int) Decrements a critter’s radiation counter by a given amount. NOTE: This should only be done to the player (obj_dude) in Fallout due to design restrictions!
radiation_inc
Critter
who (ObjectPtr)
amount (int) Increments a critter’s radiation counter by a given amount. NOTE: This should only be done to the player (obj_dude) in Fallout due to design restrictions!
random
int Script
min (int)
max (int) Returns a random value between (min) and (max), inclusive.
reg_anim_animate
void Anim
what (ObjectPtr)
anim (int)
delay (int) Adds a single, in-place animation on an object (what) to an animation sequence-list, at a given delay from the previous animation (delay should always be -1)!
reg_anim_animate_forever
void Anim
what (ObjectPtr)
anim (int)
delay (int) Adds a single, in-place animation on an object (what) to an animation sequence-list, at a given delay from the previous animation (delay should always be -1)! This animation will animate continuously until something in the system interrupts it. To be used *very* sparingly, for instance Gizmo’s sign and the ‘pray’ signs in the children of the cathedral (which will have to be toned down).
reg_anim_animate_reverse
void Anim
what (ObjectPtr)
anim (int)
delay (int) Adds a single, in-place reversed animation on an object (what) to an animation sequence-list, at a given delay from the previous animation (delay should always be -1)!
reg_anim_begin
void Anim Tells the system to start an animation sequence-list.
reg_anim_clear
void Anim
object (ObjectPtr) Terminates all animations that are currently registered for a given object.
reg_anim_end
void Anim Activates the animation sequence-list. Without this call the animation will never occur. Note: All animation sequences must be registered at ONCE! In other words, you cannot let the script end and finish registering the animations later.
reg_anim_obj_move_to_obj
void Anim
who (ObjectPtr)
dest_obj (ObjectPtr)
delay (int) Adds an animation to cause a critter object (who) to attempt to walk to another object (dest_obj) at a given delay from the previous animation (delay should always be -1)!
reg_anim_obj_run_to_obj
void Anim
who (ObjectPtr)
dest_obj (ObjectPtr)
delay (int) Adds an animation to cause a critter object (who) to attempt to run to another object (dest_obj) at a given delay from the previous animation (delay should always be -1)!
reg_anim_obj_move_to_tile
void Anim
who (ObjectPtr)
dest_tile (int)
delay (int) Adds an animation to cause a critter object (who) to attempt to walk to a given destination tile number (dest_tile) at a given delay from the previous animation (delay should always be -1)!
reg_anim_obj_run_to_tile
void Anim
who (ObjectPtr)
dest_tile (int)
delay (int) Adds an animation to cause a critter object (who) to attempt to run to a given destination tile number (dest_tile) at a given delay from the previous animation (delay should always be -1)!
reg_anim_play_sfx
void Anim
who (ObjectPtr)
sfx_name (string)
delay (int) Adds an animation to cause an object (who) to attempt to play a given sound effect (sfx_name) at a given delay from the previous animation!
rm_fixed_timer_event
void Meta(Time)
who (ObjectPtr)
fixed_val (int) Removes (clears) all timer events hooked to a given object’s (obj) script that have a given fixed_value (fixed_val).
rm_obj_from_inven
void Inven
who (ObjectPtr)
obj (ObjectPtr) Removes an object (obj) from another object’s (who’s) inventory. Note: this leaves the removed object in at location (0,1) on the map! You must call move_to(…) to place it back on the map.
rm_mult_objs_from_inven
int Inven
who (ObjectPtr)
obj (ObjectPtr)
count (int) Removes (count) instances of an object (obj) from another object’s (who’s) inventory. Note: this leaves the removed object in at location (0,1) on the map! You must call move_to(…) to place it back on the map.
NOTE: This function returns the actual count that was removed (if you attempted to remove more instances than existed). You *MUST* store this value in a variable (though you don’t have to actually do anything with it).
rm_timer_event
void Meta(Time)
obj (ObjectPtr) Removes (clears) all timer events hooked to a given object’s (obj) script.
roll_dice
Skill Returns the value of the completed dice roll. UNIMPED!
roll_vs_skill
int (roll_result) Skill
who (ObjectPtr)
skill (int)
modifier (int) Returns the value of a completed skill roll made upon an object’s (who’s) skill level with a given skill, and modified by a given amount (may be zero). This value may then be passed to is_success and is_critical to determine the appropriate states, and the how_much call can be used to determine the difference succeeded or failed by.
rotation_to_tile
int (1…5) Map
srcTile (int)
destTile (int) Returns the rotation (0…5) to face a particular tile (destTile) from a particular tile (srcTile).
running_burning_guy
int Returns the setting for the running-burning-guy in the game (defined in the options screen).
scr_return
void Script Sets the return value for a scripts C-engine node, to be used by C code.
script_action
int Script Returns the action that has activated this script. Examples include requests for the description of an object (description_proc), notifications of a spatial script being activated by something hitting its boundary (spatial_proc), or a critter being given its heartbeat (critter_proc, in other words being told to move).
script_overrides
void Script Tells the C-engine that the script will override default behavior for the object. What this means is that the C-engine will not attempt to do things that it would normally do, in expectation that the script will handle those things itself. This is an IMPORTANT command! It is commonly used for the general player actions upon objects, such as looking at them (requesting a description), using them (opening doors, for example), or using items ON them (using a picklock or a key on a door lock).
self_obj
(ObjectPtr) Script Returns a pointer to the object connected to this script.
set_critter_stat
int Critter
who (ObjectPtr)
stat (int)
val (int) Sets the value of a desired attribute/stat in a critter (who) to a given value (val).
set_exit_grids
void Map
markElev (elevation)
mapID (int)
elevation (int)
tileNum (int)
rotation (int) Sets all exit grids on a given elevation (markElev) to point to a destination mapID (may be -1 which means stay on this map), elevation, tileNum, and rotation.
set_global_var
void Map
var_index (unsigned int)
value (int) Sets the value of a global variable (var_index) to a given (value).
set_light_level
void Map
level (int: 1-100) Sets the ambient light level. The range is Full Darkness to Full Daylight.
set_local_var
void Map
var_index (unsigned int)
value (int) Sets the value of a local variable (var_index) to a given (value).
set_map_var
void Map
var_index (unsigned int)
value (int) Sets the value of a map-global variable (var_index) to a given (value).
set_map_start
void Map
x (int)
y (int)
elev (0-2)
rot (0-5) Sets the start location & rotation for the next time this map is entered (loaded & run).
set_obj_visibility
void Object
obj (ObjectPtr)
visibility (boolean) Sets the OBJ_OFF flag for an object (makes it not drawn).
signal_end_game
void Tells the system that a script is indicating the game should be ended. This will return the player to the main-menu.
skill_contest
Skill Returns the value of a completed skill vs skill contest (to run through is_success & is_critical).
source_obj
(ObjectPtr) Script Returns a pointer to the source object (activator) for this action. The source object for a pickup_proc (pickup an object script_action) would be the critter picking the object up, for instance.
start_dialogue
void Dialog
who (ObjectPtr)
mood (int) Start the dialogue system focusing on a critter (who) and starting in a given (mood). This call sets up the appropriate dialog windows, head art, etc. If this call is not made before the normal dialog calls (sayReply, sayMessage, sayOption, etc.) then the dialog windows will not come up, and only grey boxes will appear with the text.
start_gialog
void Dialog
msgFileNum (int)
who (ObjectPtr)
mood (int)
headNum (int)
backgroundIdx (int) Start the dialogue system focusing on a critter (who) and starting in a given (mood). This call sets up the appropriate dialog windows, head art, etc. If this call is not made before the normal dialog calls (sayReply, sayMessage, sayOption, etc.) then the dialog windows will not come up, and only grey boxes will appear with the text.
target_obj
(ObjectPtr) Script Returns a pointer to the target object for this action. The target object is what is being acted upon.
terminate_combat
void Combat Tells the combat system to terminate prematurely. USE WITH CAUTION. This doesn’t prevent another (or even the SAME) script from re-starting combat, so make sure you turn off any hostile flags, etc.
tile_contains_obj_pid
boolean Map
tile (int)
elev (0-2)
pid (int) Returns True if a particular tile contains an object with a matching prototype index # (obj pid).
tile_contains_pid_obj
boolean Map
tile (int)
elev (0-2)
pid (int) Returns a pointer to the first object that matches a particular pid # that is on a particular tile and elevation.
tile_distance
int Map
tile1 (int)
tile2 (int) Returns the tile distance between two tile #'s.
tile_distance_objs
int Map
obj1 (ObjectPtr)
obj2 (ObjectPtr) Returns the tile distance between two objects (between their tile #’s).
tile_is_visible
boolean Map
tile (int) Returns True if a given hex (tile) is currently visible, i.e. an object on it could conceivably be displayed on-screen. This includes hexes that may technically have bases that are off-screen, but on whom objects could exist that would bound into the actual display area.
tile_num
int Map
obj (ObjectPtr) Returns the tile number of object (obj).
tile_num_in_direction
int Map
start_tile (int)
dir (0-5)
distance (int) Returns the tile number of a tile offset from a starting tile in a given direction (the next tile in that direction).
town_known
int Meta
townArea (int) Returns True if a given town area (townArea) is known, False otherwise.
town_map
void Sends a request for the game engine to bring up the Town Map screen, for the player to go to different locations in an area (different areas in Vault13, for example).
use_obj
(ObjectPtr) Script
obj (ObjectPtr)
use_obj_on_obj
(ObjectPtr) Script
item (ObjectPtr)
targetObj (ObjectPtr) Attempt to use an item object on a target object (targetObj). This could be used to have a critter use a Stimpack on the player, for instance, or to use a key on a door.
using_skill
boolean Skill
who (ObjectPtr)
skill (int) Returns True if an active skill is being used, False otherwise. Examples of active skills are Stealth and First Aid.
violence_level_setting
int (boolean) Meta Returns the current setting of the violence level. See define.h for values.
wield_obj
void Inven
obj (ObjectPtr) Sets up an animation causing a critter (self_obj) to wield an object (obj) in that critters’ inventory. This puts that object in the critter’s hand.
wield_obj_critter
void Inven
who (ObjectPtr)
obj (ObjectPtr) Sets up an animation causing a critter (who) to wield an object (obj) in that critters’ inventory. This puts that object in the critter’s hand.
wm_area_set_pos
void
areaIdx (int)
xPos (int)
yPos (int) Sets the World Map coordinates for a given area/town (areaIdx) to a given x and y position.
world_map
void Sends a request for the game engine to bring up the World Map screen, for the player to move around to different locations.
world_map_x_pos
int Returns the current X Position of the party on the World Map.
world_map_y_pos
int Returns the current Y Position of the party on the World Map.


剧本运作摘要(Script Actions Summary)

很简单的说,没理由解释了吧……

Description Object A request to examine (extended-look) an object.
Combat Critter A combat action is occurring.
Create Script This script-object is being created. (UNIMPED).
Critter Critter A critter script is getting its heartbeat.
Damage Object This object is taking damage.
Destroy Script This script-object is being destroyed.
Drop Item An object is being removed from another object’s inventory and is being dropped on the ground. (UNIMPED).
Look At Object A brief look at an object is being requested.
Map Enter Map This map is being entered (was just loaded).
Map Exit Map This map is being left (is being saved as a savegame).
Map Update Map This map is being updated (changing levels, lighting, etc.)
None Script No action.
Pickup Item An attempt is being made to pickup an object and place it in an object’s inventory. Or, could be looting/stealing.
Spatial Script This scripts’ spatial radius has been entered.
Start Script Starting up script for first time.
Talk Critter A script dialogue is being requested.
Timed Event Script A timed event has just reached activation.
Use Object Attempt to use an object.
Use Object On Object Use an object on another object.
Use Skill On Object Use a skill on an object.


剧本运作组令(Script Action Groups)

物件(Object)物件运做这一指令格式一般可用在游戏中的所有道具上。举例来说,如果有人想在游戏中观察一样事物,那么所有的物品都可以(除了游戏界面外)得到介绍。个别的物件原本就已经被决定了是否可供运做。所以,照样来说,如果不是物件的原形设置成你可以“USE”之,那么PC就不可能通过选项来执行这一运做指令。

道具(Item)道具运做是用做特殊动作如PC可否拿起,丢弃,穿着。换言之就是物品道具(inventory items,however you know that...) 。

人畜(Critter)这一运做指令可以使得NPC在游戏中对你所做出的行为有所反应。用实例说就是这一指令只作用在“智慧型”生物上,与所有的任务事件和互动或是挑起战斗又或是对话,等等。

地图(Map)这个是用在地图特殊事件上的(注:恩,你的肾上腺分泌太多了,建议去玩下神圣手雷以缓和心情,当然这并不是那种特殊地图的运做,不过译者认为这可以拿来为可以反复进入的特殊事件之金字塔再加一个尖顶)。简单来说(这里没有照原样翻译,照实翻太傻了),这个就相当于PC进入一个地图后的地图剧本更新(你做了什么坏事,杀了多少人,用了多少个保险套,恩……)的记录,待你下次回到那地图时,记录剧本读取,NPC根据你的作为记录来相应的回报你。

剧本(Script)包括了特殊剧本,例如当一个剧本给摧毁了,或给一个特殊行动激活了,或者由先前的时限事件觉醒了。这一运做指令并不是直接由PC所激活的(不同于物件运做),而是由剧本系统自身引发。


剧本运做作描述(Script Action Descriptions)

描述(Description)玩家用来检测剧本的工具。默认是将物件的长段描述列印在一个小型的显示窗口内。

战斗(Combat)当战斗发生时,战斗的潜在指令之一给激活。这一行为允许战斗与剧本起交互作用即使战斗已开打/等,程式依然控制着可行的选择)。
它们是:
命中(HIT_SUCCEEDED)—当剧情目标成功的击中其目标后运做。可用来做额外伤害(辐射,比如说),或者可用来计算成功击中的次数。

行动顺序(SEQUENCING)—用来核对战斗顺序(检测人畜是否要参与或脱离战斗)。

回合(TURN)—一般的战斗都只是因为开打而开打。你可替换默认的战斗回合条件为NPC对特定的事件而引起战斗(或使他们做出特别的动作来)。

非电脑回合(NONCOM_TURN)—无用。

制作(Create)—无用。

人畜(Critter)—NPC的关键所在。基本上,每个剧本时常要给用到(可能是1秒数次)以此来与外界互动或者改变标记变量等。这里就是代码可用来供人畜移动等行动,也就是说完全自动执行。

伤害(Damage)—可能导致剧本目标受害的指令。这一行几乎总是意味着有人畜在战斗中给打中了。这时就会给敌对方加上标记(之后可能会影响到对话或任务身份等,简单来说就是你打NPC他们就和你敌对),或者治疗自身来避免死亡(实际操作起来或许并不妙,但你可利用其在一、两个任务中确保人畜做或说些什么事,等等。当然是在他们死透前)。
您需要登录后才可以回帖 登录 | 开放注册

本版积分规则

Archiver|手机版|小黑屋|13号避难所-旧人类论坛

GMT+8, 2026-6-5 23:37 , Processed in 0.107581 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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