Results 1 to 16 of 16

Thread: Campaign refuses to start after text edits

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Campaign refuses to start after text edits

    Hello everyone!

    I press start campaign and it sends me back to choose grand campaign/custom campaign/custom battle/etc menu. Not a CTD.

    This is the full story:
    My enormously big plan is to fully transfer a faction from DaC to Thera*. All went well, I kept the usual backup files, checked every time to see if my changes were causing any trouble and proceeded slowly and carefully. I reached the point where I had completely changed the EDB to suit my concept, completely incorporated new units in EDU and BMDB and some minor changes here and there.

    The problem started when I tried to recruit_pool my new units into the EDB. Again, slowly and cautiously I wrote and/or copied/pasted the relevant lines into the correct places. Now the game starts, custom battles start, but campaign does not.

    Possible causes:
    1. I deleted/commented out some units in EDU due to the 500 units limitation. Probably some of those units were referenced to by some other files (via ownership perhaps). Like EDB. On the other hand...
    2. ...descr_strat: I changed the starting units for the new factions, their starting location, the starting regions and the starting buildings. I double checked the spelling.


    What I have done to try to solve it:

    • I reverted back my edits up to a point. No solution.
    • I cannot generate a log file, because I don't know where it is located (I run on Ubuntu and SteamOS, so the files usually are not where they are supposed to be). Or even if it is generated.
    • I deleted map.rwm after every map change (not map per se, but descr_strat instead).
    • I came here to ask for help, again.


    The true question
    (I guess):
    Since the game and custom battles start normally, I think the usual suspects are not to blame (like serialization in BMDB or a miss-spell in EDU). This leads me to believe that the file to look for is one that is used only when the campaign is loaded. So: What are those files? How can I be sure that I have not messed up with descr_strat?

    Thanks in advance!

    *Replace the Wotan with a desert elves faction, in case someone was wondering. Of course it is only for my personal use.
    Last edited by Socrates1984; December 16, 2016 at 08:27 AM. Reason: Typos

  2. #2

    Default Re: Campaign refuses to start after text edits

    Being sent back to the menu us a sign there's something wrong with the descr_strat (if it had been an EDU or EDB issue, it would have crashed on startup). Without a log file (which would tell you exactly what the problem is), you're whistling in the wind, though.

    What did you use to make the edits - a proper editor like Notepad++ I hope?

  3. #3
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Campaign refuses to start after text edits

    Thanks for the help QuintusSertorius!

    That information was exactly what I was looking for, because I was diligently surveying all files in case I had missed something. Sure, it is an educating process, but quite tiring at the same time. Now I can at least focus on descr_strat only, as all changes are contained in the faction I edit (Wotan), so I can probably find what causes the problem.

    I am using Geany, a text editor for Ubuntu. It is okay to use it - I have verified it both in practice (since everything else worked) and in another thread.

    And yes, the situation with the log file is kind of depressing.

    Thanks again +rep.

  4. #4
    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,679
    Blog Entries
    35

    Default Re: Campaign refuses to start after text edits

    If it is in descr_strat then logic would suggest that it has to with that new faction. I would suggest to go through that faction's entry and see if it is something obvious. If not then remove the faction completely (listing on top, faction section, diplomacy stuff at the bottom), move the faction's settlements into the slave section and see if the game starts. If it does then slowly set up the faction, step by step: start with only a faction leader, and move the settlements back. Then add more characters in small numbers between tests. Finally set up the family tree and diplomacy.










  5. #5
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Campaign refuses to start after text edits

    Thank you again!

    I think I located the source of the problem. I wanted the new faction to have fewer regions than the default (one instead of three). I deleted the ones I didn't want and that was it. So, just to be sure, every region in descr_regions has to have an equivalent in descr_strat? Because if that is the case, then the only problem is that I deleted them instead of moving them to the slave section.

    While writing it, I realized that it absolutely makes sense...

    Anyway, I will try this solution again on Monday and keep you up to date.

    Thanks again +rep!

  6. #6
    KEA's Avatar Senator
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    1,104

    Default Re: Campaign refuses to start after text edits

    Quote Originally Posted by Socrates1984 View Post
    So, just to be sure, every region in descr_regions has to have an equivalent in descr_strat?
    No. IIRC, the original PI descr_strat had a lot of settlemets missing that on game start appeared as 400-people villages of the slave faction. So that alone shouldn't prevent the game from starting.

  7. #7

    Default Re: Campaign refuses to start after text edits

    Quote Originally Posted by KEA View Post
    No. IIRC, the original PI descr_strat had a lot of settlemets missing that on game start appeared as 400-people villages of the slave faction. So that alone shouldn't prevent the game from starting.
    Even if the game works, that's a terrible design choice. Even if you can't come up with something unique and interesting about a settlement, that's no excuse to leave it to whatever the default settings are.

  8. #8
    KEA's Avatar Senator
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    1,104

    Default Re: Campaign refuses to start after text edits

    Quote Originally Posted by QuintusSertorius View Post
    Even if the game works, that's a terrible design choice. Even if you can't come up with something unique and interesting about a settlement, that's no excuse to leave it to whatever the default settings are.
    The entire north was completly wip on the original release.

    Proper design not is the question here. This feature is extremly helpfull when setting up a new map. So adding more settlemets to descr_strat won't help the OP, just add more possible sources for errors.

  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,679
    Blog Entries
    35

    Default Re: Campaign refuses to start after text edits

    I habitually only list one settlement per faction in descr_strat to cut down on possible errors (format, EDB related) while developing a map (if I am not using Geomod). The final project however shouldn't really make use of this 'lazy' option - it reflects negatively on the developer, if anything.










  10. #10
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Campaign refuses to start after text edits

    Hello again everyone!

    First of all, thank you all for the help and the interest you are showing.

    What I did after your comments:
    I moved the new faction's settlements to the slave section of descr_strat. Just in case. => CTD.

    I removed some buildings from the faction's settlement(s) in case they were incompatible with EDB (they were). => CTD.

    I removed all instances (in all descr_strat - not just the faction's entry) of units removed from EDU. => CTD.

    I changed the x, y coordinates of starting generals, princess and priest in case they started inside the newly rebel settlements. Now they all ought to start in the same single faction's settlement. => CTD.

    I changed the starting army of said generals to Elf Leader, which is their type in EDU. They have the general_unit variable in attributes. => CTD.

    I retried with the default starting armies, after re-introducing them to EDU in the right order. => CTD.

    Each time I tried something I deleted map.rwm to be sure.

    Next steps:
    There is no reason as far as I can see to change anything else in other parts of descr_strat, like listing at the top or diplomacy, since I didn't change anything there in the first place.

    Is there any chance that descr_rebel_factions or descr_mercenaries could cause the problem? I removed from there all instances of units removed from EDU just in case.

    Is removing -i.e. cutting and pasting the entry to a backup file- equivalent to commenting the entry out?

    As you can see, it no longer returns me to choose campaign menu, crashing to desktop instead. No clue for the reasons.

    Thanks again for all the help!

  11. #11
    KEA's Avatar Senator
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    1,104

    Default Re: Campaign refuses to start after text edits

    When does the CTD occur, when launching the game or when selecting a campaign? What's with the log?

    Quote Originally Posted by Socrates1984 View Post
    Each time I tried something I deleted map.rwm to be sure.
    Not needed. map.rwm only is relevant when making changes to the basic map files, not when chaning descr_strat or files completly unrelated to the map, such as EDU or EDB.

  12. #12
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Campaign refuses to start after text edits

    Okay, thanks for the clarification on the map.wrm. The CTD occurs every time a press start campaign after selecting the faction (any faction). The game starts normally and the custom battles as well. That's why I believe I did everything else right (EDB, EDU etc).

    As far as the log goes, my Ubuntu + SteamOS installation doesn't seem to generate one. Otherwise I would have provided one after first checking it. I am trying to solve this problem right now, because a log would probably solve my problems. And that's why I am whistling in the wind as QuintusSertorius said in post #2.

  13. #13
    KEA's Avatar Senator
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    1,104

    Default Re: Campaign refuses to start after text edits

    I see. My guess would be that something went wrong when editing descr_strat, such as a letter was left over when doing c+p or something was left out when commenting out lines. Without log, impossible to trace.

  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,679
    Blog Entries
    35

    Default Re: Campaign refuses to start after text edits

    Congratulations! You have managed to resolve the descr_strat error and are now presented with an error that could be anywhere. Seriously: how high is your pain threshold that you attempt large modding attempts without a log? This is worse then modding RTW, there at least you got one error message at a time.

    I do hope you have a back up from when last your mod worked - because going back there and starting over will be quicker and easier on the nerves then hunting for the bug.

    Is there any chance that descr_rebel_factions or descr_mercenaries could cause the problem? I removed from there all instances of units removed from EDU just in case.
    Possible - it's easy to create errors by removing entries.

    Tip: make proper use of your search function - because checking the content of txt files in the data folder usually checks sub folders as well and hence can be time consuming it is best to keep a folder on the desktop where you copy the whole lot every time you need to check all of them, eg if you are looking for a unit entry. In windows I actually use Notepad++, open all of the files and then search them with the application, it lists every instance of the search criteria with linked references in a summary sheet.

    Never, ever do bulk changes. Small changes (preferably one file at a time and small sections), test, back up if it works. Rinse and repeat. In the face of an absent log that's he only way to stay sane.

    As to the log, have you tried to see if the setting exists in your mod's CFG file? Should look something like this:
    Code:
    [log] 
    to = logs/M2TW.system.log.txt        # path and name of log
    level = * trace                        # detailed log










  15. #15
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Campaign refuses to start after text edits



    With some afterthought, is seems I had complete lack of sense of danger... You can imagine the following inner dialogue:

    Socrates: "How was I supposed to know that???"
    Socrates: "Oh, yes, it makes sense now, it was obvious."

    Or:

    Socrates: "Modding without a log? Yes, why would I need a log? It's not like I will make any mistakes."
    Socrates: "What are you, mad?!?!?! Modding without a log?!?!"

    And yes I actually managed to resolve the CTD issue, since now the game starts normally. It's again the campaign that I can't start. I have big reserves of patience, it would seem.

    Now I am back at the OP. I have working custom battles, which means working EDU and EDB, as far as I can tell. I have a backup of descr_strat, since I do nothing without a backup. But this descr_strat is obsolete, because it references units that have been commented out, thus it makes sense for the backup file to not work at all. I tried to replace the edited descr_strat with the backup one and reintroduce the changes I believe to cause the problem, this time only removing the obsolete units and nothing else. It still refuses to start the campaign.

    As for the search function, I don't use it exactly the way you describe, as I don't quite understand it. The thing is though that I am as careful as it gets, especially now that I have come to a dead end. Moreover I always load the game even after the smallest edit. The only time I wasn't careful enough was just before I opened this thread...

    And as for the log, I have thoroughly checked every available resource to make the game produce one*, but to no avail. The closest thing to a log is a crash report in the form of *.dmp files. I know that in Windows there is program to open and read them, but I need more research to manage that in Ubuntu. It's today's news after all, this info, so I have no conclusive data on it. I will surely contact Feral Interactive on this issue, too.

    *Inserted the right code in both files (thera.cfg and med2tw.cfg), created myself the folder and the file, changed the path, made the cfgs read only etc. One after the other, not all at once.

  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,679
    Blog Entries
    35

    Default Re: Campaign refuses to start after text edits

    Search function: windows allows you to search for file content as well (limited to plain text files, eg txt, xml), not just the file name. While the result will only be for the plain text files it still seems to search other file formats as well.

    Log: you might be onto something with the dmp file - after all the 'error' log is nothing but a dumping of data. See if you can open it with a text editor.










Posting Permissions

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