Results 1 to 4 of 4

Thread: Guide: Complete guide to BPI - model info files

  1. #1
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Guide: Complete guide to BPI - model info files

    I recently wrote a tutorial that covers most aspects of making collision INFO files over at totalwar.org. If you are interested in BPI files, you should check it out


    In case the above link won't work for some reason, I will also provide a copy of it here:
    I've dug around the forums and haven't found much topics relating to the collision files in RTW, so I decided to start one myself, with a fairly detailed tutorial including images and a sample file.
    This tutorial is based on the assumption that you know how to set up a working building items and I will only concentrate on Wall info files, because they contain most of INFO objects.

    For additional resources, you can also check official info provided by JeromeGrasDyke and another tutorial by Thor the Bassist.

    List of known BPI INFO directives during conversion of *.cas -> *.bpi
    Code:
    >>building_description
        fire_exclude
        ejector
        collision
        collision_3d
        collision3d
        kill_zone
    >>building_physical
        slot_platform_
        platform_
        tunnel
        arrow_horizontal_
        arrow_vertical_
        banner
        dock
        spawn
        muster_
        entry_
        respawn
        dock_sap
        dock_ram
        dock_lad
    This is the basics that I could dig out from the ALX executable and pretty much provide everything we need to build a working collision info file - obviously I don't know all the effects of some of these objects and will exclude those for now. I will continue with examples of known info objects.


    1) Spot FX Files
    These files are only used by gates and towers. They include flags, oil jets, torches and are not converted into BPI files. They are still essential for walls - BI had 2 examples of these files, one of them conveniently being for a gateway. For that reason I will skip this part for more important matters.

    If you have problems exporting your CAS file without any materials, just use the dummy.tga.dds I included in the sample file as a texture. To avoid the chance of any errors, you should copy the dummy texture to your models_building/textures/ folder.
    Also make sure your new info objects are assigned to the scene root and have a pivot position in the center of the scene (x0,y0,z0)


    2) Model INFO Files

    I will start with the most essential and will end with the most exotic object types. These object types will make the whole of your INFO file, which is exported as a cas model and then converted into BPI when the battle is loading the building item.

    -) 2D Collision
    (examples: collision, collision_planx, collision_setx, collision_01 - cannot be collision3d / collision_3d!!)
    This is a simple 2d shape that is used to draw out the necessary boundaries of the building. It will simply block the area so that troops won't be able to walk into buildings. Separate 2D collision shapes must be as separate objects. For example 2 separate squares with a gap between them need to be different objects like collision_01 and collision_02




    -) 3D Collision

    (examples: collision3d, collision3d_buildingA, collision_3d_wallsX)
    This collision object is only used for detecting projectile hits and mouse interaction. It serves no other purpose. This object is a simplification of the building model and shouldn't be too detailed to spare the CPU.




    Now to actually get your walls to function like walls, they first need physical INFO. Physical info is essential for proper unit interaction in the game. Without Physical info, you can't dock rams, siege towers or anything else for that matter.


    -) Platforms

    Platforms are surfaces on buildings where units can walk on. For this to work, you need a platform and a slot_platform.
    Platform syntax is "platform_<N>_<edges>" - A platform is always 4 sided, and to designate the front edge, both vertices adjacent to it must have vertex coloring of RGB 0,0,0 (Black). <N> (0-9) designates the number of the platform. Each platform must have an unique number, or the info file will not work. <edges> designate the description of the four edges of the platform, starting with the first edge that has vertex coloring. There are 3 main types of edges: H (hard edges, blocks troop movement), S (soft edges, unlucky troops can fall down from these edges) and C (clear edges, troops can fall off or traverse onto another platform from this edge). There also seems to be a special type of edge: G (probably 'Ground') - troops can traverse onto the platforms without a tunnel via this edge, which must be close to the ground ofcourse. This allows for special info files, like making troops walk on the rubble of a destroyed wall piece.

    A regular wall platform looks like this: "platform_0_HCSC"


    Platforms can also be sloped if necessary.


    Slot_platforms are simple isoceles triangles (both edges must be equally long) that are used to place troops. Without slot platforms you cannot place troops on the walls and the INFO file will not work.
    If you fail to get a platform to work, then faulty slot_platforms are probably the reason for it.
    Slot_platform syntax is "slot_platform_<N>_<rank>", where <N> must match the number of the platform it used for and where rank designates the number of the the slot_platform, first being 0.
    A typical platform has more than 2-3 slot_platforms and they should look like this: "slot_platform_0_0" "slot_platform_0_1" "slot_platform_0_2" These are all meant to match "platform_0_HCSC". Slot platforms are usually placed right above the platform.




    -) Tunnels

    To actually get your troops onto a platform, you need a tunnel. Tunnel works as a simple bridge that can send troops through anything onto the platform it goes through. Tunnels can have either 4 edges (like a simple square), or have an addition of 2 edges, to form a slightly more complex tunnel (tunnel that has corners/bends). Tunnels must be named as "tunnel_<X>" where X is any number or letter necessary for identification. Example: "tunnel_01" , "tunnel_02".
    Without tunnels troops can't get onto platforms and the tunnel MUST only go NEAR the platform. The following image shows the 2 possible applications of tunnels, notice how the tunnels clip through the platform as needed.



    If you have done everything right, you should have a building that troops can get into/onto and fight in/on. But how about attacking with siege rams, ladders, huge siege towers and the likes? Well its fairly easy in theory.

    -) Dock Points
    There are several types of dock points that are used to test if a building can be attacked by rams/ladders/towers.
    These dock points are: dock (no idea!?), dock_ram (rams, elephants), dock_sap, dock_lad(ladders and dock_lad01 is for siege tower).
    A dock point is marked by a simple cube in the part of the wall where you need the siege engine to attach. So far, docking a ram is fairly easy: Just make a simple box, name it dock_ram, put it to a desired position, assign to parent Scene Root and export the cas info file.


    -) Arrow slots
    These are essential if you plan on making towers that shoot arrows. Without arrow slots, your towers won't do anything useful. The theory behind arrow slots is also fairly easy. There are two objects: "arrow_horizontal_<N>" "arrow_vertical_<N>" - where <N> marks the number of a given arrow slot.
    Each slot consists of 2 of these objects. Both must be isoceles triangles that have a shared vertex position.
    To make it easier for you to understand, here's an image of how an arrow slot should look like:

    Notice the tips of both these triangles meet at the same point. The shape of the triangles (aspect ratios of triangles height and its bottoms width) determines the angle the arrow is able to be shot out of the arrow slot. The dotted red lines should give an idea on that arrow slots field of view. Horizontal and vertical arrow slots don't have to be identical, just need to be isoceles and the top vertices must share the same point in space.
    Example: "arrow_horizontal_01 arrow_vertical_01" "arrow_horizontal_02 arrow_vertical_02"


    -) Muster planes
    A possible way to use these is to make ambush buildings, or just places to send troops into. I have no data on whether the troops will fight once mustered or not, but they will most probably be grouped into one single point, which is the center of the muster plane.
    These consist of two types of objects: muster_ (this is where the troops will be gathered) entry_ (way to enter the muster plane).
    A muster plane can be a simple square; troops will be mustered into the center of this square. Example "muster_0"
    There can be several entryways for a muster plane. Examples: "entry_0" (1 entryway for muster_0), "entry_0_0 entry_0_1 entry_0_2" (3 entryways for muster_0)



    This is the end of the tutorial for now. I will keep adding more data as is found out.
    You can also download this file (Max 9) with a very basic wall setup to get you started, it also includes a .3ds version of the file, in case you don't have Max 9.
    Last edited by RedFox; January 03, 2009 at 10:31 AM.

  2. #2
    Agisilaos's Avatar GREECE - ΕΛΛΑΔΑ
    Join Date
    Sep 2007
    Location
    Hellas
    Posts
    3,120

    Default Re: Guide: Complete guide to BPI - model info files

    this post definitely needs to be given reputation!
    Macedones were, are and will always be Greeks
    Under the Noble Patronage of jimkatalanos and proud patron of Agis Tournas and cocobongoclub-DJ
    Terrae Expugnandae, Imperial Might, Mythology, Complete Byzantine Roster, Ruins of glory, Sparta 3, Hegemonia City States, Roma Surrectum 2,300 Warlords of Sparta, Sparta 3.5, Classical Age Total War
    watch this
    , this and this
    Τακτική είναι να ξέρεις τι να κάνεις αν υπάρχει κάτι που μπορείς να κάνεις.
    Στρατηγική είναι να ξέρεις τι να κάνεις όταν δεν υπάρχει τίποτα να κάνεις.

  3. #3
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: Guide: Complete guide to BPI - model info files

    I updated the first post with some important notes. I also thought it nice to post these here:

    I have taken some further interest in the INFO BPI files yet again and have managed to complete a fully functional set of walls.
    During that process I discovered major flaws in my previous tutorial, namely:

    Naming of tunnels is rather strict and must be: tunnel_01 or tunnel_02. Usually having tunnel_0 can cause problems
    Same applies to arrow slots, which must be: arrow_horizontal_01 etc..


    Complex/bending multi-piece tunnels do NOT seem to work, even though stated so by CA. You need to have a slot_platform where you need the tunnels to turn (for example watchtowers require a ' Y ' shaped setup)..

    Muster planes do not seem to work even after some testing it didn't show any promise..

    !2D Collision!:
    Separate pieces of collisions must be different objects! 2D Collision pieces must form a continuous shape that closes around itself. If you have two squares with a gap between them, they need to be different objects, or one of them will not work. Again, collision_01 and collision_02, not collision_0

    SPOT FX Files: I have encountered graphical artifact problems with these and have decided not to mess with it..

    >>
    There also seems to be a special type of edge: G (probably 'Ground') - troops can traverse onto the platforms without a tunnel via this edge, which must be close to the ground of course. This allows for special info files, like making troops walk on the rubble of a destroyed wall piece.


    Problem detection:
    CTD's while loading battle, ~1/5 of the loading bar: Your INFO file has unrecognizable mesh data. Try converting all mesh into 'Editable Mesh' or 'Editable Poly'.
    Or, the material assigned to your mesh does not appear in the material editor (typical if you merge files). Just re-apply the texturing to the mesh from material editor slots.

    Platforms not working: You have set up your platforms, but they still don't work! That means you don't have proper slot_platforms!! Make sure they start as: slot_platform_0_0, slot_platform_0_1 etc..

    Cannot walk onto platforms, even though you have tunnels: Tunnel shape or naming is incorrect, make sure it is tunnel_01 and tunnel_02, not tunnel_0 and tunnel_1


    Final notes:
    If anyone is interested on my progress on this new set of walls, visit the thread in XGM - Diadochi forums:
    http://www.twcenter.net/forums/showthread.php?t=207462
    The final version of the walls differs greatly from the initial concept, so make sure you check all of it!


    Here's a little preview of the possibilities that working with INFO files offers:
    These walls are approximately 60% the height of regular stone walls and can be breached by elephants or rams...

    Spoiler Alert, click show to read: 

    Units lined up at the start of the battle.


    The Gateway with support struts


    Transitions between platforms work flawlessly


    The towers shoot arrows perfectly fine =)


    The watchtower with new supportive struts..


    Getting on the walls is simple as always

    The ram is attacking the wall


    The wall is breached!


    Carnage between Hypaspists and Polybian Principes


    A sad day for the Seleucid Empire =(


  4. #4

    Default Re: Guide: Complete guide to BPI - model info files

    Finaly, thanks Red Fox, good job...

    + rep !

Posting Permissions

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