MapChecker

Tutorials and discussions about Mapping - Introduce your own ones!
Buggie
Godlike
Posts: 3162
Joined: Sat Mar 21, 2020 5:32 am

MapChecker

Post by Buggie »

Special tool for UnrealEd for check for well-known map mistakes.

Some list of checks:

Code: Select all

	checkStatic();
	checkAlwaysRelevantCount();
	checkTriggerLight();
	checkLifeSpan();
	checkMoverOnce();
	checkDuplicateNames();
	checkMeshNone();
	checkCollisionForDrawScale();
	checkCTFFlags();
	checkInventoryRespawnTime();
	checkMoverReturnGroup();
	checkMoverGrab();
	checkScriptedPawnRangedProjectile();
	checkRotateActorRole();
	checkScriptedPawnInDamageZones();
	checkScriptedPawnInVoid();
	checkZoneInfoZone();
	checkSpectatorCamDrawType();
	checkWarpZoneInfo();
	checkMoverAmbientSound();
Appear in UnrealEd as builder button.
scr_1631582636.png
Source inside .u file. use UnrealEd if need see.

If you know some checks which can be added - write to topic.
If something going wrong - write to topic.

No any version here, so use time inside zip.
New version will be overloaded in first post.
MapChecker.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Buggie on Sat Sep 21, 2024 10:27 am, edited 78 times in total.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MapChecker

Post by sektor2111 »

You have some fake info over there:

Code: Select all

ScriptLog: Actors change DrawScale but use same CollisionRadius and CollisionHeight:
ScriptLog: MyLevel.Cow0
ScriptLog: MyLevel.Cow1
PAWN is NOT a Decoration. Pawn is adjusted itself in run-time - it's a bad practice to mess with Collision for re-scaled pawns. Those cows are NORMAL and they should stay exactly as they are unless you want to see some Behemoth from MH-GXech what funky collision is having. In that map where Pawn is stupidly resized MapChecker doesn't report anything at this point and map is NOT OK but it is reporting actors which are not having any issue.

Code: Select all

ScriptLog: MyLevel.SkaarjLord0
ScriptLog: MyLevel.SkaarjLord1
ScriptLog: MyLevel.SkaarjLord2
ScriptLog: MyLevel.SkaarjLord3
ScriptLog: MyLevel.SkaarjLord4
These Skaarj are NORMAL in game all the way but not Behemoth0 which in game blocks everything - it should not be screwed up EVER, patch file which I was writing for that map it's just putting the dumb setup back in original.

Pawn.UC

Code: Select all

...
	if ( DrawScale != Default.Drawscale )
	{
		SetCollisionSize(CollisionRadius*DrawScale/Default.DrawScale, CollisionHeight*DrawScale/Default.DrawScale);
		Health = Health * DrawScale/Default.DrawScale;
	}
...
Never mess with these cylinders for PAWNS unless you know what you do. MH-GXEch map is demonstrating clearly that Pawns screwed up are not looking normally and this tool doesn't report them but it's reporting those which are not a problem and they should STAY as they are.
User avatar
Barbie
Godlike
Posts: 2923
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MapChecker

Post by Barbie »

Buggie wrote: Tue Sep 14, 2021 2:26 am If you know some checks which can be added - write to topic.
From my MapChecker:
  1. Check PlayerStarts or even all NavigationPoints if placed in void
  2. Check the following concerning ThingFactories and SpawnPoints:
    • Factory.Prototype is NONE, abstract, bStatic or bNoDelete
    • Factory.Capacity > FactoryCapacityThreshold
    • Factories have between 1 and 16 SpawnPoints
    • Factories with the same Tag
    • all SpawnPoints have a Tag and an assigned Factory
  3. Huge Trigger collision causes lags:

    Code: Select all

    function bool CheckTriggers(out int ErrCount) {
    local Trigger TRG;
    
    	ErrCount = 0;
    	foreach AllActors(class'Trigger', TRG)
    		if (TRG.CollisionRadius > TriggerSizeThreshold || TRG.CollisionHeight > TriggerSizeThreshold)
    		{
    			logger(LOG_Warning, "CheckTriggers", "huge collision for" @ TRG @ "(R" $ int(TRG.CollisionRadius) $ "/H" $ int(TRG.CollisionHeight) $ ")");
    			ErrCount++;
    		}
    	return ErrCount == 0;
    }
  4. Check if each Event has at least one Actor with that Tag
"If Origin not in center it be not in center." --Buggie
Buggie
Godlike
Posts: 3162
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Barbie wrote: Tue Sep 14, 2021 12:37 pm 4. Check if each Event has at least one Actor with that Tag
What about GradualMover and some custom classes which modify tags in runtime?
Barbie wrote: Tue Sep 14, 2021 12:37 pm Factories have between 1 and 16 SpawnPoints
Tag for SpawnPoints can set at runtime.
Barbie wrote: Tue Sep 14, 2021 12:37 pm all SpawnPoints have a Tag and an assigned Factory
Some spawnpoints can be used without factories if use custom version of class.

Automatically merged

Barbie wrote: Tue Sep 14, 2021 12:37 pm Huge Trigger collision causes lags
Not sure, but possible only if on map present movers. Or even huge movers.
User avatar
Feralidragon
Godlike
Posts: 5498
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: MapChecker

Post by Feralidragon »

Also, issues with large collision cylinders should have been all addressed from 469 onwards, considering that Higor/Caco merged his new collision octree into the patch (I think).

