Results 1 to 13 of 13

Thread: Modding Units Question

Hybrid View

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

    Default Modding Units Question

    Hi, I'am new here. I have been wondering how to do this for a long time.
    I'am playing as Macedon in the campaign game and thougt that it would be nice if I could train war elephants at my stables (or whatever building they come from) but obviously macedon does not have this ability. I know that I will have to edit a game file to do this, so were do i start? All i want to do is make the war elephant units from carthage or the selucids available to be trained by macedon in the campaign game. someone must know how to do this.
    I tried doing this myself by going into the export_descr_unit file and export_descr_building file.
    I managed to change unit ownership but it doesent effect the campaign game, just the custom battle. So I edited the building files to make elephants available to macedon but then RTW wont start! Help please!

  2. #2

    Default Re: Modding Units Question

    1) go into descr_model_battle.txt
    2) Find elephant entry (need both elephant and elephant riders)
    3) copy texture line, past underneath
    4) Change faction name to macedon
    5) do same with sprites
    6) add edu ownership
    7) open export_descr_buildings.txt and find entry for stables (probably high end). Find the elephant entry for the carthaginians, and add macedon into the brackets

    I think thats it



  3. #3

    Default Re: Modding Units Question

    Thanks, but I dont understand steps 3 and 5.

    What is a sprite?

  4. #4

    Default Re: Modding Units Question

    Quote Originally Posted by What you will see in the dmb file
    type carthaginian_elephant_crew
    skeleton fs_forest_elephant_rider
    indiv_range 40
    texture carthage, data/models_unit/textures/unit_mm_elephant_archer_carthage.tga
    model_flexi data/models_unit/unit_carthage_archer_high.cas, 15
    model_flexi data/models_unit/unit_carthage_archer_med.cas, 30
    model_flexi data/models_unit/unit_carthage_archer_low.cas, 40
    model_flexi data/models_unit/unit_carthage_archer_lowest.cas, max
    model_sprite carthage, 60.0, data/sprites/carthage_carthaginian_elephant_crew_sprite.spr
    model_tri 400, 0.5f, 0.5f, 0.5f
    Quote Originally Posted by What it should look like after
    type carthaginian_elephant_crew
    skeleton fs_forest_elephant_rider
    indiv_range 40
    texture carthage, data/models_unit/textures/unit_mm_elephant_archer_carthage.tga
    texture macedon, data/models_unit/textures/unit_mm_elephant_archer_carthage.tga
    model_flexi data/models_unit/unit_carthage_archer_high.cas, 15
    model_flexi data/models_unit/unit_carthage_archer_med.cas, 30
    model_flexi data/models_unit/unit_carthage_archer_low.cas, 40
    model_flexi data/models_unit/unit_carthage_archer_lowest.cas, max
    model_sprite carthage, 60.0, data/sprites/carthage_carthaginian_elephant_crew_sprite.spr
    model_sprite macedon, 60.0, data/sprites/carthage_carthaginian_elephant_crew_sprite.spr
    model_tri 400, 0.5f, 0.5f, 0.5f
    Ok, your dmb file should look something like what is posted first, and you should change it to what it looks like in the second quote there. That is steps 3, 4 and 5

    Note: You will have to do the same with the entry for the elephant itself as well
    Last edited by Publius; August 15, 2006 at 01:51 PM.



  5. #5

    Default Re: Modding Units Question

    thanks again

    Hmmmm.... still won't work. Whenever I edit export_descr_buildings.txt in any way RTW starts but exits back to windows before the main menu even loads. The problem is with the buildings file. any ideas?

    Merged double post. - Trajan
    Last edited by Trajan; August 15, 2006 at 06:54 PM. Reason: Merged non-duplicate double post.

  6. #6

    Default Re: Modding Units Question

    What does the merged double post mean?

  7. #7

    Default Re: Modding Units Question

    It means that you posted twice in succession (like you did again here) and that a moderator combined your posts as they came one after the other. Its nothing huge, but for the future just try to use the edit button instead of posting twice in a row :happy0144

    As for your problem, either use the show_err function or post the part of the code you think is bad



  8. #8

    Default Re: Modding Units Question

    I think the problem occurs when I edit export_descr_buildings.txt


    circus_maximus requires factions { carthage, parthia, macedon, seleucid, roman, }
    {
    capability
    {

    recruit "carthaginian elephant african cataphract" 0 requires factions { carthage, macedon } and resource elephants

    All I do is add macedon to the factions bracket but when I start up the game it just exits to windows. When I remove macedon from the bracket the game runs fine. I don't know what I'am doing wrong. :sign0163:

  9. #9
    Halie Satanus's Avatar Emperor of ice cream
    Join Date
    Nov 2005
    Location
    London
    Posts
    19,971
    Blog Entries
    1

    Default Re: Modding Units Question

    I'll take a guess here, there is no elephants resource in macedon, so you'll get a ctd, try removing the, and resource elephants , part, if you've done everything else right it should work fine.

    Also,

    Welcome to the forums, in my sig theres a link to the TWC faq, have a look through it, especially the rules, and enjoy your time on the forums.

    Good luck. :wink:
    Last edited by Halie Satanus; August 16, 2006 at 09:30 PM.

  10. #10

    Default Re: Modding Units Question

    Also make sure that the elephants you gave to the macedonians are indeed the cataphract elephants. There are I think four (five if you count the cheat Yutseb) types of elephants, so it may be possible to have your elephant types mixed up perhaps



  11. #11
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Modding Units Question

    recruit "carthaginian elephant african cataphract" 0 requires factions { carthage, macedon } and resource elephants
    Don't forget you need a comma after macedon ie.
    { carthage, macedon, } and resource elephants

    Think not having the elephant resource in macedon regions wouldn't make game crash, just stop macedons building unit, unless they invade carthage regions etc that have elephant resource.
    Removing, 'and resource elephants', would make them recruitable anywhere, if you want to keep restriction, I think you need to add elephants resource in descr_strat (as its a visible not hidden resource)
    ie.
    resource elephants, xxx, yyy
    you'll need to find the xxx and yyy co-ordinates for an accessible point in the relevant regions when you get game working again. And / or (if I'm wrong on that) add it to resource line for region in descr_regions.txt

  12. #12

    Default Re: Modding Units Question

    Thanks everyone! I got it working. Just had to add the coma after macedon and take out the elephant resource line. But why do the elepant unit cards show up as peasents?

  13. #13

    Default Re: Modding Units Question

    Quote Originally Posted by Fingy
    Thanks everyone! I got it working. Just had to add the coma after macedon and take out the elephant resource line. But why do the elepant unit cards show up as peasents?
    This tutorial will explain everything you need to know about making units and simpiler tasks such as just adding them to another faction http://forums.totalwar.org/vb/showthread.php?t=51750

    To get the right unit cards you'll need the pack extractor http://www.twcenter.net/downloads/db/?mod=43

    This next bit is from Alcords UI readme

    1. Download xpac
    2. Make a new folder, rename it to 'UI' and place it in your DATA folder. You must use xpac to extract all of the files from 'ui_1.pak' under data/packs (you can modify the .bat file to unpack only the ui_1.pak) and copy all of the files there.
    3. Rename the new empty txt file to 'ui_1.pak' and place it in the packs file with the other pak files. This will trick the game to look in another location for the file.


    All you have to do now is go into your new UI folder and look in unit_info under carthaginian find the elephants your looking for CARTHAGINIAN_ELEPHANT_AFRICAN_CATAPHRACT_INFO copy this file and place it into your macedon folder. Do the same for the UI units folder and you'll now have the proper unit and unit info cards to look at. It's a little complicated the first time.

Posting Permissions

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