Single Player bugs and crashes v37 plus (SVN) - After the 24th of December 2016

I tried loading a game while currently in one. I got an exception in cvinfo.cpp, CvLeaderHeadInfo::getDiploWarMusicScriptIds. I got this exception:
Exception thrown at 0x06469D5E (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 0xC0000005: Access violation reading location 0x00000005.
It seems that a value of 1 (location to read in an array) was passed, but for some reason that location was empty.
This problem iirc has been around for some time now. Usually have to go the Main Menu and then load save game. But if you've found out where the problem lies perhaps someone like alberts2 or T-brd can fix it?
 
I was under the impression that the enum was no longer used or was only used for the vanilla missions. I have never added anything to the enum when adding missions. I have only added it to the missions XML.
It may be that past the hardcoded mission lists, it's not necessary to have them in the enums but as toffer points out, there could still be some issues that invites and when they get out of order between xml enumeration and dll enumeration is where you really set up for a problem. So while extra missions in the modules may be ok, if a mission is defined in the core, the enums should get an update I think. I'm happy to do this for us - just takes a little communication when some are added and very important if some are removed or the list order changes in the xml.

They only need to be listed in the enums if the dll needs to reference it somewhere in its code.
the enums isn't necessary when adding a new mission that is completely handled by xml (and python?).

Here's the main reason why some of the non-vanilla missions are inside the enum list
Code:
    case MISSION_BUTCHER: szString = L"MISSION_BUTCHER"; break;
    case MISSION_RECORD_TALE_ORAL: szString = L"MISSION_RECORD_TALE_ORAL"; break;
    case MISSION_RECORD_TALE_WRITTEN: szString = L"MISSION_RECORD_TALE_WRITTEN"; break;
    case MISSION_ANIMAL_COMBAT: szString = L"MISSION_ANIMAL_COMBAT"; break;
    case MISSION_ANIMAL_STUDY: szString = L"MISSION_ANIMAL_STUDY"; break;
    case MISSION_ANIMAL_SACRIFICE: szString = L"MISSION_ANIMAL_SACRIFICE"; break;
    case MISSION_BARBARIAN_ENVOY: szString = L"MISSION_BARBARIAN_ENVOY"; break;
    case MISSION_CURE: szString = L"MISSION_CURE"; break;
    case MISSION_ESTABLISH: szString = L"MISSION_ESTABLISH"; break;
    case MISSION_ESCAPE: szString = L"MISSION_ESCAPE"; break;
    case MISSION_AMBUSH: szString = L"MISSION_AMBUSH"; break;
    case MISSION_ASSASSINATE: szString = L"MISSION_ASSASSINATE"; break;
The dll deals with their in-game text in some way.
Very good reasons to not just define missions in xml alone.

I tried loading a game while currently in one. I got an exception in cvinfo.cpp, CvLeaderHeadInfo::getDiploWarMusicScriptIds. I got this exception:
Exception thrown at 0x06469D5E (CvGameCoreDLL.dll) in Civ4BeyondSword.exe: 0xC0000005: Access violation reading location 0x00000005.
It seems that a value of 1 (location to read in an array) was passed, but for some reason that location was empty.
This may be an effective memory failure. The game has always proven to fail at wiping the previous game data completely when loading in a new one. Always best to reload the mod from desktop with each new game if you can.
 
Also, shouldn't these lines switch place inside the mission XML?

MISSION_RECORD_TALE_ORAL
MISSION_RECORD_TALE_WRITTEN
MISSION_ANIMAL_COMBAT
MISSION_ANIMAL_STUDY
MISSION_ANIMAL_SACRIFICE
↓ with ↑
MISSION_DIPLOMAT_ASSIMULATE_IND_PEOPLE
MISSION_DIPLOMAT_PRAISE_IND_PEOPLE
MISSION_DIPLOMAT_SPEAK_TO_BARBARIAN_LEADERS
MISSION_DIPLOMAT_SPREAD_RELIGION
MISSION_LAWYER_REMOVE_CORPORATIONS

The top group work fine as it is, so it would only be for orders sake.
The dll just has the wrong names for the bottom group is all.
It's just important that what's in the dll is in the same order as the xml so I just took the xml list and aligned the enums list to it. I think that'll be enough but I'm waiting to find out here.
 
It's just important that what's in the dll is in the same order as the xml so I just took the xml list and aligned the enums list to it. I think that'll be enough but I'm waiting to find out here.
Ok, but then you have to add a lot of new entires to the enums, I would think it would be easier to move the entries in the xml to fit the enums so that the enum in dll is as small as possible.
If you move these down in the enums:
MISSION_RECORD_TALE_ORAL
MISSION_RECORD_TALE_WRITTEN
MISSION_ANIMAL_COMBAT
MISSION_ANIMAL_STUDY
MISSION_ANIMAL_SACRIFICE
then you still to add 15 entries between MISSION_ASSASSINATE and MISSION_RECORD_TALE_ORAL.
And you would still need to have 5 entries between MISSION_BUTCHER and MISSION_JOIN_CITY_POPULATION (currently wrongly named in dll enumerator as MISSION_BARBARIAN_ENVOY), cause something has to replace those you moved.

EDIT:
Had a look at MISSION_JOIN_CITY_POPULATION, and it isn't referenced by the dll a single time, therefore it doesn't need to be in the enum at all, and the xml entry for MISSION_JOIN_CITY_POPULATION should be moved to bellow MISSION_ASSASSINATE, which is the last mission used by the dll in any way.
MISSION_BARBARIAN_ENVOY should then just be deleted from the enum list because that mission doesn't really exist and we just moved the mission that used to occupy that slot to below the rest of the enum list.

There is one dll reference to MISSION_BARBARIAN_ENVOY that should also be deleted, this line within CvGameCoreUtils.cpp:
case MISSION_BARBARIAN_ENVOY: szString = L"MISSION_BARBARIAN_ENVOY"; break;
EditEdit:
Right now it is like this:

XML entry == Dll enumeration
MISSION_BUTCHER == MISSION_BUTCHER
MISSION_DIPLOMAT_ASSIMULATE_IND_PEOPLE == MISSION_RECORD_TALE_ORAL
MISSION_DIPLOMAT_PRAISE_IND_PEOPLE == MISSION_RECORD_TALE_WRITTEN
MISSION_DIPLOMAT_SPEAK_TO_BARBARIAN_LEADERS == MISSION_ANIMAL_COMBAT
MISSION_DIPLOMAT_SPREAD_RELIGION == MISSION_ANIMAL_STUDY
MISSION_LAWYER_REMOVE_CORPORATIONS == MISSION_ANIMAL_SACRIFICE
MISSION_JOIN_CITY_POPULATION == MISSION_BARBARIAN_ENVOY

MISSION_CURE == MISSION_CURE
MISSION_ESTABLISH == MISSION_ESTABLISH

Red = Dll is confused about what missions it is referencing when using these enumerator names.

EditEditEdit: sorry for my verbosity, this is some hard stuff to put into words; maybe I'm just tripping here and got it all wrong... ^^
 
Last edited:
Ok, but then you have to add a lot of new entires to the enums, I would think it would be easier to move the entries in the xml to fit the enums so that the enum in dll is as small as possible.
If you move these down in the enums:
MISSION_RECORD_TALE_ORAL
MISSION_RECORD_TALE_WRITTEN
MISSION_ANIMAL_COMBAT
MISSION_ANIMAL_STUDY
MISSION_ANIMAL_SACRIFICE
then you still to add 15 entries between MISSION_ASSASSINATE and MISSION_RECORD_TALE_ORAL.
And you would still need to have 5 entries between MISSION_BUTCHER and MISSION_JOIN_CITY_POPULATION (currently wrongly named in dll enumerator as MISSION_BARBARIAN_ENVOY), cause something has to replace those you moved.

EDIT:
Had a look at MISSION_JOIN_CITY_POPULATION, and it isn't referenced by the dll a single time, therefore it doesn't need to be in the enum at all, and the xml entry for MISSION_JOIN_CITY_POPULATION should be moved to bellow MISSION_ASSASSINATE, which is the last mission used by the dll in any way.
MISSION_BARBARIAN_ENVOY should then just be deleted from the enum list because that mission doesn't really exist and we just moved the mission that used to occupy that slot to below the rest of the enum list.

There is one dll reference to MISSION_BARBARIAN_ENVOY that should also be deleted, this line within CvGameCoreUtils.cpp:
case MISSION_BARBARIAN_ENVOY: szString = L"MISSION_BARBARIAN_ENVOY"; break;​
On cheatcode chipotle you can see missions units are on during debug runs on single player games. That's a lot of what the string setup is all about. Much better to have them defined in the code than not. And it was very quick to fix. (Doesn't disturb compatibility of saves which I think is part of the magic of some of the previous modders work on our very unique C2C dll.)

