Auto detect mod errors

Oni Ryuu

King
Joined
Sep 8, 2016
Messages
893
Location
Manchester UK
The great and mighty Quintillus has offered to make a bug detecting program. It will help us all to reduce those torturous weeks of testing and debugging. This won’t be an easy undertaking so anything you can do to reduce his workload will help.

We need to provide him with exact and concise information to minimise confusion and reduce the time it takes to find the relevant information. We want to know about every time you’ve caused a problem with a mod. We need to know the exact parameters for what constitutes a bug so the program can highlight them.

If you simply don’t have the time to retype the information as requested, a link to those resources will still help.
 
I was hoping their might be a few more as well. I took a look at the one Bluemofia linked to, but it will be much more complicated to detect than the infinite upgrade loops (which are now detected upon save in versions 1.12+ of my editor). The two main hazards being reading the .flc/.fxm files, and my relative lack of knowledge of how they are supposed to behave. With file format documentation, what Bluemofia and Vuldacon mentioned in that thread might be enough to implement it... but that's a long-term one.

A warning about too many Build Often/Build Never options being checked could be added. Although I'd be curious to see that in the context of what Ozymandias posted it, and particularly if there are any stats showing the lack of effect. I'd prefer to focus on ones that are clearly demonstrated as bugs or issues, and just that snippet isn't very precise - the "about 3 or 4" in particular makes it hard to program a proper check for.

Generally, what I want to start with are issues that:

  • Are either in the .biq file itself, or in a Civ file I can read fairly easily, notable the Civilopedia entry ones or perhaps .pcx files.
  • Either cause a game crash, or...
  • Are somewhat common

Another example I can think of that illustrates the type of error I'm looking for is the missing civilopedia entry ones that you sometimes encounter when starting a mod. Somehow these occasionally slip through into distributed mods, and then you can't play them when you download them. Detecting that would be nice, and while it may be mildly annoying to have to add a Civilopedia entry first, it's better than your mod not being playable. Less severe, but common enough that I've seen it multiple times, is using the large Civilopedia graphic for both Civilopedia images, and thus having the graphics be out of whack when you view an entry.

