Various XC Works Discussions

User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Various XC Works Discussions

Post by sektor2111 »

I was thinking that some of my doing toward patching maps on purpose to remove that "1000 Nodes searched from X" might trigger interest here and there.
If this task in simple maps was probably piece of cake, I got headaches from my tiny brain trying to mitigate/solve problems developed by "Mix-Mapping" types a la MH-LandsOfNapali. That Level is done from pieces, the evidence are duplicated actors mooing around, we do have 1716 NavigationPoint actors spreading spam when DevPath goes in troubles. By injecting new paths and getting rid of others there is possible a clean Network with only 800+ NavigationPoint actors.
My problem has come from iterator foreach AllReachSpecs crashing during a call through Navigation and doing tweaks increasing cycles to the death.

Code: Select all

LANDSOFNAPALI: Attempting to screw up Evil NavigationPoint actors...
Critical: appError called:
Critical: PathsActor MH-LandsOfNapali.PathsActor0 (Function ANDSOFNAPALI.PathsActor.CleanupNavSpecs:0014) Runaway loop detected (over 10000000 iterations)
Critical: Windows GetLastError: The operation completed successfully. (0)
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Log: DirectDraw End Mode
Exit: UD3D9RenderDevice::ShutdownAfterError
I went for a slooow solution but... not everything do looks fine. Player might spawn in other location because re-wrapping Navigation could make triggers to go wrong for some reasons - or I do have to recall some PostBeginPlay around triggers for capturing stuff again.... Another time spawning in a new location do works properly... I'm not sure if duplicated actors are not fooling iterators by screwing that whatever TArray else I don't have other logic explanations.
A code snippet from state which is processing/eliminating old network - I don't think this is final stage - is down there:
Spoiler

Code: Select all

auto state PathsMapping
{
Begin:
	Sleep(0.01);
	TD = Level.Game.GameSpeed;
	BroadcastMessage("Waiting Map Patching Process...");
	ConsoleCommand("SLOMO 0.11"); //Setup lag for prevent a bad start during DevPath attack- troubles might occur here 
	ChangeNastyActors();
	Sleep(0.01);
	DoAlterBadPoints();
	cnt = 0;

	A = Level.NavigationPointList;
		While ( A != None )
		{
			cnt++;
			if ( cnt >= 128 )
			{
				Sleep(0.00); //Break them
				cnt = 0;
			}
			if ( Old != None )
				Old.NextNavigationPoint = None;
			A.bStatic = False;
			A.bCollideWorld = False;
			A.bCollideWhenPlacing = False;
			G.CleanupNavSpecs(A);
			if ( PlayerStart(A) == None && SpawnPoint(A) == None
			&& Teleporter(A) == None && QueenDest(A) == None )
			{
				A.Tag = 'BORKED';
				A.SetLocation( A.Location+vect(0,0,-3500) );
				if ( InventorySpot(A) != None && InventorySpot(A).MarkedItem != None ) //Remove these
				{
					InventorySpot(A).MarkedItem.MyMarker = None;
					InventorySpot(A).MarkedItem = None;
				}
			}
			if ( PlayerStart(A) != None )
			{
				A.SetLocation(A.Location+vect(0,0,120));
				A.bStatic=True;
			}

			Old = A;
			A = A.NextNavigationPoint;
		}
	A = None;
	Old = None;
	Level.NavigationPointList = None;
	cnt = 0;
	Sleep(0.02);
	GetNewNavList();
	Sleep(0.00);
	RebuildPrimaryNetwork(); //Old usable Navigation will go linked excepting useless stuff
	Sleep(0.15); //And breath a bit
	log ("Navigation processing done, spawning new paths...",LTag);
	log ("Moving Navigation obstructions",LTag);
	ReleaseRoutes(); //Moving to hell all doors - our tester guy need to figure good reachable spots
	Sleep(0.05); //Breath, if previous task do takes time
	ConsoleCommand("SLOMO"@TD); //Get back after applying hacks
	SpawnPaths(); //Deploy our new stuff
	Spawn(class'SomeActor'); //A sort of additional management
	Sleep(0.00); //Breath a bit again - no rush
	DoFakeNavigation(); //If bad spots are taking place use brute force
	Sleep(0.05);
	RestoreOriginal(); //After all parties bring back all Doors (movers)
	Sleep(0.00);
	DoReconnect(); //Cause forced links if are needed
	Sleep(0.0);
	DoAdditionalPostNavigation(); //Adds after Lifts Pathing
	BroadcastMessage("Patching Process Done...");
	Spawn(class'TelPathsHacker'); //Teleporter management - Lol Epic, thanks Higor
	Spawn(class'NoLost'); //Default Bot must get some help when possible
	GotoState(''); //Our job has ended here - thanks for participation
}
I will attempt another combination in next round...
I think Final viable solution would be Editing map and removing duplicated actors because they do not have any purpose...
Opinions ?
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

