Page 6 of 7 FirstFirst 1234567 LastLast
Results 101 to 120 of 131

Thread: Examining models_naval tables and CA's ship model

  1. #101
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining models_naval tables and CA's ship model

    What about TAW? He has done excellent work regarding the esf files in Empire. Since you already have found out a lot about the structure of the naval table with hex, he should have it easier to come up with a converter.

    Regarding the EF-lines. I'm feeling confident enough to try to work myself on an exporter (and maybe even an importer)

    I already wrote a small tool for rigid_splines (as used as borders and rivers). This can surely be adopted for EFLines and any other necessary esf file


  2. #102
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    I suppose it's easy to export EFlines coordinates, at least, its extremity ones.
    The problem is to calculate direction.

    It should be easy for building, direction is only along x or y directions.
    Code:
            <ef_line name="EFline_piece01_destruct02_line01" action="Overflow">
                <end x="11.3" y="-4.292" z="5.738"/>
                <end x="11.3" y="-10.346" z="5.738"/>
                <direction x="0.381" y="0.0" z="0.0"/>
    Code:
            <ef_line name="EFline_piece01_destruct02_line04" action="Low wall">
                <end x="11.923" y="-12.453" z="5.738"/>
                <end x="5.213" y="-12.453" z="5.738"/>
                <direction x="0.0" y="-0.381" z="0.0"/>
    It's more difficult for ships as direction can be along two axis :
    Code:
            <ef_line name="EFLine_o_03" action="Officer3">
                <end x="-0.63" y="-6.474" z="1.96"/>
                <end x="0.63" y="-6.474" z="1.96"/>
                <direction x="0.0" y="0.38" z="-0.006"/>
    Code:
            <ef_line name="EFLine86" action="Naval_firing_position_stand_360">
                <end x="0.17" y="-6.794" z="1.986"/>
                <end x="0.407" y="-1.787" z="1.419"/>
                <direction x="0.38" y="-0.017" z="0.002"/>
    Code:
            <ef_line name="EFLine89" action="Naval_firing_position_stand_360">
                <end x="2.258" y="-5.014" z="1.755"/>
                <end x="-2.282" y="-5.023" z="1.755"/>
                <direction x="0.0" y="0.378" z="-0.039"/>
    We have to find how CA caclulate this direction.
    It look like being a vector or even a unit vector :


    Where :


    But unit would not be 1, but 0.381...
    Last edited by wangrin; May 09, 2014 at 10:26 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  3. #103
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining models_naval tables and CA's ship model

    Basically we need the direction between two points:

    https://docs.google.com/drawings/d/1zVOMfpKvxObChdiofWm09H6HwvCtuCQK8Zlg5bZu3zk/edit?usp=sharing


    Anyway - i started to work on a exporter script for 3ds Max. Actual version 0.1.

    You can set the name, to which building and destruction piece it does belong and the EFline type, like "High wall", "Low wall" (used to tell the game how the soldiers should interact with) for ALL selected splines.

    At the moment the direction is just a placeholder and is not correct.
    The file can be converted by BoB without. Though this doesn't mean that the splines might work in shogun. This needs further testing. Feedback much needed!

    Click image for larger version. 

Name:	xmlfile.jpg 
Views:	15 
Size:	272.4 KB 
ID:	306988 Click image for larger version. 

