XC_Engine [20] - XC_Core [7b] - XC_IpDrv

User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Chamberly »

Qwerty wrote:Hi There seems to be a latency problem with flag grabs. This happens only sometimes, but in a full server it happens a lot.

With XC engine off when you grab the flag normally by running across it or in our case flying with RX the flag is taken near instantly

with XC engine on there is a 2-5 second delay after the flag has been grabbed / returned etc it also seems to be affected byt the amount of players in game as well.

On our test server I simply grabbed the flag (walk/running) using behind view 1. I had the flag and the flag was also still showing on its flag stand.

Even with some flag returns there is a 1-2 sec delay before the flag shows back up at the base.

This was not a problem in the older XC engine versions 3.x for isntance

Using all the latest XC components

any thoughts?
Hey, at least it's not like RB's RX as it didn't pick up the flag at all! :loool:
So it kept happening after 3.x updates?
Image
Image
Image Edit: Why does my sig not work anymore?
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Run two tests in near identical settings (XC=off and XC=on)

Load the map/mods where this problem occurs
Hit F6 and write down the channel count and bandwidth usage.
Type INJECT USERFLAG 1 (disable with INJECT USERFLAG 0) and write down all the info being printed.

Then, load the same map/mods but on Standalone mode, is everything working as intended?

If something is broken in standalone mode, then it's the collision octree.
If it's not, then it's the relevancy loop.

EDIT:
Also I need to know:
- XC_Engine version
- UT version
- Win32 or Linux?
- XC_GameEngine settings from INI (no need for ServerActors/ServerPackages)
User avatar
Shadow
Masterful
Posts: 744
Joined: Tue Jan 29, 2008 12:00 am
Personal rank: Mad Carpenter
Location: Germany

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Shadow »

Higor, I just saw that you're working on some movement/encroachment code, I was about to rewrite some movement hardcoded funtions for the SDK. As it's still not ready (yeah I know..) to be released I would give you that particular part of code.. so it's at least not coded for nothing. Basically I just build in my own tracing and collision code for volume/static mesh collision support .. it could help you probably, are you interested?
Image
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Absolutely, my methods aren't exactly clean.

====================
EDIT:
Gonna have to put a hotfix sooner or later, v18 (specifically) causes ACEv09 kicks and there's a very rare bug where a shot hits the last enemy in line instead of the first one if they're lined up :lol2:
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Idea for v19:
Let modders replace functions with either Native/Unrealscript counterparts using a XC_Engine opcode.

==
Example:

Functions:
- ReplaceFunction( class<Object> ReplaceClass, class<Object> WithClass, name ReplaceFunction, name WithFunction);
This would replace a 'X' function with a counterpart that can be script or native.

- DistanceViewTrigger.Trigger
This function uses a sort of slow iterator that can slow down MH significantly if overused.

So, we either write a copy of that function elsewhere (if accessing custom variables is necessary, we make a dummy subclass of the actor).
So the copy would look like this:
- FerBotz.BotzDummy.DVT_Trigger (subclass of Botz)

Code: Select all

	WithClass = Class<Object>(DynamicLoadObject("MH_FerBotz_Plugin.BotzDummy",class'class',true));
	if ( WithClass != none )
		ReplaceFunction( class'DistanceViewTrigger', WithClass, 'Trigger', 'DVT_Trigger');

Code: Select all

function DVT_Trigger( actor Other, pawn EventInstigator )
{
	local Pawn P;
	ForEach PawnActors ( class'Pawn', P, CollisionHeight + P.CollisionHeight + CollisionRadius) //Early spheric filtering
		if ( (abs(Location.Z - P.Location.Z) < CollisionHeight + P.CollisionHeight)
			&& (VSize(Location - P.Location) < CollisionRadius) )
			P.Trigger(Other, EventInstigator);
}
So if we detect XCGE, and we get to load the class containing said function all we have to do is replace it and it'll run a modified version without requiring a new XCGE build.
This also allows us to fix loads of Accessed nones and bugs in default UT99 code.
For safety it could be restricted to servers, but since ACE detects it... I may let it run on clients.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by sektor2111 »

Higor wrote:Let modders replace functions with either Native/Unrealscript counterparts using a XC_Engine opcode.
This looks
Higor wrote:ReplaceFunction( class<Object> ReplaceClass, class<Object> WithClass, name ReplaceFunction, name WithFunction);
great...
So I will be able to inject NsMonster's tweaks to default ScriptedPawn ? Sounds good to me. So finally we get some functions hooked (as I was interested in fore posts).

If this will be perfect operational probably some day we have to build a small dedicated server example (not like that trash server-multi 2013) something highly tuned with Siege, MH, whatever + a fully operational MapVote just as an example of a decent work according to 21th century. It will be example in how to setup XC stuff directly for all admins... Huh ?
User avatar
Barbie
Godlike
Posts: 2923
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Barbie »

Higor wrote:replace functions with either Native/Unrealscript counterparts
That would be great! I often found that code in Pawn or ScriptedPawn is buggy or could be improved, but to do that, all sub classes had to be redefined, too - but that would had been much work and could break compatibility with existing stuff, too.