Subject: Run-Time paths, PathNode properties.
I think I have to quit using a hard-coded distance for creating links/paths. It looks like not all spots are suitable for the same distance which I have at this moment - 750 UU.
Probably these SmartNode actors which I'm using are not that smart. I think I need two more variables having some default properties:
- UU distance recommended for tracing possible connections (maybe a number of such connections for preventing an overload) - in plane simple fields I think I can go at 850+ without troubles while in other spots I need links more restricted, are not needed so many connections - maybe going to 300 - 400 UU depending on obstructions, will decrease Radius for iterator's range making it to work faster in a smaller circle;
- a bool which comes True when paths are forced through doors and using a small connection range.
The question is: Worth dealing with other new values causing a bit of load at beginning of game ? Answer will come after testing directly in a slower machine as possible...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

I don't know where I could post something about asking Higor for some... stuff if he wants to help a little bit here:
We do have:

Code: Select all

...
GameEngine=XC_Engine.XC_GameEngine
EditorEngine=Editor.EditorEngine
WindowedRenderDevice=SoftDrv.SoftwareRenderDevice
...
Probably I would like something different - virtually speaking

Code: Select all

...
GameEngine=XC_Engine.XC_GameEngine
EditorEngine=XC_Editor.XC_EditorEngine
WindowedRenderDevice=SoftDrv.SoftwareRenderDevice
...
These aren't coming from "critical" points but are coming from a poorly coded LOGGING stuff by Epic. I was checking some maps which last time have been floating around and trying to figure things like:

Code: Select all

Log: Scout didn't fit
And the rest of polyfix bla bla, which nothing is reporting WHO the heck is guilty here, which Inventory is doing sucks and which brush went retarded, these logs without pointing problem are hilarious as useless as they are. Which mapper can figure the problem from a map done by another dude if Editor doesn't do the right logging ? Of course by setting up another skinny ass Scout, error from Inventory is gone but I still can see dumb things in game because of a bad "model" or whatever "amazing" brush miss-aligned or having non-coplanar surface(s).
Eh ?
If I'm asking too much I apology in advance... :help:
User avatar
FraGnBraG
Inhuman
Posts: 930
Joined: Sun Jun 13, 2010 5:13 pm
Personal rank: Good news everyone!
Location: Canada
Contact:

Re: Various XC Works Discussions

Post by FraGnBraG »

sektor2111 wrote:...1000 Nodes searched from X...
So is any way to fix this problem in a general way? other than just make smaller sized maps - DM, CTF, MH all seem affected.
A solution where older maps that have the problem could be easily fixed would be good-to-have...
Where is the actual code that throws the error located? Can that be modified?
-=FraGnBraG Level Design=- ***UPDATED! even works on your phone!***
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Various XC Works Discussions

Post by Higor »

User a XC_Engine powered Unreal Editor.

PathRebuilder button:
> allows you to alter the maximum distance between path nodes.
> doesn't create InventorySpot for items hidden in editor (use VisGroup toggling to turn 10 paths into 1!!)
> manual single-direction linking through event>tag

MeasureDistance button:
> measures the distance between two selected actors.
> measures the distance between a selected actor and it's nearest camera.

Use both to stretch your path network and reduce path node count.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

I'm using that - including brushtomesh but still borked brushes are a hard task for hunting them in order to align them properly.

Edit: completing thoughts about usage.
"EditorAdds" used by me were a little bit different. First I'm preparing environment for these XC paths:
exec ha - where "ha" is a file translated in my head a follows: Please hide ammo right now, and content do looks as follows:

Code: Select all

set Ammo bHiddenEd 1
this will prevent Builder to deploy Inventoryspot actors here - I don't need them... they are only loading new paths pushing engine seeking over boundaries.
Then executing another process:

