-------------------------------------------------------------------------------
IX.2 > > > > Asset/Script Mods 资产/ 脚本 模式
-------------------------------------------------------------------------------
When you make a map,
当你 制作 地图 时,
the map clearly defines what it needs.
地图 清楚地 定义了 它 需要 什么。
So when you compile your mod,
所以当你编译你的mod时,
the game knows exactly what models, sounds and even ai declarations to add to the game,
游戏 清楚地 知道 什么 模型,声音,甚至 人工智能声明 添加到 游戏 中,
but when you write scripts, the game doesn't know...
.但当你写脚本时,游戏不知道..
and as a result,
结果,
often times the thing your script needs is not present in memory when you try to access it.
通常,当您 尝试 访问 脚本所需的内容时,内存 中并不存在该 内容。
当你制作一个地图时,
地图清楚地定义了它需要什么。
所以当你编译你的mod,
游戏确切地知道什么模型,声音,甚至 ai 声明要添加到 游戏中,
但当你编写脚本时,游戏将会出现 不知道…
因此,你的脚本需要的东西
当您试图访问内存时,它不存在于内存中。
Take this example:
举个例子:
You make an asset mod (No Map) where you edit one of the original games jobs
so that it rewards a new item you created.
.你做了一个资产模式(无地图),
在那里你编辑了一个原始的游戏 jobs 。以便 它 奖励 您 创建的新项目。
Your item has a script attached to it that plays a new sound
and spawns a new 3d prop in the world using script commands...
.您的项目 附加了一个脚本,用于 播放 新的声音.。
并使用脚本命令在世界中生成新的3D道具..
您创建 一个资产模型(没有地图),
在那里您 编辑一个原始游戏工作,
使它奖励你 创建的新项目。
您的项目有一个附加的脚本,播放 一个新的声音,
并产生一个新的 3d 使用 脚本 命令。
Result:
结果:.。
The inventoryItem and its icon will be included in the mod such that when the job activates,
InventoryItem及其图标 将包含在 MOD 中,这样当“游戏的job”激活时,
they will definitely be present in memory.
它们 肯定会 出现在 内存 中。
The script will also be present,
but running it will either not work or may crash the game.
脚本 也会到场,
..但运行它要么不起作用,
要么可能会使 游戏 崩溃。
库存项目 及其 图标将被包括在 模组 中,
这样当 job 被激活时,
它们肯定会出现在 内存 中。
这个脚本也将出现,但运行它将要么不工作,
要么 可能会让游戏崩溃。
WHY:
ID Studio knows the script compiled,
IDStudio 知道 编译的 脚本,
but it doesn't know what the script actually does or needs...
但它不知道脚本实际上做什么或需要什么。
So when it did its dependency trace,
.所以当它进行 依赖关系跟踪时,
it didn't realize it needed to include the new sound
and prop because they are only referenced by the script.
它没有 意识到 它 需要加入 新的 声音..和prop,
因为 它们仅由 脚本 引用。
ID Studio知道 编译的脚本,
但它不知道 脚本 是什么 实际上做或需要..。
所以当它进行依赖性 跟踪 时,
它并没有 意识到它需要 包括 新的声音 和道具,
因为他们是 仅被 脚本 引用。
Even if you pointed to existing sounds and props,
.即使 你 指出现有的 声音和 道具,
the script would only work
if you were standing in a map that HAPPENED to already contain the model and sound in pre-cache.
如果你站在一张地图上,而这张 地图 恰好已经包含了预缓存中的 模型 和 声音。
脚本 才能 工作。
So whether you use items/sounds/resources that came with the game
or new resources you create your own, the problem is the same...
.因此,无论您是否使用 游戏 附带的 物品/声音/资源..
或者你 自己创造的 新资源, 问题 都是一样的……
The optimizing compiler doesn't know you need those things,
优化编译器 不知道 你 需要 这些 东西,
so they will not be in memory when your script tries to use them.
因此,当 脚本 尝试 使用它们时,它们 将 不在内存 中。
// 以下 是 以前的 翻译……
所以你是否使用游戏附带的物品/声音/资源呢
或者是你自己创建的新资源,问题也是一样的。
这个 优化编译器并不知道你需要这些东西,所以他们会需要的
当您的脚本尝试使用它们时,它们不在内存中。
To make things even more confusing...
让 事情变得更加 混乱。
When you test you scripts in ID STUDIO,
当您在 IDStudio 中 测试 脚本 时,
(maybe within a temporary testing map),
.(可能在临时测试地图内),
all game resources are in memory.
.所有游戏资源都在 内存 中。
So you likely will not realize you have a script dependency issue until you try to deploy your mod
and run it from the actual game.
所以你可能不会意识到你有一个脚本依赖问题,
直到你尝试 部署 你的mod 。
并从 实际游戏 中 运行它
让事情变得更加混乱..
当您使用 ID Studio中测试脚本时,..(可能在临时测试图内),
..所有游戏资源都在内存中。
....所以你可能不会意识到你有一个脚本依赖问题,
直到你尝试部署你的mod。
并从实际游戏中运行它。
让事情更令人困惑。。
当您在ID中测试您的脚本时工作室,
(也许是在一个临时的测试地图内),
所有的游戏资源都是在内存 中。
所以您可能不会意识到您有一个脚本依赖性直到你尝试部署你的 mod
并从实际的游戏中运行它。
This is probably one of the most frustrating things about modding rage.
.这可能是改变Rage最令人沮丧的事情之一。
Scripts assume the programmer will only spawn/use entities
and items that are already in memory
when the script runs because ID Studio assumes all mods are map mods.
脚本假定程序员只会生成/使用 实体。
和已在内存中的项
..当脚本运行时,
因为 ID Studio假设所有的MOD都是地图 MOD。
(If it was a map script and you made the map,
then you would know what was safe to reference).
.(如果它是一个 地图脚本,并且您 制作了 地图,
..然后你就会知道什么是 安全的参考)。
这可能是Rage mod 制作 最令人沮丧的事情之一。
脚本假设 程序员 只会 生成/使用 这些实体和项目
当脚本运行时已经在内存中,
因为ID Studio假定所有 模块是地图模块。
(如果它是一个地图脚本,而你制作了地图,那么你就可以完成了
我知道什么是安全的参考)。
So it is up to you to keep track of what your script spawns/plays and
make sure that those objects are in memory when the script runs.
所以它应该由你来跟踪你的脚本产生/播放什么
请确保在脚本运行时,这些对象都在内存中。
Props, sounds, textures:
道具、声音、纹理:
With the exception of AIs (I will get to that in a moment),
.除了AIS(我马上就会讲到)之外,
you can get around most issues by creating a welcome message (see tutorial above)
and "rewarding" the player by removing items and deployables that link to
the items that your script needs.
.您可以通过创建欢迎消息(请参阅上面的教程)来解决大多数问题。
并通过移除链接到的物品 和 可部署物品来“奖励”玩家。 脚本所需的项。
除了AIs(我马上会讲到),你可以
通过创建一个欢迎消息来解决大多数问题(参见上面的教程)
通过删除项目和可部署来“奖励”玩家
脚本所需的项目。
So if your script needs to play a sound (existing or not),
you need a new hidden inventoryItem with that sound associated with it
(maybe a dropSound for example).
.因此,如果您的 脚本 需要 播放声音(存在 或 不存在),.。
你需要一个新的 隐藏库存项目,与 声音 相关联。
(例如,可能是DropSound)。
因此,如果你的脚本需要播放一个声音(存在或不存在),你就需要
一个新的隐藏库存项目与之相关的声音……
(例如,可能是DropSound)。
The main two settings you want to "flip" for hidden items are:
您 希望“flip”隐藏 项目的 两个 主要 设置 是:
noPickupMessage : true
playerCanSeeInInventory : false
You will also want to mark hidden items as "singular".
.您还需要将 隐藏项目 标记为“单数”。
This setting will not prevent items from stacking,
此设置不会阻止项目堆叠,
however it will eliminate all but 1 instance of the item when the player changes maps.
然而,当玩家 changes(其实有时候不知道 具体意思,只好引用原文词语 ) 地图时,
它将消除除1个物品外的所有物品。
您还需要将隐藏的项目标记为“单数”。此项设置:
不会阻止物品的堆叠,但它将消除所有的东西吗?
但当玩家改变地图时,该项目的一个实例。
Any sounds, props, textures, etc... that the item points to will be
loaded into memory when the engine loads the players inventory.
任何声音,道具,纹理等等…项目将的 加载到内存时,引擎 加载 玩家库存。
If you have a truely global script with no entity attachment,
.如果您有一个没有 实体附件 的 真正全局 脚本,
then you can make the resources globably available by adding the
hidden items to the players inventory definition:
然后,您可以通过添加..玩家库存中的隐藏物品定义:
如果您有一个真正的全局脚本,但没有实体附件,
那么 您可以通过 添加 隐藏到 玩家库存 定义的 物品:
decls/entityDef/player -> startingInventory
However I haven't really tested this method.
.然而,我还没有真正测试过这种方法。
The welcome message jon is the only method I have proven experience with.
欢迎信息Jon是 我 唯一有 经验的 方法。
然而,我还没有真正测试过这个方法。乔恩收到的欢迎信息是
我唯一证明经验的方法。
B) AIs
AIs (Animated entities such as NPCS) are more complicated
because they are not simply a model.
AIS(动画实体,如NPC)更加复杂。
因为他们不仅仅是一个 模型。
They include behaviors, voice tracks, animations,
textures, weapon props for their inventory items, etc...
它们包括行为、声音轨迹、动画……纹理,weapon 道具为他们的库存项目等。
AIs(动画实体,如NPCS)更加复杂,
因为它们 并不仅仅是一个模型。
它们包括行为,声音轨道,动画,纹理,
为他们的库存物品准备的weapon道具,等等。
A simple item prop can help you get the model mesh in memory,
but that is just the tip of the iceburg.
.一个简单的项目道具 可以帮助你在内存中获得模型网格,。但这只是冰山一角。
一个简单的项目道具可以帮助你在内存中获得模型网格,但那是 就在冰堡的顶端。
I did find 1 work around,
but it is limited in scope and comes with its own bugs.
我确实在附近找到了一些 游戏中的 “处理事项 ”。
但它在范围上是 有限的,并且有其 自身的缺陷。
Rage includes a mind control dart weapon as well as remote control cars.
Rage 包括一个 mind control dart weapon 和 remote control cars.
When you use these items,
you see the player model from the remotely controlled entity.
.当 你 使用 这些 物品时,
..您 可以看到来自远程控制实体的 玩家模型。
To support this,
every map in rage already includes MD6 links to the various player armors.
为了支持这一点,
Rage(我自己翻译为 仿徨 )中的 每张 地图 都已经 包含了 MD6 链接到 不同的 玩家盔甲。
However, the MD6 itself is dynamically loaded at runtime.
然而,MD6 本身是 在 运行时 动态 加载 的。
为了 支持 这一点,
每张Rage的 地图都已经包含了MD6 链接到各种玩家的盔甲。
然而,MD6 本身是动态的在运行时 加载。
So.. you can edit one of the player outfits
so that it points at a different md6mesh and different animations.
所以..你可以编辑其中一个玩家 的装备。
以便它指向不同的MD6Mesh和不同的动画。
Then your AI can point to the corresponding player MD6 outfit.
.然后 你的人工智能 可以指向 相应的 玩家MD6 装备。???
所以..你可以编辑其中一个玩家服装,
使它指向a 不同的md6网格和不同的动画。
然后你的人工智能就可以指向 相应的玩家MD6装备。
THis will cause the game to load the model and any associated animations
when it loads the maps and your script will be able to spawn AI's that
use the model/animations since they will be in memory.
这些功能将导致游戏加载模型和任何相关的动画
当它加载地图和你的脚本将能够产生AI的那个使用模型/动画,
因为它们将在内存中。
By the time Rage gives you access to remove control cars,
.当 Rage 让你 移除 控制车 的时候,(?)
you already have to buy a non-ark suit.
.你已经能够 取得 一套 非方舟的游戏 人物 suit 了。
Thus the first 2 arksuit outfits are safe for use.
.因此,前两套Arksuit套装可以安全使用。
You could technically use the other outfits as well,
.从技术上讲,你也可以使用其他装备,
though you risk a user seeing something unusual when they use the remove control car.
尽管 用户在 使用 Remove Control Car 时 可能会看到一些 不寻常的 东西。
当“狂怒 ”让你可以 挪离 控制车时,( 应该是 Rage 游戏中的一个 事件 )
你已经可以在游戏中 得到 一套非方舟式的 suit了。
因此,前两套宇航服 使用起来是 安全的。
从技术上讲,你也可以使用其他服装,
尽管用户在使用Remove Control Car时可能会看到一些不寻常的东西。???
-------------------------------------------------------------------------------
IX.3 > > > > When it fails: 开发运维手册
Sometimes a build fails and when this happens you may find that
when you try to start up the tool kit
that the menu that appears does not have the "ID Studio" Link.
有时 构建 会失败,
当这种 情况 发生时,您可能会发现.。
当你试图 启动 工具箱 时.。
出现的菜单没有 “ID Studio”链接。
有时一个 构建 失败,当这种情况发生时,你可能会发现,
当你尝试启动工具包,因为出现的菜单中没有“ID Studio”链接。
This is because during the build process,
这是因为在构建 过程中,。
the menu is replaced with a version that does not have the IDSTUDIO link,
.菜单被替换为没有 IDStudio 链接的版本,
as the menu flash program is part of build.
因为菜单 flash 程式 是 构建的一部分。
When the build fails because of a crash,
the menu does not get restored.
当 构建因崩溃而失败时,.。菜单无法恢复。
这是因为在构建过程中,菜单会被替换为一个版本
没有IDSTUDIO链接,因为菜单flash程序的一部分
建造当生成因为崩溃而失败时,菜单将不会得到 归还?
Luckily, ID Studio baks up the original menu .swf file.
.幸运的是,ID Studio备份了原始菜单.SWF 文件。
You should find it under:
.你应该在下面找到它:
幸运的是,ID Studio备份了原始菜单.swf文件。
你应该找到它在 下面……
<Rage Tool Kit>/base/swf/
Look for any ".bak" files and manually restore them.
If you have version control software installed, it should be obvious.
.查找任何“.bak”文件并手动 恢复它们..
如果您安装了版本控制软件,
它应该是显而易见的。
查找任何“.bak”文件,并手动恢复它们。
如果你有版本控制软件安装后,应该 很明显。
===============================================================================
X. > > > > External Appendix>外部附录
===============================================================================
-------------------------------------------------------------------------------
IX.2 > > > > Asset/Script Mods 资产/脚本模式
-------------------------------------------------------------------------------
When you make a map, the map clearly defines what it needs. So when you
compile your mod, the game knows exactly what models, sounds and even ai
declarations to add to the game, but when you write scripts, the game doesn't know...
and as a result, often times the thing your script needs
is not present in memory when you try to access it.
当你制作一个地图时,地图清楚地定义了它需要什么。
所以当你编译你的mod,游戏确切地知道什么模型,声音,甚至 ai声明要添加到游戏中,
但当你编写脚本时,游戏将会出现 不知道…
因此,你的脚本需要的东西
当您试图访问内存时,它不存在于内存中。
Take this example:
You make an asset mod (No Map) where you edit one of the original
games jobs so that it rewards a new item you created. Your item has
a script attached to it that plays a new sound and spawns a new 3d
prop in the world using script commands...
您创建一个资产模型(没有地图),在那里您编辑一个原始
游戏工作,使它奖励你创建的新项目。
您的项目有一个附加的脚本,播放一个新的声音,
并产生一个新的3d使用脚本命令。
Result:
The inventoryItem and its icon will be included in the mod such that
when the job activates, they will definitely be present in memory. The
script will also be present, but running it will either not work or
may crash the game.
库存项目及其图标将被包括在 模组 中,这样
当job 被激活时,它们肯定会出现在 内存 中。
这个脚本也将出现,但运行它将要么不工作,要么
可能会让游戏崩溃。
WHY:
ID Studio knows the script compiled, but it doesn't know what the script
actually does or needs... So when it did its dependency trace, it didn't
realize it needed to include the new sound and prop because they are
only referenced by the script.
ID Studio知道编译的脚本,但它不知道脚本是什么
实际上做或需要..。所以当它进行依赖性跟踪时,它并没有
意识到它需要包括新的声音和道具,因为他们是
仅被脚本引用。
Even if you pointed to existing sounds and props, the script would only
work if you were standing in a map that HAPPENED to already contain the
model and sound in pre-cache.
即使你指出了现有的声音和道具,剧本也只会这么说
如果你正站在一张地图上,但碰巧已经包含了一个问题
预缓存中的模型和声音。
So whether you use items/sounds/resources that came with the game
or new resources you create your own, the problem is the same... The
optimizing compiler doesn't know you need those things, so they will
not be in memory when your script tries to use them.
所以你是否使用游戏附带的物品/声音/资源呢
或者是你自己创建的新资源,问题也是一样的。。这个
优化编译器并不知道你需要这些东西,所以他们会需要的
当您的脚本尝试使用它们时,它们不在内存中。
To make things even more confusing... When you test you scripts in ID
STUDIO, (maybe within a temporary testing map), all game resources are
in memory. So you likely will not realize you have a script dependency
issue until you try to deploy your mod and run it from the actual game.
让事情更令人困惑。。
当您在ID中测试您的脚本时工作室,
(也许是在一个临时的测试地图内),
所有的游戏资源都是在记忆中。
所以您可能不会意识到您有一个脚本依赖性直到你尝试部署你的 mod
并从实际的游戏中运行它。
This is probably one of the most frustrating things about modding rage.
Scripts assume the programmer will only spawn/use entities and items that
are already in memory when the script runs because ID Studio assumes all
mods are map mods. (If it was a map script and you made the map, then you
would know what was safe to reference).
这可能是制造愤怒症最令人沮丧的事情之一。
脚本假设程序员只会生成/使用这些实体和项目
当脚本运行时已经在内存中,因为ID Studio假定所有
模块是地图模块。(如果它是一个地图脚本,而你制作了地图,那么你就可以完成了
我知道什么是安全的参考)。
So it is up to you to keep track of what your script spawns/plays and
make sure that those objects are in memory when the script runs.
所以它应该由你来跟踪你的脚本产生/播放什么
请确保在脚本运行时,这些对象都在内存中。
Props, sounds, textures:
道具、声音、纹理:
With the exception of AIs (I will get to that in a moment), you can
get around most issues by creating a welcome message (see tutorial above)
and "rewarding" the player by removing items and deployables that link to
the items that your script needs.
除了AIs(我马上会讲到),你可以
通过创建一个欢迎消息来解决大多数问题(参见上面的教程)
通过删除项目和可部署来“奖励”玩家
脚本所需的项目。
So if your script needs to play a sound (existing or not), you need
a new hidden inventoryItem with that sound associated with it (maybe a
dropSound for example).
因此,如果你的脚本需要播放一个声音(存在或不存在),你就需要
一个新的隐藏库存项目与之相关的声音(可能是a
例如DropSound)。
The main two settings you want to "flip" for hidden items are:
你想要“翻转”隐藏项目的两个主要设置是:
noPickupMessage : true
playerCanSeeInInventory : false
You will also want to mark hidden items as "singular". This setting
will not prevent items from stacking, however it will eliminate all
but 1 instance of the item when the player changes maps.
您还需要将隐藏的项目标记为“单数”。此项设置:
不会阻止物品的堆叠,但它将消除所有的东西吗
但当玩家改变地图时,该项目的一个实例。
Any sounds, props, textures, etc... that the item points to will be
loaded into memory when the engine loads the players inventory.
任何声音,道具,纹理等等…项目将的 加载到内存时,引擎 加载 玩家库存。
If you have a truely global script with no entity attachment, then
you can make the resources globably available by adding the
hidden items to the players inventory definition:
如果您有一个真正的全局脚本,但没有实体附件,那么
您可以通过添加 隐藏到 玩家库存定义的物品:
decls/entityDef/player -> startingInventory
However I haven't really tested this method. The welcome message jon is the
only method I have proven experience with.
然而,我还没有真正测试过这个方法。乔恩收到的欢迎信息是
我唯一证明经验的方法。
B) AIs
AIs (Animated entities such as NPCS) are more complicated because they
are not simply a model. They include behaviors, voice tracks, animations,
textures, weapon props for their inventory items, etc...
AIs(动画实体,如NPCS)更加复杂,因为它们
并不仅仅是一个模型。它们包括行为,声音轨道,动画,
纹理,为他们的库存物品准备的武器道具,等等。
A simple item prop can help you get the model mesh in memory, but that is
just the tip of the iceburg.
一个简单的项目道具可以帮助你在内存中获得模型网格,但那是 就在冰堡的顶端。
I did find 1 work around, but it is limited in scope and comes with its
own bugs.
我确实找到了一个工作,但它的范围有限,并附带它
自己的错误。
Rage includes a mind control dart weapon as well as remote control cars.
When you use these items, you see the player model from the remotely
controlled entity. To support this, every map in rage already includes MD6
links to the various player armors. However, the MD6 itself is dynamically
loaded at runtime.
《狂怒》包括一个精神控制飞镖武器 以及 遥控汽车。
当你使用这些项目时,你可以从 远程 看到 玩家模型 受控 实体。
为了支持这一点,每张狂怒的地图都已经包含了MD6
链接到各种玩家的盔甲。
然而,MD6本身是动态的在运行时加载。
So.. you can edit one of the player outfits so that it points at a
different md6mesh and different animations. Then your AI can point to the
corresponding player MD6 outfit.
所以..你可以编辑其中一个玩家服装,使它指向a
不同的md6网格和不同的动画。然后你的人工智能就可以指向
相应的玩家MD6装备。
THis will cause the game to load the model and any associated animations
when it loads the maps and your script will be able to spawn AI's that
use the model/animations since they will be in memory.
这些功能将导致游戏加载模型和任何相关的动画
当它加载地图和你的脚本将能够产生AI的那个
使用模型/动画,因为它们将在内存中。
By the time Rage gives you access to remove control cars, you already have
to buy a non-ark suit. Thus the first 2 arksuit outfits are safe for use.
You could technically use the other outfits as well, though you risk a
user seeing something unusual when they use the remove control car.
游戏中 当“狂怒 ”让你可以删除控制车时,你已经有了去买一套非方舟式的西装。
因此,前两套宇航服使用起来是安全的。
从技术上讲,你也可以使用其他服装,
尽管你冒着a用户看到一些不寻常的东西时,他们使用的拆卸控制车。
-------------------------------------------------------------------------------
IX.3 > > > > When it fails: 开发运维手册
Sometimes a build fails and when this happens you may find that when you
try to start up the tool kit that the menu that appears does not have the
"ID Studio" Link.
有时一个 构建 失败,当这种情况发生时,你可能会发现,
当你尝试启动工具包,因为出现的菜单中没有“ID工作室”链接。
This is because during the build process, the menu is replaced with a version
that does not have the IDSTUDIO link, as the menu flash program is part of
build. When the build fails because of a crash, the menu does not get
restored.
这是因为在构建过程中,菜单会被替换为一个版本
没有IDSTUDIO链接,因为菜单flash程序的一部分
建造当生成因为崩溃而失败时,
菜单将不会得到归还
Luckily, ID Studio baks up the original menu .swf file. You should find it
under:
幸运的是,ID Studio备份了原始菜单.swf文件。
你应该找到它
在…下面
<Rage Tool Kit>/base/swf/
Look for any ".bak" files and manually restore them. If you have version
control software installed, it should be obvious.
查找任何“.bak”文件,并手动恢复它们。
如果你有版本控制软件安装后,应该很明显。
===============================================================================
X. > > > > External Appendix>外部附录
===============================================================================
A) Console Commands:
http://docs.google.com/file/d/0B0VAFIuYmSp5WE10cDUtS1A2WVE
B) Console Variables 控制台变量
http://docs.google.com/file/d/0B0VAFIuYmSp5VkpjRTE0TGdIR0k
C) Script Commands and Constants 脚本命令 和 常量
http://docs.google.com/file/d/0B0VAFIuYmSp5Ri1SYlNuaGhYb1E
D) Script operations
http://docs.google.com/file/d/0B0VAFIuYmSp5SjlsdFFydVkzaWs