However, this did not fix this original issue but did allow me the clear path to debugging it. When we set these population missions up as an event trigger with a popup, the popups are all validated but the player must answer to them for the mission to continue and thus all the missions are validated at once because the population isn't added by the time the popup has been sent. So I added a new tag for iPopulationBoost and did this much more directly without an event trigger and popup and low and behold, it works to enforce the population limit! (Debug Success!)

I did, in the process, see where there IS a difference between putting the plot or unit conditions inside the action or the outcome. You can really go about it either way... it's kinda cool design. And it would have been working fine if the popups weren't causing a workaround the validation check.

What we've probably done, however, is neatly debug some of the other mission problems DH was having. We'll have to playtest those issues.

It's funny how much I assumed all this stuff was so controlled by python.
 
Not sure if intentional, but captives can be used to rush construction in conquered cities. After the cities' revolt ends, it's usually no longer possible
This is and is not intentional. When you can build something in one round, it cannot be rushed. I'm not sure if that's a game rule we should continue to maintain though. It creates counter-intuitive limitations when we have multiple-production rules like we do now. I can't recall where that was enforced... does anyone know offhand? It might be in the code for the canDoMission portion so how is that mission setup? Does anyone know offhand?
 
SVN: 9805

Using an inquisitor awards gold depending on the population level of a city, but i'm getting 100k+ gold or more in cities larger than 20 pops, is this intended?

