Corrupted Mod Scenario?

Moderators: Order of Battle Moderators, The Artistocrats

Post Reply
LNDavoust
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Fri Apr 13, 2018 12:24 am

Corrupted Mod Scenario?

Post by LNDavoust » Thu Oct 10, 2019 4:16 pm

Ok, i would appreciate a hand regarding a X-file i'm suffering with one of my spanish scenarios in my mod :(

In one of my last playtroughs of the campaign, one of the scenarios stopped working. The damned thing freezes just after the briefing messages, and although it let me review my deployed and undeployed units, i cannot move through the map or deploy units or advance to the next turn. It happens exactly the same when i launch the scen as a single shot. I can load it correctly using the editor, as well as i can modify it or save those changes, but launch it from the editor also leads to the same situation.

This could be just a case of a corrupted file/scen, but here it is when the "funny" things begin...

No matter which version of the scen I play, it always reproduce the problem. I have tried with other versions of the same scenario (weeks and months old), without success. Of course the scen worked nicely then. Ok, so maybe it is a problem of the mod, i think. Again, I tried with mod versions from several weeks (even months) ago, and nothing works, it is exactly the same problem again and again.

I have uninstalled/reinstalled the game (maybe some corrupted file in the vanilla folder?) and erased the folder in My Documents (the one with the Mods and preferences) but still nothing.

The only thing I can think about it is that maybe an update of the vanilla game is somehow messing with some element of the scenario, but again the last OoB version is from august, and i'm sure i have played the scen correctly way after that date. So I am completely lost.

The others scens in the mod work correctly up to this moment, as far as i know. This is particulary frustrating for me, since i planned to release the next version of The Spanish Prelude this weekend. I mean, i guess I could redo the whole scen, but that would take time.

So guys, i really appreciate any ideas you could give me... :idea: :?:
Last edited by LNDavoust on Thu Oct 10, 2019 6:52 pm, edited 2 times in total.

bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 3427
Joined: Sun Jan 10, 2016 5:39 pm

Re: Corrupted Mod Scenario?

Post by bru888 » Thu Oct 10, 2019 4:55 pm

Let's start with that universal panacea of deleting the Settings folder. That can clear some things up but probably will not work in this case.

So here's what I do in your situation. Open up the scenario in the editor and look at it from top to bottom. Try to find any obvious errors.

Then slowly and methodically reverse engineer the scenario. (Keep a copy of it elsewhere, obviously.) See if you can remember what you did last, and remove it. Test. Go back and remove the next-to-last thing and remove it. Test.

Get to a point where the scenario is working again, then add back the stuff that you removed, one-by-one. Test each time.

You may never actually discover what went wrong because when you get to a point where the scenario is working again and then put things back, you did not replicate the error this time. Now it will work properly because you did it right.

The good news is, by the way, that it sounds like it's not the map that is corrupted. I've been in that situation twice recently and I don't think it's possible to recover from it. The first time, (a wall decoration got garbled) I had to recreate the entire map. The second time (some combination of full map change hex ownership and individual hex editing), I was smart enough to have a recent backup of my project to fall back on.

A trigger error is at least fixable, as long as the scenario still is uploadable in the editor. You are lucky in that regard.

But don't concentrate just on triggers in your reverse engineering. Recently, I found the cause of a freeze in one of Erik's scenarios to be his having included specialisations that are still available in the editor but not in the game itself as defined by specialisations.csv. Not including a core alliance in a scenario could be the cause; the game freezes because it does not know what to do with previously acquired core units. Even AI Setup could cause an issue if, say, you directed a team to Move to Hex that is no longer accessible because the map had been cropped.

Remember, tear it down slowly and methodically. Test and test again. I am confident that you will find the cause if you follow this approach.
- Bru

bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 3427
Joined: Sun Jan 10, 2016 5:39 pm

Re: Corrupted Mod Scenario?

Post by bru888 » Thu Oct 10, 2019 5:13 pm

LNDavoust wrote:
Thu Oct 10, 2019 4:16 pm
In one of my last playtroughs of the campaign, one of the scenarios stopped working. The damned thing freezes just before the briefing messages, and although it let me review my deployed and undeployed units, i cannot move through the map or deploy units or advance to the next turn.
This is a strange sequence that you are describing. In this scenario, run from the editor, here is the sequence of what I see:

Screenshot 1.jpg
Screenshot 1.jpg (284.05 KiB) Viewed 274 times
Screenshot 3.jpg
Screenshot 3.jpg (110.68 KiB) Viewed 274 times
Screenshot 4.jpg
Screenshot 4.jpg (407.51 KiB) Viewed 274 times
Screenshot 5.jpg
Screenshot 5.jpg (434.38 KiB) Viewed 274 times

I cannot "review my deployed and undeployed units" until after I have seen the briefing and clicked "Start Game." I hardly think that the briefings could be the cause. For some reason, then, that's giving me a clue that it's a unit issue. Maybe begin your reverse engineering by removing units. I would start with any that you have recently modded and have added to this scenario.
- Bru

LNDavoust
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Fri Apr 13, 2018 12:24 am

