[RESERVED] MODELS_NAVAL TABLES
IDEA :
The idea is to begin to work on bow_kobaya files provided by CA and compare them to bow_kobaya models_naval tables.
DOCUMENTS :
- logic.xml (raw_data\art\battle\naval\models\ships\Bow_Kobaya from Assembly Kit)
- Bow_kobaya_release.max (raw_data\art\battle\naval\models\ships\Bow_Kobaya from Assembly Kit)
- models_naval tables extracted from TWS2 using PFM
TOOLS :
- 3ds max
- Hexadecimal editor (example : Notepad++ with HEX-Editor, but a true hex editor would be better)
- Pack File Manager
EDIT : I've modified the attachment, adding the S2TW models_naval tables instead the ETW ones... sorry for this mistake.
DONE :
- EFline
- Cannon
- Collision
- Deck (some extra-data compare to .xml file are unknown)
- Pipes (some fields still unknown)
- Buoyancy
TO DO :
- damage_model
- custom positions
BUOYANCY - by manolops3
DECK **unknown remaining fields**
PIPES by manolops3 **unknown remaining fields**
CANNON
DAMAGE MODELS - by manolops3
COLLISION
EFLINE
EF_ARTILLERY_INFO
CUSTOM_POSITIONS
RESUME :
[RESERVED] 3DS MAX SHIP MODELS
Hi ,
so it begins.i think it is best,that we all use the same hexadecimal-editor.
Wangrin,what tool you prefer and use ?
I'm still searching for a good one.
Notepad++ with HEX-Editor is what I use but it is quite basic.
I want to try :
Actually, wxHexEditor look interesting.
Judging by how the XML is set up cannons are likely to be set up in one of the following ways. I recommend checking the hex data to determine which set-up is the most likely.
Way 1: similar to the piece.
Way 2: similar to the pipes.Code:<cannons> <cannon id="1"> <corner x="-0.491" y="4.113" z="2.799" type="clear"/> <corner x="-1.497" y="5.619" z="2.799" type="clear"/> <corner x="0.0" y="5.619" z="2.799" type="clear"/> </cannon> </cannons>
Way 3: similar to the damage_model.Code:<cannons> <cannon id="cannon_01"> <segment deck_piece="43" x="1.418" y="-0.406" z="2.799"/> </cannon> </cannons>
You may also want to check the EF_lines in case they have a special entry for cannons.Code:<cannons> <cannon name="cannon_01"> <cannon> <vertex x="1.418" y="-0.406" z="2.799"/> <vertex x="-1.373" y="-0.406" z="2.799"/> <vertex x="1.339" y="-0.406" z="2.799"/> <vertex x="-1.295" y="-0.406" z="2.799"/> </cannon> </cannons>
Morning Sun (adds Korea and China to the Shogun 2 map)
http://www.twcenter.net/forums/forum...28-Morning-Sun
Expanded Japan mod (97 new regions and 101 new factions)
http://www.twcenter.net/forums/showt...ew-factions%29
How to split a region in TWS2
http://www.twcenter.net/forums/showt...split-a-region
Eras Total Conquest 2.3 (12 campaigns from 970-1547)
I have checked EFLine for buildings, and those for ships are similar.
They are only use to define where to place men.
Naval EFLine use different types for action compare to buildings :Code:<ef_lines><ef_line name="EFLine48" action="Naval_firing_position_stand_360"></ef_lines><end x="-1.909" y="3.545" z="1.272"/> <end x="-2.142" y="-1.492" z="1.434"/> <direction x="-0.38" y="0.017" z="0.0"/></ef_lines>
- Naval_firing_position_stand_360
- Naval_perimeter_position
- Boarding
- Captain
- Officer1
- Officer2
- Officer3
- Marines
- Seamen
An EFline is a segment, define by its two extremity and a direction, calculate as its normal, but in a 3D space...
Looking at "L'Ocean" models_naval tables, we can found this for cannons :
63 00 61 00 6E 00 6E 00 6F 00 6E 00 01 00 00 00 02 00 00 00 0E 2D B2 C0 C3 F5 D0 40 4A 0C 2C 41 71 3D BA C0 C3 F5 D0 40 4A 0C 2C 41 06 00
where
0600 = marker - cannon field beginning
63 00 61 00 6E 00 6E 00 6F 00 6E = c a n n o n
01 = cannon ID (vary depending of cannon)
02 = ? (01 or 02, maybe related to deck ? L'Ocean is composed of 4 decks)
...
Looking to this picture of L'Ocean, the ship seems to have :
- 4 cannons on each side in the lower deck
- 2 cannons on each side in the upper deck
Code:MARKER c a n n o n cannon_id deck_id X1 Z1 Y1 X2 Z2 Y2 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 01 00 00 00 02 00 00 00 0E 2D B2 C0 C3 F5 D0 40 4A 0C 2C 41 71 3D BA C0 C3 F5 D0 40 4A 0C 2C 41 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 02 00 00 00 02 00 00 00 CB A1 B5 C0 C3 F5 D0 40 81 95 E7 C0 FC A9 BD C0 C3 F5 D0 40 81 95 E7 C0 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 03 00 00 00 01 00 00 00 23 DB E9 C0 B4 C8 46 40 6F 12 87 40 54 E3 F1 C0 B4 C8 46 40 6F 12 87 40 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 04 00 00 00 01 00 00 00 DD 24 E6 C0 B4 C8 46 40 7B 14 0A 41 0E 2D EE C0 B4 C8 46 40 7B 14 0A 41 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 05 00 00 00 01 00 00 00 96 43 EB C0 F4 FD 4C 40 E1 7A A8 C0 C7 4B F3 C0 F4 FD 4C 40 E1 7A A8 C0 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 06 00 00 00 01 00 00 00 5A 64 EB C0 85 EB 49 40 9A 99 59 BF BC 74 F3 C0 85 EB 49 40 9A 99 59 BF 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 07 00 00 00 01 00 00 00 89 41 EC 40 F4 FD 4C 40 E1 7A A8 C0 EC 51 F4 40 F4 FD 4C 40 E1 7A A8 C0 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 08 00 00 00 01 00 00 00 C5 20 EC 40 85 EB 49 40 9A 99 59 BF 27 31 F4 40 85 EB 49 40 9A 99 59 BF 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 09 00 00 00 01 00 00 00 98 6E EA 40 B4 C8 46 40 6F 12 87 40 FA 7E F2 40 B4 C8 46 40 6F 12 87 40 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 0A 00 00 00 01 00 00 00 29 5C E7 40 B4 C8 46 40 7B 14 0A 41 8B 6C EF 40 B4 C8 46 40 7B 14 0A 41 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 0B 00 00 00 02 00 00 00 06 81 B5 40 C3 F5 D0 40 81 95 E7 C0 68 91 BD 40 C3 F5 D0 40 81 95 E7 C0 06 00 63 00 61 00 6E 00 6E 00 6F 00 6E 00 0C 00 00 00 02 00 00 00 A8 C6 B3 40 C3 F5 D0 40 4A 0C 2C 41 0A D7 BB 40 C3 F5 D0 40 4A 0C 2C 41Could it be possible that cannon fields look like this :Code:cannon_01 deck_02 x1 = -5.569 z1 = 6.530 y1 = 10.753 x2 = -5.820 z2 = 6.530 y2 = 10.753 cannon_02 deck_02 x1 = -5.676 z1 = 6.530 y1 = -7.237 x2 = -5.927 z2 = 6.530 y2 = -7.237 cannon_03 deck_01 x1 = -7.308 z1 = 3.106 y1 = 4.221 x2 = -7.559 z2 = 3.106 y2 = 4.221 cannon_04 deck_01 x1 = -7.192 z1 = 3.106 y1 = 8.630 x2 = -7.443 z2 = 3.106 y2 = 8.630 cannon_05 deck_01 x1 = -7.352 z1 = 3.203 y1 = -5.265 x2 = -7.603 z2 = 3.203 y2 = -5.265 cannon_06 deck_01 x1 = -7.356 z1 = 3.155 y1 = -0.850 x2 = -7.608 z2 = 3.155 y2 = -0.850 cannon_07 deck_01 x1 = 7.383 z1 = 3.203 y1 = -5.265 x2 = 7.635 z2 = 3.203 y2 = -5.265 cannon_08 deck_01 x1 = 7.379 z1 = 3.155 y1 = -0.850 x2 = 7.631 z2 = 3.155 y2 = -0.850 cannon_09 deck_01 x1 = 7.326 z1 = 3.106 y1 = 4.221 x2 = 7.578 z2 = 3.106 y2 = 4.221 cannon_10 deck_01 x1 = 7.230 z1 = 3.106 y1 = 8.630 x2 = 7.482 z2 = 3.106 y2 = 8.630 cannon_11 deck_02 x1 = 5.672 z1 = 6.530 y1 = -7.237 x2 = 5.924 z2 = 6.530 y2 = -7.237 cannon_12 deck_02 x1 = 5.618 z1 = 6.530 y1 = 10.753 x2 = 5.870 z2 = 6.530 y2 = 10.753
Code:<cannon><cannon name = "cannon 01"></cannon><deck = 02> <vertex x=".. . ......", y=".. . ......", z=".. . ......"> <vertex x=".. . ......", y=".. . ......", z=".. . ......">
Logic seems to be related not to the structure but how the structure changes as battle goes on,isn't it? I have not played too much Shogun. Is this ship playable?
Logic file structure
Buoyancy. This section is made of bobbies, "bobby", 43 of them. Each of them has
-an id value,
- a mass value,
- a radius value
- a position x,y,z
and some of them have, (I suppose those placed near water)
- a breach radius value with a position x,y,z
and all of them
- some connection values, I guess with other bobbies.
Contrary to panels which seem to be defined by vertex these bobbies are defined by a center and a radius.A first hypothesis is that buoyancy of the ship is managed by some of these bobbies that are like round shields all around the ship, once their mass is destroyed they get a breach. But they all have a mass but not a breach value,so another could be that they are spheres, as we are in a 3d system, then mass could be a threshold of damage or a threshold of water they can get before the sinking starts, this could be related to the sinking animation, so as the water fills up one Bobby, once the breach is open, then the water enter the other ones related.
Last edited by Bethencourt; November 16, 2013 at 05:52 PM.
Bethencourt's 1800
NAVAL MODDING
& Modeling. Milkshape and UU3D. With (more than) colaboration of Wangrin.
Yes, bow_kobaya is playable.
I think he meant the L'Ocean ship. Anyway, it is only playable in FOTS.
Looking at bow_kobaya eflines :
EFlines look like this in .xml file :
In models_naval tables, the same EFline look like this :Code:<ef_line name="EFLine_o_01" action="Captain"> <end x="-0.63" y="-5.531" z="1.833"/> <end x="0.63" y="-5.531" z="1.833"/> <direction x="0.0" y="0.38" z="-0.024"/> </ef_line>
We should find the very same data in both files.Code:45 00 46 00 4C 00 69 00 6E 00 65 00 5F 00 6F 00 5F 00 30 00 31 00 07 00 00 00 AE 47 21 BF C9 76 AE 40 37 89 5B C1 AE 47 21 3F C9 76 AE 40 37 89 5B C1 00 00 00 00 CC 54 81 BC D4 F7 7F 3F 0B
45 00 46 00 4C 00 69 00 6E 00 65 00 5F 00 6F 00 5F 00 30 00 31 is the ef_line name (EFLine_o_01) field
07 is action field
Actions :
Some other codes for actions can be found in L'Ocean models_naval tables :Code:04 (04) = Marines 05 (05) = ? 07 (07) = Captain 08 (08) = Officer1 09 (09) = Boarding 0A (10) = ? 0C (12) = Naval_firing_position_stand_360 0D (13) = Naval_perimeter_position 10 (16) = Officer3 11 (17) = Officer4
05 (05)
0A (10)
They could be related to the position of gunners.
Now, we can try to find the other fields :
withCode:EFLine 48 : 08 00 45 00 46 00 4C 00 69 00 6E 00 65 00 34 00 38 00 0C 00 00 00 1D 5A F4 BF E5 D0 A2 3F 48 E1 62 40 87 16 09 C0 50 8D B7 3F DB F9 BE BF 85 BE 7F BF 00 00 00 00 1D 0F 37 3D
x, y and z = float, 32bitsCode:<ef_line name="EFLine48" action="Naval_firing_position_stand_360"> <end x="-1.909" y="3.545" z="1.272"/> <end x="-2.142" y="-1.492" z="1.434"/> <direction x="-0.38" y="0.017" z="0.0"/> </ef_line>
EFline look like this :
08 = eflinexx markerCode:08 00 E F L I N E xx X1 Z1 Y1 X2 Z2 Y2 Xdir Zdir Ydir
0B = efline_o_xx marker
00 = separator
Hi ,
i have installed Notepad++ now and found the efline:
<ef_line name="EFLine_o_01" action="Captain"> <end x="-0.63" y="-5.531" z="1.833"/> <end x="0.63" y="-5.531" z="1.833"/> <direction x="0.0" y="0.38" z="-0.024"/> </ef_line>
i understand that this lines are " translated " into a code that is used by the tables.
but my models_naval - table have only the following Tabs:
key
logic folder
rigging_file
destruction_file
display_folder
my units_stats_naval table is long,but when i compare the numbers with the code Wangrin have showed,this table cannot be the right too.....
Wangrin,is the right table really the models_naval table ?
You will have to export the TWS2 models_naval table using PFM (export selected).
This will create a binary file you will have to open with Notepad++ for example.
Okay,
i found the line with the code in models_naval with Notepad++ and hex-editor.i make my first steps.
Are there any ships that have a cannon and non-cannon version? Comparing them will make it easy to see how adding cannons changes the code.
Alternative you could examine a ship with a low number of cannons as it will be easier to find which parts relate to the cannons.
Morning Sun (adds Korea and China to the Shogun 2 map)
http://www.twcenter.net/forums/forum...28-Morning-Sun
Expanded Japan mod (97 new regions and 101 new factions)
http://www.twcenter.net/forums/showt...ew-factions%29
How to split a region in TWS2
http://www.twcenter.net/forums/showt...split-a-region
Eras Total Conquest 2.3 (12 campaigns from 970-1547)
There is None.
However, I recommend chiyodagata. They has 2 version: gunboat and torpedo boat. They are small and only have 3 gun emplacement for gunboat version, and 4 for the torpedo boat. The difference is that gunboat have single bow emplacement, little offset from the centerline. Torpedo have 2 forward firing emplacement, little angled to the sides, further back in its own platforms.
Both of their side firing emplacement are quite uniquely positioned, where the port and starboard emplacement are not flush with each others.
Last edited by weirdoascensor; November 18, 2013 at 09:55 AM.
Hi ,
when i open the chiyodagata models_naval tables ( cannon and torpedo versions ) have i to compare all the eflines or a specific one ?
One part of the work must be base on comparing logic.xml (and not logic.xml.rigging) and models_naval tables for bow_kobaya.
The reason is CA provide us with this logic.xml file that contain "file format" for several objects :
- buoyancy
Code:<buoyancy> <bobby id="0" mass="1417.92" radius="1.227" x="1.418" y="-0.406" z="0.334"> <breach radius="0.878" x="0.0" y="0.0" z="48.3216"/> <connection bobby="26"/> <connection bobby="5"/> </bobby> ... </buoyancy>- deck
Code:<decks> <deck id="deck01_main"> <piece id="1"> <corner x="-0.491" y="4.113" z="2.799" type="clear"/> <corner x="-1.497" y="5.619" z="2.799" type="clear"/> <corner x="0.0" y="5.619" z="2.799" type="clear"/> </piece> ... </decks>- pipe
Code:<pipes> <pipe id="pipe_stair_01"> <segment deck_piece="43" x="0.0" y="3.964" z="2.799"/> <segment deck_piece="20" x="0.0" y="2.216" z="1.244"/> </pipe> </pipes>- damage_model
Code:<damage_model> <part name="port_side_panel_above_water_1_top"> <panel> <vertex x="-0.003" y="7.273" z="1.161"/> <vertex x="-1.389" y="7.273" z="1.161"/> <vertex x="-1.389" y="7.235" z="2.897"/> <vertex x="-0.003" y="7.235" z="2.897"/> </panel> ... </damage_model>- collision
Code:<collision> <face name="logic_collision3d" index="1"> <vertex x="0.0" y="8.029" z="-1.379"/> <vertex x="-0.994" y="10.225" z="-0.713"/> <vertex x="0.0" y="10.225" z="-0.713"/> </face> ... <collision>- EFLines
Code:<ef_lines> <ef_line name="EFLine48" action="Naval_firing_position_stand_360"> <end x="-1.909" y="3.545" z="1.272"/> <end x="-2.142" y="-1.492" z="1.434"/> <direction x="-0.38" y="0.017" z="0.0"/> </ef_line> ... <ef_lines>- custom positions
Code:<custom_position name="flag"> <position x="0.169" y="2.952" z="13.172"/> </custom_position>
This will be very helpful to find what data type they use for these different fields.
eg. char, integer, float, simple float, double float, etc.
And this will make probably easier to find the structure of the two remaining objects :
- cannons
<cannons>
</cannons>- ef_artillery_info
<ef_artillery_info>
</ef_artillery_info>
because none of these objects appear in bow_kobaya and because CA didn't provide any example of ship using guns in its Assembly Kit.
This is where other models_naval tables will be needed.
And I agree that chiyodagata, both cannon and torpedo, will be useful.
Hi Wangrin,
so must i compare every single of these lines ?
<ef_lines> <ef_line name="EFLine48 , 49 , 50 , 51, 52 , etc. ?
or just specific ones ?
and then the same for pipe , deck , custom positions etc. ?
I'm working on EFlines and have edited post #11
When comparing .xml with db, I generally begin to compare several EFlines to try to find a pattern for data.
Then, I choose one and then try to find what is what.