Edit: I experienced a crash with the latest build, when you set a side on a trigger to all and it references units that have requiredhouse=xxx
Looks like this:
parsing [AITriggerTypes]...
can't read "sides(0)": no such element in array
while executing
"foreach house $sides($side) {
set house [string trim $house]
set multi1 [lsearch $teamownedhouse($tt1) $house]
if {$multi1 == ..."
invoked from within
"if [string equal "<all>" $house] {
foreach house $sides($side) {
set house [string trim $house]
set multi1 [lsearch $teamownedh..."
("while" body line 127)
invoked from within
"while ![eof $of] {
set curline [gets $of]
set cc [string first ";" $curline]
if {$cc == 0} {continue}
if {$cc != -1} {
set comment [string ..."
(procedure "loadini" line 1603)
invoked from within
"loadini $argv"
(file "aicheck6.tcl" line 2282)
Drücken Sie eine beliebige Taste . . .
It is a complicated matter, thus the situation but a crash isn't in your interest, that is why i thought i post it. QUICK_EDIT
RequiredHouses with a dummy value? I don't understand what you're telling me.
I can't crash it even by putting bad side values into the triggers, so while you may have a typo, you'd see a proper log entry for it:
Code:
[RUS_G30] -> invalid SIDE value for TRIGGER: 0
If your [Sides] section is somehow written wrongly, I'm not sure that would do much either, since it counts up sides without caring what their names are, but you'd also see a log entry for that:
Code:
[Sides] -> detected YR
[Sides] -> detected side: 4
Like I thought you put side zero for the trigger, but that doesn't explain why it would crash, it has handlers for such.
Anyway I was doing more optimizing with particular interest on log messages, I have it doing more and still only a hair slower than 6.3
----------
AICHECK 6.5 update...
- Now checks Smudges, Overlays and Terrain objects for missing data/art (Tiberium ignored)
- Error logging is now more accurately divided up into respective sections
- Reduced redundant error conditions, and messages more consistent
- Misc optimizations
Yeah, it is a niche problem. I changed it back; i just wanted to point out that it crashed for G-E.
Thnaks for the new version; will try.
Yup, there it is: [01000294-G] -> invalid SIDE value: 0 haha
and now all the smudges to clean up ahhhh
Bit of feedback if you are interested.
1. Ares related:
[CHRP] -> VEHICLE has Passengers value, but is not Transport or OpenTopped
This is a false positive due to the abductor logic: it has a transport value for it trapps units inside of it the flag is on it's weapon=
[NeutronCannon]
Abductor=yes
it is not open topped because the prisoned inmates should not fire outside...nice idea anyway, it grows in strength the more it captures .. gotta think about that .
2. checking Alternate Art...
works fine but excludes alternate lunar art wich ends on l.
[BRUTEL] -> unused ART object or referencing object undefined
3. The new outputs are very usable and specific, well done!
4. Suggestions.
4.1 Ignore those wall buildings if they have ToOverlay in their Art code
4.2 The customizable ignore-section in the tlc config file ignore: "CHRP" for example.
4.2 Still orderable SW's - i looked it up i have 108 of them. Same with warheads and what about the artmd.ini?
But no hurry, this program never was as good as now. QUICK_EDIT
I noticed that AICHECK doesn't always seem to find buildings if another object type is listed with the same ID, for example an animation or an overlay. With cases like walls, both the building and the overlay must share the ID (the overlay doesn't have its own section, but both are listed). In addition, it seems to have trouble finding buildings when the sections are placed between other object types, for example in between VehicleTypes. FYI I tested with TS, if that matters. _________________
The arrays only hold 1 instance of a named object if the index for both is before the data for both, it's just the way the script loads data, and would be a pain to change. As an aside, if the wall isn't buildable, it doesn't have to be a building at all...
I'd need to see specific examples if you mean something other than wall is having issues, because the index list dictates which array the object ends up in, if the object shows up under [VehicleTypes] then that's where it goes. There is a pointer array that defines what each object-to-be-found belongs to. Objects not related to walls should not share names as a rule of thumb, and I think it's good to encourage distinctiveness to be on the safe side when referencing?
AICHECK also does a post-pass on orphaned objects to see if it can determine what they are for the purposes of logging errors, but as long as everything is declared this shouldn't make a difference.
Beyond all that, has it helped?
PS. I did notice the dummy side values essentially mean that "ThirdSide" is expected as a third side, and any other name will read as fourth, including where it tells you how many sides are detected... it's easy to remove if you need to, just ask. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
MAPCLEAN 2.3 now automatically uppercases the theater value in a map, some modders changed the case because FA2 only recognizes uppercase, consider it a poor man's edit protection.
Also new script MAPKILL, or more specifically "YR Map Killer", this one has a very simple function that doesn't depend on the game or mods, and doesn't require configuration, it just deletes any map with a missing [Header] and/or any of the YR-only terrains, Lunar, Desert, NewUrban.
Since next to none of you mod RA2, MAPKILL is probably totally useless, but in the off-chance someone finds it useful. I have noticed some maps with corruption will cause the script to hang, but it tells you what map it is working on, so it should be easy to Ctrl-C and manually remove that map before trying again. The included batchfile is set for *.yrm but it can be changed to any filemask as usual.
- improved logging of sounds without resources (wavs), removing a redundant error
- fixed the console message showing which object was missing resources instead of the resource
Odd, there was a typo or copy/paste error because all the other conditions around it are correct and the if statement for the backup TeamType is also correct.
Find "if {$multi1 != 0}" and change that to "if {$multi1 == -1}"
Another performance enhancing release, I realized there's no need to load inis line by line and worry about memory usage, so now it blasts through with a full read and memory split. The above RequiredHouses glitch is fixed as well.
- Added a check for Engineer and other type category conflicts
- Fixed the multi-map check parsing code so a lack of files don't cause a crash
- Improved weapon/shrapnel/airburst checks
- Fixed projectile image checking
- Improved logging for weapons and other undeclared or orphaned objects
So good to see you work on it! Thank you. All features work as intended!
PipscaleCheck I really like!
There is a false positive however where a task force is ordered to move to a now friendly (because infiltrated by an engineer) before neutral tech building.
checking [AITriggerTypes]...
[010000F3-G] -> SCRIPT action (move to friendly building) target: NeutralTechBuilding
[010000E8-G] -> SCRIPT action (move to friendly building) target: NeutralTechBuilding
[010000E9-G] -> SCRIPT action (move to friendly building) target: NeutralTechBuilding
etc.
Same with a guard script targeting a construction yard wich does not have AIBasePlanningSide because it is normally unbuildable!
[010003B7-G] -> SCRIPT action (move to friendly building) target: Non-player or missing AIBasePlanningSide QUICK_EDIT
Those are informational warnings, you don't have to act on them. A lot of "errors" are not critical, but seeing them as potential mistakes allows you to better evaluate them in context. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
Yeah, I see; it is just such a big blob of distracting false positives in this case: And why is it a false positive? Because it is an AI-Action that is only triggered when the AI owns a tech building of that exact type... so the script checker says= wrong action but in kontext of the trigger it becomes a correct action!
This one was a bitch to sort out, but there were overlapping issues that didn't matter until I changed one thing, the point here is that "B anims" as in Buildup and BibShape have a toggle to check, but when unchecked certain features kept checking them for other reasons. This then exposed a need to change how the data is stored for referencing, which then exposed how Image= redirection of art became orphaned, and thus a false-positive error.
Updating took so long compared to most features, but the end result is better handling of mixed cases, and thus preventing otherwise known errors from showing up as orphans, which are handled differently. Likewise checkbanims=0 now disables declaration/existence tests while still loading the art as a valid object, allowing other functions to work without more special case handling.
First, I added an option to list duplicately referenced waves within a sound, though there are good reasons to do so to skew the randomness. This is purely for a quick check to see if there were copy+paste errors or typos, and not really for regular use.
Second, I added the optional inverse of what it does, it finds waves within audio.idx/audio.bag that are not referenced at all. Using this new feature I was able to remove about 10MB of audio from my mod, and trace down several sounds I had added to without updating the ini.
All in all, I think that's about as far as this script can go...
- checks all TechnoTypes for valid TechLevel
- checks BuildingTypes for valid AIBasePlanningSide if AIBuildThis=yes
- checks for name collisions among most objects (excludes overlay/terrain etc)
- checks Animations and Warheads referenced in the global sections are valid
- now lists unused Warheads
- now checks Warheads used within Particles
4) Warheads used by animations in artmd.ini are listed as unused.
5) If a task force is send towards a former neutral tech building as soon as that tech building becomes friendly via an engineer it is still displayed as an error
SCRIPT action (move to friendly building) target: NeutralTechBuilding
in aimd:
0=58,131143
1=49,0
The action works but it is still displayed as wrong.
6) This matter is Ares related but quite polluting the output with many false positives:
[MissileSplit4Weapon] -> WEAPON referenced as Airburst/Shrapnel but isn't attached to a valid unit
Ares has a weapontypes list so that you do not have to attach these types of weapons to dummy units anymore. Aicheck attributes them as not attached to a valid unit while they are in a valid list, which makes it hard to adress the one that is really missing:
[WeaponTypes]
1=StormFragment
2=TeslaSupportBeam
(That is how the list is named in rulesmd)
Suggestion:
I know you were against it before but I would nicely ask for the option to switch off specific tags in the aicheck config file like we can do with the "set gprereqs" tag: "setexeption" would do, so we could disable false positives like [thirdside] for example.
Same for the option to disable the unused warheads and weapons display in the log via the aicheck config file .
This is getting wholly into Ares territory, and at a glance would require changing a fair chunk of parsing code, or at least adding a bunch, which I am not prepared to venture into at this time.
Remember a false positive is just information, if you know you can safely ignore it, that's still better than the script not checking for the "proper" conditions. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
But maybe you delete the entry believing in the "false positive", that is pretty serious.
Also, in my attempt to use this, all that happens is "tclsh is not recognized as an internal or external command". This happens when running the script from RA2YR directory (as well as in other directories) _________________
I've just tried AICheck7 on YR but I think it has some bugs though, the most obvious is I get lots false positives on "move to friendly building", although my scripts are okay and running as expected. It says "Non-player or missing AIBasePlanningSide" or "TEAMTYPE has mismatched side (x vs y) for SCRIPT action (move to friendly building) target".
Unless I'm missing something, you must be computing the side wrong or most likely the building index. You probably know this already, but the building index should be calculated based on the position in the [BuildingTypes] array, not on the left side number, which is just a string, so I'm guessing AICheck is simply pointing to the wrong building. QUICK_EDIT
The mismatched side and such errors are to let you know if you have other faction objects your faction shouldn't have access to. As further back in the thread with Ich-H constantly asking about these, it's just information, the script doesn't know context, you do.
The point is to alert you to as many things as possible, without focusing on anything totally irrelevant.
The script does know the context from the teamtype. The team belongs to a side, the targeted building also belongs to a side, all you need to do is to compare the sides to drop the spam. Not sure how activetcl works, but it looks like it supports functions/procedures? If you make some tool functions to access various data it will be very easy to compare deeper stuff. QUICK_EDIT
Post your log, this generic discussion isn't going to help you get answers.
In my own mod I have this AICHECK warning:
[0ECCFA7C-G] -> Owner mismatch for backup TEAMTYPE: 0C142C8C-G <-> <all>
The reason I have that error is because it's an engineer on a flaktrack mission, but the flaktrack isn't available for Cuba, yet the trigger is <all> houses for the side. It's correct for all houses except Cuba.
This would inform me that I may need to make another trigger with it's own sets of teams/scripts for Cuba using Cuba's APC. What it can't tell is whether that means I should make the primary part of the trigger house specific exempting Cuba altogether from it, then make an entirely Cuba specific trigger, or whether I actually don't care if Cuba can't execute the secondary mission on the trigger. This is what I mean context.
I decided to add a re-indexing option that would sort all sounds by name. This is particularly useful when working on a map using FA2 and scrolling through the list, because if you have say ambient sounds scattered around, then typing the prefix won't show the full list, only the list starting at the first match.
A minor side effect is that inline comments on the index are discarded, but the keepcomments options will still save the header and inline comments everywhere else.
- added alternate source art checking within art.ini, where animations/sprites are using Image=xxxx
- added "100 unit bug" checking for VehicleTypes (no exception for Ares just ignore it)
- changed a few log messages
Ok so this was a fairly significant overhaul, with two major features. The parsing engine was updated to behave more like AICLEAN, in that it takes key sections and places them either at the beginning (in a specific order) or at the very end, with everything unknown/unimportant being between those blocks. This might not be terribly useful, but if you edit maps manually outside of FA2, it can make at least the scripting section easier to jump around within, as the definitions and the related code are clumped together.
Also, previously the script had no provision to work with missions (singleplayer maps) because it expected to see the header and preview sections of the map code, which are absent in missions, but while I had initially just added some error handling for that use case, I since decided to flesh out the possibility. I still don't recommend using this on missions, as the primary function of changing or removing code in a generic fashion would seem to contradict the needs of a mission map, which by its nature is entirely customized with many defaults overridden.
For cases where you want to use MAPCLEAN on a mission map, you'll have to edit the .tcl and set an internal flag to allow it. This also means you could make a duplicate of the script that is run by an alternative batchfile, specifically configured for your mission maps. By default the maps being processed are saved as *.old so there's little danger of losing anything.
On a less impactful note, both the configuration and log filenames can now be customized within the .tcl header, as well as a new option to specify whether to keep appending to the existing log, or overwrite it each run.
- Corrected the header string which said "AICLEAN" as an artifact from copy&paste code.
- Changed the sorting order to put all ambient sounds (_Amb_xxxxxxx) at the beginning, instead of at the end like previously due to the TCL sorting algorithm.
This one separates the index sorting from the object sorting, in that each can be enabled or disabled separately.
The new "sortsounds" option will make the script write out all the sound objects in the order matching the declaration list, no matter what ordering it uses. However the list is sorted, or not, is how they will be written.
As with the last update change, any sortation options will still place ambient sounds first, if both settings are off then it will not.
This one finally checks the tags within sounds for valid content: Volume, Priority, FShift etc...
Due to the lack of preloading the ini for processing, the one check I left out is to make sure sounds with Range= have the accompanying Type=local set, but otherwise I think it is feature-complete.
New:
- informs you that BurstDelayX on weapons is incorrect
- verifies DebrisTypes contain valid VoxelAnims on AircraftTypes & VehicleTypes
- additional checking on orphaned objects
Replacing the 8.1 release, I have rejigged the VoxelAnim code, which can now differentiate *barl.vxl and *tur.vxl references to their source unit, and checks if it has Turret=yes. Also it now recommends using Image= instead of ShareSource= (see: here)
Ok here's a variant of the last AICHECK, with one unique feature added: it cross checks the existence of files with all the presumed references, that means general animations and building animations .
Now there are some caveats here, it ignores Theater=yes art with the extensions like .sno/.tem/etc, and it only looks at the object names, which are all the snow art names, so that's what has to be extracted to check against. within the aicheck8mod.tcl you will have to set a new variable filebase to the path where you've extracted all the .shp files, the ones from the game and the mod you're testing.
The purpose of this is to find out if anything you have referenced in rules.ini+art.ini is physically missing, something a logic test between all the tags can't determine. As such this will require a bit of setup in finding all the files within the game mixes (ra2.mix->isosnow.mix and elsewhere) but is very simple to configure.
Both tcl and batchfile are distinctly named, so they won't overwrite any existing copy you have.
In the example screenshot, I didn't extract the collapse animations to the directory specified in $filebase, but everything else was present, including renamed Psychic Amplifier artwork from the temperate theater art, since it shows an error without snow art.
I discovered the orphan/unknown object detection code didn't handle VehicleTypes, so that's been corrected, which means they are later properly scanned for errors, even though they remain unused.
Additionally, as I found out, the game will crash for units that have DebrisTypes specified (overriding the [General] defaults), but don't have DebrisMaximums set for them! There are now error messages for one found without the other, and improper length lists.
I also improved some of the VoxelAnims checking code, adding range checks to a few tags, and shortening the error messages to be more inline with other sections.
I'm not sure I entirely understand how to use these scripts? I was able to sort out getting ActiveTCL working but if I understand the output I'm getting back, I need to have the INI files in the specific path C:\CC-RA2 ?
AICheck specifically seems to still kick back an error that it can't find rules.ini but if I rename my rulesmd then it seems to function. I'm a bit more interested in knowing how the map checkers work. I'm not entirely sure how it works or even what it does but I have a map that's been crashing on me every time I run it and I'm at wits end trying to figure out what's up with it. 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