【教程】08红色警戒2地图编辑器FinalAlert2入门基础教程

您所在的位置:网站首页 红警报错 【教程】08红色警戒2地图编辑器FinalAlert2入门基础教程

【教程】08红色警戒2地图编辑器FinalAlert2入门基础教程

2023-12-24 03:22| 来源: 网络整理| 查看: 265

在红色警戒2地图制作的时,真正熟练掌握了地图制作后,最大的问题将会是面临数不清的无论热门还是冷门的错误和限制,学会纠错,建立自己的Debug意识,将是从入门跨入进阶的一个重要转变。

地图制作作为一个可视化的浅层级编程操作,和高级别的编程拥有一定共性,调试就是一个最大的共性。因为制作者自身的错误,和游戏本身的一些漏洞和BUG,我们制作出的地图如果较为复杂,将有很大可能导致错误,作为一个合格的地图制作者,要尽可能的在制作阶段找到并修复或规避这些错误,而不是等着发布后让玩家体验极差后再反馈回来。

正因为Debug对于地图制作和Mod创作具有很重要的意义,而且难度较大,工作量也非常重大,因此Debug单独的分为这样一个章节进行讲解。

针对原版Debug和Ares平台下的Debug,通常有不同的纠错方式,纠错在RA2Modder之间俗称为“抓虫”。

原版的报错后的Debug文件except位于游戏的根目录

而Ares平台下报错后的Debug文件except位于游戏根目录下的Debug文件夹内

尤里的复仇mod“心灵终结”使用了Ares平台,因此拥有Debug文件夹红色警戒2原版IE报错尤里的复仇IE报错Ares平台的FE报错

红色警戒2的一大部分报错和程序崩溃情况都会生成一个except.txt的文件

这个文件就是用来给开发者提供Debug的参考,但是通常情况下这个Debug提供的信息相当模糊,或者压根无效。

其中第三个小节内,Registers:这一段内,EIP:XXXXXXXX这个代码,就是常用的错误类型判断代码,也就是Moder们常说的EIP查错法。

EIP的类型有非常非常多,以至于绝大部分的EIP实际是没有现有范例用来判断到底具体是那个地方出现了致命错误导致了游戏崩溃,除非你和AlexB,Zero Fanker或者老哈这样的相关方面专家非常熟悉,你就可以通过他们来获取这些EIP的具体问题,除此之外,对于冷门的EIP,恐怕将成为不解之谜。

不过,因为大部分Modder和地图制作者的错误,基本都是在同一个坑摔倒,所以,EIP内存在一部分“常用EIP”,这一部分在modenc上可以查询到,这里给各位指挥官一部分参考(摘自modenc),各位可以在这里查询到一部分常用EIP:

Yuri's Revenge 1.001

00000061==either Countries or Singleplayer== This error is encountered when you launch RA2's unedited campaign missions, but have added a new country to the Countries list. This can happen if RulesMD.ini is used by RA2 instead of Rules.ini (by manually renaming the file) and you forgot to add a ';' to entry 9 (which is set to YuriCountry for YR).

004145BD==Art==An AircraftType has a corrupted HVA.

Shows the file type as "unknown" in the XCC Mixer. Also an AircraftType has image tag missing or no artmd section. This could also be caused from an aircraft with no name under AircraftTypes or the name is in the wrong section.

004157E3==Weapon==An AircraftType used as spy plane has no Primary weapon.

00417D05==Weapon==An AircraftType has fired a weapon which has Suicide=yes set.

004242DB==Animation==Using a TrailerAnim on an Animation but not setting a TrailerSeperation (or setting TrailerSeperation=0). This is because the default TrailerSeperation is zero, and that number is used as a divisor.

00424A14==Animation==An Animation with MakeInfantry=X set was played, where X was greater than the number of list entries in AnimToInfantry or less than 0.

0042E7AF==AI==A Construction Yard does not have AIBuildThis=yes set and the owning side's AI was present in the game.

00441C28==Misc==You have set [AudioVisual]→ShakeScreen= to zero.

004593BB==Misc==See Tank Bunker / Sell Unit IEs

004586A9==General=="What PadAircraft would you like?" ";" "You must have PadAircraft!!! I kill you!"

0045EC90==Misc==Multiple reasons, depending on the stack dump in the except:

If 00506115 appears near the top of the stack dump - some country (present in the game at the moment, controlled by AI) cannot build anything from [General]→Shipyard=.

0045ED69==Misc==The [General]→PadAircraft= list is empty.

0045ED71==Misc==The first AircraftType in the [General]→PadAircraft= list doesn't have at least one BuildingType listed as its Dock.

