In the data folder of patcher, add a folder "stage", and copy original "data\BFtwh" folder , "data2\BFtwh.map", "data2\BFtwh_EVE.map", "data2\BFtwh_QST.map" Drag and drop the "BFtwh.map" into XenoXmlConverter.
The creation of the Xml version will extract some CollisionMesh_xxxx.emd and some Havok__xxxxx.hkx files. Havok files are for collisions/hitbox, and also for physical simulations for destructions. CollisionMesh are in reality just visual result of some group of havok files.
XXX.cmd, it's just to avoid always drag and drop on each modification. I just double click on it to reverse the xml conversion (so repack all havok files and collisionMesh). Here the batch:
SET XenoXmlConverterPath=D:\[...]\bin\Release\XenoXmlConverter.exe start /B /Wait %XenoXmlConverterPath% BFtwh.map.xml
For all nsk , I just drag and drop the file into NskPack. that give me for each a emd and a esk.
The esk, here, it's not for "skeleton" as a character, it's just to move some emd part to a specific position/orientation/scale. So, in xenoveiwer, you should put the emd on esk as you always do for character, to have the right position of some object.
Notice: material and shader are not all good into xenoviwer for many reasons. So, if you see nothing, I advice to use another default material : right click on the view part -> Display -> Material -> "White" or "Normal" (witch is better is lot of cases).
Time to take some pop corn :
-BFtwh_h102.nsk : seam to be a building with destructible parts, projectiles.
-BFtwh_h102B.nsk: seam to be the rest of the building after destruction.
-BFtwh_h102s.nsk: seam to be the building before damages.
-BFtwh_h103.nsk, BFtwh_h103B.nsk, BFtwh_h103s.nsk are the same for another building with double doors :
-BFtwh_h104.nsk, BFtwh_h104B.nsk, BFtwh_h104s.nsk for another building with no doors. after check in the stage, it's about the top of a building. the base can't be destroy :
-BFtwh_h105.nsk, BFtwh_h105s.nsk is a public bench. there isn't "B" because there is no rest after destruction.
-BFtwh00.nsk is a series of geometry to make all the sky. certain are for specific cloud. (sorry the screenshot is complex to do because of wrong material/shader on xenoviewer, and sky have no normals.)
-BFtwh01.nsk is some land + big rock for wild background.
-BFtwh02.nsk is some land for city
-BFtwh03.nsk is all no-destructible building (we also see the half building witch will have the destructible roof), fences, some city's lights, public benches, signboard.
-BFtwh04.nsk is city's lights, cars and signalisations. Notice: there are all destructibles.
-BFtwh05.nsk is city wild building for background.
-BFtwh06.nsk something wild may be with the wild buildings
after a second look, I did found in this files : trees, vegetation, terminal fire and trash can. BUT, when I look inside Xml version of map file, I look the ListNsk used. So I can add :
-BFsin\BFsinh67.nsk (ready for destruction) and BFsin\BFsinh67s.nsk are trees
-BFpln\BFplnh11.nsk and BFpln\BFplnh12.nsk vegetation
(Notice: I miss to use normal material to see leaf)
-BFtwn\BFtwnh60.nsk (ready for destruction) and BFtwn\BFtwnh60s.nsk is fences
-BFtwn\BFtwnh57.nsk terminal fire broken with water. if I convert ema into ean (with drag and drop into emaEan), I see there is 2 animations for water.
-BFtwn\BFtwnh57s.nsk terminal fire not broken.
-BFtwn\BFtwnh50.nsk and BFtwn\BFtwnh50s.nsk, BFtwn\BFtwnh51.nsk, BFtwn\BFtwnh51s.nsk, BFtwn\BFtwnh52.nsk, BFtwn\BFtwnh52s.nsk are car.
-BFtwn\BFtwnh56.nsk BFtwn\BFtwnh56s.nsk is trash can
-BFtwn\BFtwnh55s.nsk is city lights
-BFtwn\BFtwnGrassMassALOD000.nsk, BFtwn\BFtwnGrassMassALOD002.nsk (LOD version : keep only big one), BFtwn\BFtwnGrassMassAFLOD000.nsk, BFtwn\BFtwnGrassMassBLOD000.nsk, BFtwn\BFtwnGrassMassBLOD002.nsk, BFtwn\BFtwnGrassMassBDKLOD000.nsk, BFtwn\BFtwnGrassMassBDKLOD002.nsk are grass
-COM\COMa02.nsk is the portal to change of area. there animation to rotate it (only a little angle, but the animation is repeted for a full rotation).
-Fragments\Fragments_F00_soil00.nsk to Fragments_F05_soil00 are rock/parts of explosions with different shapes or sizes. (same for Fragments_F00_grass00 to Fragments_F05_grass00, and Fragments_f00_conc00 to Fragments_f04_conc01)
3) add map's objects one by one and try to explain what is going on.
First, you have to understand map file is huge about functionnalities, because is setup all kind of stages, and also because there is named parameters for some scripts things. And, same if I try to understand what is parameters for by modify them one by one, this time I have lot of parameters I didn't know what is for (also because I focused on Havok part, after confirmation about havok file have the limits of the stages). So it's still have lot of work on that, and is too big for one guy. SO, if you find something on a parameter, please tell us on that post. Thank.
Notice: In Xml version, there is lot of comment to explain the range/unique values found in all map files. But, it's not great to comment one or many objects. So, I give you this file BFtwh.map witch I modify to remove all comments (with minify and beautyfy function of codebeautify.org/xmlviewer).
So, here we beginnig to do a fast look inside Xml version of BFtwh.map. -near of all the file "Settings" have the same settings. only few have few differences. We didn't really know what is about on that. -the only setting found is s0a_unk_6 float="-9.80000019" for gravity on all scd and destructions's parts (if you make it positive, you will have all going to the sky). -ItemTypes is a list of type, but we didn't know yet witch parameter use them (certainly a index). -for ListSection1 and ListSection2, when you look the name, it's seam to refer to a specific scenario/trigger. we didn't know more on that. -ListFragmentGroup is a serie of group of objects's index. In tournament (BFten), there is rocks witch appear after collision between a wall and a kamehameha is grouped by one group named "fragments". And also a group for grass. Here, we have: -"hakai" witch is the japan term for "destruction" or "break". -"wood_break" may be for fences. -"saku" witch could be trad by "flower" -"Tree" -"Gate" (may be for the city entry) -and series of "fragments" Notice: if a index is up to the number of objects (like if we coments the object for test), the game just don't care, it will not crash.
-ListObject is the main part of the file. each object add a functionality or a visual things. Inside there is : -hitboxGroupIndex witch refer to a hitboxgroup witch is the next part of the file. it's here there is collisions. -ListEntity, it's here we could add a visual object with files nsk (mesh + skeleton), textureEmb, emm (material) and/or ema (animations). -Notice : there is a possiblity to setup some ListLod for nsk and emm (witch is all big things for performances). -ListVirtualSubPart, it's here we could add a functionnality /behaviour. -IMPORTANT: The number of Object.VirtualSubPart must be the same as the number of hitbox inside hitboxgroup or the game/tool crash (it's a fact inside the map file format). -you could add a Action from collision detected, with a list of command like "PLAY SOUND 3D" -you could add Action witch is ref to a script things. -in certain case, there is also a "Hierarchy". a sort of recursive things. it's have to be confirm a little bit.
-ListHitboxGroup is the hitboxgroup witch is used by the object. -"Why you don't put hitboxgroup inside the Object ?" -> because many object could refer the same hitboxgroup, so if I do that, the xml will be very huge, and also rebuilded map file will be very different from original. -ListOnDestruction is not really for destruction -HavokFile is a reference of extracted havok file for defined hitbox/collisions. -CollisionGeometry is reference to CollisionMesh witch is in reality a geometry for visual debug of group of havok.
-ListFiles is some list of file used inside the map file. In theorie, this section is not necessary because I read all files named inside all sections, but it's here to keep files order for having no difference on rebuild of the map file. there is ListNsk (mesh + skeleton), ListTextureEmb, ListEmm (material), ListEma (animations)
So let's begin to remove all object to add them one by one (ormay be some group if similar):
-if all objects are commented, there is nothing (except halo from spm but here it's not enable). it's just all black. Characters just flying in void.
-with add the first object "ENVTEX", we see nothing because it's just to load the texture witch will be reflected in buildings's windows (all reflection surfaces), but we have none object, just characters.
-adding hn67yashi_00, there is one tree destroyable.
if we look deaper on object added there is : -2 entity, one for brokeable tree BFsinh67.nsk, and one for the original BFsinh67s.nsk -13 VirtualSubPart. And on the first, there is a action "PLAY SOUND 3D" may be when we broke the tree. -there is a action to allow to the destruction.
-each VirtualSubPart, have a hitbox in hitboxGroup 1 "COL_H67_break". It's for take care of collisions and physic in destroy step. -COL_H67a is using Havok__1_1_0_0.hkx, witch we could see the result by display CollisionMesh_1_1.emd : it's the base of the broken tree
-COL_H67b_break (Havok__1_2_0_0.hkx, CollisionMesh_1_2.emd), COL_H67c_break, COL_H67d_break, COL_H67e_break, COL_H67f_break, COL_H67g_break, COL_H67h_break, COL_H67i_break, COL_H67j_break, COL_H67k_break (CollisionMesh_1_11.emd), COL_H67l_break are part of the destroyed tree.
-adding until "hn67yashi_13" (included), there is all destroyables trees.
-adding "hn60_01" it's the destroyable wood fences. It's exactly the same as tree, there is VirtualSubPart and Hitbox for destructions.
-adding others, and "h11tree_00", there is some vegetation. -No destruction, so there is only one entity. -but still have 2 VirtualSubPart, and one action. -the second hitbox is a sphere. After, test ingame, it's may be a sphere witch if the camera is inside, the transparence change for better look.
-adding others, and "bnBFtwh00", there is the sky, cloud and wild background like montains. -one entity, one VirtualSubPart, and one action. -the hitbox is a "BOX" (this name could avoid a need of a havok).
-adding "bnBFtwh01", add wild plaine and bigs rocks to complete the background.
-adding "bnBFtwh02", there is the ground. So now, we can also walk. And also have a effect of destruction from a kamehameha on the ground.
-there is one Entity, and one action. -there is 24 VirtualSubPart. -HitboxGroup "BFtwhcolroot" : -BFtwhcolroot -BFtwh01wallcol (Havok__6_1_0_0.hkx, CollisionMesh_6_1.emd): big plane with terrain's skirts on each side. THAT THE WALL witch keep us inside the area. -BFtwn01_area016col (CollisionMesh_6_2.emd) : area for something
-BFtwhBKUwall06col (Havok__6_4_0_0.hkx) : strange thing. the name say it's a Wall. may be for portal ?
-BFtwh03_outside02col (Havok__6_5_0_0.hkx, Havok__6_5_1_0.hkx, Havok__6_5_1_1.hkx, CollisionMesh_6_5.emd) : it's some building. it's for make shadows/ambiant occlusion.
-BFtwh03_outside01col, BFtwh03_outside03col, BFtwh03_outside04col, BFtwh03_outside05col : same with also fences, all for shadows/ambiante occlusion. -nofragment001 to nofragment014 : it's for some fake tree out of area/walls, with only 3 planes.
-adding "bnBFtwh03", there is all no-destructible building. Notice: there is no extra Havok for them because they are allready on "bnBFtwh02"
-adding "bnBFtwh04", add traffic lights, lights, and car, all no-destructible because they are out to the area/walls.
-adding "bnBFtwh05", add wild building, out of area.
-adding "bnBFtwh06", not really sure what is about.
-adding "hn102_00", there is the first destructible building. is like destructible trees.
-there is 2 entity : BFtwh_h102.nsk (ready for destruction) and BFtwh_h102s.nsk -and a lots of VirtualSubPart, one for each parts of the building destroyed. -Notice in action there is "SET BREAK PARTS INVISIBLE" with a time to make invisible the part after a certain time. -Notice: BFtwh_h102B.nsk, seam not be used in map file. may be it's for
-adding others building 103 and 104.
-adding "hn57_00", add a terminal fire.
-there is 2 entity: BFtwnh57.nsk (ready for destruction), and BFtwnh57s.nsk. no Ema file setup. -there is 2 VirtualSubPart. on the first, there is a action "PLAY EFFECT" with a effect_ID "0" (from Category_ID "-1"). it's for a explosion + vibrations. => BFtwnh57.ema is never setup, so how the animation of water after destruction is done ?
-adding other, adding "hn50_00" and others until "hn52_01", there is destructibles car.
-adding "hn56_00" and others, there is trash can.
-adding "GATE_to_BFten", normally add the portal, but we didn't see it. Something could activate the display (allready look inside BFtwh_QST.map.xml and BFtwh_EVE.map.xml) -there is a action "CHANGE AREA" -there the animation ema.
-adding other gates, adding "hn105_00" and others, there is public bench.
-adding "h12tree_00" and others, for vegetations -adding "hn55s_01" and others, for traffic light.
-adding "sound_ENV", with a action "PLAY SOUND 3D". but not sure to listen some specific sound (I have turn the music volume down)
-adding "insGrassA" and others, for some grass. -have no hitbox : <hitboxGroupIndex value="4294967295" /> -have one entity for a template mesh/texture/material. -have a Hierarchy, may be for duplicate the object (hierarchy could be not the good word, it's could be instancedMesh/instancedGeometry). All instance of the geometry could have a specific transform.
-adding "GATE_EXP_IN", another gate. but here there is a Action witha command "HideObject" (same if I remove this command, I see nothing).
-adding "insGrassBDK", there is more grass. -adding "FragmentsF00_soil00" and others, there is rocks on collision between kamehameha and ground. but I didn't see them, may be only one witch disappeard fastly. -adding "FragmentsF00_grass00" and others, there is rocks on collision between
-adding "FragmentsF00_conc00", there is rock for hit a building with kmh
-adding "SetShadowArea", with a action "SET SHADOW AREA", may be to adjust the area with shadows (because we allready have shadow before.) -adding "FragmentsF00_conc01" and others. (after test next "Henshin Impossible" (hensin = morphing/transformation), I could say it's for having flying rocks when I'm in SuperSayen3 transform.
-adding "NG_GNT_000", with some action "Henshin Impossible". Same with that, I could continue to be in SS3. So it's strange.
4) render to texture (TV) and animations of the zeplin in Tournament stage.
In BFten, the Budokai Tnekachi, the tournament stage, there is a Zeplin with a TV on it and the zeplin is animated to turn around the stage's area.
The Zeplin is BFten02.nsk.
For having the TV, the material/shader used use a Render-To-Texture ("RTT"), a texture witch have the result of a new render of the scene. The easy example is for car's mirror in car game : there is a second camera witch render in direction of back of the car.
But, because that take some performance, you have to active the update of the RTT. For that, in BFten.map.xml there is the object called "SmallScene". If you remove it, the Tv will still on the last update, witch could be on the city, or another stage.
witch use vertexShader "T2_MUV_ADTV_SmallScene_VS" and pixelShader "T2_MUV_ADTV_SmallScene_PS" (from technique_age_sds.sds.xml in adam_shaders). the pixel shader have a entrie : "Texture_SamplerSmallScene" and if we search into BFten02.emd.xml the submesh "LED", on textureDefinition, we have,
The texture 9 is for fake scanline (simulate the entrelaced mode of old TV). the texture 8 is just blue. I think it's the one witch is replaced by the RTT, but I don't know how, sorry.
For the animation, by default, in object "LCT00_obj_BFten02", it's use the ema for animate rotation of propeller. There is also a Action "MOTION SET" to start the animation on object creation. But the zeplin don't move at all, just stay in sky.
For that, there is the object "LCT00" witch is a empty/dummy where the ema turn around the stage's area. there is a Action "SET LCT", witch make a link with the zeplin object : "LCT Object Name"="@self", "Target Object Name" = "LCT00_obj_BFten02"
-object index6 "Event_water" with a action "Water" and parameter "SURFACE Y" setup at 0. If I comment this, I don't have the posteffect "underWater", and my character don't swim, just walk or fly, and also I don't have the effect on transition.
-object index5 "watersurface". I don't know what it do. -I have try to use "Event_water" without this, it's work as usual. -I see reflection or wavelet as before. -and nothing relevant on hitbox, it's just a box.
-object index4 "WATER" witch have a entity with a plane as geometry (with some subdivisions). Notice: this object use the first object witch is about making a envirronnement reflection. and also the texture of dynamique shadows witch is deformed by the waves. Without this (and previous), you just see all :
Notice: a animation of light effect/lensflare due to the refraction of the sun on water surface is still on the underground map.