Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: Unnamed Captains and CTD on exit

  1. #1
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Unnamed Captains and CTD on exit

    Hello all,
    I have been attempting to implement a new faction into my mod recently using Gigantus's tutorial, and was running into the issue of a blank captain name (have not tried with generals as the faction has not been implemented in the campaign yet) as well as an inconsistent CTD on exiting M2TW, only when this new faction has participated in a battle on the battle map.
    Spoiler Alert, click show to read: 
    The blank name do not happen 100% of the time, and the CTD can occur regardless of whether or not the unnamed character participated in the battle. The CTD is also coupled with a certain sound effect, that sounds like a clattering with two notes.

    The last lines in the log file are these:
    Code:
    17:42:15.304 [system.io] [warning] open: data/menu/_M2_MP_HISTORICAL_BATTLE_CHOOSE_TEAMS.TGA is missing
    17:42:15.309 [system.io] [warning] open: data/menu/TEXTURES/_M2_MAIN_MENU.TGA is missing
    17:42:15.887 [system.io] [warning] open: data/menu/buttons_composite2.tga.dds is missing
    17:42:15.888 [system.io] [warning] open: data/menu/slider_composite.tga.dds is missing
    17:42:15.889 [system.io] [warning] open: data/menu/slider_composite2.tga.dds is missing
    17:42:15.889 [system.io] [warning] open: data/menu/border_4pix_black_gold2.tga.dds is missing
    17:42:15.889 [system.io] [warning] open: data/menu/text_border.tga.dds is missing
    17:42:15.890 [system.io] [warning] open: data/menu/yellow_highlight.tga.dds is missing
    17:42:15.890 [system.io] [warning] open: data/menu/border_4pix_black_gold_selected.tga.dds is missing
    17:42:15.890 [system.io] [warning] open: data/menu/border_4pix_black_gold_black.tga.dds is missing
    17:42:15.891 [system.io] [warning] open: data/menu/_M2_Selection_Glow.tga.dds is missing
    17:42:15.891 [system.io] [warning] open: data/menu/unit_card.tga.dds is missing
    17:42:15.892 [system.io] [warning] open: data/menu/icons.tga.dds is missing
    17:42:18.593 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    Wonder if anyone has encounter such issues before?
    Last edited by Medusa0; June 24, 2018 at 07:48 PM.

  2. #2

    Default Re: Unnamed Captains and CTD on exit

    Might seem obvious, but do you have a list of names for your new faction in descr_names? And in text/names? The problem doesn't ring a bell but you test this in custom battles if I follow? You should implement your faction in campaign and see what happen, it will be easier to track down in campaign if you missed something during the faction creation.

  3. #3
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    I do have the new names included in names.txt and descr_names.txt, hopefully it's not an issue with non-printing (invisible) text characters. Will try to implement the new faction in campaign just to see how it goes.

    Edit: Implementing the new faction in campaign causes a generic crash on campaign startup, however, replacing all the names assigned to this faction with one of the existing ones seem to have fixed the crash, so the issue is name related.

    Edit 2: Okay, I have used internal names to reference character names for this faction, and the campaign started correctly. However, the next crash occurred when I moused over a non-faction leader family member. Below is the last two lines in the log:
    Code:
    00:09:17.063 [game.script.trigger] [trace] Trigger <0016_UI_Panel_Overview_Faction_Trigger> fired
    00:09:20.211 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    The same CTD on exit is still occurring, though I have not seen any unnamed captains in custom battles for a while now.
    Last edited by Medusa0; June 25, 2018 at 02:56 AM.

  4. #4

    Default Re: Unnamed Captains and CTD on exit

    Can you attach the full log? I am not very optimist about the answer being in it, the 'unspecified errors' often being dirty in the way that they don't leave log clues but you never know. The crash on mouse over might be related with some strat models not correctly referenced in descr_model_strat or descr_culture maybe, or pointing to some tga/cas files that don't exist? Though in the cas file case, you should have a crash on startup if it didn't exist, if memory serve.

    How did you follow Gigantus tutorial, did you use his examples files for graphics, or did you add your own? Are you sure they are all named and placed as you referenced them in the text files?

  5. #5
    Gigantus's Avatar The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it
    Patrician Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    47,251
    Blog Entries
    24

    Default Re: Unnamed Captains and CTD on exit

    Follow the tutorial painstakingly, step by step. Use only Notepad++ to edit text files.

    Making a mistake at any one step can cause a crash, that's why this is about the most involving, file wise, modding you can do. And there is no way to test it until you have done all the steps.



  6. #6
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Apparently I was not meticulous enough, the campaign mouse-over CTD has been fixed, looks like I missed a line in expanded.txt.strings.bin, the EMT_FACTION_NAME_FACTION_HEIR_TITLE line which should display when one mouse-over the faction heir portrait in the family tree view.

    So far, the unnamed captain and CTD on exit are only an occasional occurance. I will check the names text file with Notepad++ for rogue invisible characters. I have some suspicion that it may be caused by the presence of references that point to internal names and the displayed names, especially names involving hyphens "-" and underscores "_". Will post when I find something.

    Many thanks to the both of you.
    Last edited by Medusa0; June 28, 2018 at 10:56 AM. Reason: Updated files on post #18

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

    Default Re: Unnamed Captains and CTD on exit

    "of Morocco" surname. Spaces aren't allowed, right? A few others too.

  8. #8
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by Withwnar View Post
    "of Morocco" surname. Spaces aren't allowed, right? A few others too.
    In descr_names.txt? Seems vanilla M2TW uses them without issues (as bynames). Perhaps some of the name combinations are too long? Don't know if there is a minimum number of names for factions, but I am probably just going to start with a single name, test them separately to find the one or the combination that yield the errors.

  9. #9

    Default Re: Unnamed Captains and CTD on exit

    It's also that way in vanilla, 'of London' being in descr_names as a internal name, then being referenced in names.txt as: {of_London}of London. It's the same for every surname with 'of'.

    So even if it seem strange, it also appear to work? I don't think it's Medusa bug somehow. I will be trying the list a little later, but do these crashs on exit and nameless captain also happen in campaign or only in custom battles?

    edit, didn't see your new answer. Did you try launching your mod in geomod tool? Just launching, you don't need to save or change anything, and geomod detect some errors with names at launch I think?
    Last edited by selv; June 26, 2018 at 11:20 AM.

  10. #10
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by selv View Post
    So even if it seem strange, it also appear to work? I don't think it's Medusa bug somehow. I will be trying the list a little later, but do these crashs on exit and nameless captain also happen in campaign or only in custom battles?

    edit, didn't see your new answer. Did you try launching your mod in geomod tool? Just launching, you don't need to save or change anything, and geomod detect some errors with names at launch I think?
    I have not done exhaustive testing in campaigns yet, but that does give me an idea to assign full army stacks for the faction, and then splitting them up in campaign mode to generate random captains.
    Will look into the geomod tool, is this the one? http://www.twcenter.net/forums/showt...ol-for-Mapping

  11. #11

    Default Re: Unnamed Captains and CTD on exit

    Yes, this is, though it can be quite peculiar if you never used it. Beside, I just tried to substitute your list of ghana names to the vanilla moors in bare_geomod, and I experienced no problem. No nameless captain, in campaign or in custom battle, no crashes on exit. Tested three times on different campaigns and battles, exiting and reloading the game to be sure. It escape me what is causing your current troubles, but I am starting to doubt it is the names themself?

  12. #12

    Default Re: Unnamed Captains and CTD on exit

    After further testing, the only way I can reproduce nameless captains, or other characters, is if they are in the descr_strat but their name not listed in the descr_names.
    For instance:
    Code:
    character	Khayri, general, male, age 20, x 63, y 65 
    army
    unit		Desert Cavalry				exp 0 armour 0 weapon_lvl 0
    unit		Desert Cavalry				exp 0 armour 0 weapon_lvl 0
    unit		Desert Archers				exp 0 armour 0 weapon_lvl 0
    unit		Desert Archers				exp 0 armour 0 weapon_lvl 0
    This moorish captain will show up in game, but if he doesn't have it's name in the moor name list, he will appear nameless. If I then divide his army in game, the new created captain will have a name. Interestingly, this error isn't reported by the log, and it also apply to agents like diplomat and priest.
    However I am not sure if it's part of your problem, as I still can't reproduce the nameless captains and crashes following a custom battle.

  13. #13
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by selv View Post
    This moorish captain will show up in game, but if he doesn't have it's name in the moor name list, he will appear nameless. If I then divide his army in game, the new created captain will have a name.
    Fascinating, the unnamed captain does not prevent the campaign from starting. Sounds like I need to run more tests, but due to the elusive nature of this problem, I will start with a much smaller name list to try it.

    The crash does not occur immediately after the custom battle, but rather when exiting the game following the completion of said battle. The error occurs right before the game tests for certain triggers, I will upload both the normal log and the crash log when I get the chance to do so.

    Edit: Well, I found three missing names in names.txt, referenced in descr_names.txt, so I added them in, and two names with defined internal names but not displayed names - this should fix the unnamed captains (there were simply no strings to display for the given internal name! May or may not be useful for some mods).

    That was not the end of the story however as the CTD on exit showed up again. The captain was definitely named properly in this case. I have attached two logs, one for normal, no crash, the other for the crash on exit. Neither of them seem very informative. Will keep on testing.
    Attached Files Attached Files
    Last edited by Medusa0; June 27, 2018 at 12:09 AM.

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

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by Medusa0 View Post
    In descr_names.txt? Seems vanilla M2TW uses them without issues (as bynames).
    Quote Originally Posted by selv View Post
    It's also that way in vanilla, 'of London' being in descr_names as a internal name, then being referenced in names.txt as: {of_London}of London. It's the same for every surname with 'of'.

    So even if it seem strange, it also appear to work?
    Huh, so they do. Must be some kind of hardcoded shenanigans going on when "of " is used.

  15. #15

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by Medusa0 View Post
    That was not the end of the story however as the CTD on exit showed up again. The captain was definitely named properly in this case. I have attached two logs, one for normal, no crash, the other for the crash on exit. Neither of them seem very informative. Will keep on testing.
    Don't know if it's related but you have these errors:
    Code:
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, village -> motte_and_bailey, core_building[0](wooden_pallisade) -> core_castle_building[1](wooden_castle)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, town -> wooden_castle, core_building[0](wooden_pallisade) -> core_castle_building[1](wooden_castle)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, town -> wooden_castle, hinterland_roads[0](roads) -> hinterland_castle_roads[0](c_roads)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, large_town -> castle, core_building[0](wooden_pallisade) -> core_castle_building[1](wooden_castle)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, large_town -> castle, core_building[1](wooden_wall) -> core_castle_building[2](castle)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, large_town -> castle, port[0](port) -> castle_port[0](c_port)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, large_town -> castle, hinterland_roads[0](roads) -> hinterland_castle_roads[0](c_roads)
    21:43:47.858 [data.invalid] [error] Target building level not allowed: The Aztecs, large_town -> castle, hinterland_mines[0](mines) -> hinterland_castle_mines[0](c_mines)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, village -> motte_and_bailey, core_building[0](wooden_pallisade) -> core_castle_building[1](wooden_castle)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, town -> wooden_castle, core_building[0](wooden_pallisade) -> core_castle_building[1](wooden_castle)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, town -> wooden_castle, hinterland_roads[0](roads) -> hinterland_castle_roads[0](c_roads)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, large_town -> castle, core_building[0](wooden_pallisade) -> core_castle_building[1](wooden_castle)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, large_town -> castle, core_building[1](wooden_wall) -> core_castle_building[2](castle)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, large_town -> castle, port[0](port) -> castle_port[0](c_port)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, large_town -> castle, hinterland_roads[0](roads) -> hinterland_castle_roads[0](c_roads)
    21:43:47.862 [data.invalid] [error] Target building level not allowed: The Chichimec Tribes, large_town -> castle, hinterland_mines[0](mines) -> hinterland_castle_mines[0](c_mines)
    I think building level not allowed in the current settlement level can cause crashes, though here it appear to concern conversion options rather than buildings being pre build in your descr_strat. If you took out some or all castle buildings in EDB, you also need to take out the conversion options.

    edit, you shoudn't remove the core castle walls and the castle port from EDB, even if they aren't in use. Some hardcoded crash will follow.
    Last edited by selv; June 27, 2018 at 10:25 AM.

  16. #16
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by selv View Post
    I think building level not allowed in the current settlement level can cause crashes, though here it appear to concern conversion options rather than buildings being pre build in your descr_strat. If you took out some or all castle buildings in EDB, you also need to take out the conversion options.
    That's an old one, I can fix it by enabling a part of the castle core building chain for the Mesoamerican culture via EDB and descr_cultures.txt (up to castle, leaving out fortress and citadel), as well as adding ownership for the castle counterpart of roads, ports, and mines.

    Might have to whip up a basic unit building chain for those two factions as I do not know if the campaign ai is smart enough to convert captured castles back to cities.

  17. #17

    Default Re: Unnamed Captains and CTD on exit

    You have some names in descr_names.txt, but not names.txt, at least Daoula and Saraba that I found.

  18. #18
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by WhiffOfGrapeshot View Post
    You have some names in descr_names.txt, but not names.txt, at least Daoula and Saraba that I found.
    It was more than that, I have attached the new files. In hindsight, modding past the wee hours probably wasn't such a good idea.
    Attached Files Attached Files

  19. #19

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by Medusa0 View Post
    It was more than that, I have attached the new files. In hindsight, modding past the wee hours probably wasn't such a good idea.
    Still running into the problem? That would definitely cause the issues with blank names and CTDs, but that doesn't mean it's the only error.

  20. #20
    Medusa0's Avatar Artifex
    Join Date
    Apr 2009
    Location
    Nowhere
    Posts
    378

    Default Re: Unnamed Captains and CTD on exit

    Quote Originally Posted by WhiffOfGrapeshot View Post
    Still running into the problem? That would definitely cause the issues with blank names and CTDs, but that doesn't mean it's the only error.
    Okay, just finished testing ALL the names for this faction, minesweeper style, while the result was unfortunately inconclusive (the CTD on exit is rare, only occurring at approximately 1.8% of all the tests that I did, and all names in descr_names.txt have been accounted for in names.txt), I did however made some interesting discoveries:

    In custom battles, captains can be named with just their surnames if there are no names in the "character" section, the captain title will remain on the battle result screen. In this example: Captain of the Sahara, Captain de Parenzo, etc (The criteria are however not clear, as "of Cherokee" or "Maa ya ha" from the Americas campaign are not valid for this purpose). This exclude surnames with hyphen, apostrophe, and some but not all special character, whether or not there are other hard restrictions may require more testing. Single words without special characters always work. When invalid surnames are used, the captain title in the battle result screen will also be absent. Names under the women section will not be used for captain names in custom battle at all.

    The only thing that is consistent about this CTD on exit is that it occurs when the game is checking for script trigger as [game.script.trigger] on game exit, which seem strange as I did not make any sort of script/traits/ancillaries changes when implementing this new faction. Of course, this could be a red herring and it may be the other new faction (Apachean renamed Chichimec, since their names entries are not considered valid for surnames as shown in the above test) that I have added before this that is causing it.

    If nothing came of the investigation, might have to consider this a Heisenbug and just leave it alone for now.
    Last edited by Medusa0; June 29, 2018 at 01:59 AM.

Page 1 of 2 12 LastLast

Posting Permissions

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