The "too many links" for certain resources is another one I can think of (though I don't remember what the limit is), which it would be nice to make visible without having to get a zillion popups in-game. I believe there's also a limit to how many resources (or maybe just strategic/luxury resources) can be in the game, but don't recall what that limit is. More generally, things that commonly surface in playtesting may be good candidates (with the caveat that some, such as game balance, are impossible to detect programmatically).

At a lower priority would be potential errors, such as a unit that can never exist, perhaps because you forgot to make it available to a Civ. I could use help from those who spend more time making mods in knowing what commonly crops up as an issue of this type.

In all of these cases, having reference materials (good posts on the topic) or examples (mods/scenarios/etc. displaying the issue) makes it all that much easier to start on them. At some point, I'll get around to looking some of these up myself, but I don't know of all of them, am more likely to work on problems where I already have the problem well-defined - so you can speed up getting your (least?) favorite issues detected by mentioning them here!

-------------

Edit: Welp, turns out the resource limits one was discussed earlier this month, and that thread has a very nice summary of the situation. Linking here to make it easier to find in the future, but that may well be my next addition in this area. The phantom resource bug in particular qualifies as one that would be easy to miss yourself, but is easy to detect automatically, and Pounder does an excellent job of describing what causes it and how to avoid it.
 
Last edited:
The Build Often/Build Never information was as vague as the quote I posted.
2. “Civilizations" 3rd bullet point

It would be useful to be notified about the missing Civilopedia, PediaIcons and graphics.

Every mod I’ve made causes iron, saltpetre and oil to have the “too many links” problem. No one needs to know what units become available with that resource. If you could disable the links or remove the list of units there wouldn’t be any problem. Any warning that refers to your own Civilopedia entries would be triggered by those resources.

The maximum strategic resources thing is complicated. The simplest fix would be to force all strategic resources to the top of the list, then luxury, then bonus. The limit only applies if you have them mixed. I think the result is a duotrigesimal number system. You can’t have a strategic resource exactly 32 entries after another one. E.g. 1, 33, 65 etc. or 2, 34, 66 etc.

Regicide king units don’t have a specific Civ in the unit editing screen. They’re accessed by the Civ editing screen. I also use no-civ units or other things like ‘enslave’. Some kind of warning might be helpful for rookies but rookies won’t be using your editor.

I hope this wasn’t too rambling. I can barely make sense of shape and colours at the minute.:vomit:
 
Last edited:
That does make sense. Unfortunately I suspect fixing the "too many links" problem would require a change to Civ III; if there were a way to fix it via, say, Pedia files, I suspect someone would have found it by now (unless I missed it). But for mods that are borderline - they go over it by 1 or 2 - I could see it potentially being preferable to be aware of it and remove a unit or two, to having that land mine in there waiting for players to click on. Though it is indeed in the lower priority ones, and one that would have to be optional.

I like the idea of arranging the resources by type to avoid the problem. My plan had been to add the error alert, then make resources reorderable so it could be more easily fixed, but having a "rearrange and fix" option would be nice.

Good points on regicide/enslave units. That's a good example of one that would be more complex, given those rarer ways that a unit can exist (and I definitely could have overlooked regicide). One case I'd thought of that hasn't been called out is "unit cannot be created, but starts on the map"; another is ones that are auto-created by buildings but cannot be manually built. This is probably another one that, even if it covers every case I can think of, should probably be optional.

I take it from the last sentence that you are ill? :( Hope you feel better soon!
 
I’ve corrected some of the gibberish in my previous post.

I can now confirm with relative confidence that having 4 ‘Build often’ or ‘Build Never’ options works. So at least we have a number.
I take it from the last sentence that you are ill? :( Hope you feel better soon!
Thanks, the antibiotics are starting to work now.
Spoiler Self-pity :
This last month I’ve had an x-ray, an EEG and an MRI. I’m only 29; you’d think I’ve just crashed my spaceship and terrified the earth people.
I’m supposed to be going camping in the Scottish highlands in the spring.
We’re pretty strict; our rules are “you can share the fire but that’s it”.:viking:They’re going to leave me in a ditch, I know it.
 
Oh hey, we're pretty close to the same age, I'm 28! I've been fairly fortunate health-wise, but I have a friend who's a year younger who's spent more time and money on medical treatments in the past 5 years than I can count - well over $100K out of pocket (not covered by insurance; it's a good thing he has a Midas touch), and a lot of time cooped up due to illness, and a lot of that was just trying to diagnose what wound up being a serious late-onset birth defect. And a former co-worker who was no older than 28 at the time spent a lot of his late 20's unable to do pretty much anything outside of the house due to immunosuppressants taken due to a gastrointestinal issue. So alas, I'm familiar with friends having poor luck with health. Fortunately both are on the upswing now, and I hope what you are dealing with is less severe.

Back on topic, I now have a Phantom Resource Bug detector working in the editor. No guarantees on it being released this year, and I don't have resource-reordering to easily fix it yet, but it was pretty straightforward to add the detection.
 
Oh hey, we're pretty close to the same age, I'm 28! I've been fairly fortunate health-wise, but I have a friend who's a year younger who's spent more time and money on medical treatments in the past 5 years than I can count - well over $100K out of pocket (not covered by insurance; it's a good thing he has a Midas touch), and a lot of time cooped up due to illness, and a lot of that was just trying to diagnose what wound up being a serious late-onset birth defect. And a former co-worker who was no older than 28 at the time spent a lot of his late 20's unable to do pretty much anything outside of the house due to immunosuppressants taken due to a gastrointestinal issue. So alas, I'm familiar with friends having poor luck with health.
$100K!! I was complaining about paying £8.50 for the antibiotics because they came through the pharmacy. Breaking Bad comes to mind.

I hope your friends will be fighting fit and free from medical expenses soon; oh, and Civ fans.
Fortunately both are on the upswing now, and I hope what you are dealing with is less severe.
I have plenty of faith in the NHS and much more appreciation now I know you could get a bill like that.
Back on topic, I now have a Phantom Resource Bug detector working in the editor.
Excellent work; these mods will make themselves soon.
No guarantees on it being released this year
upload_2017-12-31_9-43-41.pngHa!
 
Top Bottom