Code: Select all

	if ( bPreNavigAddHck )
	{
		MyMap.ConsoleCommand("actor select none");
		MyMap.ConsoleCommand("set PathNode CollisionHeight 40");
		MyMap.ConsoleCommand("set PathNode CollisionRadius 18");
		MyMap.ConsoleCommand("set PathNode bMovable 0");
		MyMap.ConsoleCommand("set PathNode bCollideWhenPlacing 0");
		MyMap.ConsoleCommand("set InventorySpot CollisionHeight 40");
		MyMap.ConsoleCommand("set InventorySpot CollisionRadius 8");
		MyMap.ConsoleCommand("set InventorySpot bMovable False");
		MyMap.ConsoleCommand("set InventorySpot bHiddenEd False");
		MyMap.ConsoleCommand("set LiftExit CollisionHeight 40");
		MyMap.ConsoleCommand("set LiftExit CollisionRadius 18");
		MyMap.ConsoleCommand("set LiftCenter CollisionHeight 40");
		MyMap.ConsoleCommand("set LiftCenter CollisionRadius 18");
		MyMap.ConsoleCommand("set JumpSpot CollisionHeight 40");
		MyMap.ConsoleCommand("set JumpSpot CollisionRadius 18");
		MyMap.ConsoleCommand("set TranslocDest CollisionHeight 40");
		MyMap.ConsoleCommand("set TranslocDest CollisionRadius 18");
		MyMap.ConsoleCommand("set TranslocStart CollisionHeight 40");
		MyMap.ConsoleCommand("set TranslocStart CollisionRadius 18");
		MyMap.ConsoleCommand("set AlternatePath CollisionHeight 40");
		MyMap.ConsoleCommand("set AlternatePath CollisionRadius 18");
		MyMap.ConsoleCommand("set PathNode DrawScale 0.5");
		MyMap.ConsoleCommand("set Inventory bCollideWorld 1");
		MyMap.ConsoleCommand("set NavigationPoint bEdShouldSnap 1");
		MyMap.ConsoleCommand("set Scout CollisionHeight 40");
		MyMap.ConsoleCommand("set Scout CollisionRadius 10");
		MyMap.ConsoleCommand("set Scout bCanJump 1");
		MyMap.ConsoleCommand("map sendto last"); //Trigger a ViewPort update after this task
	}