1. Download attached save file
2. Go to Yekaterinburg situated at the south-west of the main island
3. Select inquisitor and try to perform inquisition.
Ah, now that I've looked in the code, I get it. The recosting project has made the buildings more expensive and thus when a city has a lot of buildings of other religions, you can really get a lot of gold from them, as that's what you're basically raiding the gold from. It's not a merchant mission as I suspected. But there's a simple way to control this and that's to increase a global variable that was built in to help with balance issues like these without having to adapt code. So I'll just increase that divisor from 4 to say 10 and we should be much more reasonable. That said, it's the first time I've really seen what this mission is in action. I really think it should just take down one selected religion each time it's successful... a project for a future date.
 
- Recalculation gives some weird results: I lost ~3000 gold per turn, though I gained 50% defense on all my cities. I know there may be many changes in about 80 SVN revisions, but so many? Is this normal/intentional?
There will probably always be some bugs in recalculations, which is why you should never just recalculate just to recalculate. The ONLY time you'll want to (which is not always the only times you are asked to) is when you've updated assets that may have changed some values on buildings, civics and traits and such. Even unit value changes aren't really worth a recalc over and most DLL updates aren't either. I know that's tough for players to know when to recalc and when not to. But yeah, it can really throw off some things that aren't quite right after recalcing. Trying to debug recalc efforts is like trying to do a tax audit on a state... you're looking at a HUGE pool of data to comb through, so immense it is mind boggling. Sometimes we can find and spot specific problems, like was reported previously with the nazca lines and knowing that's a problem spot, we might be able to figure out why and how and fix that so that recalcs make that right rather than screw up that value's inclusion. Anyhow, recalcs are best to be sparing with if you can.
 
Looking at thesaurus, a few ideas (may not "hit the spot", but worth considering): Nightwatch; Sentry; Custodian.
A few more options: Marshal (if not used for great generals or such); peace/police officer; constable; bailiff.
Another option is to keep the city, but replace the guard. Town security, city police or something along these lines will reduce the overlap of the name.

Sentinel
Protector
Thank you for suggesting some new names. I selected Marshal. This is an interesting article about what the names mean in modern lingo and they probably did have some root base that has been maintained. For game purposes, Marshal hardly fits this definition, as it is primarily the stage at which the city watch upgraded to gunpowder usage, but it does have a nice ring to it in the sense that it represents a more updated concept of law enforcement that there are servants of the court now providing arrest and protection services for the city.

In most cases unfortunately, to change a unit or building's name has created Save Game Breaking incompatibilities in the past.
In this case, for now, I've just changed the label. I know its not great practice but this is not the kind of unit you want to screw up for any folks in a good game right now. Next time we break compatibility we should change the <type> tag name and text keys as well.
 