0046650D==Weapon==A unit's ShrapnelWeapon or DeathWeapon does not exist (see broken-reference causes, below).

00471CA4==Weapon==A unit's initial primary (Primary or Weapon1) weapon's Warhead does not have MindControl=yes set, but a weapon in some other weapon slot does. Triggered by one of the following events:

Unit was selected by the user and the user moused-over a potential target.

Unit was considering potential targets on its own (e.g. the unit was about to fire automatically at a nearby enemy unit).

An IFV or urban combat building gains a mind-control weapon via passenger entry or garrison.

00482096==Unit crates==Your [AI]→BuildRefinery= is either invalid, missing or blank thereby the game can't find the harvesters for deciding the unit.

004895C7==Warhead==You have a warhead with a CellSpread greater than 11.

004C445E==Weapon==A unit's secondary weapon does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank. Examples:

The offending weapon is the unit's Secondary weapon, and the unit just finished constructing.

The offending weapon is the unit's EliteSecondary weapon, and the unit just got promoted to Elite status.

004D5108==Weapon==A unit's secondary weapon does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank. Examples:

The offending weapon is the unit's Secondary weapon, and the unit just finished constructing.

The offending weapon is the unit's EliteSecondary weapon, and the unit just got promoted to Elite status.

004F0FEC==Weapon==A unit's Primary weapon does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank. Examples:

The offending weapon is the unit's Primary weapon, and the unit just finished constructing or just got spawned.

The offending weapon is the unit's ElitePrimary weapon, and the unit just got promoted to Elite status.

004F8CCD==AI==[AI]→BuildConst= lists less than 3 BuildingTypes and your last [listed] Construction Yard was destroyed or sold while you were on low power, or you went into low power without owning any Construction Yards.

004F65BF==Misc==Some House cannot build anything from [General]→BaseUnit= .

00505E41==Misc==An AI-controlled House which, due to rules(md).ini configuration, is unable to construct a base, received a Construction Yard thus triggering the AI base planning routine. Triggered by the following events:

If a player's MCV was mind-controlled by an enemy, that player is killed, and the MCV is then released from mind-control to the neutral side. The only workaround is to make MCVs immune to mind-control (this is done in the UMP).

