Another UT Builder - Work In Progress...

Development assistance and tutorials here.
Post Reply
Nelsona
Posts: 1767
Joined: Sat Sep 30, 2017 5:03 am

Another UT Builder - Work In Progress...

Post by Nelsona »

Small Intro.
I was hunting a solution for retrieving brush data, more exactly geometry problems.
It's not like you can do anything in UScript even if you can iterate through objects not actors or I could not figure what's doable.

I quit trying to gain geometry errors and I hit another try in the other side which I could manage due to last XC works as they are type XCGEv24.
This requires XC_Engine v24+ (or only 24) which has to be in editing assets not exactly set as game extension.

I think soon I will show in public the builder returned from initial purpose into another Paths worker using UScript through Editor. It's not Unreal227 - it's UnrealTournament this time...
What's the point of another way of building paths ?
#1 Range option - not only in v21 and v25b - XC builders in stage;
#2 Paths charge control - prevent over-loaded nodes connected in 8 directions to other nodes connected each-other and all that useless spam eye paths-lines;
#3 Two build types which original UT is not really having: Monster-Paths - Titans in stage capable to roam or do whatever patrols, Bot paths known in fake news from tutorials as Heavy paths - original UT out of XC_EditorAdds is drawing them in RED;
#4 It does a valid log where "Scout did not fit" or else we won't know where is the spot with possible issues;
#5 It is excepting paths created for items hidden in Editor for preventing any over-load;
#6 It logs reachSpecs created and other several data for having a clue what paths are suitable, even if final build option sorted by mapper is original build if doesn't like this way or it's too complex;
#7 It won't mess with bOneWay paths - such points are left alone letting user to connect this point where wants and how wants using human eye;
#8 Extra control in adjusting ReachSpecs - enlarging default ones - creating new specs where Editor is "forgetting" them;
#9 Completing Paths after building paths using other builder or Editor itself - exactly - you can polish a bit missing paths or hijack reachSpecs. This is a bit complex but... we have manual control for doing this. Different said, Path from PathNode0 to PathNode1 is evil. We need a Path from PathNode3 to InventorySpot1. We can "move" evil path into missing path and adjusting Paths List from nodes involved. At this moment reachSpec adjusted must be moved manually in Paths lists, perhaps in future it will be automated, these are rare needs, we can reduce range or doing things different and such an option it's not widely used, but right now it's possible to do some stunts this way.

I won't bet that I found the most great ever solutions due to iterations limit from UE1 and then all things/checks must be minimized while Builder is working.
Technically it is moving pretty fast, it draws paths at certain interval - so to speak it's updating ViewPort during working stage.

Not yet implemented: Automated Air routes - perhaps not needed because there it is advisable user control with human eye and not scripted predictions.
This is the tool in current stage:
UT99_PathsWorks.PNG
UT99_PathsWorks.PNG (9.46 KiB) Viewed 8932 times
All it's based on input data - setting Option True - Hit Build button.

You can imagine the mystery haunting me: Why would not be welcomed such a builder boosted by it's own natives like that MP3 OGG support for newer audio drivers ? It's when I don't get why would not have all editing options for slapping down bugs as much as possible...

The known problems - perhaps bugs:
- XC doesn't offer support for wiping bad path but making null - not really deleting junk data.
- No great power of new XC iterators because they are refusing to work in Editor - or I cannot put them on the right way, and then original UT ones are not the best.

Builder contains a template, a dummy reachspec where user can demand what wants as path for certain spot, this is like that red brush template from which Editor is building a room. Here is build/created a future Path/ReachSpec using this dummy formula. Point nodes A and B can be completed by builder as well. We don't need too much names writing, builder is writing these for you. What is needed as data: navigation flags and collision accepted, the rest is calculated automatically.
I have to track well in various tests if something need corrected before any release.
I doubt that this will have more users because here is needed some experience, you need to know well what you want or else your paths won't help with anything.

I think here is needed attaching a tutorial well explained. Perhaps technical UE1 terms not well combined in english might be causing headaches for users. I don't think everyone will figure how to do these... but maybe somebody from this planet will say "Thanks" or... "Give me a break, this it's destroying my brain" or whatever... Not all works for UT are are aiming every single user in end.
UncodeX Stuff
Not often maintained
My UT Mapping works...
Learn the rules like a pro, so you can break them like an artist.
- Pablo Picasso -
User avatar
Kelly
Posts: 188
Joined: Fri Sep 29, 2017 1:54 pm
Location: Coos Bay Oregon

Re: Another UT Builder - Work In Progress...

Post by Kelly »

