Results 1 to 5 of 5

Thread: Modding eras?

  1. #1

    Default Modding eras?

    Long time lurker posting for the first time. I've thought about "correcting" some minor details that bug me in the game, and sort of wonder if there is any mod available that has done it already, or if it simply can be triggered with a flag in a config file.

    I really miss the eras of Medieval 1. First it would be nice to be able to start with different levels of development, but that is outside the scope of any modding I'd do.

    It also kind of kills the immersion to be able to recruit Tercio Pikemen and Gendarmes in 1200, and I think it might help AI army composition to simply make certain crappy units obsolete over time.

    And looking at export_descr_unit.txt it does seem like there should be an era parameter for when the various units are available, and the faction descriptions also talk about "late period" and the like. But this doesnt seem to be used by the game at all... Only mercenaries are affected by time (for instance german knights only appear later in the game and crusader knights are unavailable after a certain date), but that doesnt seem to be controlled by the era parameter but rather by a date in the descr_mercenaries.txt file. So I looked at the gunpowder units for guidance. They require a building and an event to be produced.

    So I thought about changing descr_events.txt to include two counter type events called era_1 and era_2, and having the export_descr_buildings.txt conditions check for those counters, which however would be very tedious. Is it possible to add a NOT condition to make units obsolete? My intended solution would be to simply let the buildings produce their "top tier" units plus whatever lower tier units that havent gotten obsolete yet.

  2. #2

    Default Re: Modding eras?

    Yes, it can be done and with out too much effort. First find descr_events.txt and look for some of the inconsequential events, first_windmil is a good one.

    Change the "date" to whatever you want.

    Then open export_descr_buildings and find for example "stone_wall city" and make it look like this,


    Code:
    stone_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, } and event_counter first_windmill 1
    Notice the "and event_counter first_windmill 1" at the end. This will mean that this core building can only be constructed after that event has happned. Consequently, every building that needs that core building and every unit that needs those building also can not be constructed because that core building needs the event.

    You can make your own events, but that requires editing .bin files and mod directories and all that mess. If it is just for you, what is above is very simple. There are enough pre made events to cover five distinct eras, if you want that many.

  3. #3

    Default Re: Modding eras?

    I've finally gotten around to implementing eras in this way (used "quiet" events, you only need to mess with the bin files for messages to show up). But I cant get the units to become obsolete. It seems like the event_counter condition z is of the type "greater than x", and I cant figure out how to add a NOT condition (I wanted to make mailed knights and a host of other units obsolete).

  4. #4
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Modding eras?

    Moved to modding questions

  5. #5
    Ranting madman of the .org Senior Member Fly Shoot Champion, Helicopter Champion, Pedestrian Killer Champion, Sharpshooter Champion, NFS Underground Champion Rhyfelwyr's Avatar
    Join Date
    Oct 2006
    Location
    In a hopeless place with no future
    Posts
    8,646

    Default Re: Modding eras?

    https://forums.totalwar.org/vb/showthread.php?t=76357

    The bit with the Hobilars shows how to use a 'not' condition
    At the end of the day politics is just trash compared to the Gospel.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO