Various XC Works Discussions

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

Re: Various XC Works Discussions

Post by sektor2111 »

Due to some recent maps which I was interested to solve in regard to paths making task, I was probing original devs which weren't always so bad. However, the hyper-trash done in bad angles and those pruned paths were not making me too happy. A quick solution would be completely removal of these junks, not only making them null and leaving them to stay saved inside map-file. I think I got an idea how to make use of XC_Engine to delete paths even if this cute extension won't do this directly - it doesn't include deleting a ReachSpec function perhaps because of some logic reasons concerning indexing paths lists. Solution will grow numbered names for some points (not InventorySpot0 but InventorySpot101) in exchange the result will be a map using stock Paths and ONLY stock paths out of other unseen debris. A half of task for nulling bad ReachSpecs is available but method for getting rid of nullified ones is doable in some hackish formula. Whoever wants to share some personal cute solution I'm eyes and ears - I'll talk about my idea when I'll get something functional.
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

Does it worth a XC_PathsWorker for XC v21 ? Perhaps no...
This is a "replacement" for those Zero results of "GetReachSpec(R,RI)" if we still want to see how much Blue is in the path...

Code: Select all

function XCDescribeSpec( int rIdx, Out Actor Start, Out Actor End, Out int Radius, Out int Height, Out int reachFlags, Out int Distance, Out byte bPruned )
{
	local ReachSpec R;
	local Actor tmpStart, tmpEnd;
	local int tmpRadius, tmpHeight, tmpreachFlags, tmpDistance, MaxSpec, RI;
	local byte tmpbPruned;

	MaxSpec = ReachSpecCount();

	if ( rIdx > -1 && rIdx < MaxSpec )
	{
//		GetReachSpec(R,rIdx); - Actually it doesn't do anything in XC v21
		foreach AllReachSpecs(R,RI) //using "Alternate Path" - slower - and still grows iterations count...
		{
			if ( RI == rIdx )
			{
				tmpStart = R.Start;
				tmpEnd = R.End;
				tmpRadius = R.CollisionRadius;
				tmpHeight = R.CollisionHeight;
				tmpreachFlags = R.reachFlags;
				tmpDistance = R.Distance;
				tmpbPruned = R.bPruned;
				break;
			}
		}
	}
	else
	{
		log ("ReachSpecs are ending at "$MaxSpec-1$".",'NoReachSpec');
	}
	Start = tmpStart;
	End = tmpEnd;
	Radius = tmpRadius;
	Height = tmpHeight;
	reachFlags = tmpReachFlags;
	Distance = tmpDistance;
	bPruned = tmpbPruned;
}
Still why not ? Because this is not the only issue with XC v21...
The thing is that this XC Builder can be delivered compatible with all XC versions but it will be really slow and stupid...
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Various XC Works Discussions

Post by sektor2111 »

This is a Counter planned for December 2022. It counts ReachSpecs delivering a bit more detailed report - perhaps there will be extra-details. Written for those alleged PrunedPaths that are added out of their lists in some newer XC assets bugging MapGarbage and DrawPaths mutator.

Code: Select all

event CountThem()
{
	local int NSpecs, Prunes, Norm, RI;
	local ReachSpec R;

	NSPecs = ReachSpecCount();
	log ("Total ReachSpecs found ="@Nspecs,'XC_Counter');
	log ("Looking for properties...",'XC_Counter');
	foreach AllReachSpecs(R,RI)
	{
		if ( R.bPruned == 0 )
			Norm++;
		else
			Prunes++;
	}
	if ( Prunes > 0 )
	{
		log ("Map has"@Norm@"normal paths and"@Prunes@"pruned paths.",'XC_Counter');
		Rep = "Map has"@NSpecs@"ReachSpecs,"@Norm@"paths and"@Prunes@"pruned paths.";
	}
	else
	{
		log ("Map doesn't include pruned paths.",'XC_Counter');
		Rep = "XC: Found"@NSpecs@"ReachSpecs.";
	}
}
For coders users willing to check this, this is a XC_Engine_Actor (type nousercreate) that is added temporary by a Builder as long as Builder classes cannot call XC stuff directly (lousy things are happening...) - Editor Environment in stage.
Dec_XC_Counter.PNG
Post Reply