I see what you are doing Nels. Just understand something like this is more of a 'passion project' for yourself than aiming it for use by others to address map issues. Mostly the people left running servers and doing work are older dudes with not a ton of free time. If a map is shit they just delete it from rotation and don't make an effort to repair it. I love what you do on things like this and I understand your interest in seeing what is possible. Just don't get your feelings hurt if no one else seems to care. You are working at a technical level very few others share (and there are less every year).
I don’t wanna give the end away
but we’re gonna die one day
Nelsona
Posts: 1767
Joined: Sat Sep 30, 2017 5:03 am

Re: Another UT Builder - Work In Progress...

Post by Nelsona »

For a case when a mapper UT fan wants to do something good and has issues with Plain Building, this is possible to be helpful. If I'm doing something perhaps it's not nice to keep it restricted and private, curious ones can touch it if they want. It's not a must have, it's an "AlternatePath". Right now I'm toying with it for figuring if something goes down-hill.
I did not make more maps but where I worked at a moment I found situations really annoying. Editor did what wanted not what I wanted, I think it's my turn to do things on my way and skipping myths and stories told all these years.
With regard to such a builder I really don't expect more users. That XC was left in a pretty much unfinished state and it needs attention in using it, however it's the only tool working on this side, generally mapper is not having access everywhere and for me it's fascinating to guide things as I planed without Goblin's guessing.

You can imagine that something which I found in XC connectors I had to modify. Random Node 1 to Random Node 2. Connection was defaulted for walk and jump. If one of them it's in water it's added Swim resulting Flag 13. For exiting from water we need these like for entering water but Water to Water perhaps will need ONLY Swim. Why ? Let's say that Tentacles are not walking nor DevilFishies. I won't require a Walk and Jump from them but exclusively Swimming... because they have to move if they need that - Why not ? Somehow I like these things a lot... After 20 years...

Next tool is a bit more closer to geometry, a builder for texture calculations concerning a pillar - I read that tutorial at ut99 and it was hard to track how and when, etc. In old times I did such pillars but miss-aligned, a heavy task for figuring each face alignment. Now with machine's help it's all easy as a pie and it's more simple than using ClipMarkers, all it's exclusively delivered by Builder with no errors. Sshht, don't tell anybody that I got maths formulas from Internet because I forgot geometry classes.
UncodeX Stuff
Not often maintained
My UT Mapping works...
Learn the rules like a pro, so you can break them like an artist.
- Pablo Picasso -
Nelsona
Posts: 1767
Joined: Sat Sep 30, 2017 5:03 am

Re: Another UT Builder - Work In Progress...

Post by Nelsona »

The bump Subject: Clocking Some Performance toward executions.
Two separate Builders will have capabilities to Disconnect Navigation Chain (you can delete a Node without data placed in Void) and the other builder will re-connect what map is having into Navigation Chain known as "Level.NavigationPointlist" - no corruptions, no issues - stock won't compile anything here due to hypocrite limitation at vars that are constants (and they are not constants at all). These are separate from "MapGarbage" for separate fast access - probably will stay here not in public.
What is all about: Disconnecting chain will iterate through Navigation Points and disconnecting all related chained data.

Code: Select all

// This builder will disconnect and clean up the Navigation Chain,
// leaving the reachSpecs arrays intact.

class NavUnlink expands BrushBuilder;

var() LevelInfo MyMap;
var() bool bUnLinkNavList;
var string AText;

final function bool HasChain(){ return MyMap.NavigationPointlist != None; }
static final function CleanNode(NavigationPoint N)
{
	N.bestPathWeight = N.class.default.bestPathWeight; N.visitedWeight = N.class.default.visitedWeight;
	N.prevOrdered = N.class.default.prevOrdered; N.nextOrdered = N.class.default.nextOrdered;
	N.startPath = N.class.default.startPath; N.previousPath = N.class.default.previousPath;
	N.routeCache = N.class.default.routeCache; N.taken = N.class.default.taken; N.bAutoBuilt = N.class.default.bAutoBuilt;
}

function FindLevel()
{
	local int lv;
	local bool bHaveLevel;

	if ( MyMap == None )
	{
		lv = 0;
		do
		{
			if ( MyMap == None )
				SetPropertyText("MyMap","MyLevel.LevelInfo"$lv);
			else
				bHaveLevel = True;
			lv++;
		}
		until ( bHaveLevel || lv == 11);

		if( MyMap == None )
		{
			log("NavLink: Couldn't find LevelInfo!");
		}
	}
}

