Results 1 to 3 of 3

Thread: Editing .modelreferencepoints files (siege engines/weapons crew and fire position)

  1. #1
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Icon1 Editing .modelreferencepoints files (siege engines/weapons crew and fire position)

    By editing the .modelreferencepoints files (they're inside data/siege_engines) you can change the positions of the crew of a siege engine/weapon (like the catapult) as well as its shot origin (the exact coordinate from where the projectile is spawn).

    .modelreferencepoints files are binary, this means either you edit it via a hex editor (difficult and complex), or you can simply download the python tool attached in this post to convert the binary file into a text file and easily edit it in notepad++. The tool usage is absolutely self explanatory.

    once you have the file converted to text, open it and you will see something like these examples:

    For the elephant cannon unit:
    file: elephant_cannon_lod0.modelreferencepoints


    Code:
    22 serialization::archive
    3 4 4 4 8 1 0 0 0 0 0 0 0 2 0 0 0 0 2 
    
    
    18 Artillery FrontPFX 0
    1.0    0.0    0.0    0.0
    0.0    1.0    0.0    4.15749931335
    0.0    0.0    1.0    0.80863022804
    0.0    0.0    0.0    1.0
    6 exit01
    
    
    19 Engine StationPoint 
    1.0    0.0    0.0    -0.40000000596
    0.0    1.0    0.0    4.19999980927
    0.0    0.0    1.0    -1.0
    0.0    0.0    0.0    1.0
    11 Cannon_Crew
    This is the total number of entries in the file
    This is the entry for the shot origin
    This is the entry for gunner position

    This is the LEFTxRight coordinate

    This is the HEIGHT coordinate
    This is the HEARxFRONT coordinate

    For a ballista unit:
    file: siege_ballista.modelreferencepoints


    Code:
    22 serialization::archive
    3 4 4 4 8 1 0 0 0 0 0 0 0 5 0 0 0 0 2 
    
    
    19 Engine StationPoint 0
    1.0    0.0    0.0    -1.20089876652
    0.0    1.0    0.0    0.0
    0.0    0.0    1.0    1.91849994659
    0.0    0.0    0.0    1.0
    9 Crew_Left
    
    
    18 Artillery FrontPFX 
    1.0    0.0    0.0    -0.00811655912548
    0.0    1.0    0.0    4.0
    0.0    0.0    1.0    2.01944947243
    0.0    0.0    0.0    1.0
    6 exit01
    
    
    16 Engine PushPoint 
    1.0    0.0    0.0    1.82727563381
    0.0    1.0    0.0    0.0
    0.0    0.0    1.0    -0.469062387943
    0.0    0.0    0.0    1.0
    10 Crew_Right
    
    
    16 Engine PushPoint 
    1.0    0.0    0.0    -1.91732847691
    0.0    1.0    0.0    0.0
    0.0    0.0    1.0    -0.46906259656
    0.0    0.0    0.0    1.0
    9 Crew_Left
    
    
    16 Engine PushPoint 
    1.0    0.0    0.0    0.0
    0.0    1.0    0.0    0.0
    0.0    0.0    1.0    -2.80180740356
    0.0    0.0    0.0    1.0
    9 Crew_Rear
    Engine PushPoint is the entry for the guys pushing the ballista, notice there are 3 entries.


    Edit the coordinates the way you want, convert the text file back to binary using the same tool, then rename the new created file to match the name of the original one, then replace the original one with it.

    Thats all.

    ADDITIONAL INFO::

    Height value for siege weapons crew seems to be hardcoded somewhere else. Editing it in the modelreferencepoints file will have no effect, the men will still be on the ground line, always.

    It can be changed in the modelreferencepoints of mounted engines though (e.g elephant cannon)
    Attached Files Attached Files
    Last edited by leo.civil.uefs; September 22, 2021 at 07:46 PM.

  2. #2
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: Editing .modelreferencepoints files (siege engines/weapons crew and fire position)

    anyone knows if its possible to change the direction of the shot? I mean, making the engine to fire not only foward but also back, to the sides, in different angles than straight foward.

  3. #3
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: Editing .modelreferencepoints files (siege engines/weapons crew and fire position)

    some interesting finging:

    the crew guy who loads the engine has his pushpoint entry, and will always move to the stationpoint to activate the the crank.

    Identify his entry by observing his position in game and the matching coordinates in the file.

    His station point coordinate will be ALWAYS the LAST ONE in the file.

    if you set the same coordinate for this guy and for the last stationpoint entry in the file, he will not move anywhere to activate the engine, but will work anyway.
    Last edited by leo.civil.uefs; February 19, 2023 at 01:51 PM.

Posting Permissions

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