MapChecker

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

Re: MapChecker

Post by Buggie »

Then you can select all plants and uncheck this flag (bCollideWorld). Or somehow change collision of it. If collision not same as default, there no warning.

You can't place InventorySpots manually. So this pointless tell this. It just hint about missing it. This mean you need rebuild paths.
User avatar
Barbie
Godlike
Posts: 2597
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MapChecker

Post by Barbie »

Suggestion for check: is ScriptedPawn.RangedProjectile of class projectile?
code

Code: Select all

function bool CheckRangedProjectile(out int ErrCount) {
/*********************************************************************************************
Checks if ScriptedPawn.RangedProjectile is a projectile and issues a warning for other classes.
ScriptedPawn.RangedProjectile==None may be correct.
*********************************************************************************************/
local ScriptedPawn SP;

	ErrCount = 0;
	foreach AllActors(class'ScriptedPawn', SP)
	{
		if (SP.RangedProjectile != None && ! ClassIsChildOf(SP.RangedProjectile, class'Projectile'))
		{
			logger(LOG_Warning, "CheckRangedProjectile", SP $ ".RangedProjectile ==" @ SP.RangedProjectile @ "is not of type 'Projectile'");
			ErrCount++;
		}
	}
	return ErrCount == 0;
}
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2137
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Added more checks:

Code: Select all

	checkWeaponLockerWeaponOrder();
Improved some checks:
- checkScriptedPawnRangedProjectile

Add modular system for connect modules which make check required create dependency.

Updated in first post: viewtopic.php?f=5&t=14809
User avatar
Barbie
Godlike
Posts: 2597
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MapChecker

Post by Barbie »

I noticed your comment "Plasma too?" - yes, that also needs a fix, because Plasma@UnrealShare.u has a damage of 0 (do devs have forgotten to set property?)

FYI my fix of RangedProjectiles

Code: Select all

function int FixRangedProjectiles(ELogType LogLevel) {
/*******************************************************************************
Changes RangedProjectile for all ScriptedPawns, if RangedProjectile.Class is
equal to:
* "class'UnrealShare.Plasma'" -> ScriptedPawn.Default.RangedProjectile
* "class'BotPack.GuidedWarShell'" -> ScriptedPawn.Default.RangedProjectile
* "class'UnrealShare.EnergyBolt'" -> Class'EnergyBoltSB'
* "class'UnrealShare.ShellCase'" -> ScriptedPawn.Default.RangedProjectile

If a stock SkaarjTrooper has no weapon, the default weapon is assigned.

Log a warning if
	ScriptedPawn.bHasRangedAttack != ScriptedPawn.Default.bHasRangedAttack
	ScriptedPawn.RangedProjectile != None && ! ScriptedPawn.bHasRangedAttack
Returns the number of modified ScriptedPawns.
*******************************************************************************/
local ScriptedPawn SP;
local int result;

	// log("Entered FixRangedProjectiles, Level.PawnList=" $ Level.PawnList);

	foreach AllActors(class'ScriptedPawn', SP)
		if (SkaarjTrooper(SP) != None && SkaarjTrooper(SP).WeaponType == None)
		{
			if      (SP.Class == class'SkaarjTrooper')  SkaarjTrooper(SP).WeaponType  = class'SkaarjTrooper'.Default.WeaponType;
			else if (SP.Class == class'SkaarjGunner')   SkaarjGunner(SP).WeaponType    = class'SkaarjGunner'.Default.WeaponType;
			else if (SP.Class == class'SkaarjInfantry') SkaarjInfantry(SP).WeaponType  = class'SkaarjInfantry'.Default.WeaponType;
			else if (SP.Class == class'SkaarjOfficer')  SkaarjOfficer(SP).WeaponType   = class'SkaarjOfficer'.Default.WeaponType;
			else if (SP.Class == class'SkaarjSniper')   SkaarjSniper(SP).WeaponType    = class'SkaarjSniper'.Default.WeaponType;
			// other types are custom and should not be changed
		}
		else if (SP.RangedProjectile == class'UnrealShare.Plasma')
			FixRangedProjectile(LOG_Info, SP, SP.Default.RangedProjectile, result);
		else if (SP.RangedProjectile == class'BotPack.GuidedWarShell')
			FixRangedProjectile(LOG_Info, SP, SP.Default.RangedProjectile, result);
		else if (SP.RangedProjectile == class'UnrealShare.EnergyBolt')
			FixRangedProjectile(LOG_Info, SP, Class'EnergyBoltSB', result);
		else if (SP.RangedProjectile == class'UnrealShare.ShellCase' || SP.RangedProjectile == class'Botpack.UT_ShellCase')
			FixRangedProjectile(LOG_Info, SP, SP.Default.RangedProjectile, result);
		// if *RangedProjectile==None* then *bHasRangedAttack* is not necessarily FALSE - see Titan for example. Such cases cannot be detected.
		else if (SP.bHasRangedAttack != SP.Default.bHasRangedAttack)
			logger(LOG_Warning, "FixRangedProjectiles", "bHasRangedAttack=" $ SP.bHasRangedAttack @ "is not the default value for" @ SP $ "; RangedProjectile=" $ SP.RangedProjectile);
		else if (SP.RangedProjectile != None && ! SP.bHasRangedAttack)
			logger(LOG_Warning, "FixRangedProjectiles", "bHasRangedAttack=false for" @ SP @ "although it has a RangedProjectile=" $ SP.RangedProjectile);
	return result;
}

----- snip -----

class EnergyBoltSB extends EnergyBolt;


simulated function Explode(vector HitLocation, vector HitNormal) {
/******************************************************************************
EnergyBolt.Explode() is not "simulated".
******************************************************************************/
	Destroy();
}


defaultproperties {
	RemoteRole=ROLE_SimulatedProxy
	LifeSpan=7
}

"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2137
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Plasma work for some scripted stuff. It blown and make damage if touch DispersionAmmo

Code: Select all

simulated function Explode(vector HitLocation, vector HitNormal)
{
	if ( Role == ROLE_Authority )
		HurtRadius(Damage,150.0, 'exploded', MomentumTransfer, HitLocation );	
	Destroy();
}

simulated function ProcessTouch (Actor Other, vector HitLocation)
{
	If ( (Other!=Instigator) && Other.IsA('DispersionAmmo') )
		Explode(HitLocation, HitLocation);
}
   
Auto merged new post submitted 3 minutes later
Improved some checks:
- checkScriptedPawnRangedProjectile

Updated in first post: viewtopic.php?f=5&t=14809
User avatar
Barbie
Godlike
Posts: 2597
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: MapChecker

Post by Barbie »

But Plasma has a damage of zero - then HurtRadius(Damage,150.0, …) does not really hurt.
And if it had a none zero damage: would really anybody shoot other player's or ScriptedPawns' dispersion pistol's projectiles? :shock:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Buggie
Godlike
Posts: 2137
Joined: Sat Mar 21, 2020 5:32 am

Re: MapChecker

Post by Buggie »

Idk. it look as weird ancient stuff or hack from Unreal.