function bool Build()
{
	AText = "";
	if ( MyMap == None )
		FindLevel();
	if ( MyMap == None )
	{
		AText = "INVALID LEVELINFO";
	}
	else
	{
		if ( bUnLinkNavList )
		{
			MyMap.ConsoleCommand("HIDELOG");
			UnlinkNavChain();
			MyMap.ConsoleCommand("SHOWLOG");
		}
		else
		{
			log ("Builder must be activated first.",class.name);
			AText = "You need to activate un-linking option <RIGHT-CLICK>.";
		}
	}
	if ( AText == "" )
		AText = "Navigation Unlinker 2025";

	return BadParameters(AText);
}

function UnlinkNavChain()
{
	local NavigationPoint N;
	local int ClearedNodes;
	local float Time[2];
	local float UnlinkTimer;

	if ( HasChain() )
	{
		class'XC_CoreStatics'.static.Clock(Time);
		MyMap.NavigationPointlist = None;
		foreach MyMap.AllActors ( class'NavigationPoint',N )
		{
			CleanNode(N);
			N.nextNavigationPoint = None;
			ClearedNodes++;
		}
		UnlinkTimer = class'XC_CoreStatics'.static.UnClock(Time);
		log("Disconnected" @ ClearedNodes @ "navigation points.",'NavUnlink');
		log("Unlink Time:" @ UnlinkTimer @ "seconds.",'NavUnlink');
		AText = "Disconnected "$ClearedNodes$" navigation points.";
	}
	else
	{
		log("There is no Navigation Chain linked here.",class.name);
		AText = "Navigation Chain is NONE";
	}
}

defaultproperties
{
	BitmapFilename="NaviUnlink"
	ToolTip="Navigation Chain Unlinker"
}
This task takes around 0.001437 - 0.001444 seconds...
Editor.Log wrote: NavUnLink: Disconnected 1438 navigation points.
NavUnLink: Unlink Time: 0.001444 seconds.
....
NavUnLink: Disconnected 1438 navigation points.
NavUnLink: Unlink Time: 0.001437 seconds.
Mainly 0.00001 seconds for every single Node disconnected.
On the other side is Connecting back the chain...

Code: Select all

// Current builder has a single purpose if it's active:
// It will link Navigation Chain - also it looks like "do-until" works a bit faster than iterator,
// but variables for "do-until" need to be completed first... There is no automatic completion at changes...
// Total time is longer but our task works well. This is a study around linked lists performance in Uscript.
// "FOR" it's not an option, it is the slowest way, yes boys, it's really slow.

class NavLink expands BrushBuilder;

var() LevelInfo MyMap;
var() bool bReLinkNavList;
var NavigationPoint Np[4096];
var bool bOutRange;
var string AText;
var int LastPos;
var float TTime;

const Max_Load = 4096;

final function bool HasChain(){ return MyMap.NavigationPointlist != None; }

function MapActors()
{
	local NavigationPoint N;
	local int i;
	local float Time[2];

	TTime = 0.000000;

	class'XC_CoreStatics'.static.Clock( Time );
	bOutRange = False;
	i = 0;
	if (Np[i] != None)
	{
		do
		{
			Np[i] = None;
			i++;
		}
		until ( i == Max_Load );
		i = 0;
	}
	LastPos = 0;
	foreach MyMap.AllActors ( class'NavigationPoint',N )
	{
		if (i == Max_Load) { bOutRange = True; break; }
		Np[i] = N;
		i++;
	}
	LastPos = i;
	TTime = class'XC_CoreStatics'.static.UnClock(Time);
	if ( !bOutRange )
		log("All Set..."@i@"navigation points.",class.Name);
	else
		log("There are more than "$Max_Load$" navigation points here... Is this truly an UT'99 map ?",class.Name);
	log ("Setup Time:"@TTime@"seconds.",'XC_Clock');

}

function FindLevel()
{
	local int lv;
	local bool bHaveLevel;

	if ( MyMap == None )
	{
		lv = 0;
		do
		{
			if ( MyMap == None )
				SetPropertyText("MyMap","MyLevel.LevelInfo"$lv);
			else
				bHaveLevel = True;
			lv++;
		}
		until ( bHaveLevel || lv == 11);

		if( MyMap == None )
		{
			Warn("Couldn't find LevelInfo!");
			Log ("Please manually complete a LevelInfo name in MyMap variable for this map.",'BadState');
		}
	}
}

function bool Build()
{
	AText="";
	if ( MyMap == None )
		FindLevel();
	if ( MyMap == None )
		return BadParameters("No Valid LevelInfo has been found...");
	else
	{
		MyMap.ConsoleCommand("HIDELOG"); //Won't waste time painting letters...
		MapActors();
		if ( bReLinkNavList )
			LinkValidNavList();
		else
			log ("Builder must be activated first.",class.name);
		MyMap.ConsoleCommand("SHOWLOG"); //Now we can read what was done...
	}
	if ( AText == "" )
		AText = "You need to activate linking option <RIGHT-CLICK>.";

	return BadParameters(AText);
}

