Results 1 to 17 of 17

Thread: CTD when clicking Custom Battle in Menu

  1. #1

    Default CTD when clicking Custom Battle in Menu

    PROBLEM:

    After adding a number of factions and modifying some files that seem to work flawlessly with the Grand Campaign, I now CTD when I click "Custom Battle" on the main menu.

    What I know:
    - It's not a VirtualStore/UAC problem
    - Everything else in the menu works fine including Grand Campaign, Custom Campaign, Historical Battle, and Quick Battle
    - Starting/running a campaign is working
    - The battle map is working via both campaign battles and Quick Battle
    - It's not related to menu_english.txt

    What I'm not sure about:
    - I get the same exact CTD when I use Gigantus' 31-faction mtw2.lnt (instead of the mtw2.lnt I'm working with) so I don't think that's it's related to that file. I will admit that there are now more factions available to play as than there are icons to choose from, though.
    - I don't think it's related to custom_battle_availability in descr_sm_factions.txt because changing those values for the new factions didn't fix the CTD
    - I don't think it's related to expanded.txt (this one has given me problems in the past)

    SOLUTION:

    Provided by Withwnar: http://www.twcenter.net/forums/showthread.php?521738

    As you get closer to the "31 faction" cap, you might need to remove entries from custom_locations.txt OR just remove unique images tied to the entries. If I understand the solution correctly, you should actually be able to have as many entries in custom_locations.txt as you want as long as some of them use the same image (placeholder or otherwise) to keep you below your mod's "max image limit" (influenced by the number of factions, among other things).
    Last edited by Absolutex; February 09, 2016 at 11:50 PM.

  2. #2
    h.fast's Avatar Libertus
    Join Date
    Jan 2015
    Location
    Ukraine
    Posts
    60

    Default Re: CTD when clicking Custom Battle in Menu

    Hi there! We have the same problem after adding 30th faction (rebels are the 31). That's quite strange cuz we've done the same things as 29 times before. But problem (CTD after clicking "Custom Battles") appears only after thirtieth time.

  3. #3

    Default Re: CTD when clicking Custom Battle in Menu

    Interesting. My submod is up to 30 factions (rebels are #30) and I just experienced the error. Did you get the CTD right after modifying all of the necessary files for new factions? Or did you also modify other files?

  4. #4
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: CTD when clicking Custom Battle in Menu


  5. #5

    Default Re: CTD when clicking Custom Battle in Menu

    Quote Originally Posted by Withwnar View Post
    Incredible, it worked! I spent so much time googling/searching for solutions and it turned out to be so simple. All it required, in my case, was simply to remove one location from custom_locations.txt. I'm not sure that I understand the connection, but I'll take it!

  6. #6
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: CTD when clicking Custom Battle in Menu

    I think it has to do with images. If too many images are loaded by the game at this menu stage then it wigs out. Removing a custom location from the list means that the game loads one fewer images (its screenshot pic) so is less likely to wig out.

    Adding factions also introduces new images to be loaded (faction symbols etc.). So to accommodate that some images need to be removed from somewhere else (custom locations).

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: CTD when clicking Custom Battle in Menu

    So it's a matter of:
    if factions > 30 and custom battle pics > 10 = custom battle option crash?

    Weird. Never came across that - I always add a blank 'custom_locations' file to my mod at start because the vanilla co-ordinates won't be valid unless you use the vanilla map - leading to a crash if the co-ordinates are outside the map's dimensions. Having more then 10 locations after that is a bit excessive anyhow.
    Last edited by Gigantus; February 09, 2016 at 11:45 PM.










  8. #8

    Default Re: CTD when clicking Custom Battle in Menu

    Quote Originally Posted by Gigantus View Post
    So it's a matter of:
    if factions > 30 and custom battle pics > 10 = custom battle option crash?

    Weird. Never came across that - I always add a blank 'custom_locations' file to my mod at start because the vanilla co-ordinates won't be valid unless you use the vanilla map - leading to a crash if the co-ordinates are outside the map's dimensions. Having more then 10 locations after that is a bit excessive anyhow.
    I'm not 100% sure about this, but I don't think it's necessarily boiled down to a specific number of factions; rather, it just depends on how many images are being stored in M2TW's buffer in general, as Withwnar suggested. For example, if you have something like 50 custom battles, each with their own unique images, then you might be capped at 28ish factions before you get a CTD (just a guess here). Vanilla TESTW has 39 custom battlefields (and 39 unique images) and I was forced to remove 1 unique image reference to get 30 factions to work without a CTD.

    To be fair, I still have to add about 7 leader portraits and 7 unique unit images so that working "38 unique image" figure could drop a lot when everything's done, assuming those have an impact...

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: CTD when clicking Custom Battle in Menu

    I just checked EBII - 33 custom locations - each with individual pic, 30 factions (28 enabled for custom battle). No problem.

    In the log the faction stuff (logo, symbol etc) gets accessed way before the location pics, so I guess the max number of location pics is tied to the faction number.
    And that number appears to be drastically dropping with each custom faction added.
    Last edited by Gigantus; February 10, 2016 at 12:17 AM.










  10. #10
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: CTD when clicking Custom Battle in Menu

    I got the problem when trying to add two* factions to vanilla TATW. TATW has only 13 playable factions but 51 custom locations.

    * I could add one faction without problem. The second one is where things went awry.

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: CTD when clicking Custom Battle in Menu

    playable as in descr_strat or as in custom_battle_availability (descr_sm_factions)?

    The log processes the symbols of all factions at start up, regardless** if present or playable or even custom_battle_available - so I guess the total number of factions in the descr_sm_factions file is the base. If you have unused factions listed in descr_sm_factions then removing them might have helped.

    **Confirmed that by starting Bare Geomod up to custom battle screen and finding normans and saxons in the initial symbol processing. they are neither present or playable in the main campaign nor custom battle available. No additional processing before custom battle.
    Last edited by Gigantus; February 10, 2016 at 12:49 AM.










  12. #12
    h.fast's Avatar Libertus
    Join Date
    Jan 2015
    Location
    Ukraine
    Posts
    60

    Default Re: CTD when clicking Custom Battle in Menu

    Thanx guys! As mr. Absolutex wrote - it works! I mean removing of custom locations. I can't + rep yet, but I'm very thankful for help!

  13. #13
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: CTD when clicking Custom Battle in Menu

    Quote Originally Posted by Gigantus View Post
    playable as in descr_strat or as in custom_battle_availability (descr_sm_factions)?
    I was only counting campaign playable (13). Custom battle factions = 14. Total factions in descr_strat = 17. Total factions in descr_sm_factions = 27.

  14. #14
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: CTD when clicking Custom Battle in Menu

    Quote Originally Posted by Withwnar View Post
    I was only counting campaign playable (13). Custom battle factions = 14. Total factions in descr_strat = 17. Total factions in descr_sm_factions = 27.
    That plus 2 plus 51 locations will be the crash calculation I would think. Cleaning up the descr_sm_factions and\or cloning instead of creating new factions might provide a solution other then changing the location pics.










  15. #15
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: CTD when clicking Custom Battle in Menu

    Aha, yes: the first faction I added was merely one that was currently unused (poland). The second faction - crash causer - was a brand new faction (hrebels) which increased the descr_sm_factions count.

  16. #16
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: CTD when clicking Custom Battle in Menu











  17. #17

    Default Re: CTD when clicking Custom Battle in Menu

    I don't have this problem if I use a menu (mtw2.lnt) that doesn't include the HotSeat Campaign. It's strange...

Posting Permissions

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