I didn't test the collision in 469 yet, but at least in 436 using his collision octree did fix all issues related with large collisions, so it may be worth to test any of those problematic cases again in 469.
Buggie
Godlike
Posts: 3162
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Map build for v436 too, so still need considered this as bad practice, even if this be fixed in v469.
User avatar
Feralidragon
Godlike
Posts: 5498
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: MapChecker

Post by Feralidragon »

Sure, but it then should at least inform the mapper what is fixed in 469, at least for educational purposes, because what is a "bad practice" in 436 is not the same as in 469, otherwise all the trouble of fixing those issues is completely wasted.
Which is not very nice.

So, maybe, besides the informative note, it should also have the ability to do targeted checks: if I am building a map for 469 and above, not caring about 436 at all, why should I have to deal with that warning at all?

Otherwise that tool will just keep perpetuating potential myths around problems that do not exist anymore, forever.

But these are just suggestions, of course.
User avatar
Barbie
Godlike
Posts: 2923
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MapChecker

Post by Barbie »

Feralidragon wrote: Tue Sep 14, 2021 4:56 pmissues with large collision cylinders should have been all addressed from 469 onwards
In map MH-Nagrath Trigger1 has a collision of (R=32000/H=10000) and causes heavy lags on server v451 when shooing into the air in the area at end of the map (see topic Heavy lags in MH-Nagrath). I just tried it with v469c on server and v436/v469c on client and didn't notice any lags.
"If Origin not in center it be not in center." --Buggie
Eternity
Skilled
Posts: 178
Joined: Sat Nov 30, 2019 10:56 pm

Re: MapChecker

Post by Eternity »

Large collision cylinders reduce the performance of the collision related functions ("Trace" in this case) anyway, but with v469c these performance losses are not that much since it has the collision performance significantly improved.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MapChecker

Post by sektor2111 »

When mapper uses a BIG TRIGGER ( 20000 x 20000 ) for firing some lousy smoke it's not like a small TIMEDTRIGGER cannot launch smoke without lagging a PLAIN server - I edited such a map because it was annoying. Why would be used such a Big trigger when things can be done without any processing ?
To not forget that Touchers list has 4 elements which discards more than 4 touchers anyway.
Regarding to "scaled collisions" MapGarbage has a bit of fix for decorations and Pawns are reverted doesn't matter DrawScale used.

Code: Select all

P.SetCollisionSize(P.Class.Default.CollisionRadius,P.Class.Default.CollisionHeight) //No insanity today
Because there is no reason to waste time editing actors and doing more damage. For decorations in more cases is recommended scaling cylinder correctly and I did not see this way in many maps and it's why I added the function. Of course there might be needed a bit of extra-work because... some of those statues can be placed horizontal on the ground and it's not like you need to adjust cylinder for extra-collisions much over statue's visible volume.
Buggie
Godlike
Posts: 3162
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Added more checks:

Code: Select all

	checkElevatorMoverEncroach();
	checkNavigationPointInVoid();
	checkRotateReplication();
	checkCollisionSize();
	checkSkaarjTrooperWeapon();
	checkEnforcerRespawn();
	checkRotateStatic();
	checkActiveBrushes();
	checkTeleporterRotation();
Updated in the first post: viewtopic.php?p=131447#p131447
Buggie
Godlike
Posts: 3162
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Added more checks:

Code: Select all

	checkSpecialEventBroadcastEmpty();
	checkFortStandardVisibleSize();
	checkFortStandardCollide();
	checkExplosionChainCollide();
	checkMonsterHuntPlayerStartTeamNumber();
	checkBiterFish();
	checkMonsterHuntAssaultInfo();
	checkMonsterHuntFortStandard();
	checkMonsterHuntTeamTrigger();
	checkMonsterHuntPlayerStartCount();
	checkMonsterHuntTeamCannon();
	checkMonsterHuntMonsterEnd();
	checkAttachNoDeleteToMover();
	checkInventoryMyMarker();
	checkLightDynamic();
	checkAttachTag();
	checkFortStandardHidden();
	checkTriggerInactive();
	checkScriptedPawnPosition();
	checkExplodingWallCollide();
	checkExplosionChainDestroy();
	checkExplodingWallDestroy();
Updated in the first post: viewtopic.php?p=131447#p131447
User avatar
fudgonaut
Adept
Posts: 365
Joined: Sat Oct 05, 2013 7:20 am
Personal rank: Easy Target
Location: "The Butthole of the World"

Re: MapChecker

Post by fudgonaut »

I unzipped MapChecker.u and the editorres folder to Unreal Tournament/System

I added the follwowing to UnrealTournament.ini under [Editor.EditorEngine]

EditPackages=MapChecker

But when I try to start UnrealEd:

unrealed.jpg

What am I doing wrong? Help!
You do not have the required permissions to view the files attached to this post.
Buggie
Godlike
Posts: 3162
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

In Editor.log must be reason why.

I check now: v436 load this file fine. so this not related to v469 where it built.
User avatar
fudgonaut
Adept
Posts: 365
Joined: Sat Oct 05, 2013 7:20 am
Personal rank: Easy Target
Location: "The Butthole of the World"

Re: MapChecker

Post by fudgonaut »

Buggie wrote: In Editor.log must be reason why.
Yep - the editor.log reported a different package was missing. When I restored the missing file, the editor loaded properly. Thanks!