Would this also work for state functions?
"If Origin not in center it be not in center." --Buggie
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by sektor2111 »

Barbie wrote:Would this also work for state functions?
I think it doesn't need a lot of hacks like that just a code to replace function as described. Why ? Because if we have a query eg: PickDestination()
if (IsInstate('Roaming'))
DoSomeCode();
else
DoCombatCode();
Not a big deal. States should be left alone and avoiding to add buggy things and new crushers.
All needs is only a Master function that has to get called from Any Default State and working according to state's Label. If this will be real then... damn... I have never been more happy :rock:

Perhaps state code itself where some animations are bad called or whatever...
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Hook test.

Created class XC_Engine_Actor:
Spawned automatically at map start (before InitGame).
Contains useful code for serverside/local function replacement in runtime, clients are unaffected.
XC_Engine stores all original function data internally and restores it during mapswitch.
Natives:
- Added DynamicActors native.
- Added PawnActors native (from FerBotz).
- Added NavigationActors native (from FerBotz).
- Added InventoryActors native.
Mods:
- Transporter hook: transport all player types.
- Queen hook: evil mode, queen won't get stuck at teleport animation, may attempt to chase enemies using non QueenDests.
- Weapon.ForceFire and Weapon.ForceAltFire moved to this system.
- AssaultRandomizer hook: fix log spam in non-assault games.
- Mutator hook: AddMutator is safe to use even if new mutator is deleted or an already chained mutator.


Dunno if it's stable, but it's definetely worth a test.
Also, if you find any other common sense patches give'm here so I can add them to the official release.

If you plan to use this functionality in third party packages, remember to copy the native functions you're going to use (that includes ReplaceFunction) and perform a XC_Engine version check to see it's all in order.
You do not have the required permissions to view the files attached to this post.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by sektor2111 »

If this is functional then I'm gonna be a bit busy... The reason(s) is(are probably a bunch) to quote a few:
- Engine.Decoration.Destroyed;
- Engine.Decoration.SkinnedFrag;
- Engine.GameInfo.Killed ???;
- Engine.Playerpawn.AFewStupidShite();
- Engine.Mover.Something();
- Engine.Carcass.splash bla bla Hearing has nothing to do with visibility - a blind man might still hear sounds.
- Mercenary.SprayTarget;
- BruteProjectile.BlowUp;
- Gasbag.PlayRangedAttack;
- ScriptedPawn.MeleeDamageFart;
- etc. etc.;

Btw AssaultRandomizer if I well recall refers to teamIndex - defender attacker - Assault - bla bla - all of these doesn't exist in other games and neither basic CTF logic - who is defender and who is attacker - answer: EVERYBODY.
- Botpack.TranslocStart;
- TeamGamePlus.Killed ???;

However, I'm curious about player - postrender errors - these are another story...
Anyway I'll have a joy in debate ScriptedPawn + I'm gonna slap unique fixes rather that replacing a bunch of stupid things. Code will run smoother...

To not forget - rewritting AutoState.SetHome and the rest from SkaarjTrooper. I don't need craps like bIsPlayer for troopers and neither others.

Edit:
Tiny things:
- I have saved another package XC_Engine.u (in hoping to not get it screwed somehow) because XC_Engine_Actor is not hidden in game and I'm not curious how do it looks like;
- I get some logs (surfaces fixes ?) ;

Code: Select all

Log: Fixed surf 2023
Log: Fixed surf 2101
Log: Fixed surf 2102
Log: Fixed surf 2103
Log: Fixed surf 2192
Log: Fixed surf 2193
Log: Fixed surf 2194
Log: Fixed surf 2195
Log: Fixed surf 2196
Log: Fixed surf 2197
Log: Fixed surf 2198
Log: Fixed surf 2199
Log: Fixed surf 2760
Log: Fixed surf 2945
Log: Fixed surf 2946
Log: Fixed surf 2947
Log: Fixed surf 2948
Log: Fixed surf 2949
Log: Fixed surf 2950
Log: Fixed surf 2951
Log: Fixed surf 2952
Log: Fixed surf 2953
Log: Fixed surf 2954
Aside my new function looks called properly

Code: Select all

ScriptLog: Tw_SprayTarget
ScriptLog: Tw_SprayTarget
ScriptLog: Tw_SprayTarget
ScriptLog: Tw_SprayTarget
ScriptLog: Tw_SprayTarget
ScriptLog: Tw_SprayTarget
Which Means: Huurraayy !!!
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Fixed Surf logs are NF_NotVisBlocking nodes containing non-translucent polys.
It's a small hack turning those nodes into Vis-Blocking to improve behaviour of relevancy traces.

Right, I forgot to hide the actor.
Either way, start turboposting fixes.
BTW, AssaultRandomizer fix returns 0 if pawn isn't a player... should I discard that condition as well and turn AssaultRandomizer into a fully toggleable path for all creatures outside of Assault mode?
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by sektor2111 »