Name:	EFtool_v01.jpg 
Views:	17 
Size:	30.5 KB 
ID:	306989

    ~~ Download ~~

    EF Line Tool 0.1.rar


    Edit:

    I made a quick testbuilding and it does indeed work it's a bit buggy though. Because of the wrong direction soldiers look in all directions and only fire in those directions. But hey, trenches, leuthen church, hougamont etc. are now possible!

    Last edited by Primergy; May 10, 2014 at 04:46 AM.

  4. #104
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    Great, really great.
    I will rep you as soon as possible.

    I should be able to create the redoubt now

    Question : do you have run the CS2 exporter for garrisonable building ?
    When I try it, even with model provided by CA, it doesn't work.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  5. #105

    Default Re: Examining models_naval tables and CA's ship model

    i have absolutely no idea what you guys are talking about and how this step could been done,but it looks great !!!

  6. #106
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining models_naval tables and CA's ship model

    Question : do you have run the CS2 exporter for garrisonable building ?
    When I try it, even with model provided by CA, it doesn't work.
    Buildings are a bit strange. All names have to fit, and it seams like Bob also reads in the max file. But normally CA models should work... did you changed anything once?

  7. #107
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    I only open the .max model with 3ds max 2013 to save it as .max (2010) to be able to open it in 3ds max 2010 and use CS2 exporter.

    Did you have try to convert TW:S2 .max building model using TW:R2 CS2 exporter ?
    CA told that it should work but I didn't have time to work on.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  8. #108
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining models_naval tables and CA's ship model

    Yes, it also works for me.

  9. #109
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining models_naval tables and CA's ship model

    I fixed the direction issue. Soldiers now face straight ahead, depending on the EFline orientation.

    -Added a button for assigning the rotation. This will add a new line indicating the direction of the spline.
    -Added a button for mirroring the rotation. Sometimes the rotation might be in the wrong direction, or you made changes to the spline and now have to recalculate the direction. Press the button erase the old rotation and add a new.

    Usage:

    Extract the folder and copy it to 3dsMaxdirectory/scripts/
    Run by clicking on Maxscript, run script --> EFtoolsbuttons - this opens the dialog.

    Create a new Spline with only two points. First set the properties (which building piece, which destruction level) and which type it has. Different types have different effects. "Low wall" makes soldiers kneel while firing and so on.
    Then use the add direction button, afterwards you are good for exporting. Choose a directory and a name which fits with the building name (like acw_eftest_tech.xml")

    Use Bob and have fun with your garrisonable building.

    Click image for larger version. 

Name:	EFLinetools.jpg 
Views:	139 
Size:	36.4 KB 
ID:	307336

    Example:

    Spoiler Alert, click show to read: 
    Attached Files Attached Files

  10. #110
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    taw's models_naval <> xml converter

    taw create a new tool to convert back and forth models_naval tables to .xml file format
    It is now possible to manually edit or add cannon positions and number.



    1. INSTALLING TAW's TOOL :
      • Prerequisites :

      • Checking JRuby Version :
        • run windows command prompt (cmd)
        • jruby -v : print version number, then turn on verbose mode
          Code:
          jruby -v
          jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 +jit [Windows 7-amd64]
        • jruby -e 'puts RUBY_VERSION' : print version number, then turn on verbose mode
          Result should be 1.9.3
          Code:
          jruby -e 'puts RUBY_VERSION'
          io/console not supported; tty will not be manipulated 
          1.9.3
        • jruby -e 'p wtf: :seriously' : this code sample will crash on 1.8, but works on 1.9+
          Code:
          jruby -e 'p wtf: :seriously'
          io/console not supported; tty will not be manipulated
          {:wtf=>:seriously}
        • jruby --2.0 -e 'puts RUBY_VERSION' : specify Ruby 2.0.x compatibility, even with old JRuby which default to 1.8, you can probably just tell it to use 1.9 or 2.0 compatibility
          Code:
          jruby --2.0 -e 'puts RUBY_VERSION'
          io/console not supported; tty will not be manipulated
          2.0.0


    2. CONVERTING MODELS_NAVAL TABLES TO XML FILE FORMAT
      1. Napoleon, Shogun 2 and Rome 2 models_naval tables to xml command line :
        Code:
        jruby models_naval_unpack models_naval_dbtable models_naval_dir
      2. Empire models_naval tables to xml command line :
        Code:
        jruby models_naval_unpack --empire models_naval_dbtable models_naval_dir

    3. CONVERTING MODELS NAVAL XML FILE TO DB TABLES
      • Napoleon, Shogun 2 and Rome 2 models_naval xml to db table command line :
        Code:
        jruby models_naval_pack models_naval_dir models_naval_dbtable
      • Empire models_naval tables xml to db table command line :
        Code:
        jruby models_naval_pack models_naval_dir models_naval_dbtable

    4. SOURCES




    Last edited by wangrin; May 01, 2015 at 04:05 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  11. #111
    Junaidi83 de Bodemloze's Avatar Dont Mess With Me
    Join Date
    Feb 2011
    Location
    Indonesia
    Posts
    2,616

    Default Re: Examining models_naval tables and CA's ship model

    Wow yummy stuff Sir Wangrim, with this i believe i can see all cannoon hole open in shogun 2 , yipeee .
    Modding is like accursed wine, you try a sip and you ended empty the whole glass
    Under Proud Patronage of Shankbot de Bodemloze

  12. #112
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    I've done nothing here, you should thanks taw for his work : Naval models editing


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  13. #113
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining models_naval tables and CA's ship model

    I wrote an ugly script which makes it easier to import and edit ship models.

    You can open ships with UU3D and save it as fbx file and then import it with my tool. There are options to scale and mirror it, since the freshly imported fbx doesn't have the right scaling.

    https://www.dropbox.com/s/e4sbk7v3xe...tools.rar?dl=0

  14. #114

    Default Re: Examining models_naval tables and CA's ship model

    Maybe someone can help me. Every time when I try to use "jruby models_naval_unpack models_naval_dbtable models_naval_dir" on the cmd console, it says "Error opening script file: models_naval_unpack (No such file or directory)".
    jruby version: jruby 1.7.24 (1.9.3p551) 2016-01-20 bd68d85 on Java HotSpot(TM) Client VM 1.8.0_73-b02 +jit [Windows 10-x86].
    jruby -e 'puts RUBY_VERSION': 1.9.3
    jruby -e 'p wtf: :seriously': {:wtf=>:seriously}
    jruby --2.0 -e 'puts RUBY_VERSION': 2.0.0

    Everything is in the right folder.

  15. #115

    Default Re: Examining models_naval tables and CA's ship model

    Quote Originally Posted by izzi View Post
    "jruby models_naval_unpack models_naval_dbtable models_naval_dir"
    I think the problem is this:

    The "models_naval_dbtable" refers to the unpacked dbtable. It should not be in a folder of its own. As far as I know, the name of the dbtable are just "models_naval"

    Also, "models_naval_dir" points out to the folder you want the xmls be placed into. It can be any name you want.


    So, try this:
    Code:
    jruby models_naval_unpack models_naval models_naval_xml
    And when you finished editing the xml, packing them (for instance):
    Code:
    jruby models_naval_pack models_naval_xml izzi_models_naval

  16. #116

    Default Re: Examining models_naval tables and CA's ship model

    Hi guys, one question. What if the models_naval tables are just for everything that moves from the ship (guns and gun placement, animated things on deck, rigged and animated sequences: like sails, ropes, etc...)? I think that the static 3d models is defined in the "warscape_rigid_lod_tables" and its textures on "warscape_rigid_tables". I have been playing around a bit (with no succes, but I am close). But I need some help from you guys. I made a pack file where I put al the information (I think....)needed to make ship. But as I am not really a master in modding and didn't use assembly kit to do it, only with PFM, I think that I made some (minor)errors. I made a copy of a ship (chiyodagata), and renamed it to "gunboat"(just for testing). I used a hex editor to rename it in "models_naval" tables. And much more defined in the db: warscape_rigid_tables, warscape_rigid_lod_tables, units_to_groupings_military_permissions_tables, units_tables, unit_stats_naval_tables, naval_uniforms_tables, cdir_unit_qualities_tables, building_units_allowed_tables. I attached the file.ship_mod.zip

  17. #117
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    models_naval table is not only for "animated" object.
    These tables contains 3d data about nearly everything, from collision model to gun placement.

    Data about sails and rope are not in the models_naval tables, but in logic.xml.rigging file located in each ship folder from rigidmodels\naval main folder.
    This is the same for ETW and, I suppose, NTW.


    The first step to make test is to "isolate" a ship models_naval tables like you've done.
    But, to modify them, you should use taw's tool (Naval models editing) instead of hexadecimal editor as describe in post #110 above.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  18. #118

    Default Re: Examining models_naval tables and CA's ship model

    Quote Originally Posted by wangrin View Post
    models_naval table is not only for "animated" object.
    These tables contains 3d data about nearly everything, from collision model to gun placement.

    Data about sails and rope are not in the models_naval tables, but in logic.xml.rigging file located in each ship folder from rigidmodels\naval main folder.
    This is the same for ETW and, I suppose, NTW.


    The first step to make test is to "isolate" a ship models_naval tables like you've done.
    But, to modify them, you should use taw's tool (Naval models editing) instead of hexadecimal editor as describe in post #110 above.
    That's what I mean, like collision to gun placement and interaction (like how the units move on the ship). But my theory is that the entire static 3d objects are not defined there. For example, you make a copy of a new ship, you add something to it (for example on the stern of the ship). Offcourse without modifying the models_naval_tables(only a new name), the ship will not be entirely interacted. But I have to test this. The problem with taws tools, is that now when I try to convert it to xml, that it doesn't find the java directory.

  19. #119
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining models_naval tables and CA's ship model

    Yes, using taw tools is not always easy, but hopefully they work.
    Converting models_naval to xml file make them far easier to modify (and to understand too).


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  20. #120

    Default Re: Examining models_naval tables and CA's ship model

    Can you send me the model_naval_tables in xml format please(of all the STW2 ships)? So I can take a look at it. After I will try again to reinstall jruby. But for know I am focusing on the ship models ST2.

Page 6 of 7 FirstFirst 1234567 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •