Results 1 to 4 of 4

Thread: Units of Mod A into Mod B

Hybrid View

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

    Default Units of Mod A into Mod B

    I am running Stainless Steel 6.1. I tried out Thera, A New Beginning, to see what it would be like. I found a Spartan faction that I really liked, and started my quest.

    I have copied the "export_descr_unit" file for the Spartan Hoplites over to the Stainless Steel data folder, as well as pretty much everything else in the mod I could without conflicting with Stainless Steel.

    With this file in, Stainless Steel crashes every time I attempt to boot it up without even making it to the loading screen. To test things, I have removed the little paragraph of information and it boots up fine, without the units. I edited things so that "England" would be able to create them, and the same thing happened.

    Am I missing something crucial? What do I need to do?

  2. #2

    Default Re: Units of Mod A into Mod B

    The process to port units from one mod to another is relatively straightforward once you get the hang of it, but it can be extremely cumbersome at first and it's not a very speedy process. I've spent hours and hours doing just this. However, for one unit it shouldn't be too difficult.

    The first thing you need to do is look at the export_descr_unit file of the receiving mod. At the very end of it there should be a commented number like ';499' or ';500'. This is the number of individual unit entries and it is very important because the hardcoded limit is 500 (I think 499 in some cases, not positive). If the number of entries in the export_descr_unit file is maxed out, then you have a problem because you need to swap out a unit. By itself, this is as simple as deleting the entry in EDU; the problem lies in all of the references throughout the game. You'll need to hunt down all mention of the unit if you want to play a campaign since the game will search for the missing unit and object very strongly to its disappearance (CTD). Essentially you need to delete everything but basic text references to prevent CTDs in campaigns, but those can be explained later. The important part is enabling the unit for custom battles right now.

    Once you have copied the unit's EDU entry into the receiving mod's, you will need to head over to the dreaded battle_models.modeldb file. This file was spawned by Satan but was made much easier to work with after it's been formatted properly (most mods should already have the formatted version because of said satanic properties of the unformatted version -- SS does). One of its most disturbing aspects is that it will cause an unspecified CTD upon loading the game if even one single character is out of place. And considering that every line needs to have a leading integer representing the number of characters or entries succeeding it, preventing this can be difficult so testing often and many incremental saves is key. In this dastardly work of programming all correlations between units, their models, textures, and their animations are made. And it is in this file that you will find the most work to be done when porting units.

    In order to simplify the process of copying data from Mod A's modeldb file to Mod B's, a program such as WinMerge (free, open source) will be needed. This has the added effect of reducing the chance of human error causing a CTD. Using WinMerge on the two modeldb files, run a search for your unit and compare the two sides. These threads should help you determine what needs to be inserted into Mod B. EDIT: After double checking, WinMerge can be of minimal use if the two files are too dissimilar, and may only be helpful when minor edits are needed.

    Lastly modeldb needs something to point to, so you need to copy the files indicated in the modeldb file to the right directory in Mod B (if needed, make a new directory). If the modeldb file can't find a texture/model/sprite, the game will crash upon loading the unit. Then the number at the top of the modeldb file needs to be incremented by 1 for each unit entry you have added to it. So if you only added Spartan Hoplites, change '1078' to '1079' (the number will be similar to that one).

    Factions need to be specified in both the modeldb file and EDU. Change the faction in both to the one you wish, taking care to precede the faction with the number of characters in the modeldb file, and you should finally be in business. At this point you should have a Roman peasant sitting in your unit roster in the custom battle screen, which is your new unit. Following the information in the above threads, you shouldn't have too much trouble.

    I do apologize if this covered more or less ground than necessary. And if you have any problems that this or the threads mentioned didn't cover, post away or PM me.
    Last edited by TEN10X; April 12, 2009 at 06:57 AM.

  3. #3
    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: Units of Mod A into Mod B

    Moved to Text Editing. If you have not posting a tool or a tutorial please do not post in the tutorial section.
    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

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Units of Mod A into Mod B

    The 'easy' way:

    1 change the existing unit's model, texture and sprite entries in battle_models.modeldb to what you want.

    2 change edu to match the new unit's desired stats/performance.

    3 edit the export_units.txt to change the name and description.

    4 rename unit cards and description pictures to match old unit and stick in correct folders.

    dead easy... but omg so boring.

Posting Permissions

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