function LinkValidNavList()
{
	local NavigationPoint N, NOld;
	local float Time[2];
	local float LinkTimer;

	if ( HasChain() )
	{
		log("Wrong !!! Navigation Network is already wrapped.",'AlreadyListDone');
		log("A NavigationPointList has been already done, more or less with this tool.",'AlreadyListDone');
		if ( AText == "" )
			AText = "NavigationPointlist is already loaded and linked.";
		return;
	}
	class'XC_CoreStatics'.static.Clock( Time );
	ConnectNavigationChain();
	LinkTimer = class'XC_CoreStatics'.static.UnClock(Time);
	log ("Time taken:"@LinkTimer@"seconds.",'XC_Clock');
	TTime = TTime + LinkTimer;
	log ( "Total Time Spent: "$TTime$" seconds.",Class.Name);
}

function ConnectNavigationChain() //Need other adjusted files for compiling these... constants brain-farts...
{
	local NavigationPoint N, OldN;
	local bool bChain;
	local int Nodes, i;

	bChain = False;
	if ( bOutRange )
	{
		log ("Builder doesn't work in such a misery !!!",Class.Name);
		log ("There are more than "$Max_Load$" navigation points here. You have to be kidding...",Class.Name);
		AText = "OVERLOADED MAP - TASK REJECTED !";
		return;
	}
	else
	{
/*
		foreach MyMap.AllActors(class'NavigationPoint', N)
		{
			if ( !bChain )
			{
				MyMap.NavigationPointlist = N;
				OldN = N;
				bChain = True;
			}
			else
			{
				OldN.nextNavigationPoint = N;
				OldN = N;
			}
			N.nextNavigationPoint = None;
			Nodes++;
		}
*/
		i = 0;
		if ( Np[i] != None )
		{
			do
			{
				N = Np[i];
				if ( !bChain )
				{
					MyMap.NavigationPointlist = N;
					OldN = N;
					bChain = True;
				}
				else
				{
					OldN.nextNavigationPoint = N;
					OldN = N;
				}
				N.nextNavigationPoint = None;
				Nodes++;
				N = None;
				Np[i] = None;
				i++;
			}
			until ( i == LastPos );
		}
		else
		{
			log ("I did not see any navigation node here.",class.name);
			AText = "NO NAVIGATION NODES HAVE BEEN FOUND !";
			return;
		}

	}
	log("Navigation chain has been linked using"@Nodes@"navigation actors.",'ChainReady');
	AText = "Navigation Chain was connected using"@Nodes@"navigation actors.";
}

defaultproperties
{
	BitmapFilename="NaviLink"
	ToolTip="Navigation Chain Linker 2025"
}
Here it will work as follows...
Editor.log wrote: NavLink: All Set... 1438 navigation points.
XC_Clock: Setup Time: 0.000551 seconds.
ChainReady: Navigation chain has been linked using 1438 navigation actors.
XC_Clock: Time taken: 0.000397 seconds.
NavLink: Total Time Spent: 0.000948 seconds.
....
NavLink: All Set... 1438 navigation points.
XC_Clock: Setup Time: 0.000557 seconds.
ChainReady: Navigation chain has been linked using 1438 navigation actors.
XC_Clock: Time taken: 0.000398 seconds.
NavLink: Total Time Spent: 0.000955 seconds.
....
So... if we would have an array ready loaded with everything, connecting said array into a chain would take a blink using "do-until". Iterator works nice but it will waste time crawling all possible actors and sorting out desired class. This is more expensive at a moment.
ForeachAllActors wrote: ChainReady: Navigation chain has been linked using 1438 navigation actors.
XC_Clock: Time taken: 0.000658 seconds.
Compared to
DoUntil wrote: ChainReady: Navigation chain has been linked using 1438 navigation actors.
XC_Clock: Time taken: 0.000400 seconds.
But... in order to gain this linking speed, we need to complete elements which is another task. Anyway connecting the chain takes less time than disconnecting due to the "CleanUp" required - that data hosted is useless.

All Experiments have been performed in some Vortex-like MH map loaded with a lot of more or less junks - initially a complete flawed "map" that was causing issues ON-LINE because *mapper did not have any clue how many network channels are used in UT for communicating between server and client connected.
We have actually 16699 actors out of the three camera actors used in Editor - it is not possible even to save a copy of said "map". But... it's a good environment for experiments...
UncodeX Stuff
Not often maintained
My UT Mapping works...
Learn the rules like a pro, so you can break them like an artist.
- Pablo Picasso -
Post Reply