Last edited:
I've noticed that the doctor's building (the +5 health... forgot the full name), surgeon office and water treatment plant doesn't seem to give as much as indicated. doctor and surgeon should give -80 disease, water treatment should give -100, but the actual effects didn't seem as high (didn't test it directly, but it seemed that it wasn't as effective as expected.
In addition, I think the shaman (or druid?) building that prevent unhealth from buildings works on diseases, too. I doubt diseases should be exempt due to implementation.
You can't imagine the complexity of how properties actually tally up in real effects. Suffice it to say that the power of say, -100 disease is entirely relevant to how much disease you have and how much decay there is on that property and so many other factors its crazy. It is not a system a player can audit. But you CAN, with experience in play, come to understand and get more of an intuitive sense for how impactful the values should be once applied. Certainly, it is true that a source that states -100 disease is going to be stronger than a source that states -80 disease.

If you try to understand the underlying formula you're probably going to encounter Cthulu at some point.
 
I've noticed that the doctor's building (the +5 health... forgot the full name), surgeon office and water treatment plant doesn't seem to give as much as indicated. doctor and surgeon should give -80 disease, water treatment should give -100, but the actual effects didn't seem as high (didn't test it directly, but it seemed that it wasn't as effective as expected.
In addition, I think the shaman (or druid?) building that prevent unhealth from buildings works on diseases, too. I doubt diseases should be exempt due to implementation.
You can't imagine the complexity of how properties actually tally up in real effects. Suffice it to say that the power of say, -100 disease is entirely relevant to how much disease you have and how much decay there is on that property and so many other factors its crazy. It is not a system a player can audit. But you CAN, with experience in play, come to understand and get more of an intuitive sense for how impactful the values should be once applied. Certainly, it is true that a source that states -100 disease is going to be stronger than a source that states -80 disease.

If you try to understand the underlying formula you're probably going to encounter Cthulu at some point.

Well, it's more that they take the role of dogs and scouts in that regard at least. And being better at it unleveled... It just seems unbalanced is all, but it certainly makes them even more useful than they already are, so I'm not complaining. I wouldn't use them to actually attack the animals, just hang around to spot the elusive ones AND earn xp from attacking neighbour units.

Scouts or dogs are worse in that regard that they either can't attack or you don't want to use them to attack, because dogs don't subdue that well. So you don't really level them up at all
Teamwork is the name of the game. There are reasons to take dogs or staff dogs. Criminals may work great with hunters in the field as spotters. Dogs would too. But you sure don't want Criminals in the city hanging out as a spotter. And dogs can sure move faster through the wilderness than anything else in the game. I also like to use dogs to attack animals because of this and they can often level up pretty quickly and start to make for great Criminal attackers once they do (as well as improving their spotting abilities a lot.) I could discuss the strategeries ad infinitum of course but suffice it to say that hunters aren't masters of sight as much as you might think because the goal was to have them benefit from some teamwork with other units. Clearly they are the best to attack the animals with and some of the best at pursuit arts on Hide and Seek. And they are automatic stack defenders against animal attacks. Furthermore, they are awesome bird hunters, which you can't pursue but they have low HP (on SM anyhow) and so enhancing their stealth attacks will quickly make them excellent at hitting and taking down avians before they fly off. (There again criminals and strike teams are dang good at that too.)

VERY important possible bug I forgot to mention! Also with the strike units, when on "Stay the hand", you can enter an opponents square with a unit in it and pillage whatever's underneath it, roads, improvements and obviously most important of all - forts. Ambushers can't pillage forts, because they don't have the enter city ability.
Ambushers shouldn't be pillaging (which gets money out of the deal). One of the key differences between strike teams and criminals is this ability. Criminals benefit from pillaging whereas Strike Teams must spend espionage points on sabotage (have not had a chance to confirm this is working quite as planned.) As you noted about strike teams, and ruffians as well, they can't enter the city peacefully, even if hidden. And in this case, the forts count as cities. However, if hidden, I'm totally cool with Criminals being able to pillage right out from underneath other units on the tile. Wasn't there a scene in a movie where some stealthy folks snuck into a fortress and lowered the gates at just the most opportunistic time? I think it should be a valid strategy. If you don't want it to happen to you, maybe you need some good spotters in the fort that can see them coming and thus defend against their attempt to enter?
 
Last edited:
This is and is not intentional. When you can build something in one round, it cannot be rushed. I'm not sure if that's a game rule we should continue to maintain though. It creates counter-intuitive limitations when we have multiple-production rules like we do now. I can't recall where that was enforced... does anyone know offhand? It might be in the code for the canDoMission portion so how is that mission setup? Does anyone know offhand?
There is no Python code behind it. It is all in the XML. They are defined in the XML in a similar way as the Great Engineer as far as aide to building. I think the :hammers: merchant is defined the same way but is activated slightly differently in the dll. They also can't aide production if the building will finish this turn.
 
There is no Python code behind it. It is all in the XML. They are defined in the XML in a similar way as the Great Engineer as far as aide to building. I think the :hammers: merchant is defined the same way but is activated slightly differently in the dll. They also can't aide production if the building will finish this turn.
Yeah I've come to understand that. But event coding... most of that is python right? As for the merchant production mission, you're saying that the filter of requiring that the building won't be completing this round is in the dll? Ok, I'll look for that too because I'm finding it as annoying as others do.
 
Yeah I've come to understand that. But event coding... most of that is python right? As for the merchant production mission, you're saying that the filter of requiring that the building won't be completing this round is in the dll? Ok, I'll look for that too because I'm finding it as annoying as others do.
Annoyingly while most is some isn't
 
This is and is not intentional. When you can build something in one round, it cannot be rushed. I'm not sure if that's a game rule we should continue to maintain though. It creates counter-intuitive limitations when we have multiple-production rules like we do now. I can't recall where that was enforced... does anyone know offhand? It might be in the code for the canDoMission portion so how is that mission setup? Does anyone know offhand?

I am talking about 4 different cases:
1) Captive in a captured/recently captured city, and building not finished next turn -> can boost
2) Captive in a captured/recently captured city, and building finished next turn -> cannot boost
3) Captive in an old city -> cannot boost (regardless of the "next turn" rule)
4) Production merchant in a city -> can boost (regardless of the "next turn" rule)

