Results 1 to 7 of 7

Thread: replacing vanilla models by custom ones

  1. #1
    JustDoit8's Avatar Aquilifer
    Join Date
    Jul 2011
    Location
    Norway
    Posts
    327
    Tournaments Joined
    0
    Tournaments Won
    0

    Default replacing vanilla models by custom ones

    I am planning a retexture for late British and American units and am wondering if it is possible to replace vanilla models of f.ex coldstream guards by another model with its own textures.

    I'd appreciate any help.
    !!!COMPLETE SURVEY - HELP ME OUT WITH MY TERM PAPER!!


    http://kwiksurveys.com/app/rendersur...facebook%2Ecom

  2. #2
    Bethencourt's Avatar PLVS VLTRA
    Artifex

    Join Date
    Jul 2009
    Posts
    4,668
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: replacing vanilla models by custom ones

    What you are asking for is really two things. One disabling one unit and the other is adding a new one.

    You have to add the following tables to your mod

    warscape_animated

    warscape_animated_lod

    units_to_groupings_military_permissions or units_to_exclusive_faction_permissions

    units

    unit_to_unit_abilities_junctions

    unit_stats_land

    building_units_allowed

    There are other tables like units_to_gov_type_permissions that you may want to add depending on you design.

    To disable one unit you have to identify its db identity. The most common way to do it is to go to unit table in main or in the patch it has been publish in by CA. The second column of that table is screen name. If you click on the name of the column the names will apear in alphabetical order so you search for Coldstream Guard. In this case the db identity of the unit is euro_superior_line_infantry_coldstream.

    Then go to units_to_groupings_military_permissions or units_to_exclusive_faction_permissions in main or in patch file to see where the unit is attached to the group that the faction belongs to or the to the faction directly. If it is in units_to_groupings_military_permissions just delete the file if you do not really want it in the game, but if you want to preserve it for other factions of the group, British rebels or whatsoever, or it is attached via units_to_exclusive_faction_permissions then go to this last table ald put false where it is true. This second method using units_to_exclusive_faction_permissions is the best method.

    Then to add the new unit. If you have created a new model and then new textures then add the lod files and the textures files to your mod. It is better to use the same name for the lods files and for the textures files so things go quicker when changing db tables which is what follows, so you can use the same name for the unit id and the unit model in the tables. This tutorial is made suposing that you have done so if not it can cause ctd if you do no place the correct names in the tables.

    Go to warscape_animated add a row, copy and paste the last row. (In general you can clone rows but in some tables like unit stat land this is forbiden as the clonation is always partial and it causes ctd.) In first column replace the name by the same name you have used to name the lods and then textures. and replace "unitmodels/textures/vanilla unit" by "unitmodels/textures/your unit name". With this you are adding the textures to the db table.

    Go to warscape_animated_lod and clone the last four rows. Each row is for a lod, so lod1 lod2 lod3 and lod4. Change the number of the first column, put any number for example adding 10 to each number in that column for each row. In the second column where you see UnitModels/vanilla name_lod1.variant_weighted_mesh change to UnitModels/your unit name_lod1.variant_weighted_mesh. Repeat it in the three other lines for lod2 until lod4.

    In the last column change the vanilla unit name by you unit name.

    With all this you have added the model to the db files.

    Go to units_to_groupings_military_permissions or units_to_exclusive_faction_permissions, here attach the unit to the group you are interested or to the faction you want by using true value the faction permission table.

    Go to units table. Add a row, find the row of the euro_superior_line_infantry_coldstream copy it and paste it in the new row you first created.

    Go to unit_to_unit_abilities_junctions. Find the rows of euro_superior_line_infantry_coldstream , clone them all and then change the first column puting your unit name.

    Go to unit_stats_land and add a new row find euro_superior_line_infantry_coldstream and then copy and paste it in the row you first created. In the first column change the name of the vanilla unit by the name of you unit and then in the same table add the name of your unit in the Model Name column.

    Then go to building_units_allowed and clone the rows of the euro_superior_line_infantry_coldstream and in the second column change the vanilla unit name by the name of your unit.

    And that is it. Test.

    If you have created an official or standad bearer or drummer I will tell about it tomorrow, now I am going to sleep.
    Last edited by Bethencourt; January 30, 2013 at 02:14 PM.

  3. #3
    JustDoit8's Avatar Aquilifer
    Join Date
    Jul 2011
    Location
    Norway
    Posts
    327
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: replacing vanilla models by custom ones

    Thank you very much for such a detailed explanation, Bethencourt!
    I'll see how this works some time tomorrow.

    I'm also planning to make some changes for officers in the Elite units of America DLC. I made relatively realistic textures for 1st Delaware and Royal Welch Fusiliers ( no more sergeants with belts and epaulets ),2nd New York,1st Maryland with no shining parts making them look more like soldiers in battle and not on parade. I've also made textures of coldstream guards and generic line infantry both for GB and US, with which I'd like to replace the vanilla models and textures or create new units.

    So, I guess there are going to be quite a few questions regarding db editing

    I really appreciate your help
    !!!COMPLETE SURVEY - HELP ME OUT WITH MY TERM PAPER!!


    http://kwiksurveys.com/app/rendersur...facebook%2Ecom

  4. #4
    Bethencourt's Avatar PLVS VLTRA
    Artifex

    Join Date
    Jul 2009
    Posts
    4,668
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: replacing vanilla models by custom ones

    It is ok. Officer, drummer or standard bearer need only few more changes in db, very easy really.

  5. #5
    JustDoit8's Avatar Aquilifer
    Join Date
    Jul 2011
    Location
    Norway
    Posts
    327
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: replacing vanilla models by custom ones

    Bethencourt, I've made a retexture of 17 units for Continental and British/Loyalist/Hessian infantry and will now get them some custom officers and drummers.
    Could you tell me which entries in DB require editing?
    !!!COMPLETE SURVEY - HELP ME OUT WITH MY TERM PAPER!!


    http://kwiksurveys.com/app/rendersur...facebook%2Ecom

  6. #6
    Bethencourt's Avatar PLVS VLTRA
    Artifex

    Join Date
    Jul 2009
    Posts
    4,668
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: replacing vanilla models by custom ones

    Hi!

    To add officers, standard bearers, buglers and drummers you need to mod the next tables


    warscape_animated

    warscape_animated_lod

    unit_stats_land

    battle_personalities

    The changes in the two first are the same as the unit ones. Starting in warscape_animated you can give there the name you are going to use for you model, for example euro_officer_100, but you can give any name to it that is not already used for another model.

    So as I have said make the same changes in the two first tables as you have done for normal soldriers.

    Once you have finished with those two tables go to unit stat land and in the colum officer, standard bearer or bugler/drummer put the name of the model you have created there for the unit you want to add it to.

    Then go to battle_personalities, here you can clone the row of any officer, standard bearer, bugler or drummer, and then in the first and in the second column change the name you find there by the one of your model.


    And that is it. Test.

  7. #7
    JustDoit8's Avatar Aquilifer
    Join Date
    Jul 2011
    Location
    Norway
    Posts
    327
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: replacing vanilla models by custom ones

    Big thanks for the quick reply, Bethencourt! Will try this week
    !!!COMPLETE SURVEY - HELP ME OUT WITH MY TERM PAPER!!


    http://kwiksurveys.com/app/rendersur...facebook%2Ecom

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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