Results 1 to 16 of 16

Thread: Max faction images = CTD

  1. #1

    Default Max faction images = CTD

    Hi everyone, as explained in a thread of yore, going over 28 factions in descr_sm_factions.txt causes CTD's when selecting the Custom Battle setup. The way around this, because weirdly custom battle location pics and the faction amount are linked, is to only use 1 image for all new custom locations.
    The problem is, however, that it doesn't stop there.
    When I go to the Campaign Selection screen, I can select only a certain amount of available factions before the game CTDs. It's not one faction that causes this: it's the subsequent selection of a certain number. It must be related to this same CTD as discussed before.
    Does anyone have an inkling as to what kind of images I should delete/deactivate? I've already tried removing the Faction Units (their unique unit which usually has a cool accompanying pic in the selection menu) but this doesn't really do anything.
    Maybe I should delete the faction maps in the grand_campaign folder.
    Any ideas?

    EDIT: I solved it! I removed the individual maps from the campaign folder and put one overarching map called map_FE.tga instead, and it's solved <3
    Last edited by UrienRheged; April 09, 2021 at 02:21 PM. Reason: solution

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Max faction images = CTD

    The bug is as old as the game. The more you click the faster it CTDs.

    Several mods actually use a menu with a fixed picture (the map_fe.tga placeholder) because of that, like my Rise of three Kingdoms mod:











  3. #3

    Default Re: Max faction images = CTD

    That's amazing, and a great way of getting around the bug.

    But doesn't the amount of faction unit images cause the same CTD?
    And leader portraits, like in RTW?

    You can delete this thread, btw, Gigantus, if it's dead weight.
    Last edited by UrienRheged; April 11, 2021 at 07:50 AM.

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Max faction images = CTD

    Nope, only the faction map images cause the issue, hence why using map_fe exclusively is a work around as you discovered yourself, after all you still have the unit images as well as the leader images, don't you?










  5. #5

    Default Re: Max faction images = CTD

    Even with a single map_fe.tga in the imperial_campaign folder, the menu will still crash if you have 28-31 faction icons visible and a lot of custom battle preview images. Even if you use a single map_fe.tga image, and a single image for all the custom battle maps, and a single image for all the faction units, and etc., you will still eventually get a CTD if you furiously select and deselect factions (loading more UI) for a long enough period. This tells me there is a memory leak related to these menu elements and all we're really doing by consolidating faction-specific images into single images is buying more clicks/time until it crashes.

    That said, at a certain point, it becomes practically impossible to crash the game by this means, so if you have 28-31 visible faction icons in the menu, it will practically resolve the problem to consolidate into a single map_fe.tga and reduce the number of custom battle map preview images or other UI elements. There will still be a white flash after you select/deselect a certain number (around 5) of factions, but it won't be fatal.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Max faction images = CTD

    It does solve the issue with the faction selection screen, at least we never had any reports of it. Not sure about the custom battle screen, can't recall actually haven't heard of crashes, so maybe it's not as volatile?










  7. #7

    Default Re: Max faction images = CTD

    You can use a workaround. Delete map_fe and use the unit image for both the map and the unit. Here's an example of my menu.
    Spoiler Alert, click show to read: 

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Max faction images = CTD

    Yup, that works, too.










  9. #9

    Default Re: Max faction images = CTD

    I apologize for double posting but I can't edit posts. I tested this just now and with 15 factions, each having a very large preview image and after 200+ factions selected I got no CTD. I know this kind of CTD is much more common with mods that have more factions but I do believe the only cause of this is map_fe, or to be precise, having many map_fes. Some mods have solved this issue by removing the map_fe images and replacing unit images with maps. Another plus side of setting up your menu this way is that the unit image can have a much larger resolution than the size at which it's displayed in the game. I've found the upper limit for height of the unit image is 960 pixels. Anything above that causes all of the ui pieces to dissapear as well as the screen going black. But still no CTD. As for the width of said image, I know it works even at 1024 pixels but I haven't tested anything beyond that. All of this led me believe that the sole cause of menu CTDs are map_fe files.

  10. #10

    Default Re: Max faction images = CTD

    That's beautiful, wow!

    I ended up using a really awesome (also Middle-earth themed) interactive map_fe by 'alreadyded' with the symbols on it. No crashes or anything!

    If only I could figure out how to center the 'Faction unit' description, which is now too far to the right...


  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Max faction images = CTD

    it cold be aligned to the right - replace it with something longer to check that. I am actually not sure if aligning is actually possible....
    Otherwise it will be the co-ordinates of that particular text field, possibly a mistype when setting it up.










  12. #12

    Default Re: Max faction images = CTD

    It's not aligned to the right, because longer text just goes off screen.
    Do you happen to know where I can set these coordinates? Cause I have no clue as to what keyword I'd have to use to find them.

  13. #13

    Default Re: Max faction images = CTD

    Open menu.lnt in data\menu and first find </lpage>ImpCam_choose_faction. This is the main campaign faction selection screen. Then find the following UI piece.
    Spoiler Alert, click show to read: 
    <UI piece>faction_info
    <identifier>UIP_SELECT_FACTION_DESCRIPTION</identifier>
    <Parameters>
    <x>423</x>
    <y>236</y>
    <width>312</width>
    <height>334</height>
    <UI text>UI__DUMMY_TEXT
    <font_id>verdana_sml</font_id>
    <align>left</align>
    </UI text>
    <locked>false</locked>
    </Parameters>
    <object_data></object_data>
    <object_id>empty_art</object_id>
    </UI piece>

  14. #14

    Default Re: Max faction images = CTD

    I'm sorry. I made an error. The file is called mtw2.lnt not menu.lnt. But it is in the menu folder.

  15. #15

    Default Re: Max faction images = CTD

    Thanks! On it right now. It's gonna take a bit of fiddling I guess but this is very helpful, thanks!
    EDIT: Nice, thank you. It turned out to be the special_unit part, not the select_faction part, but it worked and it looks great.
    Very grateful!
    Last edited by UrienRheged; April 12, 2021 at 04:42 PM.

  16. #16
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Max faction images = CTD

    That file is a nightmare.....

    Tip: take a screenshot of the page you want to work on and resize it to 1024*768. Then use the same editor to find the co-ordinate you are looking for, moving the cursor over the picture usually displays co-ordinates.
    Last edited by Gigantus; April 15, 2021 at 04:49 AM.










Posting Permissions

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