Higor wrote:BTW, AssaultRandomizer fix returns 0 if pawn isn't a player... should I discard that condition as well and turn AssaultRandomizer into a fully toggleable path for all creatures outside of Assault mode?
Personally I want hunters to act normally... Any type Botz, Bot, MBot, Skaarj, even custom Flockpawns (if anyone has some)

All right... There is a lot of work if you have open this gate in attacking bad content VIA OpCode (or such if I speak well)
Let me see:
- NaliRabit - Evade Pickdestination is without Enemy check
- Weapon.CheckVisibility - sanity check for Owner and testing PawnOwner not Owner as actor
- Mover - I'm hunting TriggerControl Left-Open problem when pawn Monster has been killed letting door rammed...;
- TournamenWeapon - Do not send a Weapon into unexistent state Animend clientactive etc.;
- Brute - PlayrangedAttack the same gasbag;
- MelleDamagetarget - and all StupidDamageTarget things;
- Must rewrite Boulder thrown by Titan - must rotate ON-Line too;
- Unlocked JumpSpot for human Seeker too;
- Changed WhatToDoNext at Berserker;
- Hacked some Translocstart for a better world of monsters - not path granted but neither Accessed Nones;
- Decoration fixes (not only one);
- I have to copy my code for ScriptedPawn ChooseTeamAttackFor - TeamLeader errors
- Perhaps attitude things;
- I must write Trooper root...
Damn, I have to solve a mountain of crap, else I'm happy that I have opportunity to finally fix them.
I have done (under completions):

Code: Select all

XC_Brute.uc
XC_Decoration.uc
XC_Gasbag.uc
XC_JumpSpot.uc
XC_Mercenary.uc
XC_NaliRabbit.uc
XC_ScriptedPawn.uc
XC_SkaarjBerserker.uc
XC_TournamentWeapon.uc
XC_TranslocStart.uc
XC_Weapon.uc
You might want a separate thing/mutator not linked in engine allowing admins to write their stuff as they want. I see those logs, or make them to have a disabling feature.

I guess some simulated things - bad net stuff have to be "packaged" else will still mess up in client.
I wanna study projectiles as well... perhaps when I'll get some more free time...
[attachment=0]NsUTw_WorkingOn.zip[/attachment]
You do not have the required permissions to view the files attached to this post.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Script:
- Applied your fixes (restructured for less subclassing and uses iterators).
- Queen doesn't telefrag enemies upon teleportation.

Replication loop:
- Heavily prioritizes player owned actors.
- Closes 2-4 channels per second when the channel list is full (fixes maps like MH-Crescendo)

Removed debug logs.
You do not have the required permissions to view the files attached to this post.
User avatar
sektor2111
Godlike
Posts: 6438
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by sektor2111 »

Ooooppsyy.... Good to know that I can query animations. I didn't figured too much deal at this in the past

Code: Select all

if ( HasAnim('GutShot') )
Now I see how to use it... Oh well... More fixes to come then...
Aside I see then it might be working by using a virtual function call, all right, I get it.
Edit:

Code: Select all

ScriptWarning: ReplaceFunction: cannot find WithFunction=SkaaejBerserker_WhatToDoNext in Class XC_Engine.XC_Engine_ScriptedPawn
Typos... Changed to previous U file.
Edit2:
I'm heading for an external mutator packaged because it seems like I can solve Rotating boulders ON-Line thrown by Titans/StoneTitans. New boulders are properly spawned by old creature and they react like in OFF-LINE. In this way I think more Net stuff can be fixed.
I'll do easy fixes first and then I'll take a look at some Engine stuff.
AS an important point I think even more default MH stuff can be improved (not all) but... a lot of things can be done more properly: Killed, ScoreKill, MonsterWayPoint, MonsterEnd, reducing the load for benefit of performance.
Hey, probably an expanded MH using some defaults and fixed points might be a bless, eh...
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_Engine [18] - XC_Core [6] - XC_IpDrv

Post by Higor »

Dat SkaarjBerserker typo.

Well, this could totally solve the UPak.u debacle.
We'd only need to scan every UPak map and export to T3D and see if these maps reference only code or something else (textures, models, audio).
Anything the maps don't reference could go into data packages: UPakTextures, UPakAudio, UPakModels.
And everything else into UPak.u, and handle the 'Predator' monster using XC_Engine opcodes, as long as compatibility with clients/non-XC ut's isn't broken.

Then we'd have actual UPak coop servers running without a problem and without losing the Predator AI.
Might as well increase the difficulty of all monsters by tweaking AI instead of just increasing health.

The Queen tweak turned a monster relatively as difficult as a Titan into a nightmare, and I like it for a boss monster, although it needs some minor adjustments.


====
In the meantime, I'll be adding an additional replication boolean: bRelevantIfOwnerIs
Basically this makes an actor relevant to clients if it has an owner and said owner is relevant to the client as well, while overriding all other relevancy conditions.

Extremely useful for extra stuff that affects a player/monster, has high update frequency but doesn't need to be bAlwaysRelevant.
Example: UT_ShieldBeltEffect