This do takes an eye-blink and then I put nodes or moving all current nodes lower with at least 8 UU. Now I can add Nodes where None mapper was adding nothing before "because Editor is not letting me to put nodes in small spots" - a mapper said. They have even good ReachSpecs because... Bots and Me can use them as they are. (I'm still thinking at my planed "radar" - find a/some monster/s left in map using paths and not render ).
When ammo is hidden (or another borked stuff) XC builder won't add paths there, and, hell yeah, distance limitation was my dream since forever, now this is for real.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

About whatever things for Editor, bugging/debugging. This is a sort of basic reporting so far but I have to implement human readable WORDS or a small dictionary/legend at end of report. So far is this:
[attachment=0]Basic_Rep_00.PNG[/attachment]

It's from my MH map 3072 type where I can see simple but solid links as long as the ground is... nice.
PathNode selected is connected with only two nodes around without having useless specs... and these have been build before existence of XC builders using default Goblin's doings...
To consider

Code: Select all

	enum EReachSpecFlags
	{
		R_WALK = 1,	//walking required
		R_FLY = 2,   //flying required 
		R_SWIM = 4,  //swimming required
		R_JUMP = 8,   // jumping required
		R_DOOR = 16,
		R_SPECIAL = 32,
		R_PLAYERONLY = 64
	};
Anything more pro ?

Note: By doing the check in some AMC map reported as a crusher, Goblin is crashing Editor instantly at this query proving that map it's an alien type one, so it will still be a crusher in random moments... DescribeSpec by Epic did not crash any game or UT map so far. It's time to do a revision around garbage stuff which I might have on drives...
EDIT: I found where to not deal with null things because Editor will perform KO.
EDIT2: Worth some effort for translating bytes into words ?
This is PathNode57 from CTF-November. Connections are reported like here:

Code: Select all

Specs: +++++
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[0]=1649 Start=PathNode199 End=PathNode87 RFlags=13 Dist=1626
Connected: PathNode199 to PathNode87.
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - Paths[0]=1278 Start=PathNode87 End=PathNode150 RFlags=4 Dist=684
Connected: PathNode87 to PathNode150.
NoReachFrom: PathNode87 to point 0 which means PathNode29
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[1]=1631 Start=PathNode195 End=PathNode87 RFlags=13 Dist=1620
Connected: PathNode195 to PathNode87.
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - Paths[1]=1276 Start=PathNode87 End=PathNode134 RFlags=4 Dist=612
Connected: PathNode87 to PathNode134.
NoReachFrom: PathNode87 to point 1 which means LiftExit27
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[2]=1942 Start=PathNode29 End=PathNode87 RFlags=1 Dist=984
Connected: PathNode29 to PathNode87.
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - Paths[2]=1277 Start=PathNode87 End=PathNode149 RFlags=4 Dist=602
Connected: PathNode87 to PathNode149.
NoReachFrom: PathNode87 to point 2 which means LiftExit24
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[3]=1035 Start=PathNode134 End=PathNode87 RFlags=4 Dist=612
Connected: PathNode134 to PathNode87.
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - Paths[3]=1279 Start=PathNode87 End=PathNode151 RFlags=1 Dist=554
Connected: PathNode87 to PathNode151.
NoReachFrom: PathNode87 to point 3 which means PathNode199
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[4]=1040 Start=PathNode149 End=PathNode87 RFlags=4 Dist=602
Connected: PathNode149 to PathNode87.
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - Paths[4]=1275 Start=PathNode87 End=PathNode55 RFlags=1 Dist=430
Connected: PathNode87 to PathNode55.
NoReachFrom: PathNode87 to point 4 which means PathNode195
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[5]=446 Start=PathNode52 End=PathNode87 RFlags=1 Dist=602
Connected: PathNode52 to PathNode87.
NoReachFrom: PathNode87 to point 5 which means PathNode16
oooooooooooooooo: oooooooooooooooo
Specs: PathNode87 - UpstreamPaths[6]=1047 Start=PathNode150 End=PathNode87 RFlags=1 Dist=342
Connected: PathNode150 to PathNode87.
NoReachFrom: PathNode87 to point 6 which means PathNode48
Specs: +++++
Specs: ReachSpecs Flags summary:
Flg: R_WALK = 1
Flg: R_FLY = 2
Flg: R_SWIM = 4
Flg: R_JUMP = 8
Flg: R_DOOR = 16
Flg: R_SPECIAL = 32
Flg: R_PLAYERONLY = 64
PathNode199 is connected to PathNode57 and will require reachFlags = 13. In my translation this means 8 (R_Jump) and 4 (R_Swim) and 1 (R_Walk) because node 57 is in water and if you cannot swim, you shouldn't move through that point. Jump is required because you want a "Jeronimo" type travel for getting over a top ledge (Node 199) - Default Bot stops at ledges so it has to jump over, and definitely you will want capability of walking because you might want to get closer to Node 199 for continuing such movement. So far it's logic. But how to transfer this 13 into readable words using a bit of math ? Or maybe I have to leave it as it is because I understand what is about...
Attachments
Basic_Rep_00.PNG
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

Due to said problems with newer editing stuff, I think I want to setup another party for XC_Engine21 or less XC_Engine - at least v21 for me is good as it is. Target: Editor. I want to configure a builder or inside an existent builder a feature to discover that Pathing bug causing loops. Probably this heads to iterations limit so I might I have to think well strategy, if won't help, maybe a Mutator for debugging running a state code should do the task in a few seconds breaking iterations constantly and smoothly reporting borked spots and buggers. Is this doable in Editor without to crash it ? Right now I can have a clue about some stairs if A.I. can navigate them using jump or they are one-way, right in Editor without firing game, but those buggers are a hard task to find when map has more load.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Various XC Works Discussions

Post by Barbie »

sektor2111 wrote:But how to transfer this 13 into readable words using a bit of math ?
Use the bitwise AND (&) for it.
Example (compilable):

Code: Select all

const RF_Transactional	= 0x00000001;
const RF_Public			= 0x00000004;
const RF_Transient		= 0x00004000;
const RF_NotForClient	= 0x00100000;
const RF_NotForServer	= 0x00200000;
const RF_NotForEdit		= 0x00400000;

function String FlagsToString(int Flags) {
local string result;
   if ((Flags & RF_Transactional) != 0) result = result $ "RF_Transactional ";
   // ...
   if ((Flags & RF_NotForEdit) != 0) result = result $ "RF_NotForEdit ";
   // cut off last space:
   if (result != "") result = left(result, len(result) - 1);
   return result;
}
sektor2111 wrote:Target: Editor. I want to configure a builder or inside an existent builder a feature to discover that Pathing bug causing loops.
Another option is NOT using UnrealEd but another development tool (C, C++, Delphi, Perl, VBS, Whatever) working on an exported T3D file. (I have a rudimentary tool coded with Delphi (version 3 :lol2:) that checks a map in T3D format for some common errors.)
<EDIT>
Fixed above code so that it will compile.
</EDIT>
Last edited by Barbie on Sat Dec 22, 2018 5:20 pm, edited 2 times in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

Barbie wrote:Another option is NOT using UnrealEd but another development tool (C, C++, Delphi, Perl, VBS, Whatever) working on an exported T3D file.
Perhaps another option is to not spent X years learning programming languages which I never worked with them, I'm not an IT technician or such, but making a mutator for running into a state code takes less time if Editor is grinding teeth at iterations.
About translations in strings of numbers returned from specs like 1, 4, 9, 13, 32 I have to figure what is best - or the best is... NOTHING, because I'm understanding them as numbers as they are - "legend" being logged - would be somehow helpful for others which want WORDS.
So I'm asking you if you want to light me as follows:
We have flags (perhaps using pre-defined constants): 1, 4, 8, 16, 32, 64(-never seen so far). Results returned by native might be: 9, 13.
Sample me the function for these 13, 9, not for default object in HEX.
Edit: I want to see something that can be compiled rather than snippets.
Edit2: If that flag = 32 then the rest of results are dumb things - first test would be if we have a match with exact flags and then dealing with other values, this is not that easy, because types are incompatible with "&" or "|" and... they won't compile. ReachFlag at teleporters and Combos LE-LC-LE is exactly 32 - SINGLE who need this specification not other string.

Note: I see reachFlag Fly in XC stuff but I have never seen it reported in any map - is that only a myth or is doable in Editor ? Or a deal with VisNoReach paths ? Do they have an index then ? Or this fly Flag is aiming only RUN-TIME pathing - that's explain a lot then... because I think Goblin has no deal here... or... making an XC Mutator connecting with this flag all VisNoReach points using R_FLY, oh well "PostPathEvaluate" looks as a "deja vu" somewhere... eh... worth a walk around.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Various XC Works Discussions

Post by Barbie »

sektor2111 wrote:Perhaps another option is to not spent X years learning programming languages which I never worked with them
Have you tried it? If you know the programming elements like loops, variables, functions and so on you can code in another language easily. But like in spoken languages you get mixed up sometimes; for example in above code I had used VBA's operator "&" to concatenate strings instead of UScript's "$"...
sektor2111 wrote:types are incompatible with "&" or "|" and... they won't compile
I updated above code so that it will compile now. The errors were missing brackets to override default precedence ("!=" has precedence before "&") and usage of wrong symbol for string concatenation.
sektor2111 wrote:If that flag = 32 then the rest of results are dumb things
First create error free code, then try to optimize... 8)
You cannot check if an expression has set a specific bit, and if the whole expression is identical to that bit coded value, at the same time. Of course you can add a statement that checks if they are equal:

