Mini tutorial: Editing enemy spawns and various scripts
Feb 11, 2016 2:37:12 GMT 10
KamiA, schnippshly, and 7 more like this
Post by FluffyQuack on Feb 11, 2016 2:37:12 GMT 10
XFS support was recently added to arctool which makes editing enemies MUCH easier than before, and also makes it possible to edit other XFS files (used as scripts and for a lot of stuff in the game). Use latest version of arctool and add the "-xfs" option to enable conversion of XFS files. It'll create an XML file you can edit. There's also a text file with struct information for the XML, but you'll want to that leave alone unless you really know what you're doing.
If you extract s400.arc (public assembly mercenaries stage), and look at s400_em00.lot.xml you'll see an entry for each enemy in that file looking something like this:
There's a lot of variables there, but the most important ones are pretty straightforward. "mLife" is the health for the enemy. "mUnitClass" is the actual enemy type (refer to this for a partial list of enemy types: www.fluffyquack.com/RE5/txt/enemy-types.txt ). "mbLefty" is whether or not the enemy is left handed. "mPosition" is the spawn position for that enemy. "mAngle" is the direction the enemy looks in when spawning. "mScale" is the physical scale of the enemy, so you could make them tiny or large.
Some enemy types would have unique variables attached to them, so if you want a different enemy type into a stage where he usually wouldn't exist, you would have to use an XFS from another stage as template (remember to copy over both the TXT and XML files when doing that). If you like the idea of messing with structs, you could even edit the TXT file directly and add new variables to it (that's definitely for advanced users though, and I haven't even messed with it myself, but it should work in theory if edited correctly).
It's worth repeating that there are a lot of XFS files in RE5, and they define a lot of various information. I've only looked at a few of them, so I'm sure there's a lot of stuff which is editable which I'm not even aware of.
I personally recommend using notepad++ for editing XML files, but any text editor would do.
If you extract s400.arc (public assembly mercenaries stage), and look at s400_em00.lot.xml you'll see an entry for each enemy in that file looking something like this:
classref type="1637199632">
<s32 name="mID" value="0"/>
<string name="mInfoClass" value="cSetInfoEm10"/>
<string name="mUnitClass" value="uEm10"/>
<classref name="mpInfo" type="82723943">
<string name="mName" value=""/>
<string name="mParentName" value=""/>
<s32 name="mParentNo" value="-842150451"/>
<u32 name="mOrder" value="4"/>
<vector3 name="mPosition" x="808.507202" y="52.791748" z="1063.524170"/>
<vector3 name="mAngle" x="0.000000" y="2.199115" z="0.000000"/>
<vector3 name="mScale" x="-1.000000" y="1.000000" z="1.000000"/>
<u32 name="PatternNo" value="0"/>
<u32 name="mLife" value="800"/>
<u32 name="mJumpInit" value="0"/>
<bool name="mInAir" value="false"/>
<bool name="mNoLimitCheck" value="false"/>
<u32 name="mModelType" value="0"/>
<u32 name="mMontageNo" value="4294967295"/>
<u32 name="mSearchType" value="1"/>
<f32 name="mSearchForward" value="0.000000"/>
<f32 name="mSearchCircle" value="1000.000000"/>
<u32 name="mSearchHitNo" value="0"/>
<u32 name="mAreaKeepType" value="0"/>
<f32 name="mAreaKeepDist" value="0.000000"/>
<u32 name="mAreaKeepHitNo" value="0"/>
<bool name="mIsFindPL" value="true"/>
<bool name="mIsGoto" value="false"/>
<bool name="mIsGotoAng" value="false"/>
<vector3 name="mGotoPos" x="0.000000" y="0.000000" z="0.000000"/>
<vector3 name="mGotoAng" x="0.000000" y="0.000000" z="0.000000"/>
<bool name="mIsForNet" value="true"/>
<s32 name="mSArg00" value="0"/>
<s32 name="mSArg01" value="0"/>
<bool name="mIsScrHitOff" value="false"/>
<bool name="mbForceMoveFSM" value="false"/>
<bool name="mbArmed" value="true"/>
<s32 name="mArmNum" value="0"/>
<s32 name="mArmId" value="459088"/>
<u32 name="mArmSetJoint" value="0"/>
<bool name="mIsExtra" value="false"/>
<u32 name="mExtraNo" value="0"/>
<bool name="mIsActing" value="false"/>
<u32 name="mAttribute" value="0"/>
<u32 name="mPlagaType" value="0"/>
<u32 name="mSubBomb" value="0"/>
<u32 name="mAttackType" value="0"/>
<s32 name="mMaskType" value="-1"/>
<bool name="mbLefty" value="false"/>
<bool name="mbNeckEvent" value="false"/>
<f32 name="mbNeckLimitY" value="90.000008"/>
</classref>
There's a lot of variables there, but the most important ones are pretty straightforward. "mLife" is the health for the enemy. "mUnitClass" is the actual enemy type (refer to this for a partial list of enemy types: www.fluffyquack.com/RE5/txt/enemy-types.txt ). "mbLefty" is whether or not the enemy is left handed. "mPosition" is the spawn position for that enemy. "mAngle" is the direction the enemy looks in when spawning. "mScale" is the physical scale of the enemy, so you could make them tiny or large.
Some enemy types would have unique variables attached to them, so if you want a different enemy type into a stage where he usually wouldn't exist, you would have to use an XFS from another stage as template (remember to copy over both the TXT and XML files when doing that). If you like the idea of messing with structs, you could even edit the TXT file directly and add new variables to it (that's definitely for advanced users though, and I haven't even messed with it myself, but it should work in theory if edited correctly).
It's worth repeating that there are a lot of XFS files in RE5, and they define a lot of various information. I've only looked at a few of them, so I'm sure there's a lot of stuff which is editable which I'm not even aware of.
I personally recommend using notepad++ for editing XML files, but any text editor would do.