A neutral Engineer (there's an official multiplayer map that has neutral Psychic Sensors which, on rare occasions, can leave an Engineer as a survivor) captures a Construction Yard.

More detail: The AI base planning logic kicks in at the moment a player receives a Construction Yard and generates a plan of what buildings to build, in what order. However, the game makes an assumption that any country that can actually start base construction will be able to build at least 3 different BuildingTypes. When that assumption fails (a Construction Yard is received by the civilian house, who cannot build anything), everything goes haywire. For more info on how base planning logic works, refer to the AI Base Planning System article.Interestingly, the civilian house acquiring a Construction Yard via relinquished mind-control (in the same way as for an MCV) does not cause an IE. Clearly this effect was not taken into consideration when mind-control was added to the engine and the AI base planning routine is only called when a Construction Yard is captured or is first created.

0050CD440050CD790050CDA20050CDCC0050CDF00050CE140050CE380050CE5C0050CEA20050CECC0050CF150050CF2A

==AI==

The AI is trying to pick a target for the Nuclear Missile or Weather Storm superweapon but is lacking target weighting values for a certain object that exists on the map. You need to uncomment/restore one of the [General]→AIIonCannonXValue= lines.

0050CD20 - An InfantryType with Engineer=yes exists on the map. AIIonCannonEngineerValue needs restoring.

0050CD44 - An InfantryType with VehicleThief=yes exists on the map. AIIonCannonThiefValue needs restoring.

0050CD79 - A BuildingType with Factory=BuildingType exists on the map. AIIonCannonConYardValue needs restoring.

0050CDA2 - A BuildingType with Factory=UnitType and Naval=no exists on the map. AIIonCannonWarFactoryValue needs restoring.

0050CDCC - A BuildingType with a positive Power value exists on the map. AIIonCannonPowerValue needs restoring.

0050CDF0 - A BuildingType with IsBaseDefense=yes exists on the map. AIIonCannonBaseDefenseValue needs restoring.

0050CE14 - A BuildingType with IsPlug=yes exists on the map. AIIonCannonPlugValue needs restoring.

0050CE38 - A BuildingType with IsTemple=yes exists on the map. AIIonCannonTempleValue needs restoring.

0050CE5C - A BuildingType with HoverPad=yes exists on the map. AIIonCannonHelipadValue needs restoring.

0050CEA2 - A BuildingType listed in [AI] → BuildTech exists on the map. AIIonCannonTechCenterValue needs restoring.

0050CECC - A VehicleType with Harvester=yes exists on the map. AIIonCannonHarvesterValue needs restoring.

0050CF15 - A VehicleType with a positive Passengers value exists on the map. AIIonCannonAPCValue needs restoring.

0050CF2A - A VehicleType which DeploysInto a BuildingType listed in [AI] → BuildConst exists on the map. AIIonCannonMCVValue needs restoring.

00518369==Warhead==An InfantryType is taking damage from a non-existant warhead.

0054AF0E==Object==A unit's Secondary points to a non-existent weapon.

0054D10A==Object==This happens when you re-code the Battle Fortress to have a SizeLimit bigger than 2 (i.e. can load other tanks) and then tell it to enter an amphibious transport. Of course, this isn't limited to the BFRT alone. It should be noted though that the game doesn't always crash when the enter order is issued. It's more of an occasional crash that seems to happen randomly. (confirmed for RA2)

00567B43==Object==An Object has a negative sight.

0056D388==Object==An InfantryType or VehicleType does not have a valid movement zone.

005D7387==Misc==Not having at least one valid InfantryType with AllowedToStartInMultiplayer=yes (default) for each house.

005DA453==Network==A crash occurred with the network code around an object called FirewallHelper.

005F4F88==Animation==An Animation has TiberiumSpawnType=SOME_OVERLAY and SOME_OVERLAY is one of the three last entries in [OverlayTypes].Link to original report

005F5155==Misc==You tried to construct a BuildingType with HasSpotlight=yes. Yuri's Revenge 1.001 doesn't support this, only patched versions do.

0062B662==Animation==Having an animation with SpawnsParticle which does not point to a valid ParticleSystem (see broken-reference causes, below).

0062DCD2==Misc==An overlay type with Explodes=yes set has been destroyed, random dice roll determined that the particle specified in BarrelParticle should be displayed, but that flag is blank OR you're firing a weapon with UseSparkParticles=yes/UseFireParticles=yes/IsRailgun=yes without a valid AttachedParticleSystem= set.

0064003C==Misc==If you have a buildable Construction Yard, start its construction, and then cancel it, an IE will occur. Construction Yards should not be buildable - they should only be deployed from vehicles.

006407A6==Misc==You've made a MapShot "Not ScreenShot" that was saved as Map****.yrm and is in your Directory. Game is trying to load map during initial startup. Remove these MapShots from the directory to prevent this from happening.

0065B73F==Weapon==You have a Weapon whose RadLevel is less than [Radiation]→RadLightDelay=. (Cause: Integer division is performed on those two values, which yields zero in this case, and then another value is divided by the result - division by zero.)

0069ACC6==Map==A PKT file's [MultiMaps] section declares a map which doesn't have its own section to define the parameters, or lacks the CD entry in the section.

00697F29==Misc==The game can't find a valid gamemode. Your mpmodesmd.ini is corrupted.

006ABF96==Misc==This IE is encountered immediately after loading up. This was tested for skirmish with the XWIS Multiplayer-only components.

This crash happens when the resolution is set to higher than 2560x1600.

006AEBB8==Misc==Your ra2md.ini file lists a combination of game mode/map which the game cannot satisfy. This can happen if the range of valid combinations changes between one game session and the next (i.e. because you changed what maps were valid for which game modes in your mod, or you activated a different mod to the one that was active previously).

LaunchBase works around this by saving and restoring the game's configuration on a per-mod basis.

006B7987==Object==A garrisonable building has non-existing weapons.

006B7D30==Object==An object has a weapon with Spawner=yes, but it doesn't have Spawns=yes. The latter part is what tells the game to initialize the Spawn Manager for this unit when it's instantiated, the former part tells the game to try and access the Spawn Manager (and it doesn't check if it's been initialized properly).

006B7718==Object==A Spawned=yes attempted to fly over the map border instead of landing, thus crashing the game. A known reason for this issue is Selectable=no on AircraftTypes that use aircraft Locomotor.

006C1D28==Object==A unit has Turret=yes despite unittur.vxl not existing. What's interesting is that the game won't crash because of this if no VXL or HVA for this unit exists at all.

006EA6AE==AI/Map==You coerced the game into creating an instance of a TeamType that is not defined, either through Map Triggers or through AI Script Actions.

006F1FC6==AI programming==A TeamType has been defined without assigning it a TaskForce, or a TeamType is being referenced without being defined at all.

006F352E==Weapon==A unit has an ElitePrimary weapon specified which does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank, and that unit just got promoted to Elite status.

006F40A2==Weapon==Started construction of a unit whose Primary weapon does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank.

006F72EF==Weapon==A unit has an ElitePrimary weapon specified which does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank, and that unit just got promoted to Elite status.

006F9DB6==Techno==The game tried to check an ownerless unit's owner. Reported case was Service Depot's allegiance check.

0070031E==Weapon==A unit has a weapon specified which does not exist in the INI (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank. (Common reason - that unit just got promoted to Elite status and one of the Elite weapons is misdefined.)

00702330==Anim==A building has missing or non-existing DebrisTypes. Like DebrisTypes=CRYSTAL1.

0070DF8A==Weapon==A unit with IsGattling=yes is either missing WeaponX/EliteWeaponX entries, or WeaponCount is less than 2 times WeaponStages. For example, if WeaponStages=2, WeaponCount must equal 4, and you must have accompanying Weapon1-4/EliteWeapon1-4 entries. IE occurs at the time the IsGattling unit is firing and would advance to the missing Weapon Stage.

007120F7==Misc==You have a BuildingType (which is click-repairable) with Strength=0 or Strength below [General]→RepairStep=.

0071AF4D==Warhead==Detonating a Temporal=yes warhead under one of the following conditions:

Firing weapon was a shrapnel weapon.

Firing weapon was an urban combat weapon (fired from an occupied building).

Warhead has a non-zero CellSpread set.

0071B173==Warhead==Firing a death weapon using a Temporal=yes warhead.

0044283200442892004428DE

==Warhead==

Using Sparky=yes warhead without three valid animations defined in [AudioVisual]→OnFire=. Crash happens when damaging a building into yellow or red health.

0071C661==Warhead==Using Sparky=yes warhead without two valid animations defined in [AudioVisual]→TreeFire=. Crash happens when damaging a wooden terrain object.

0072652D==Map==There is a trigger in the map that wants to change a house's non-existant object to another house.

00684E55==Map==There is a trigger which requires a house, either because its events, actions or attached triggers require a house. The house on the trigger is not set.

00728F08==Object==Something's wrong with this building's Secondary (missing/invalid)

007387EB==Art==[AudioVisual]→ShakeScreen= is missing or set to zero.

0073B0C9==Misc==The concept known as "Infantry Linking" can result in an IE, occuring when the linked infantry was modified in a subsequent game mode override file or a map and a human player scrolls their battlefield view to a place on the map where an AI-owned War Factory is located. Don't do Infantry Linking.

0073C762==Art==The artmd.ini entry specified by a Voxel-using VehicleType's Image tag is missing - the game defaults to Voxel=no in this case and attempts to load and draw a non-existant SHP.

00756B2D==Art==The specified ShadowIndex on an AircraftType or a voxel VehicleType adresses a section that does not exist.

00772A98==Weapon==A unit has an ElitePrimary weapon specified which does not exist (see broken-reference causes, below), or the weapon's Warhead tag is missing or set to blank, and that unit just got promoted to Elite status.

Also reported to be due to "firing a weapon that has no projectile". This needs testing - missing projectile may be an alternative reason to all 'missing weapon' IEs.

007C9B92==Malformed input==

Multiple reasons, depending on the stack dump in the except:

If 006DD5D2 or 006DD009 appear near the top of the stack dump - Map contains a malformed Map Action, while parsing it, a number was expected, something else or end-of-line was found instead. Map Actions expect well-formed input.

If 00843EEC appears in the stack - RefinerySmokeOffsetThree is not set to a valid value.

Another reason: A country has empty nodes in a campaign map. It may happen NodeCount has a value different than the actual amount of nodes. Make sure the amount of base nodes exactly match the value of NodeCount.

007CAF66==Malformed input==

Multiple reasons, depending on the stack dump in the except:

If 0075DE19 appears near the top of the stack dump - A Warhead whose Verses could not be processed. EBP value says how many values remained to be parsed when an error occurred - (11 - EBP) is the 0-based index of the problematic value.

007CFD30==Misc - memory management==

If line 20 of the stack dump includes 61108B, and line 23 includes 610CA0, you are likely trying to use RockPatch's "Place Urban Areas" feature without applying the necessary snowmd.ini fix. Please check the RockPatch Help for more info.

Varies, stack dump starts with 0051BB7D

==Warhead==

A unit was being erased by a chrono weapon but the object that started the erase process no longer exists. When a unit is being erased, an instance of the TemporalClass is linked to it. This class references the object that is doing the erasing. If the object breaks the link under 'normal' circumstances (e.g. the firer is destroyed or moved) then the attack order is cancelled and the TemporalClass is removed. In some rare cases the link to the firer's TemporalClass is not removed and therefore points to garbage memory.

Examples of how the IE may occur:

Ore harvester with a chrono weapon started an attack but then transformed whilst unloading ore at a refinery before the target was destroyed. Don't give ore harvesters chrono weapons.

A vehicle was being erased but then got picked up by a carryall. This is very difficult to replicate - it has only been reported once.

The IE occurs when the unit would have been erased.

Varies, stack dump starts with 00520FC8

==Warhead==

A building was being erased by a chrono weapon after infantry recieved the order to occupy it. When the building is erased before the infantry reaches it, an IE occurs. This is because the TemporalClass removes the building without marking it as dead, thus the occupying infantry is not informed its destination is gone. The IE occurs when the infantry unit updates its position. There is another TemporalClass related bug similar to this one – EIP address 00521BB6, which lies inside the same function, can be seen near the top on a stack of this exception.

0052976F==Campaign==RA2 1.003 doesn't like it when its battle.ini is overriden by another one outside of local.mix. Whether or not putting it in an expandxx.mix fixes this is unknown.

The game crashes when your start a new campaign during loading. You get a blank screen during loading. A side-effect is the soviet campaign-load palette and SovietLoad color being used for Allied missions when loading them through the load menu and then restarting them. Strangely enough, the reverse doesn't happen.

Varies, stack dump at 18D264 has 00722C9E

==Resource==

One or more resources have invalid resource spread/growth data which tries to access a map tile it isn't supposed to and corrupting it.

90900004==Misc==Generic exception, for example, raised when you are missing the snowmd.ini median fix.

FEEEFEEE==Misc==Multiple reasons, depending on the stack dump in the except:

If the stack dump starts with 006B771E then it's a variant of 006B7718.

参考文献:https://www.modenc.renegadeprojects.com/Internal_Error#Tiberian_Sun_2.03

以上内容可能存在排版错误,属UP主个人错误,原文见原地址

同时UP主我自己也在收集一些我自己遇到的冷门EIP,比如:

0065D99F:小队内存在重复单位时,会导致本错误

00529A14:CSF问题 ※读取形如"a,b"这样的两个整数的时候没读取到而且找不到默认值

007C9B92:数值无法读取,或者节点问题

006E2449:42号触发写错参数

EIP的Debug方式基本就是出了错然后找到EIP代码然后对照查错表进行纠错,但是要注意的是,EIP不是万能的,EIP只是一个粗略的判断错误类型的办法!千万必要过于迷信EIP的效果。

而EIP只是一个较为主流而且效果明显的Debug方式,除此之外,EIP解救不了的错误,那就需要通过其他的方式来进行抓虫。而且,EIP仅能从程序层面找到错误,并不能对你惨不忍睹的游戏机制,或者趣味匮乏的玩法进行任何调整和提示。

所以,首先,我们可以通过【Saveloading】大法来解决绝大部分问题!那么这个看上去高大上的词是什么意思呢!当然就是保存载入啦!

没错,就如同在教程一开始我提到的,保存非常重要,对于纠错,很多时候我们也要通过保存和重载来修复BUG,因为有相当一部分错误和BUG是不可逆的无法修复操作。

这个时候我们就需要通过备份我们的地图来解决这些问题,一旦出现不可逆的数据破坏,就可以通过重载备份数据来修复掉我们的BUG和错误,这是最原始也是最有效的修复方式。

但是,毕竟不一定随时我们都可以找到我们的备份数据,所以面对可修复的错误,我们还是有其他办法来解决这些问题,比如【逻辑抓虫】,这也是非常原始但是有效的Debug手段。但是这需要制作者养成经常进入游戏调试以便于及时发现问题的习惯。通过基础的逻辑进行抓虫,可以让我们发现绝大部分的地图明显BUG,以及游戏机制的错误,我们在发现这些问题后,可以通过文本形式记录下来,最好不要通过脑力来记忆,因为复杂的地图,特别是单人战役,每次测试可能会带来巨量的问题,纯靠脑力记忆可能会相当困难。

在每次测试过后,记录下出现的问题,然后及时修正,遇到IE/FE报错,则可以立刻寻找到对应的except文件,查找对应EIP,如果是热门EIP则立刻对症下药解决,如果是冷门EIP,则通过逻辑分析在最近的编辑时我们修改了什么内容,然后逐一的禁用后进入游戏测试,排查是否存在问题。

这样的抓虫方式可以解决掉98%的不足和问题,当然,前提是你会改。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3