Posted: Tue Oct 22, 2024 4:03 pm Post subject:
Unknown AI crash error (consistent)
I have already checked all AI tools and they find no mistakes.
The crash only happens in very late game Soviet AI. There is no crash if I fight Allies or Yuri. This is why it seems weird. I get no crashes when playing as Soviets myself.
All have the same error code.
I would like to tackle this error before publishing the mod, but my dozen attempts couldn't change it (even reverting the AI file).
The game just crashes to desktop, there is no error window. I am using Ares.
There are some of those that could cause a crash in theory (such as CIVAN not having elite weapon, even though he couldn't rank up), but he isn't in the AI scripts. But most things such as duplicate listings should be completely harmless, and others supposed "missing anims" actually use different capitalization which works just fine.
But, we shall see. I reckon some leads might be useful, including the gatling one since I had made a gatling-enabled Apoc variant to use the missiles against ground as well. _________________ QUICK_EDIT
I thank to the people that helped debugging, I am a major step closer to release thanks to that. Seems like AI is not crashing any more as before. And I made fixes, and fixes to fixes.
my fixes however made a new error, this happened during a soviet vs soviet battle:
Send me your 3 main inis in pm, there's clearly something structurally wrong with ai.ini since it's making the script crash, and we know where the problem most likely resides by where it crashes... triggers. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
That's strange. The AI is based on vanilla one since alternate AIs aren't normally compatible with the campaign. And the AI itself seems to work just alright now as far as I tested.
Since the inis aren't a trade secret or anything (kind of worthless without other assets) I will still post them here besides sending them, just in case anyone can identify any problem.
The crash I posted reocurred last time seemingly when an Object 279 tank destroyed NALASR, but many other buildings had been destroyed without crashing so I don't think its related to building destruction animations for example. Maybe to elite levelling in the tank? Who knows.
I also include a more edited AI that I am not using just in case.
Don't you use any tools to check your inis? There are so many errors and I don't know where to start.
The BlimpBombE weapon is used but has no projectile, just one example of many... QUICK_EDIT
I literally posted that I used the tool and a screenshot of it, bruh.
And I also said why not everything is fixed, there's too many false positives and stuff that doesn't actually affect anything in the logs, such as:
* caring for the capitalization of the names of anims
* and units, or
* tagging as errors the phobos entries
* Caring for stuff such as "barracks has higher techlevel than produced unit" (which literally does nothing)
* "Weapon exists but is unused" (so what?)
* "Warhead not found: Special", when the original game also uses it without declaring it, and many other such cases
, and so on. It takes a lot to wade through that stuff.
In fact, the error you posted is one of like five "real" ones, and even that one can't cause a crash. _________________ QUICK_EDIT
Well AICHECK isn't crashing for me, so you might just have a permissions problem or where you placed the script is not where it's generating the check.log to read...
I always recommend keeping the scripts in the game/mod directory.
Anyway here's the check.log, as you can see there's a vast number of non-existent warheads, invalid techlevels, undefined animations and other junk.
The missing art errors can be solved just by adding a [HEADING] for the object in art.ini btw, no code required just that it exists.
I'm also including AICLEAN's log and altered inis, read the log to understand what it did/found, and then you can compare the inis to the original -- or start modding from the cleaned inis.
AICLEAN also generated a readable [ScriptTypes] translation, worth reviewing to look for weird cases.
AICLEAN is not entirely happy with your choice of adding [null] to this, so in my copy I removed it:
Registering warheads that are not present has no effect, prerequisite that does not exist in unbuildable unit has no effect, etc.
I actually found the event that crashes the game, and its none of that
Its [OBJECT279] being destroyed. In previous versions this didn't crash anything, but now it does. Removed trailer anim from custom turret debris (only "weird" thing), but it still crashes.
So it beats me, for now.
Quote:
where you placed the script is not where it's generating the check.log to read...
Its generating them at the game directory. Should I move all the script files to the game directory?
***
Object279 that is crashing the game is not mentioned by the .log at all, btw
PS: I removed the mention of the custom debris from the tank and that made the game not crash. Although I am still unsure of what caused it to be that way, maybe some debris numerical setting is out of expected bounds.
PS2: Well, it wasn't the settings because copying other working ones did nothing. I also tried to reduce the string length of the title with no effect. Maybe its the simple fact of having a number on the name which is bad for debris, don't know. For now I will just leave the custom debris disabled, even though for me that's one of the coolest looking effects (tank body and turret fly off independently and explode when destroyed). _________________ QUICK_EDIT
Its generating them at the game directory. Should I move all the script files to the game directory?
Yes, all the batchfiles for the scripts, their cfgs and the tcls, that's the simplest way to make sure it all works as intended.
Object 279 could easily be crashing because the voxel debris doesn't have an art entry telling the game it is in fact a voxel.
[OBJECT279DEB] -> VOXELANIM missing ART data: OBJECT279
[OBJECT279TURDEB] -> VOXELANIM missing ART data: OBJECT279
This may seem like a pedantic and overly particular take, but I would suggest fixing everything AICHECK finds wrong as soon as possible, even if it's only marginally important. For example all the unused voxelanims can be removed, all the art entries can be created, unused sequences can be deleted or commented out, tags that don't apply to voxels or buildings can be selectively removed....
Did you read the clean.log? That also contains lots of hints telling you that certain objects are duplicated in your inis, along with redundant tags within them...
I don't want to remove anything. Most the entries are there for future use or because map needs them.
Deleting "Unused weapons" would break the campaigns that reference these weapons in their altered rules.
Furthermore, the "cleaned" inis remove Phobos stuff.
***
The error wasn't so much of the art but because the voxel was just named 279. Missing voxel will not crash with a vehicle, but seems that will crash with a debris.
Since the "missing art data" is the most common error due to it not taking into account capitalization, I coudn't know which of them were true or false. I spent over an hour just putting art entries in all caps.
Code:
In fact, the so called missing art data you so reference is completely irrelevant in these cases. It also throws the same error for "missing art data" for the default TIRE and PIECE voxel debris, which obviously work from the base game
***
I would suggest you reconfigure your scripts and divide into sections of errors that can crash the game, and other, alleged "cleaning" parts for the logs.
Furthermore, my suggestion is that the script be able to read any capitalization in art entries and match that with the rules. Just like the game does, make it agnostic. _________________ QUICK_EDIT
I would suggest you reconfigure your scripts and divide into sections of errors that can crash the game, and other, alleged "cleaning" parts for the logs.
AICHECK doesn't grade what it finds because a lot of it is ambiguous lacking context, any attempt to classify errors into mild or severe will inherently be inaccurate.
NimoStar wrote:
Furthermore, my suggestion is that the script be able to read any capitalization in art entries and match that with the rules. Just like the game does, make it agnostic.
This was a deliberate design choice to force modders to use consistent naming, because sometimes it does matter, and a little diligence goes a long way to preventing future name related errors.
NimoStar wrote:
Furthermore, the "cleaned" inis remove Phobos stuff.
Well, in any case *none* of the errors found were the cause of any of the two crashes. The first was wrong number of gatling stages, the second was missing voxel. Putting in the "cleaned" inis would have made more crashes without resolving the ones still there.
So I will not be replacing my inis anytime soon.
I still think that trying to "force" modders do this or that according to OCD (rename, "remove unused", etc.) is bad design, instead of prioritizing crashes that we *know* crash the game, like missing weapon; or ones that have gameplay impact, like unlisted warhead.
I would divide and order the log into three types of errors:
Crashes:
1- Missing weapons, calling for nonexistent units, etc.
No necessary effect:
3- Unused weapons, warheads, inconsistent capitalization in names, etc.
Still, I did fix a few things like wrong projectile that have a moderate gameplay impact, so I guess I will just have to eyeball it. _________________ QUICK_EDIT
Putting in the "cleaned" inis would have made more crashes without resolving the ones still there.
Precisely why I was suggesting to look/compare, and read the log to see what it wants to do... like I said it shows entire duplicated objects and other things that can make it hard for you, in cases you change the wrong one and the game reads the other for example.
NimoStar wrote:
I still think that trying to "force" modders do this or that according to OCD (rename, "remove unused", etc.) is bad design, instead of prioritizing crashes that we *know* crash the game, like missing weapon; or ones that have gameplay impact, like unlisted warhead.
Again things like capitalization are enforced so as not to make casual spelling mistakes, as well as identifying duplicated code.
NimoStar wrote:
Still, I did fix a few things like wrong projectile that have a moderate gameplay impact, so I guess I will just have to eyeball it.
That's the idea, before every playtest, I run AICJHECK and give it a quick review, at least I know which messages I am aware of and ignore, versus what I wasn't expecting. Usually it will find a simple thing like forgetting to declare an object or a copy&paste error that can be quickly fixed without wasting the time in testing. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum