Page 1 of 2 12 LastLast
Results 1 to 20 of 27

Thread: Building models

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Building models

    What format are building models in? .cas or is it and ITEM file? What folder are they in also?
    [signature]

  2. #2

    Default Re: Building models

    OK, let me elaborate, because I not getting any responses. I'm making an addon for a mod, as you see in my sig, but I've caught a little snag. The mod doesn't have new buildings and its mod foldered. I just want to add the new building models to the mod folder so that the new buildings replace the old vanilla ones. Anyone know in detail how to do that?
    [signature]

  3. #3
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building models

    The simple answer is that building files are both .CAS and ITEM files.

    You have to create the .CAS and put them in the appropriate folder data/building_model/buidings and the skin in data/building_models/texture

    Then you have to code these into the descr_items.txt file. (best to create a new text doc called di_addon_buildings.txt or something and place this in data/descr_items. You will then have to open the vanilla descr_items.txt folder and at the very top add the line;

    include di_addon_buildings.txt (the game will automatically look in the descr_items folder in the mod folder for this file)

    Once you get this coded, delete the descr_items.db, start the game, it should give a warning and control+alt+delete out.

    If you did it all correctly an ITEM should exist in the ITEMS folder in the mod folder now.

    I left out a bunch of details on the assumption that you know how to code the building into the listed files.

    Good Luck.
    Under the Patronage of Lord Condormanius

  4. #4
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    Adding a new model in a fresh mod-folder is one thing. Another thing is to modify an existing vanilla model (not the texture!)

    The question is: where are the cas-files located in??
    I know that (according the coding) the files are located here:
    DATA\MODELS_BUILDING

    But if you check the given vanilla folder you see that it's empty (or at least you see that there are no building models inside).
    Now we come to the pack-files (pak). You de-pack all of them and indeed you can find the building textures and the items now - however - the models are not there.

    Where are the building models?
    Last edited by Pompeius Magnus; March 21, 2010 at 08:16 AM.

  5. #5
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Building models

    Once the item files are generated the cas files are no longer needed. To get the cas back use vercingitorix importer as I believe it will allow you to load item files.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  6. #6
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    The problem for me is that we made a new item file for the roman_huge_city_wall._straight.

    We linked new textures to that wall (that's the background why we did it).
    And now, when the game loads the 3D view (tactical view), I get 2 failure messages that the engine can't find the 2 wall parts (the cas-models!) high and low.
    That's one of the failure messages:


    When I click on 2 times on the "OK" Button the loading-bar moves on until the tactical view is finally visible - but without the straight city wall. That means you can look through the walls.

    What's wrong here? Is the new item file wrong/defective? My plan was to take the real wall model (the cas files) and put it into the mod folder. How can I fix that problem?
    Last edited by Pompeius Magnus; March 21, 2010 at 09:08 AM.

  7. #7
    Athenogoras's Avatar Campidoctor
    Join Date
    Apr 2007
    Location
    Sweden
    Posts
    1,785

    Default Re: Building models

    Are the new items size of similar size as the old.

    I know I had a similar problem when trying to get new textures for the walls.
    Invisible walls, only the gates and wallgrass visible.
    On further inspection I found the item-files to very small(although there names were correct)
    I simply replaced them with the old wall-items which I had saved. And everything looked alright again with the new textures.
    Here is the link to my problem

  8. #8
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Building models

    when you delete the .db and make game make your new .items from your new .cas's - it also starts trying to re-make all the original .items too (because they are also in the items text file), how many it will overwrite depends on how many error messages you click through when you're making the new db...

    because as stated above CA didn't bother sending the .cas files, when it tries to remake old ones it generates 0kb versions with nothing in....


    so you need to keep copy of all the original items somewhere, and add them back in after you've made your new .items.

    I believe all the items have to be placed in the modfolder if you have any at all in there (eg you can't only have the new items in the modfolder you need copy of original ones as well)

    Quote Originally Posted by Pompeius Magnus View Post
    The problem for me is that we made a new item file for the roman_huge_city_wall._straight.

    We linked new textures to that wall (that's the background why we did it).
    And now, when the game loads the 3D view (tactical view), I get 2 failure messages that the engine can't find the 2 wall parts (the cas-models!) high and low.
    That's one of the failure messages:
    EDIT: actually that doesn't sound like problem me and Athenogoras were referring to.

    Did you actually delete and re-create the items.db file to make your new item? or did you try exporting directly as an item with verc's script?

  9. #9
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    the original name and size of the vanilla item:
    roman_huge_city_wall_straight.item
    22.1 kb
    Last edited by Pompeius Magnus; March 31, 2010 at 03:30 PM.

  10. #10
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Building models

    you're not meant to have a new .item file before you delete the items.db!

    you should be exporting from 3ds as .cas

    you're meant to put .cas in folder on path specified in the items text file and let the rebuilding of the db process generate the new .item for you....

    if you don;t want high and low .cas change what it specifies in the items text file to suit your new cas name

  11. #11
    Athenogoras's Avatar Campidoctor
    Join Date
    Apr 2007
    Location
    Sweden
    Posts
    1,785

    Default Re: Building models

    Perhaps a stupid question: but you have added the texture-entrys in descr_buildings_battle.txt?

    Like this
    Spoiler Alert, click show to read: 
    ##crenellations_brck42S.tga
    {
    parthia ##CONST_BRCK42S.TGA
    }

    brck42S.tga
    {
    parthia CONST.TGA
    }

  12. #12
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    @makanyane
    I'm not sure what you mean. Are you speaking about the creation of a new cas (respectively the creation of a new model)?
    But this is exacatly what we don't want. We just want give a new texture to the vanilla epic roman walls.

    @Atheno
    no I haven't. Because I always thought that it's sufficient if you have an item file which is correctly linked with the textures. And I find in the dbb only the log walls, brick and crennelation files - nothing else.
    Is it necessary to add the new textures here?

  13. #13
    Athenogoras's Avatar Campidoctor
    Join Date
    Apr 2007
    Location
    Sweden
    Posts
    1,785

    Default Re: Building models

    Is it necessary to add the new textures here?
    To be honest, I dont know. You and Makanyane seem to have a better grasp of this than me. Perhaps the file is redundant.
    I did it though and my walls had the new textures.

  14. #14
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building models

    The textures are linked through the CAS model from what you link it in Max. There is no other text area to link textures to ITEMs.

    Here's a little trick though. You can open the ITEM file and edit it in a hex editor. As long as the texture is in the mod/data/building_model/texture folder and you name the new one the same length as the old ie: roman_building_texture.tga changed to roman_building_text001.tga the game will link this new texture to the vanilla model.

    If you want to change textures on vanilla models you have to either A. Edit the vanilla texture. B. Create new texture, load the Item into max, path the texture to the model, export the CAS, and restart the game to create a new Item. C. Use the HEX editor to edit the texture name in he ITEM file.

    Hope that all makes sense.

    Also, best way to check what texture an ITEM is looking for is to open it in notepad. You'll see the texture name right at the top. Can't edit anything in notepad, but its a helpful troubleshooting tool.
    Under the Patronage of Lord Condormanius

  15. #15
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    @Rama
    yes, I understand your points. The thing with the Hex Editor was new for me that the length should be the same!!! This is something we have to test before I give a result here. But our lenghts have different sizes - that's for sure.

    for example: The texture brck42S.tga was replaced from us withGREEK_CITY_WALL.TGA
    Obviously much longer. But as said, I will check this first.
    @ramashan
    is it required to delete the item database if I replace the name via hex editor?

  16. #16
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building models

    No, you do not have to delete the ITEM.db if you edit the item in the HEX. At least I have not in the past and this is how I would fix texture issues when I receive .jpg or something from my modeler.

    But yes, you can't add cells to the hex editor only edit the existing ones, so the names must be the same.

    If you want to attach a whole new texture with a different name, then you have to load the ITEM into Max, select the building, press 'M', work out your texture path and then export out the CAS. I'm assuming you know how to turn the CAS into an ITEM.
    Under the Patronage of Lord Condormanius

  17. #17
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    Well, the "same-length-issue" was the solution for our problem. The length was indeed completely different before. Some minutes ago the test was successfully passed, the tactical view is loading and the new textures were attached to the model.
    Many many thanx to all of you Ramashan, Athenogoras and also makanyane.
    Theodosian walls are saved!!!
    +rep from me

  18. #18
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building models

    Glad to help and hear that it all worked out.

    Did you end up doing it through the HEX editor without having to delete the ITEM.db? Just out of curiosity.
    Under the Patronage of Lord Condormanius

  19. #19
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: Building models

    Quote Originally Posted by Ramashan View Post
    Glad to help and hear that it all worked out.

    Did you end up doing it through the HEX editor without having to delete the ITEM.db? Just out of curiosity.
    Yes, I used the HEX Editor and I replaced the old texture-name (the new one had the same length).
    I simply clicked on "save file" and the old item was overwritten.

    Finally I loaded the campaign without deleting the item database.
    But perhaps it also works when I delete it. I can check that in the next 1-2 days and I will post the result here.

  20. #20
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,981

    Default Re: Building models

    Come to think of it, you don't want to delete it when you use the HEX editor. It would most likely revert to the texture called for in the CAS file. So, if you do delete the ITEM.db you'll just have to use the HEX editor to fix the problem again.
    Under the Patronage of Lord Condormanius

Page 1 of 2 12 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
  •