Code: Select all

if ((Flags & RF_Transactional) != 0) result = result $ "RF_Transactional "; // check if input contains this bit
if ((Flags == RF_Transactional) return result; // check if input is equal to this bit
But you have to add it to every code line where the bit existence is checked what results in a double number of comparisons. Wether that is more efficient than before depends on the statistical bit distribution of the input.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

In the meaning of Flags, these are two things: object flag said 0×00something, and reachFlag which is a decimal number returned by DescribeSpec according to other decimal set as constants in those devs. Because HEX is not the same with DEC these will mismatch each-other somehow. And now, one of my default human issues is that I don't spent 10+ years for something and I go for an alternate raw solution. As long as I did not see any flag between 16 and 32 and never something like 64, I took in account this and I wrote other things without to blink an eye. Now I have this:
BuilderCheckingFlag NOT object flag but navigation Flag

Code: Select all

final function string GetReadableFlag(int I)
{
	local string result;
	local int K;

	if ( I == 0 )
	{
		result = "NoFlag ";
		GoTo Truncate;
	}
	else if ( I == 64 )
	{
		result = "PlayerOnly ";
		GoTo Truncate;
	}
	else if ( I == 32 )
	{
		result = "Special ";
		GoTo Truncate;
	}
	else if ( I == 16 )
	{
		result = "Door ";
		GoTo Truncate;
	}
	else if ( I == 8 )
	{
		result = "Jump ";
		GoTo Truncate;
	}
	else if ( I == 4 )
	{
		result = "Swim ";
		GoTo Truncate;
	}
	else if ( I == 2 )
	{
		result = "Fly ";
		GoTo Truncate;
	}
	else if ( I == 1 )
	{
		result = "Walk ";
		GoTo Truncate;
	}
	else
	{
		if ( I < 16 && I > 8 )
		{
			result = "Jump ";
			K = I - 8;
			if ( K >= 4 )
			{
				result = result$"Swim ";
				K = K - 4;
				if ( K <= 0 )
					goto Truncate;
				if ( K == 1 )
				{
					result = result$"Walk ";
					GoTo Truncate;
				}
			}
			else if ( K >= 2 )
			{
				result = result$"Fly ";
				K = K - 2;
				if ( K <= 0 )
					goto Truncate;
				if ( K == 1 )
				{
					result = result$"Walk ";
					GoTo Truncate;
				}
			}
			else if ( K == 1 )
			{
				result = result$"Walk ";
				GoTo Truncate;
			}
		}
		else if ( I < 8 && I > 4 )
		{
			result = "Swim ";
			K = I - 4;
			if ( K >= 2 )
			{
				result = result$"Fly ";
				K = K - 2;
				if ( K <= 0 )
					goto Truncate;
				if ( K == 1 )
				{
					result = result$"Walk ";
					GoTo Truncate;
				}
			}
			else if ( K == 1 )
			{
				result = result$"Walk ";
				GoTo Truncate;
			}
		}
		else if ( I < 4 && I > 2 )
		{
			result = "Fly ";
			K = I - 2;
			if ( K == 1 )
			{
				result = result$"Walk ";
				GoTo Truncate;
			}
		}
	}
	result = "MoreThanDoor ";
Truncate:
	if ( result != "" ) result = left( result, len(result) - 1 );
		return result;
}
I preserved some string in other sudden case, but still having original translated-into-words number as returned by DescribeSpec.

Code: Select all

log ( N.Name@- Paths[$i$"]="$N.Paths[i]@Start=$Start.Name@End=$End.Name@RFlags=$GetReadableFlag(reachFlags)@=@reachFlags@Dist=$distance,'Specs' );
Readable in Editor.log - even during editing after resizing log Window a bit. This will help to check/understand if a spot can be passed by A.I. without to launch 100+ game sessions by only reporting point directly in Editor.
Now I'm testing a feature toward bStatic doing 2 things: if something has bStatic as class and has been screwed, if something has bStatic as actor but class doesn't have such thing... to implement bNoDelete as well... helpful for preventing bugs hunting through 1000+ actors and doing fixes right in Editor without any t3d thing.

Researcher type statistics and Brain-farts about stats ?
Oh well, I think now can be opened each stock map from UT and reporting each NavigationPoint somewhere if anyone wants to read or to know how many PathNodes has stock UT :lol2: and their specifications...
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Various XC Works Discussions

Post by Barbie »

sektor2111 wrote:Because HEX is not the same with DEC
Oh, it is in that case. Imagine the visual representation of a number as a language: in English it is "twentytwo", "ventiduesimo" in Italian, "zweiundzwanzig" in German, "dvadeset i dva" in Croatia - but it means all the same, 22.
Or in different number systems: 22 (decimal) = 26 (octal) = 16 (hex) = 10110 (dual). It means all the same, whatever name I give it.

Back to the navigation flags:
Because not only one but multiple properties can occur, you cannot simply number it like this (NM=Navigation Mode)

Code: Select all

const NM_Walk			= 1;
const NM_Fly 			= 2;
const NM_Swim			= 3;
const NM_Jump			= 4;
const NM_Door   		= 5;
const NM_Special   	= 6;
const NM_PlayerOnly	= 7;
because you would not be able to say "you need 'swim' and 'walk'. Instead every navigation mode is represented by a bit, and in this special case it is the best to view these numbers in dual system (NF=Navigation Flag):

Code: Select all

// number systems: decimal, hexadecimal, dual
const NF_Walk 		= 1;  // = 0x01 = b0000.0001
const NF_Fly  		= 2;  // = 0x02 = b0000.0010
const NF_Swim 		= 4;  // = 0x04 = b0000.0100
const NF_Jump	 	= 8;  // = 0x08 = b0000.1000
const NF_Door	 	= 16; // = 0x10 = b0001.0000
const NF_Special 	= 32; // = 0x20 = b0010.0000
const NF_PlayerOnly = 64; // = 0x40 = b0100.0000
As you can see, every "1" in the dual system stands for a certain navigation state. For example, if you have a path with one point in water and where you have to walk to a gap, jump over it, then to enter the water and swim to this point, you will get the route flags (NF_Walk + NF_Jump + NF_Swim). If you do this addition (or alternative bit-wise OR), you get

Code: Select all

   b0000.0001
OR b0000.1000
OR b0000.0100
-------------
   b0000.1101
If I were you I'd use the algorithm I presented above.
sektor2111 wrote:As long as I did not see any flag between 16 and 32
Maybe that flag combination does not make sense or is very rare?
sektor2111 wrote:Now I'm testing a feature toward bStatic doing 2 things: if something has bStatic as class and has been screwed, if something has bStatic as actor but class doesn't have such thing

Code: Select all

Foreach AllActors(Class'Actor', A)
	if (A.Default.bStatic != A.bStatic)
		ReportThis(A);
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

Reversal order.
I did that bStatic scanner and also will check bNoDelete - both of them are not spawning so they are pointless set like that.
Here also I did rounding of cylinders, relocating actors matching some grid, preventing useless NavPoints to have flags and paths index.
What I needed was translating those combined flags with specs that are shown. So far in common cases I could see: 1, 4, 9, 13, 32(combos and teleporters probably the most powerful stuff). These could be directly translated but I preserved "fly" as well, maybe someday... Jets are no longer dreams for A.I. and then... scanner should report buggers. I don't want math classes, as you can see my way is simple - it works.
What I was asking in past days and nobody is answering is if I can "#exec _cpptext void something" which might be more exactly a call to a C++ native, of course there are a lot of factors in account but I wanna know what is doable and what not. Aside DescribeSpec doesn't show collision data, which for me is not a good thing, if collision is incompatible, Pawn won't navigate and I wanna know this right from Editor.

I'll pack an archive and I'll send it to you for the rest of checks if you want to see it. If you have something to improve I would like to know. Also other ideas are welcomed, then implementing some fix for duplicated actors which I have in other builder.

Edit:
I figured what I missed at my function but... I think yours it's more suitable - that's a good one...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

Switching gear a bit.
I could see so far an XC type server hosted by a rental service running multiple game-types with no problems - all right, some of those very rare problems are not solved because... their stupid way in dealing with a server-crash won't allow flushing file correctly and then log is broken exactly where it shouldn't - but the crash it's very rare and unknown because of this way of debating threads. Here server starts using another way, my concept - using a starter.
What's next ?
When I want a change to run-line I have to write a ticket to service for doing these changes as long as new XC server comandlet has to be set manually by themselves. I think the boss himself did this, and politely answering at request and then, for this reason I'm entirely grateful.
However, I want a quick handling for such server-stunts so I believe I will setup other plans based on the XC_Init whatever power from an XC_Engine_Actor causing let's say virtually an auxiliary Run-Line loading mutators there from a defined list. All future changes are going to be doable in a matter of seconds by using this actor via some INI file - but here I have to take in account relevance checking - or the deal it's a ServerActor usable in all cases. Perhaps I have to hook and set before any prebeginplay some options spoofing making server to think that mutators were set in run-line - I just have to figure "Howto".
Do you think that this is a bad idea or not ? Previous deal with actor starter was working but I want to set more flexibility without writing tickets all time.
If run-line is poorly written, Level is read from INI, game-type as well, Server-Actors as well. Probably we have all tools for dodging away from repeated run-line editing especially when rental services are not 100% friendly because of limitations from Web type interfaces and controls - last error which I see was about some "character" unsupported but which is definitely supported by UT because I did such servers all time and I did not have any problems everything being started as expected.
Post Reply