Case 3 seems like a bug. Cases 1 and 2, as compared to 4, also seem to point to an inconsistency issue.

You can't imagine the complexity of how properties actually tally up in real effects. Suffice it to say that the power of say, -100 disease is entirely relevant to how much disease you have and how much decay there is on that property and so many other factors its crazy. It is not a system a player can audit. But you CAN, with experience in play, come to understand and get more of an intuitive sense for how impactful the values should be once applied. Certainly, it is true that a source that states -100 disease is going to be stronger than a source that states -80 disease.

If you try to understand the underlying formula you're probably going to encounter Cthulu at some point.
I was under the impression that there are two types of reduction, direct and from the plot. A building granting -100 disease should show -100 in the city viewer. On the other hand, -100 disease on the plot will, in some form, get a reduction in the city.
If that's not the case, it's extremely unclear. Most buildings such as the LE buildings did seem to grant the correct -property immediately.
Is it possible that the said buildings grants the effect to the plot instead of the city, thus indirectly affecting it?
 
The bad character encoding has been reported for the svn version ?
It's realy sad for non english player.
 
I think it boils down to how it was setup to create the reference. I've got to research on the info side how @AIAndy planned this out but I'm thinking that it takes a unit's action mission definition and adds it to the enumeration but that it does so with a hardcoded belief that there will not be any further missions in the enums list past MISSION_PRETARGET_NUKE. So I'm thinking that the source of the error was to add to the mission list - he must have theorized we would have no further need to do this and would just build everything further through the action mission method. So I'm going to look into that angle of things. I'm hoping its that simple. Otherwise, the whole coding system of the Action Outcome Missions may be deeply bugged and requiring some serious retooling. It certainly is concerning that the mission isn't defined anywhere but the unit's xml. AIAndy is very good at knowing how and when he can bypass certain steps that seem like they should be required to a lesser programmer so I have some faith he's done it right and it's just my limited understanding that is running up against the rocks here. We messed up in the xml/coding somewhere I think, not knowing a rule that we breached a rule he might have failed to mention or if he said it we failed to understand it at the time.
That was bad documentation and relying on brittle things from my side. You will need to check the different parts that check if a mission is an outcome mission or not and make them check more reliable things than enum position.
Check this post and following: https://forums.civfanatics.com/threads/the-outcome-system.451071/page-6#post-11915436
In general what is in the enum needs to be at the start of the XML in the same order while the opposite is not true. You can have mission infos in the XML that are not in the enum as long as they are after the last enum XML entry.
Koshling suggested there to add missions to the enum remapping but I think that was never done so reordering missions will break savegames that have ongoing missions of those types.
You might want to add code that verifies that all enum entries have the same IDs in the XML.
Having strings for those missions in the DLL makes little sense as you have the mission info in the XML for that.
 
