本帖最后由 unicornvalley 于 2011-5-22 02:10 编辑
第三部分Ok, nowlet's crack open fs_dagger and get fs_dagger.txt.If you open it up, you will see this:
现在让我们破解fs_dagger得到fs_dagger.txt。将其打开,你将看到下面的编码(此处不全,请参照原帖)
Code:
+1.0000000
19
0 0 0 63 0 0 0 0 +0.0000000 +0.0000000 +0.0000000 -1
114 0 109 97 0 0 0 0 +0.0952390 +0.0007523 +0.0000001 0
0 0 0 0 0 0 0 0 +0.0234129 -0.4646038 -0.0049952 1
114 0 109 97 0 0 0 0 +0.0231562 -0.4006252 -0.0124050 2
32 0 32 32 0 0 0 0 -0.0000000 +0.2124624 -0.0000000 0
71 1 0 0 0 0 0 0 -0.0002945 +0.2115581 +0.0000000 4
59 1 59 59 0 0 0 0 -0.0000617 +0.2349734 +0.0000000 5
59 0 59 59 0 0 0 0 +0.0040140 -0.0843266 -0.2039877 5
59 0 59 59 0 0 0 0 +0.0000000 -0.2602941 -0.0697457 7
59 0 32 65 0 0 0 0 +0.0000000 -0.2600267 -0.0696740 8
10 0 59 13 0 0 0 0 +0.1786139 +0.0782279 -0.0239007 5
59 0 59 59 0 0 0 0 +0.3022083 +0.0110892 -0.0137860 10
59 0 59 59 5 0 0 0 +0.2838367 -0.0030067 +0.0263546 11
59 0 59 59 0 0 0 0 -0.1780248 +0.0782278 -0.0239007 5
78 0 95 66 0 0 0 0 -0.3022082 +0.0110892 -0.0137860 13
0 0 65 78 4 0 0 0 -0.2838367 -0.0030065 +0.0263547 14
66 0 69 78 0 0 0 0 -0.0952390 +0.0007524 +0.0000000 0
77 0 13 10 0 0 0 0 -0.0234127 -0.4646038 -0.0049953 16
116 0 109 97 0 0 0 0 -0.0231561 -0.4006253 -0.0124050 17
0 0 0 63
150
Somewhat daunting, I know. And there's no manualfor it too, unlike many text files you can modify in RTW. There are onlynumbers, which we must try to interpret and explore what they do.
有点儿吓人,我知道。而且也没有说明书。不同于RTW中许多可以修改的txt文件。这里只有数字,所以我们必须探索并翻译出它们的含义。
This is what I have found out about what they meanor might mean:
以下是我对这些数字猜想的含义:(注:此处图挂了,原图中有A,B,C,D的标注,对理解至关重要,请参看原帖)
A. This is the size of the model. Verc's XIDX can resize a model by multiplying this numberand E with the new size. You can use that for easiest resizing, or you can editthis number and the coordinates to get a resize.
A.这里是模型的大小。Verc's XIDX能够通过增加这个数字重新定义模型大小。你可以简单的重新定义,或者编辑这个数字和坐标来重新定义。
B. This is the number of bones in the model,excluding Scene Root, which technically isn't a bone.
B.这里代表模型中骨头的数量。
C. Now this, is still elusize. I have no idea whatthese numbers do. If they're for some reason does SOMETHING, most of them areunused in fs_slinger_new, which uses 0 instead of anumber. So I have no idea what they do. Making them all 0 (which I did try)doesn't appear to change anything on the soldier's behavior, except during thefiring of a missile. It's still too hard to notice anything right now.
C.这个,我也不知道是干什么用的。在fs_slinger_new这里的数字都是0。将他们都改成0也没有明显改变模型的动作。除了在射箭时,但现在还说不清。
D. This is pretty useful. 5 0 0 0 means it's the"right hand" so far only used as an attach point for pikes. Naturallyit's on the right hand bone. If you change it to head bone, then pikes forpikemen units will be attached to the soldier's head. Making it all 0 will makepikes attached to Scene Root, aka. the pelvis (yes, it's juvile joy of watchingyour soldiers "raise" and "lower" his pike). 4 0 0 0 is usedon the left hand bone. As of now, I have no idea what this is used for. 1 0 0 0is the bone designated for the mounting of horse or camel. Basically it means 1rider per mount and it follows the triggers of a horse type. 2 0 0 0 is usedfor elephant skeleton, so this is a mounting bone for a skeleton used aselephant. If you used this attribute on another bone, the engine will attachthe crew/rider of the mount on that bone. So adding 1 0 0 0 on a bone willenable that skeleton to attach a horse rider on it. I have no idea if 3 0 0 0is used at all since I couldn't find a skeleton that uses it.
D.这个很有用。50 0 0 代表右手。目前只用作长枪的附着点。自然是在右手骨上。如果你将其改成头骨,那么长枪将附着在长枪兵的头上。将其都改成0则会让长枪附着在骨盆上(啊,是的,看着你的士兵举起和放下长枪你将异常兴奋)。40 0 0 代表左手骨。目前我还不知道有什么用。10 0 0代表骑乘马或骆驼用的骨头,基本意味着只能有1个骑手,并使用马匹的触发器。20 0 0 用在战象骨骼上,所以这是骑乘战象用的骨头(前面提到过)。如果你将这一特性用在其他骨头上,游戏引擎会将骑手放在那块骨头上。所以将添加10 0 0 在一个骨头上会使这个骨骼能够连接一个骑手。我不知道30 0 0 是什么意思,因为我没见过用它的骨骼。
E. Now this is the main attraction. This is thelist of the bone's coordinates in respect to itsparent. Changing the values of these will alter the appearance of a skeleton.You can extend arms, or the neck or create an entirely new skeleton.
3.这里是最吸引人的地方。这里是一份骨头坐标的清单,改变这里的数值将会改变骨骼的外观。你可以延长手臂,脖子,或创造一个全新的骨骼。
F. This is the hierarchy of the bones, which boneis which bone's children, etc. I will explain how to make the list easily laterin this post.
F.这里是骨头的等级,哪块骨头是哪块的孩子(下属?)。在后面我将解释如何简单的制作这个清单。
G. Unknown. Doesn't seem to do anything, really. fs_slinger_new and fs_archer even list them as all 0s.
G. 不清楚。fs_slinger_new和fs_archer中这里都是0
H. The number of animation entries.
H.动作文件的入口数字
I. The entry for the animation to use. The list ofanimation triggers appear to be a set list. You cannot move stand_idleto the bottom and expects the engine to activate that for standing idle. Itwill always read the first entry as stand_idle. Thereappears to be a pre-determined set of trigger to be read when the engine readsa skeleton file.
I.使用的动作文件入口。动作触发清单貌似是固定的。你无法将stand_idle移到末尾还期望游戏引擎能够启动这个命令,它总是将stand_idle作为第一条读取。貌似在引擎读取骨骼文件时有预定的套路。
J. Most of these is unknown. There's littledifference between this entry's numbers and the others. There are someexceptions, most notable is the IMPACT FRAME number,where it indicated the frame an impact is supposed to occur when an attackanimation is played so the opponent may react accordingly. This one isinteresting because during my testing, if you put the impactframe to be 0, then the attack will not commence. If you put impact frame on all attacks to be 0, you will get aunit/soldier that CANNOT attack! Further research required.
J.尚不清楚。特别需要提到的是IMPACT FRAME数据,代表了攻击动作发生或对手所作出反应的界限。如果将impact frame改成0.攻击就不会发生。如果将所要的impact frame改成0.则会得到一个不能攻击的单位。尚需深入研究
K. This is the number of entries of soundtriggers. If there is no sound to be activated, this number is set at 0.
K.这里是声音触发器的入口。如果没有声音可供启动,这里的数字则设置为0
L. I'm semi-certain the number here corresponds tothe type of sound data banks. Further research required.
L.这里的数字可能对应声音数据库的类型。
M. I'm semi-certain the first number is the framethe sound should start to trigger and the third number is the last frame thesound could trigger. Having the same numbers mean the sound is always triggeredat that exact frame, having a range means they could be triggered at any timewithin the range. Note that this is still my speculation.
M.这里的第一个数字可能是声音可以开始触发的界限,而第三个数字是声音触发最后的界限,如果是同一个数字表示声音只在某一点触发,而如果是一个区间则表示声音在这个区间之内触发。注意这只是我的猜想
N. The name of the sound file/bank to derive thesound files from. This is what you change if you want this particular skeletonto produce a different sound than the one you copied it from.
N.声音文件的名称。这里就是如果你想要这幅骨骼发出不同的声音所要修改的地方。
O. This is still unknown. It appears to berelevant but I still don't know what they're for.
O.应该有用,但还不清楚。
Then, we seethis part:
来看这一部分:
The "0 0 0" isfrom fs_dagger, which you cannot use for a missileunit. That "0 0 0" is actually 3 animationtriggers that are deactivated, they are missile_aim,missile_hold and missile_fire, which can be seen at the figure below it from fs_archer. I have tested and copied the 3 entries from fs_archer and paste it on fs_daggerto make a new skeleton and it works. I can just use "fs_archerdagger,fs_archerdagger" for entry in DMB instead of "fs_archer, fs_dagger". I am unsure why CAwould deactivate some animation triggers. Perhaps there's a limit on the numberof triggers? Or perhaps they do it simply to make skeleton files lesscluttered, as in less triggers better performance.
0 0 0 来自文件fs_dagger,你不能将其用在远处部队上。"00 0"实际是3个停用的动作触发器,分别是射击_瞄准,射击_暂停和射击_发射,这可以从fs_archer文件中看出来。我将fs_archer中的这3个动作复制粘贴到fs_dagger并制作了一个新骨骼,并且测试成功。我现在可以在DMB中使用"fs_archerdagger,fs_archerdagger"代替"fs_archer, fs_dagger"。我不知道为什么CA会停用这些动作触发器,也许是为了限制触发器数量,或者改善动作表现。
If we compare all of these entries then we findthat each skeleton is read in a series of triggers. If the entry is simply"0" then the game would say "There's no entry for it, can'tplay, let's crash instead!" like if you used "fs_dagger,fs_dagger" for a unit with a missile attack since missileanimations are missing from fs_dagger.
如果我们做个比较就会发现每个骨骼都是通过一系列触发器读取的。如果入口是0则游戏引擎就会说“这里没有入口,没法玩了,我们还是当机吧”,比如
将"fs_dagger, fs_dagger"用在远程兵种上,因为fs_dagger中没有远程动作
Ok, so let's get to the meat of the possibilities.What are really possible with this tool? Here's an example:
下面再举一个例子(图挂了,请参照原帖):
This is a screenshot of my testing of a completelydifferent skeleton but a very simple one: a snake, which is just a straightline.
这幅图是我所测试的一个完全不同但又非常简单的骨骼:一条蛇,也就是一条直线。
This is the model I quickly made up for thistesting.
I made 1 animation to test and the result can beseen here:
这是一个我用来测试的模型,我制作了一个动作用来测试,结果可以在这里看到
http://www.youtube.com/watch?v=CiRFnRK3yTU
But what can a new kind of skeleton do forexisting models/units? Well, we can now do what M2TWmodders already did with adding new bones, like this: 那么新的骨骼能对已有的模型有什么用呢?我们现在可以做到M2TW修改所做到的——增加骨头,像这样:
http://www.youtube.com/watch?v=DNNNEie1nn4
Note that there is a drawback to this method,meaning the bow cannot be "hidden" by the engine when switchingweapons. This is because it is animated, thus will not be read as "primaryweapon" stand-alone object. We are also bound by the hardcode:there's a maximum of 24 bones per skeleton. I tried adding more and the game justCTD without error message.
主要这个方法有个缺点,即在切换武器时弓无法被隐藏了,因为增加了它的动作。同时受hardcode限制,每个骨骼最多24跟骨头。
Even though it only appears I added very few newanimations on the archer, in fact ALL of the animations are new. Basically, Ihad to export every single animation to be used by the new skeleton (with 24bones instead of the regular 19 bones) because the way the engine readsanimations.
在我为弓箭手添加新动作时,因为所有动作都是新的,因为引擎读取动作的方式,我必须将用于新骨骼的每个动作输出(用24块骨头代替一般的19块)
The RTW engine (which I think was rectified inM2TW) reads every bone in the skeleton by a set list. For the regular skeletonRTW use, this is the list:
RTW引擎是按固定清单读取骨骼中的每块骨头(这在M2TW中得到了修成),对与一般使用的RTW骨骼,清单如下:
bone_pelvis
bone_abs
bone_torso
bone_cloak_top
bone_cloak_mid
bone_cloak_bottom
bone_head
bone_Lupperarm
bone_Lelbow
bone_Lhand
bone_Rupperarm
bone_Relbow
bone_Rhand
bone_LThigh
bone_Llowerleg
bone_Lfoot
bone_RThigh
bone_Rlowerleg
bone_Rfoot
The list's coordinates can be seen in part Eabove. If you convert fs_archer and fs_slinger_new you will see the difference. The slingerhas an extra bone after bone_Rhand called bone_Weapon.Note that the names of bones are irrelevant. The engine ignores the names andonly reads from the list. Meaning if you used a regular skeleton's animation(19 bones) on a slinger (20 bones), the rotation value of bone_Rthigh will beapplied to the slinger's bone_Weapon and so on, untilthe slinger's last bone, bone_Rfoot, receives no rotation. Importing aslinger's animation on a skeleton with less than 20 bones will cause an error onthe MAX script. You can easily test this in MAX: open the slinger's model, thenimport a regular animation, it will show up weird. Now try it again but deletebone_Weapon before importing the same animation. The slinger modelshould animate normally.
这份清单的坐标在E中我们提到过。你可以在fs_archer和fs_slinger_new中看到区别。投石兵的右手骨头后面多出了一块骨头,叫bone_Weapon。注意这些骨头的名字无关紧要,因为引擎只按上面清单的顺序读取。也就是如果你将一个一般的骨骼动作(19块骨头)用在投石兵(20块骨头)上,那么右大腿骨的旋转动作就会用在投石兵多余的那块骨头bone_Weapon上,依次类推,而最后一块骨头,右脚骨,则不会旋转。将投石兵的动作输入到不足20块骨头的骨骼上会引起MAX脚本错误。而在输入动作之前删除bone_Weapon这块骨头,则投石兵模型应该动作正常。
So making a new skeleton for RTW has its drawback:you have to make every single animation it's going to use. Sure, it's notreally that hard since in my case, I just imported existing animations, add inthe new bones then export them. Only 3 animations are using the new bones:readying the bow, holding the bow and firing the arrow. It's a time-consuminglabor mostly.
所以在RTW中制作新骨骼是有缺点的:你必须制作要用到的每个动作,当然你可以输入已有的动作,或者添加新的骨头然后再将其输出。只有3个动作使用的了新的骨头,准备射击,拉弓,和射箭。这很费时费力。
So, in summary, to create a new skeleton, this iswhat you must do:
总的来说,创建新的骨骼,你要做下面几步:
1. Make the model with the new skeleton.
2. Export it as a CAS model, then press F11.
3. Copy the data shown by the scipt,this is important.
4. Make all the new animations you want to use onyour new skeleton, export them with all the bones.
5. Extract all the skeletons and animations.
6. Pick the closest skeleton you want to use, copyit and rename.
7. Convert the new skeleton into text file, openit.
8. At the bone coordinate part and hierarchy, usethe data from part 3. However, be sure to convert the coordinates rom (x, y, z) in MAX to (-x, z, -y) for the skeleton.
9. Change all the animations into the newanimations. Change any sound trigger if you want.
10. Convert the edited skeleton text file intoskeleton file. Delete the old one, rename the new one.
11. Add the new skeleton name in list.txt.
12. Add all the new animations in anim_list.txt
13. Repack skeletons and animations.
14. Use the new skeleton in DMB.
1.
用新的骨骼制作模型。 2.
将其输出为CAS模型,然后按F11。 3.
复制scipt(笔误吗?这词我不认得)中的数据。 4.
制作新骨骼所要用到的所有动作,并将它们输出 5.
提取所以的骨骼和动作。 6.
选择一个你想用的最接近的骨骼,复制并重命名。 7.
将新骨骼转换为txt文件,打开。 8.
在骨头坐标和等级这里使用第3部分的数据。但是一定要将MAX中的坐标rom(x, y, z)转换成骨骼中的坐标(-x, z, -y)。 9.
将所以的动作改成新动作,并修改声音触发。 10.
将修改过的骨骼txt文件转换为骨骼文件,删除之前的,重命名新文件。 11.
将新骨骼的名称添加到list.txt. 12.
将所有新动作添加到anim_list.txt。 13.
重新打包骨骼和动作文件。 14.
在DMB中使用新骨骼。
Now let's get crackin' and figure out what elsecan we uncover from this!
Many thanks to Knight Errant for writingthis wonderful tool and putting up with my endless nagging for revisions andinfo.
PS. Also from Knigh Errant, a fix for Vencingetorix's CAS Export/Import tool here:CAS_IE_b79_modbyKE_ver3.ms
This updated tool does nothing for the averagemodder who only deals with models. The fixes are for animations. It fixes theanimation glitch where soldiers will not reach their actual destination if thewalking animation is edited. They will now reach their intended spots. Alsofixed is the glitch where the soldier have to do a 90 degrees turn and theengine cannot turn them partially. They can now do so without glitching. Onemore glitch still exists though, which is the not-reaching-destination glitchfor mounted units.
感谢中央气象台的Knight Errant。 PS. KnightErrant的Vencingetorix's CAS Export/Import tool工具的一个补丁(请在原帖下载) 这个补丁主要是针对动作所作的修正,修正了步行动作修改过后士兵无法到达指定目的地的错误;修正了一个士兵90度转身时发生的错误。现在仍存在一个错误,即骑兵单位无法到达指定目的地的错误。
|