Results 1 to 9 of 9

Thread: State of ETW campaign map modding please?

  1. #1
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default State of ETW campaign map modding please?

    Hi,

    I'm currently hacking through all Empire internals, rather successfully (for example territorial expansion penalty turned out to be fully modable in spite of repeated claims that it's impossible; as did some other things).

    But I never modded any maps.

    Could someone brief me about situation of ETW map modding. What is possible, what isn't, and what happens when you try?

    • Changing boundaries
    • Adding new slots
    • Adding new regions
    • Making non-passable regions passable (like between Guyanas and Colombia)
    • Making unavailable regions available (like China, Africa etc.)
    • Creating and destroying ocean bridges
    • Fortifications and turns-to-surrender - can they be modded reliably?

    I know building levels, population counts, religion, ownership etc. etc. are moddable.

    And of all things that look like maps, which actually work, and which don't?
    regions.esf is an obvious candidate, but I start from zero idea, and perhaps it's already
    known to not work for some reason.

    What works, what crashes the game, what sort of works but has severe bugs etc.?

  2. #2
    Port's Avatar Civis
    Join Date
    Sep 2009
    Location
    Russia
    Posts
    194

    Default Re: State of ETW campaign map modding please?

    So, you should talk over with this person
    http://www.twcenter.net/forums/member.php?u=54956
    He very well knows a map

    I will tell that format files esf., new regions are very difficult for adding, and it is necessary to know coordinates.

    Finish the editor esf, much will be clear.
    Last edited by Port; September 28, 2010 at 04:20 AM.

  3. #3
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: State of ETW campaign map modding please?

    Quote Originally Posted by Port View Post
    So, you should talk over with this person
    http://www.twcenter.net/forums/member.php?u=54956
    He very well knows a map

    I will tell that format files esf., new regions are very difficult for adding, and it is necessary to know coordinates.

    Finish the editor esf, much will be clear.
    Coordinates in regions.esf seem to be trivial, it's standard big list of floats in one place,
    and indexes to this list everywhere else. That's the single most common format in computer graphics.

    As far as I can tell nothing stops anyone from adding more coordinates at the end of the list.
    I mean, other than ESF format being obscure and undocumented ;-)

    I'd still like to learn that, as I need to understand how to handle all weird data inside ESF and present it in nice XML.

    Right now we can see data like this:
    <element name='regions'>
    <str>french_guyana</str>
    <ascii>land</ascii>
    <vec2 y='16.2205047607422' x='-382.677551269531' />
    <vec2 y='40.0' x='-362.174774169922' />
    <array flags='0' name='areas'>
    <element name='areas'>
    <false />
    <false />
    <true />
    <vec2 y='16.2205047607422' x='-382.677551269531' />
    <vec2 y='40.0' x='-362.174774169922' />
    <u2>0</u2>
    <record flags='0' name='faces'>
    <i4_ary size='162'>19543 39939 50148 19543 50148 45977 19543 45977 48466 24927 19543 48466 48466 53943 24927 24927 53943 59302 59302 53943 16846 16846 21769 59302 59302 30325 24927 35277 19543 24927 58895 21769 16846 50512 58895 16846 30325 59302 4454 21769 27255 4454 4454 59302 21769 4454 27255 39592 27255 37892 39592 8217 4454 38695 4454 39592 38695 4454 35699 30325 7163 37892 27255 13896 11481 31788 11481 48466 31788 48466 45977 31788 48466 11481 16846 16846 53943 48466 11481 13896 57120 39987 11481 57120 43063 39987 57120 43063 11138 39987 45679 16846 11481 11481 39987 45679 28697 11138 31346 45679 39987 11138 28697 45679 11138 28697 28538 45679 28538 42323 45679 42323 43610 45679 45679 50512 16846 45679 43610 42218 42218 50512 45679 39915 35277 24927 39915 24927 24916 24927 30325 24916 24916 30325 35699 21769 58895 45250 21769 45250 45125 8798 21769 45125 8798 27255 21769 8798 10725 27255 10725 7163 27255 17870 35699 4454 17870 4454 56238 4454 8217 56238</i4_ary>
    </record>
    <array flags='0' name='outlines'>
    <element name='outlines'>
    <true />
    <vec2 y='16.2205047607422' x='-382.677551269531' />
    <vec2 y='40.0' x='-362.174774169922' />
    <i4_ary size='32'>56238 8217 38695 39592 37892 7163 10725 8798 45125 45250 58895 50512 42218 43610 42323 28538 28697 31346 11138 43063 57120 13896 31788 45977 50148 39939 19543 35277 39915 24916 35699 17870</i4_ary>
    <array flags='0' name='connectivity'>
    <connectivity c='16' a='9764864' b='0' />
    <connectivity c='24' a='10354688' b='17' />
    <connectivity c='31' a='9633792' b='25' />
    </array>
    </element>
    </array>
    <u2>65535</u2>
    <u2>34</u2>
    </element>
    </array>
    <i4>-1</i4>
    </element>
    And we know what are these indexes in outlines and faces lists.
    And that connectivity are some bitmaps (I should probably format them as hex) - I'm not quite sure what they describe but they're almost definitely not uint32s as schema pretends.
    And we know how xy coordinates correspond to game map.

    Is there anything stopping us from expanding french guyana way inside the jungle at this point? Or are these table not really related to it?

  4. #4
    Port's Avatar Civis
    Join Date
    Sep 2009
    Location
    Russia
    Posts
    194

    Default Re: State of ETW campaign map modding please?

    I will try to tell as I think personally.

    It is possible to try, but it will be very heavy. At first it is necessary to compare files The Warpath Campaign to original files. There have opened some regions for America.

    In regions.esf there are regions, there there is a tab
    regions.esf\Root\Region_Data\Regions\Indochina | Regions\Areas\Areas\Outlines\Outlines (for example). Coordinates, and they for all are specified
    poi.esf\CAI_POI_ROOT Still is.

    In patch2.pack it is a lot of as for regions.

    I think it it will be very difficult! At first try to make for main\startpos.esf\CAMPAIGN_STARTPOS\CAMPAIGN_ENV\CAMPAIGN_MODEL\CAI_INTERFACE that they were defined by the signature where that. There the number for fractions.

  5. #5
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: State of ETW campaign map modding please?

    CAI_POI_ROOT is not hardcoded on size. First number is entries count, each entry is about 24 lines of XML ;-)
    Adding new ones there is not a big deal.

  6. #6
    Port's Avatar Civis
    Join Date
    Sep 2009
    Location
    Russia
    Posts
    194

    Default Re: State of ETW campaign map modding please?

    You can finish the tool for definition and explain us as them to transform?

  7. #7
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: State of ETW campaign map modding please?

    Just in case you missed this thread, where already was done a lot of reserach regaridng campaign map:

    http://www.twcenter.net/forums/showthread.php?t=355187

  8. #8
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: State of ETW campaign map modding please?

    Quote Originally Posted by Primergy View Post
    Just in case you missed this thread, where already was done a lot of reserach regaridng campaign map:

    http://www.twcenter.net/forums/showthread.php?t=355187
    So very little is known.

    I'll start with a few random notes:

    • regions.esf contains black_shroud_outlines - obvious thing to try
    • regions.esf has most vertexes as indexes to one big vec2 table
    • all regions in regions.esf contain bounding box in addition to outline, don't forget to update it
    • db/regions_tables says all impassable regions are on continent "cont_impassable"
    • cont_* are smaller than theaters and not really related - obvious thing to try would be making one of regions like arabia, amazonas some other cont_X and seeing what happens
    • startpos.esf seems to use SETTLEMENT_INDICES for many things not settlement names
    • campaign_maps/global_map/X_map.tga and X_lookup.tga are probably just for theater radar, rgb colors are probably db/regions_tables's last three columns
    • lua adds extra exclusion zones with: game_interface:add_exclusion_zone( v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8] ). Is this how normal regions are excluded too? Oh, and also game_interface:set_map_bounds, game_interface:show_shroud, game_interface:unveil_black_shroud, game_interface:remove_barrier etc. - or is it only episodic shrouds not main one?
    • Nothing obvious in decompiled *.luac.

  9. #9

    Default Re: State of ETW campaign map modding please?

    Quote Originally Posted by taw View Post
    Could someone brief me about situation of ETW map modding. What is possible, what isn't, and what happens when you try?

    • Changing boundaries
    • Adding new slots
    • Adding new regions
    • Making non-passable regions passable (like between Guyanas and Colombia)
    • Making unavailable regions available (like China, Africa etc.)
    • Creating and destroying ocean bridges
    • Fortifications and turns-to-surrender - can they be modded reliably?


    Having studied the map and made a thread about my findings here is what I know:

    1) It is possible to change boundaries (CA did this in Warpath) but I don't know how. It probably involves the regions.esf.

    2) New slots are possible (CA also did this in Warpath) but because we can't edit the coordinates telling ETW the location of these slots they don't work properly.

    3) New regions are possible (CA yet again did this in Warpath) but I don't know how as I can't change boundaries. It again probably involves the regions.esf.

    4) Non-passable regions could be made passable if we knew how to make regions.

    5) Hidden regions would be playable if we could remove the black barrier covering them and make them into regions.

    6) Ocean bridges should be modable but I don't know how to add / remove them. Most likely the regions.esf or startpos.esf.

    7) Unsure about fortifications (you need a building editor) and turns to surrender (may be hardcoded).

    Quote Originally Posted by taw View Post
    So very little is known.

    I'll start with a few random notes:

    • campaign_maps/global_map/X_map.tga and X_lookup.tga are probably just for theater radar, rgb colors are probably db/regions_tables's last three columns
    • lua adds extra exclusion zones with: game_interface:add_exclusion_zone( v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8] ). Is this how normal regions are excluded too? Oh, and also game_interface:set_map_bounds, game_interface:show_shroud, game_interface:unveil_black_shroud, game_interface:remove_barrier etc. - or is it only episodic shrouds not main one?
    If you add another region you'll probably need to update the map.tga.

    Which lua are you looking at?
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

Posting Permissions

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