Results 1 to 10 of 10

Thread: Name-CTD Mystery

  1. #1
    Foederatus
    Join Date
    Mar 2010
    Location
    Holland, MI
    Posts
    48

    Default Name-CTD Mystery

    This question is posed primarily to Aradan, since he has written the tutorial guide to names; however any other input from fellow forum-members would also be most welcome.

    I have been working for some time on my own RTW mod and am getting a name-related CTD for which I cannot find any cause (or cure).

    I have read “A Modder's Guide to Errors” by Khelvan and the Tutorial “Editing Character Names” by Aradan and have checked everything, yet the name-prompted CTD keeps happening at the same place within the descr_strat file (at the end of britons faction). I have also done a scan/search in the forum under “names”+”CTD” and I saw 2 other threads that seemed to have the same problem, but the final solutions were either very simple (ie. an obvious error) or not clarified.

    I read the various reasons name-related CTD’s occur in Aradan’s excellent tutorial, and I have eliminated all of them (no double names in names.txt, no mismatch between descr_names & names.txt or descr_strat & descr_names etc...).

    In addition, when I made the changes in this particular mod I took the following precautions, which SHOULD (by all rights) have prevented any such issues:

    I took the PREVIOUS WORKING version of descr_names and names.txt and,

    (1) for the changed factions, I CUT & PASTED names ALREADY EXISITING in descr_names. I specifically AVOIDED typing on my own or use of tabs/spaces etc, to eliminate the possibility of human error.
    ,
    (2) I did not create ANY new names in descr_names
    &
    (3) I did not ERASE any names from names.txt

    Oh, and yes, I have also run “Zeus_Tool_v0.91.exe” by RedFox and it comes up clean.

    Yet, I still have a problem…

    Some other thoughts I have had as to possibilities (anyone please let me know yeah or nay if these are potential causes)

    - hardcoded limit to number of names in a given faction (one faction has quite a few)
    - hardcoded limit to TOTAL number of names (in either descr_names or names.txt).
    - I read somewhere in this forum (cant find where) that no more than 2 factions can have IDENTICAL name lists, although I have eliminated that possibility by making 1 or 2 name deletions between similar factions.

    So, ANY insight would be incredibly helpful as I have exhausted any logical reasons for this.

    I have attached the descr_strat, descr_names and names.txt files FYI.


    Attachment 204772

    Attachment 204773

    Attachment 204774

    Kind Regards,
    Phalanx_Man
    Last edited by phalanx_man; February 14, 2012 at 06:55 AM. Reason: Spelling mistake.

  2. #2

    Default Re: Name-CTD Mystery

    Barrage of questions:
    How do you know this is a name-related CTD? Do you get an error report (there's an "errorless" tag, just making sure)? Are you using -show_err?

    Can you provide the working version of the file(s) you changed or a list of the changes? There's a possibility this has to do with the structure of descr_strat and not the names.

  3. #3
    Foederatus
    Join Date
    Mar 2010
    Location
    Holland, MI
    Posts
    48

    Default Re: Name-CTD Mystery

    Hello Aradan, thanks for responding.

    Yes, I am using show_err modswitch.
    The reason I think it is name related is because, according to the Modders Guide to Errors, there are only 3 errorless CTD's you get during Campaign Map Loading (quoted below) and I have not done anything with the first or third (I dont know how):

    Campaign Map Loading CTDs:
    - Landmass ratio problem causes a CTD when loading the campaign map.
    - A named character has an invalid name in descr_strat.
    - The game is loaded but the screen is centered onto a buggy region (see the campaign map scrolling CTDs).

    The prior working versions of the files are attached below.

    I Made the following changes, in furtherance of the following theme (I am giving this background so that you may understand the nature of the list of changes I will provide below):

    THEME:
    An RTR-mod that starts in 125BC, when Rome has conquered a significant amount of territory (I wanted more of a challenge fighting Rome's legions). By this time in history, Illyria, Macedon, Epirus, Bactria, Pergamon and Carthage are gone (which I had in my previous 280BC RTR-mod) and I have replaced them with Indo-Greek kingdom , Arabia, Britons and I have reintroduced the 4 roman factions again. Following is a list of the old and new cast of factions:

    Game-Facton 280BC RTR-mod 125BC RTR-mod
    --------------------------------------------
    spain = IBERIA = IBERIA
    britons = ILLYRIA = BRITONS
    gauls = GAUL = GAUL
    germans = GERMANIA = GERMANIA
    dacia = THRACE = THRACE
    scythia = SARMATIA = SARMATIA
    numidia = NUMIDIA = NUMIDIA
    carthage = CARTHAGE = ARABIA

    romans_senate = N/A = SPQR
    romans_julii = ROMANS = JULII
    romans_scipii = EPIRUS = SCIPII
    romans_brutii = INDIA = BRUTII
    greek_cities = GREEK CITIES = GREEK_CITIES
    macedon = MACEDONIA = INDO-GREEK

    thrace = PERGAMON = INDIA
    egypt = PTOLEMAICS = PTOLEMAICS
    seleucid = SELEUCIDS = SELEUCIDS
    pontus = PONTUS = PONTUS
    armenia = ARMENIA = ARMENIA
    parthia = PARTHIA = PERSIA
    slave = REBELS = REBELS


    So basically I essentially rearranged the factions macedon, carthage, britons, thrace and the roman factions (the others were essentially the same) and of course changes to territories & family trees in descr_strat. I did a text search in all files to change the "slavs" dummy faction back to "romans_senate". (I had done this before however, with another experiment I had done and never had a problem with this).

    The following is a summary of files I changed along with a short description of what was changed:

    data/descr_banners.txt slavs -> romans_senate
    data/descr_building_battle.txt slavs -> romans_senate
    data/descr_character.txt slavs -> romans_senate
    data/descr_lbc_db.txt slavs -> romans_senate
    data/descr_model_battle.txt textures, sprites etc for changed factions & units
    data/descr_model_strat.txt textures, sprites etc for changed factions & units
    data/descr_names.txt moved or copied name lists from one faction to another
    data/descr_names_lookup.txt confirmed entries even though this is no longer used
    data/descr_rebel_factions.txt some units no longer could be merc/rebel units
    data/descr_sm_factions.txt faction cultures and slavs to romans_senate
    data/export_descr_buildings.txt different factions have different recruitment & religion
    data/export_descr_buildings_enums concurrent with export_descr_buildings
    data/export_descr_sounds_prebattle slavs -> romans_senate
    data/export_descr_unit.txt changed factions have different recruitment
    data/export_descr_unit_enums.txt concurrent with export_descr_unit
    data/text/expanded_bi.txt In-Game text descriptions
    data/text/export_buildings.txt concurrent with export_descr_buildings
    data/text/export_units.txt concurrent with export_descr_unit
    data/text/names.txt concurrent with descr_names
    data/world/maps/base/descr_regions Changes to some hidden resources
    ../imperial_campaign/descr_mercenaries some units no longer could be merc units
    ../imperial_campaign/descr_strat General changed based on the different aforementioned theme


    RedFox's Zeus validator showed everything as clean, by the way.

    I did notice (during my changes) that in descr_names, there were quite a lot of names repeated within the same faction. See below prior working version of descr_names at the following line numbers.

    Line 80 = Ugutz repeated
    Line 613 = Diegis repeated
    Line 1111 = Agricola repeated
    Line 1137 = Attius repeated

    This is just a sampling, there were actually many more – I have to wonder now if there was a reason those repetitions were there to begin with.

    Also, now that you mentioned structure of descr_strat, I did make the following minor changes…

    (1) I put a carriage return between “denarii xxxx” line and the “settlement” line, for readability, but I had this in the prior working version as well, with no ill effects

    (2) I added some [TABS] bwteen the names of the “relative” lines (also for readability), but, again, that was present in the prior working versions as well with no ill effects.

    (3) I have put many comments (to facilitate future changes) at the start of each ARMY force or spy/diplomat/admiral (with a semicolon in front) stating where the army is etc…, but also, no ill effects with prior working versions.

    PS – The reason I know (or think I know) more or less WHERE the error is occurring is because of the following:

    In an effort to isolate (what I thought was) the offending name, I came up with what I thought was novel way to determine where in DS it happens:

    With modswitch show_err on, I intentionally make a change, say, halfway down the factions that I know will cause an Error-yielding game stop - since I have noticed that the game seems to read and process DS in a top-down manner. Typically I intentionally duplicate a name within a faction at the end of the character list. When I start a campaign, if it kicks back to the main menu (and I exit), it will give me the line number where the duplication occurred and I know that the DS list is “clean” down to that line. If, however, I get an errorless-CTD, then I know that the offending name is ABOVE that point. Then, using binary iteration, I correct that duplication and make another, say half way between that position and the top of DS. I continue this until I have narrowed down which name-line seems to be the issue.

    Only thing is that, I get this errorless-CTD occurring between the end of the character list and the beginning of the family tree (see excerpt here):

    ; BRITON DIPLOMAT East of CALLEVA - ready to reason with Invaders
    character Brycham, diplomat, age 26, , x 59, y 128
    traits NaturalDiplomatSkill 2, GoodDiplomat 1

    ; BRITON FLEET, BRYTHONIC CHANNEL
    character Brigomaglos, admiral, age 30, , x 59, y 127
    army
    unit naval boats exp 1 armour 0 weapon_lvl 0
    unit naval boats exp 0 armour 0 weapon_lvl 0
    unit naval boats exp 0 armour 0 weapon_lvl 0

    character_record Boudicca, female, age 42, alive, never_a_leader
    character_record Cuniovenda female, age 26, alive, never_a_leader
    character_record Ambiorix, male, age 10, alive, never_a_leader
    character_record Iseult, female, age 9, alive, never_a_leader
    character_record Boudecea female, age 24, alive, never_a_leader
    character_record Avaros, male, age 8, alive, never_a_leader
    character_record Iseulta, female, age 7, alive, never_a_leader
    character_record Beth female, age 22, alive, never_a_leader
    character_record Gorteyrn, male, age 6, alive, never_a_leader
    character_record Esselt, female, age 5, alive, never_a_leader
    character_record Barita, female, age 20, alive, never_a_leader
    character_record Maglocunus, male, age 4, alive, never_a_leader
    character_record Cunoarda, female, age 3, alive, never_a_leader

    relative Morirex, Boudicca, Glasobrin, Ivomagus, Berdic, Ceanatis, end
    relative Glasobrin, Cuniovenda Ambiorix, Iseult, end
    relative Ivomagus, Boudecea, Avaros, Iseulta, end
    relative Berdic, Beth, Gorteyrn, Esselt, end
    relative Ceanatis, Barita, Maglocunus, Cunoarda, end

    I will get an Error for duplicated character if I change Admiral Brigomaglos to be Brycham (the spy above him), implying that up to the admiral himself there is no name-induced error.

    However, if I make the age of Bouddica 12 (which will normall give a warning of “character will be deleted since she does not have a parent”), I just get an instant CTD.

    But as you can see, there is nothing between Brigimaglos and Bouddica, and both names are correct by spelling, have a match in names.txt and I have checked upper/lower case errors.

    Now, I writing this, I tried to reproduce an error from the spain faction (the prior faction) by making the age of the “queen mother” also less than 16 and I simply get an instant CTD – even though the entire spain faction is OK.

    There doesn’t seem to be any consistency in terms of ALWAYS giving an error or an errorless-CTD from a particular cause… Now I am not even sure there is a top-down reading of the DS file – at least in terms of where/when the game decides to CTD.

    Anyway, hope this clears up the logic I have tried to use to pinpoint this error.

    Regards,

    Prior working version files (descr_names, names & descr_strat) follow here…

    Attachment 204902

    Attachment 204903

    Attachment 204904

  4. #4

    Default Re: Name-CTD Mystery

    Good thinking, inrtroducing known errors in DS to isolate the problem area, that's standard practise among experienced modders. The file is actually parsed top-down.

    There are a couple of other reasons for an errorless CTD during campaign loading, for instance one has to do with buildings, building cards and the carthaginian culture. You can also get a CTD when changing descr_sm_factions and not regenerating map.rwm (usually happens when you change the order in which factions are listed, but I always regenerate to be sure).

    The current- and previous-version files are too different for a side-by-side comparison to be effective, plus with all the changes in the other files the problem could be sth totally irrelevant.

    You can try narrowing it down by making a backup of DS and outcommenting/deleting every single character in the game except faction leaders, so that only their names are present in the file (that means no armies, no families, no agents). If it doesn't load, you have 20-21 names to check. If they are ok, then the problem is not names. If it loads, the problem is either names or DS structure one faction at a time, so you add characters back one faction at a time and see where it crashes.

    Oh, and of course disable the campaign script, if there is one, that goes without saying.

  5. #5
    Foederatus
    Join Date
    Mar 2010
    Location
    Holland, MI
    Posts
    48

    Default Re: Name-CTD Mystery

    Thanks Aradan - sorry for not responding sooner - I was on the road and didnt get to a place with internet until just now.

    Regarding commenting out/deleting entries - I was thinking that as a next step. Normally I would have made the changes to this mod one step at a time but, with this mod it was basically not possible.

    Regarding campaign loading CTD's, (Buildings, Building Cards & Carthaginian culture), what are the details of these CTD's. I could check there as well, since I "moved" the carthaginian culture - although I didnt really change anything other than the starting regions.

    Regarding changing descr_sm_factions, (which I did), when you say regenerate map.rwm, do you mean delete it and force the game to make a new one, or is there something else I have to do to make this happen ?

    Regarding names that were duplicated in descr_names (same name twice in the same faction), have you noted this and/or know if there was any reason for this ?

    Finally, have you (or anyone) noticed if Zeus Validator does not catch a name error that one may still exist ? - I saw in another post you had written that spaces between 2-part names (instead of underscores) could throw off a name validator.

    Again, Many Thanks.

    Regards,
    Phalanx_Man.

  6. #6

    Default Re: Name-CTD Mystery

    Regarding campaign loading CTD's, (Buildings, Building Cards & Carthaginian culture), what are the details of these CTD's. I could check there as well, since I "moved" the carthaginian culture - although I didnt really change anything other than the starting regions.
    For starters, there are two lines in descr_ui_buildings, near the top,
    Code:
    "carthaginian eastern
    carthaginian egyptian
    If you plan to give ownership of any new buildings to the carthaginian culture as a whole, outcomment one of them. You will also need to provide the missing building cards (the game uses eastern or egyptian cards for carth buildings) for all the buildings, otherwise the game will CTD.
    And I believe some people have reported (on BI) that certain factions cannot be assigned to the carthaginian culture, which might also be true for RTW.

    Regarding changing descr_sm_factions, (which I did), when you say regenerate map.rwm, do you mean delete it and force the game to make a new one, or is there something else I have to do to make this happen ?
    Just delete it and the game will regenerate it. using a .ram generated under a previous setup can mask errors that would otherwise show an error message etc (but they now just cause a crash).

    Regarding names that were duplicated in descr_names (same name twice in the same faction), have you noted this and/or know if there was any reason for this ?
    Vanilla bugs, I guess.

    Finally, have you (or anyone) noticed if Zeus Validator does not catch a name error that one may still exist ? - I saw in another post you had written that spaces between 2-part names (instead of underscores) could throw off a name validator.
    The "Name validator" tool couldn't detect all errors, but I think Zeus can.

  7. #7
    Foederatus
    Join Date
    Mar 2010
    Location
    Holland, MI
    Posts
    48

    Default Name-CTD Mystery - Follow-up

    Hello Aradan.

    I went through descr_strat (slowly and painfully) using the method you suggested - I removed all family members (except the leader), made all the other changes to my personal mod, THEN began adding (faction by faction) all the previously-removed blocks of armies+family members. I DID end up finding a handful of names that were incorrect. They thing is, although they were blatantly incorrect spellings, Zeus validator did not catch them (I have Zeus v0.91). In fact, during some of my prior searching for this error (before the painful pedantic method above), I noted the following with Zeus:

    * It would give a clean bill of health for names listed in various factions. However, when I changed the top-down ORDER of factions, then SOME factions would now show name errors that they did not before!? Any idea (or prior experience) with that ever happening when using Zeus Validator ?

    Anyway, for me it is now academic, since I eliminated all errors and no more CTD (at least not name related).

    I do have 3 follow-up questions - I know that they are different from the original topic, so let me know if I should re-ask in another post:

    (1) I Have a cloned-character (I gave an AI faction more named-characters that their family tree could hold without knowing that the outcome would be a cloned character, then I saw the posts on it and I understand how it is caused). So apparently now whenever this character (or his clone) dies in any way, it causes a CTD. I remember reading in a post something that if you use the "kill_character" cosole command that this does not actually "kill" the character but rather only reduces it to a generic general with no traits or ancillaries. Can this character (or his clone) now be killed in-game without CTD ? I was hoping that there may be a way to salvage this campaign without restarting it again.

    (2) I have tried to use the console command "kill_character charactername" but I get an error that this "command does not exist".
    In fact, I have tested a series of the console commands listed in


    but some others (not all) give me the same error as well. Am I doing something wrong ? It even says to "type ? for help" and when I do I get the same "command not found" error ?

    (3) Finally, I have a question regarding a recruitable unit for the revolt-CTD that I have opened another post for in this same sub-forum.
    I have referenced some of your's and others work in this subject and have a question regarding this as well.

    Kind Regards for all the assistance.

    Phalanx_Man.

  8. #8

    Default Re: Name-CTD Mystery - Follow-up

    Quote Originally Posted by phalanx_man View Post
    (1) I Have a cloned-character (I gave an AI faction more named-characters that their family tree could hold without knowing that the outcome would be a cloned character, then I saw the posts on it and I understand how it is caused). So apparently now whenever this character (or his clone) dies in any way, it causes a CTD. I remember reading in a post something that if you use the "kill_character" cosole command that this does not actually "kill" the character but rather only reduces it to a generic general with no traits or ancillaries. Can this character (or his clone) now be killed in-game without CTD ? I was hoping that there may be a way to salvage this campaign without restarting it again.
    You can try killing him with a script. Of course in order to do that you need to know the character's name, so the script must be tailored to the specifics of the campaign.

    (2) I have tried to use the console command "kill_character charactername" but I get an error that this "command does not exist".
    In fact, I have tested a series of the console commands listed in


    but some others (not all) give me the same error as well. Am I doing something wrong ? It even says to "type ? for help" and when I do I get the same "command not found" error ?
    Some console commands only work through a script, and not when entering them through the console manually.
    Eg, a script can have a line like:
    Code:
    console_command kill_character CharacterName
    (3) Finally, I have a question regarding a recruitable unit for the revolt-CTD that I have opened another post for in this same sub-forum.
    I have referenced some of your's and others work in this subject and have a question regarding this as well.
    I've replied there.

  9. #9
    Foederatus
    Join Date
    Mar 2010
    Location
    Holland, MI
    Posts
    48

    Default Re: Name-CTD Mystery

    Thanks Again Aradan.

    I have never scripted before, so I will look up the tutorial and give it a try.
    I'll let you know how it works out.

    Kind Regards,
    Phalanx_Man.

  10. #10
    Foederatus
    Join Date
    Mar 2010
    Location
    Holland, MI
    Posts
    48

    Default Re: Name-CTD Mystery - Conclusion

    Well, there is no way to salvage the campaign - unfortunately.

    I can further confirm that the "kill_character" console command does NOT just bust the General down to a Captain but actually does kill the character in every sense of the word (see below).

    I used the pre-existing 4tpy script of Marcus Camillus and chose the turn where I would want this to happen, then I inserted the appropriate console command line therein using other verifyable console commands to ensure I placed it in right line of the script.

    When I used bestbuy it worked correctly (after I loaded the game and clicked show_me).

    I then did a kill_character on one of my own characters and got the voice "leaving the army"; subsequent checking of the family tree showed that character to have "died peacefully" in the correct year and season. (Also, the new captain of that army was of a different name than the killed character).

    I then wanted to make sure that the kill_character command would work on AI factions and not just my own, and it did also work on the named character of another faction.

    Then when I executed it against the cloned character's name, where I got a brief spinning hourglass followed by a CTD.

    So there it is then - no way to rescue a campaign from a cloned character.

    PS - I was even thinking to give the cloned character an invulnerable_general console command - this way he would be guaranteed to live very long - only I dont think my campaign would have been resolved by the time he died a natural death and I would have played even longer for nothing.

    PPS - The jericho console command does not seem to work, either in direct or script mode - it would have been fun to see what it might look like but no go...

    Again, thanks for all the help Aradan.
    Last edited by phalanx_man; April 07, 2012 at 03:57 AM. Reason: spelling...

Tags for this Thread

Posting Permissions

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