That was bad documentation and relying on brittle things from my side. You will need to check the different parts that check if a mission is an outcome mission or not and make them check more reliable things than enum position.
Check this post and following: https://forums.civfanatics.com/threads/the-outcome-system.451071/page-6#post-11915436
In general what is in the enum needs to be at the start of the XML in the same order while the opposite is not true. You can have mission infos in the XML that are not in the enum as long as they are after the last enum XML entry.
Koshling suggested there to add missions to the enum remapping but I think that was never done so reordering missions will break savegames that have ongoing missions of those types.
You might want to add code that verifies that all enum entries have the same IDs in the XML.
Having strings for those missions in the DLL makes little sense as you have the mission info in the XML for that.
TB opted for the solution (in latest SVN rev.) where all missions are listed in the enums. The reason he did this is so that the chipotle cheat will allow display of what mission a unit is currently on for all missions, although I'm quite certain that python could handle that job.

The downside to this solution is that it is no longer possible to reorder the missions at the end of the mission XML, but it is still possible to add new missions at its end without modifying the dll enum and those can be reordered until someone lists them in the enums.
An upside is that dll debugging will report what mission was running using the mission name instead of numbers for all the missions.
It's a bit subjective what solution is really the best one. I tend to agree with AIAndy, though TB's solution isn't really any worse.
 
Last edited:
,snip>
I was under the impression that there are two types of reduction, direct and from the plot. A building granting -100 disease should show -100 in the city viewer. On the other hand, -100 disease on the plot will, in some form, get a reduction in the city.
If that's not the case, it's extremely unclear. Most buildings such as the LE buildings did seem to grant the correct -property immediately.
Is it possible that the said buildings grants the effect to the plot instead of the city, thus indirectly affecting it?

A building, unit, and pop generates a "value/number" in the city. Then a % of that value is sent out to any adjacent owned tile (up to 8 tiles if land locked and all tiles owned by the city), the number is rounded down.
These tile(s) then in turn generate a % of that Number and send it back to the city and to It's Adjacent tiles (this is how crime, disease, pollution spreads from a main city tile).
A % of each Number generated is also removed, called Decay.
All numbers are rounded down.

This back and forth is what ends up giving the change in each properties Displayed level (ie number).

This is also why you do Not want criminal units (yours or enemies) sitting in your owned territory. They generate Crime in this instance to the tile they rest on which is in turn is diffused to that tiles adjacent tiles (up to 8). If it so happens that one of these Adjacent tiles borders a cities Main 8 adjacent tile that too will be added in and eventually make it into the city's cumulative total number.

So you see it is Not a simple math procedure. You can not say, "I had a -100 giving whatever but it's only showing -80 or it's showing -120 change, that is a bug." Because it's not a bug but how the property is designed to work.

For those that like to crunch numbers have fun with this one. It is really just best to do as T-brd suggested.
You can't imagine the complexity of how properties actually tally up in real effects. Suffice it to say that the power of say, -100 disease is entirely relevant to how much disease you have and how much decay there is on that property and so many other factors its crazy. It is not a system a player can audit. But you CAN, with experience in play, come to understand and get more of an intuitive sense for how impactful the values should be once applied. Certainly, it is true that a source that states -100 disease is going to be stronger than a source that states -80 disease.

He is right.
 
TB opted for the solution (in latest SVN rev.) where all missions are listed in the enums. The reason he did this is so that the chipotle cheat will allow display of what mission a unit is currently on for all missions, although I'm quite certain that python could handle that job.

The downside to this solution is that it is no longer possible to reorder the missions at the end of the mission XML, but it is still possible to add new missions at its end without modifying the dll enum and those can be reordered until someone lists them in the enums.
An upside is that dll debugging will report what mission was running using the mission name instead of numbers for all the missions.
It's a bit subjective what solution is really the best one. I tend to agree with AIAndy, though TB's solution isn't really any worse.
The strings for the chipotle cheat should be pulled from the mission info, not hard-coded into the DLL, then it will work for any mission.
But yes, debugging is a reason to add them to the enum.
 
Top Bottom