fe制造吧 关注:2,834贴子:14,352
  • 13回复贴,共1

战斗动画的导入方法(移植)

只看楼主收藏回复

转自FEuniverse,适合gba三作
在开始之前先说一下准备工作:
做事都少不了工具利器,这个教程中将会用到以下工具:
1.CrystalTile2   
此工具集TILE处理和16位进制编辑器于一体,同时可以简单查找压缩文件。现在的版本为2008.04.07,缺点是有时不太稳定。
2.NLZ GBA Advance   
这是国外论坛里的高手Nintenlord做的工具,专门用于查看GBA游戏中被压缩过的图片,最新版本已针对GBA火纹三作进行优化,定位更快更准,使压缩图片一览无遗。当然也可进行简单的导入导出。
3.NLZ Compressor   
同样是Nintenlord的杰作,针对LZ77算法有强大的解压和压缩功能,什么东西都能压到ROM里,缺点是无法预览图片,常常和NLZ GBA Advance配合使用。
4.GBA的模拟器和ROM   
模拟器推荐用VisualboyAdvance



1楼2011-01-29 20:48回复
    下面便正式开始导动画:
    1.首先要知道你所导人物完整的战斗动画到底有几个。
    GBA三作是由职业和武器决定战斗动画的。职业不同则动画不同,武器也是同理,但需要注意的是:角色拿剑和魔法剑用的是同一动画,枪和投枪也是同一动画,斧和投斧却是两个动画。这是因为剑与魔法剑、枪与投枪刚开始动画时人物的站立姿势是一样的,尽管后面动作不一样。而斧和投斧人物一开始站姿就不同,这就说明是两个动画。另外对某一职业来说,所有攻击性魔法(理光暗)用的是同一动画,杖是单独的动画,空手也是单独的动画。
    举个例:领主骑士(烈火中小艾的高级职业)一共有4个战斗动画:枪、剑、空手、拿烈火之剑。重装领主(大海的高级职业)有5个战斗动画:剑、斧、投斧、空手、拿天雷之斧。其实空手也可以不导,因为很少会出现没有武器的情况。
    在这个教程里,我将会把烈火中利刃领主琳使用剑的动画导入到圣魔中去。
    


    2楼2011-01-29 20:48
    回复
      2.导出
      用CrystalTile2打开烈火的ROM,
      如图切换到编辑状态,从工具栏中找到搜索—》查找,然后输入bllf,bllf是blade lord lyn(female)利刃领主琳(女)的缩写,至于动画的英文名和顺序我会在二楼给出的,方便大家查找。找到第一个bllf,在右边看到的是bllf_sw1,这就是琳用剑的动画,下面接着是用索尔.卡缇,用弓和空手的动画,我们只需要用剑的动画。
      


      3楼2011-01-29 20:48
      回复
        如图所示,红色区域便是动画数据,一共32个字节。仔细分析一下,这32字节的前12字节是ASCII码,表示的就是右边的bllf_sw1,这只是名称而已,可以不管它。后面的20字节是5个指针,分别是C8 7F E4 08,A4 7A E4 08,1C 66 E4 08,78 51 E4 08,18 51 E4 08。记下这5个指针,然后把第一个指针转换成地址是E47FC8,在CrystalTile2 左边的偏移地址栏输入E47FC8再回车。
        如图从E47FC8开始选取6行共96个字节的数据,选中后点编辑—》导出,导成2进制(.bin)文件,取名Data1。剩下的4个指针也转换成数据是E47AA4,E4661C,E45178,E45118,但是这4个地址的数据是被压缩过的,不能按第一个指针的办法来做。这时要用到NLZ Compressor。
        


        4楼2011-01-29 20:49
        回复
          这是原教程
          Utilities needed:
          -A hex editor, preferably with replace function.
          -NLZ77.
          -NLZ-GBA Advance.
          Knowledge needed:
          -How to use hex editor.
          -What are bytes, compressed data, graphics, offsets, pointers and text.
          -Ability to do as I say.
          1. First, you need to find the animation pointer table of the game you are ripping the animation from. This can be done by searching text "magm". It'll land you right on the mage animation. Scroll up until you get to the beginning of the pointer table. Next, open the Animation list that comes with Custom Battle Animation Editor module. Search for the animation(s) you wish to import and write down their values. Then, it's time to find the animation in animation pointer table. Each animation consists of a 12 byte ASCII header and 5 pointers, so the complete length of a animation is 12+5*4 = 32 bytes = 2 rows of 16 bytes. Example. Scroll down to the animation.
          2. Write down the 5 pointers of the animation. Then take the pointer pointing to the highest offset (usually the first pointer) and follow it to the offset. Copy/paste the next 96 bytes(6 rows) into a new file. Make sure you write what file's data comes from what offset into somewhere or just use the original offset as the file name.
          3. Uncompress the data pointed by the second pointer with NLZ77. In the uncompressed data you'll see dozens of pointers. All those point to graphics, so write the offsets down. If you wish to import several animations, you should repeat the first 3 steps for all animations before hand, since some animations may share graphics. If it's your first time importing and you are uncertain if you will get it right, you can continue importing just one animation.
          4. After that, uncompress the 3rd, 4th and 5th pointers with NLZ77 into separate files.
          5. Uncompress the graphics pointed by the 2nd data. You can either do it with NLZ77 or NLZ-GBA Advance, though if you use the latter, no need to scan, since we know the graphics offsets already. Don't use bitmaps either, just dump raw data, as it saves work on inserting.
          6. Now that you have all the data from the original game, it's time to insert the animation into the new game. First, find some empty space in the ROM or expand it to get some room for the new animation. Then, insert the graphics and write down the offsets where you inserted them. Use NLZ77 for it.
          7. In the data with the pointers to graphics, replace the old pointers with new pointers to the offsets in the new game. If your hex editor has a Replace function, use it. If not, you have a lot to work to do.
          8. Start reinserting the rest of the animation data. Remember to compress the data with NLZ77 if it was compressed in the original game. Write the new offsets down.
          9. Right now you should have all the data you need in the new game. That leaves the pointers in animation pointer list. Go to the end of the animation pointer table and create a new animation instance (you can find the new games animation pointer table the same way as in the original). Fill the ASCII text part as you please and type the pointers in by using the beginning offset of the data in the new game and offsets in old game as help.
          10. Now the animation should be working, but it isn't used. Not to worry, since you can change that by following the battle animation pointer in class editor and changing the animation value or by using the Custom animation module. Just make sure you add your animation to the animation list of the module.
          


          6楼2011-01-29 20:52
          回复

            CODE
            1. File Handling. Load your ROM here.
            2. Block Handling. Pressing + or - adjusts the image.
            3. Offset. Either insert an offset that you know, or press up or down to scroll through them.
            4. Palette Control. 9 out of 10 times, you'll need 16 colors and Greyscale. It helps a lot.
            The only thing here that really needs explaining beyond what I've said, is the Block Handling. Pressing + or - will move the blocks around, and messing with this will often help you determine what you're looking at. Unless it's a bunch of garbage, in which case you're screwed anyway, as it's nothing.
            Chapter 1 ~ What To Import
            Now, break out whatever ROM it is that you're yanking an animation from. I personally will be ripping Blade Lord Lyn out of her cold FE7 ROM and putting her into a much more comfy FE8 ROM for my personal use. Go convenience!
            Now, there are a few things to keep in mind: EVERY weapon set, even if it's unarmed, is a seperate animation, and therefore another go through of the process. Swords (In most cases) all use one animation, whereas Lances/Javelins use a different animation. Axes/Hand Axes, however, use seperate animations. So if you wanted to import an Axe animation, that's an automatic 2 animations you'll have to import.
            [This is caused by the fact that the standing frames for Axe/Handaxe are different, so Javelins and Magic Swords go with the standard weapon buddies.]
            All offensive magic types (Anima, Light, Dark) use the same animation. This animation is also used for unquipped.
            Staves use an animation of their own.
            Having nothing equipped uses it's own animation. (You may or may not want to import this. It's not often people are left with no weapon.)
            Examples:
            Some of those examples: Click Here To Show/Hide This Text
            A Knight Lord (Eliwood, not counting Durandal), having Spears and Swords, has 3 animations: Unequipped, Sword, and Lance.
            A Great Lord (Hector, not counting Armads), having Swords and Axes, has 4 animations: Unequipped, Swords, Axes, and Handaxes.
            An Archsage (Who has all magic types) has 2 Animations: Magic [Anima, Dark, and Light] and Staffs.
            One good way to remember this is how many seperate standing images (Standing in battle, doing nothing) a unit has. Of course, you only have to import the animations that you need. If you don't want to use Eliwood's Sword animation, then don't import it. There's nothing that says you have to. I personally usually don't import the unequipped frames, but whatever.
            Location in the game:
            Now that you know which animations you're going to import, now you have to go and find them. It's not as hard as you'd think (This is the easy part...sorta). Open up the host ROM in your HxD, and search up "magm". This will lead you to the Male Mage's animation table data, meaning that you're somewhere in teh animation table. Scroll up for a bit, until you reach the top of the table (Trust me, you'll notice when you're at the top...there's a bunch of FFs or 00s above it.). Now, go through your Nightmare modules and find one called "Animation List" or something like that. Open it up. This here is your key to what you're looking for.
            


            8楼2011-01-29 20:58
            回复

              It's almost finished! This is the last stretch, where you'll likely find out that you messed up and get angry!
              Chapter 4 ~ Using the Animation
              What good is an animation if you can't use it? None. It's useless. So now to put it to use.
              Setting up the Animation for use
              Search the text "magm" in the final ROM, and scroll to the bottom of the table. You'll know when you get there, because there will be a lot of 00s all over the place. This is where you will put in the animation table data. Go to the line right after the last one (No skipping), and put your cursor over 4 00's to the right (You can look 2 rows up to see how far if need be). Type in the pointers to the animation DATA (Not the graphics) in order, starting from Data 1 (Of course).
              And that's all you need to do with that specific part! Now to go point stuff to it.
              Pointing the game to the animation
              Open up Nightmare, and load up the FEWhatever ROM that now has the new ROM in it. Open up the customized modules that you downloaded from the top, and go to the "Custom Battle Animation" module. Fill in all of the blanks for which animations that it will use (This is typically used by one class), and the new animation that you used will be the first blank spot in the animation list. If you've put in two of them, then the second one will be the second blank spot on the list.
              Write down/remember the offset that you just put all that data into (It's the option of what you're editing towards   the top of Nightmare) and go to the Class Editor Module. Scroll down to the bottom where it has "Battle Animation Pointer". It should be a text box, not a dropdown. Input the animation pointer from the last Nightmare Module, and you're done! Whoohoo!
              Testing the animation!
              This is the part where many of us might cry. Edit what/whoever you need to be the class that has the new animation, and send them into battle with the proper weapon so that it loads the animation. TURN DOWN YOUR SPEAKERS. If you messed up, the game will start screeching bloody hell at you, and that's no fun when your speakers were blasting out FE music right before it messed up.
              If it works, it'll work fine, and you'll see your newly imported animation running! If not, then the game will freeze just as the battle platforms are showing up, and your game will start making a very unpleasant noise.
              NOTE: If it works, but has a "kink" in it, i.e. some frames sorta glitch out, then this is NOT YOUR FAULT. In fact, it's the game's fault. As it is, the only person who can help you fix that, if they are even willing, is Nintenlord, as that is a problem with the TSA, which I know nothing about.
              AND IT IS DONE! *Breaks a champange bottle on my computer screen, frying the whole thing* 


              12楼2011-01-29 20:58
              回复
                文中---如图---我木有看见图。。。。


                IP属地:山东13楼2012-01-12 18:16
                回复
                  名称:战斗动画的导入方法(移植)
                  括号说明:(移植)


                  IP属地:安徽14楼2012-05-16 22:20
                  回复
                    诶、去火花看了看,还是不能熟练运用。。残念、、


                    IP属地:安徽15楼2012-05-17 09:46
                    回复
                      这个DATE2到DATE5怎么导出的啊````````````具体还是得看图``````````````


                      IP属地:云南16楼2013-01-09 18:29
                      回复
                        大神,请把三个工具都发给我!DXX19831117@163.com


                        IP属地:广西17楼2017-03-05 02:01
                        回复
                          当时第一次看到楼主的教程,感觉像在看天书,现在学会了再看这篇教程,发现是如此简单,讲的如此详细,给数字大神赞一下


                          IP属地:甘肃来自Android客户端18楼2017-03-29 09:50
                          收起回复