Re: Corrupted Mod Scenario?

Post by LNDavoust » Thu Oct 10, 2019 6:04 pm

Just to clarify how the problem manifests. When i launch the scen as a single stand play, the thing seems to load correctly at first...

Image
Image

... and even the first look of the mission briefing appears to be okish...

Image
Image

... but at that point i already cannot move freely in the map, nor the different briefing parts carry me to the expected hexes. What I can do is to review the briefing, and when i click on the Start Game button...

Image
Image

--- i get freezed here, withouth the turn overview pannel; i also am not be able to select units or (again) move in the map. What I can do is to review the unit list...

Image

... which appears to be more or less correct. The purchase pannel also appears be working properly.


Anyway, thanks as always for your early answer, Bru. I will try your suggestions this night and i will let you know what happened. What bothers me the most is that even old versions of the scen that did work before don't work now, which doesn't sound at all like a classic corruption problem, But sure, your reverse-engineering method sounds useful. Thanks again.
Last edited by LNDavoust on Thu Oct 10, 2019 7:04 pm, edited 2 times in total.

GabeKnight
Major-General - Tiger I
Major-General - Tiger I
Posts: 2359
Joined: Mon Nov 27, 2017 10:24 pm

Re: Corrupted Mod Scenario?

Post by GabeKnight » Thu Oct 10, 2019 6:52 pm

LNDavoust wrote:
Thu Oct 10, 2019 6:04 pm
What bothers me the most is that even old versions of the scen that did work before don't work now, which doesn't sound at all like a classic corruption problem
If the mod load itself, at least there's no internal logic problem within (like missing links, effects, units,...).

Backtracking things, as Bruce suggested, seems like the logical choice to me, too. What did you change in the mod or the mod structure (not the scen itself) since the time it worked?
Did you add/delete new units, change existing ones (like changing/renaming the unit ID, name, model...), added some new commanders or unit classes (or changed the name), added or changed some specs, etc. etc.

The game's internal check routine is very effective and very picky. If you mess up a single character in the wrong place, the whole (or parts of the) mod might not start or work properly.

PS: If you want a second pair of eyes, send me the whole thing and I'll look over it.
PPS: To safe you some time (perhaps): this is not a problem you'll get if there's something wrong with the models files (like unit pics, texture, MDB)
Last edited by GabeKnight on Thu Oct 10, 2019 7:01 pm, edited 2 times in total.

bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 3427
Joined: Sun Jan 10, 2016 5:39 pm

Re: Corrupted Mod Scenario?

Post by bru888 » Thu Oct 10, 2019 6:54 pm

LNDavoust wrote:
Thu Oct 10, 2019 6:04 pm
Just to clarify how the problem manifests. When i launch the scen as a single stand play, the thing seems to load correctly at first...
Okay, so that looks relatively normal up to the point of crash. Apparently it's when the units are called up to be displayed in the deployment phase that it freezes. That points the finger at units, so I would definitely start with them first. But again, it could be anything and the game is just choosing to stop at this point for some reason.

With reverse engineering, I mentioned the need for slow and methodical procedure. I should also add that you can save multiple copies of the scenario and reverse engineer it from different angles. Say, one copy for removing units, testing and saving as you go. Didn't work? Then call up a fresh copy and work on specialisations. Still no go? Open a third copy and work on triggers.

If you do the reverse engineering this way, at least you won't have to put back a load of other stuff when you find the real culprit.

Also, I would take Gabe up on his offer. He's got valuable experience with modding. I would offer to look at it as well but right now, I am involved with Erik's campaign in the studio. I want to finish that in order to clear the decks for a CSI sweep of your mod when it's ready.
- Bru

bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 3427
Joined: Sun Jan 10, 2016 5:39 pm

Re: Corrupted Mod Scenario?

Post by bru888 » Mon Oct 14, 2019 12:40 pm

How is the recovery operation going?
- Bru

bru888
Order of Battle Moderator
Order of Battle Moderator
Posts: 3427
Joined: Sun Jan 10, 2016 5:39 pm

Re: Corrupted Mod Scenario?

Post by bru888 » Mon Oct 28, 2019 8:56 pm

bru888 wrote:
Mon Oct 14, 2019 12:40 pm
How is the recovery operation going?
Well, LNDavoust, no news is not good news in this case. There is one other pointer that I just learned myself: If the cause is a bad trigger, merely turning it off will not alleviate the problem. If it is in a folder, merely turning off the folder will not alleviate the problem, either. The bad trigger must be deleted. It's as if the game senses the error as it is loading the scenario and, even though the trigger in question is not active, the game rejects it by freezing.

Remember, whatever the outcome of your issue, it's not your fault. These scenario and campaign editors are prone to error because they are complicated and not every aspect of them has ever been tested and debugged. I was ready to throw my scenario out just now until I did what I recommended above - reverse engineering - and at the last minute, I thought of deleting triggers instead of merely turning them off. If I had not thought of that, the scenario would be in the trash now.

I hope this has not happened to you. Your work looked interesting and I was looking forward to it.
- Bru

Post Reply

Return to “Order of Battle : World War II - Scenario Design”