Package Conformal discussion

Discussions about UT99

Package Conformal discussion

Postby sektor2111 » Sun Apr 09, 2017 6:11 pm

A bit of Karma is always in UE1 aka UnrealEngine1.

Today I could see some funky things at using multiple conforming things for preventing mismatches.

In my opinion I think this way is aiming stock updates generally - which means player with files LOADED.

By conforming other packages with extra-dependencies (uncalled in Level) required by original package, these seems to not be triggered that much in an empty player (with no files from any kind) and lousy effects occurs, player can even crash.

I could see these in a map calling 2 files conformed and MH conformed too - player being with no files. Simply there is no game.

If we are thinking at UnrealShare - every UT player on planet has this file because it's STOCK. If this file is carefully fixed and conformed there is no single issue. For the rest of Non stock mix is not the same thing.
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby sektor2111 » Tue Apr 11, 2017 6:01 am

According to this post I was trying to do a conformed update of BPak. I did 2 tries finally I setup last one.
- number 1) calling a fixed effect from another package attached to newer conformed BPak and forcing it into client with old BPak;
- number 2) - removing that useless effect used. It's useless because I did not see any difference with/without it. I did tests to see what's going on in player side. Oh well... Player with old file seems to not that good as in case of using the fixed one.

I have quit using the split method into 2 pieces. Player having newer file joined in server having original one probably won't be the best match - server not having 2nd file with the fix involved. I gotta do more research if would be possible ( probably after a break - temporary or permanent - because I need a surgery which usually have 2 results: good recovery or going down forever ).
I believe that final solution is a cleaned player by trash files floating into UT client's install, and leaving them for another mapping environment rather than for ON-Line usage.
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby Chris » Tue Apr 11, 2017 9:06 pm

A small note on ScriptedPawn when re-entering old chapter aboutone specie humping other species.

Normally using a "TeamTag" seem like a logical solution other than "Team" ("Team" for scripted pawn seem to have less significance as to what it should)..
But with a few minutes of research I noticed that "TeamTag" is also about existance of a team leader, without any bTeamLeader, "TeamTag" is useless and will keep making ScriptedPawns humping eachother. Simply setting bTeamLeader on atleast one ScriptedPawn (Prefferably a boss?) seem to work with no issues. See ScriptedPawn -> Startup -> SetTeam()

This removes the need of any kind of brutefoce check every second to stop monster madness, and will also allow creatures to focus more on actual enemies.
I also agree to keep a minimal setup for online play, perhaps running XC Engine and newer renderer. And development in another section untouched by network.

Few people seem to pay attention to posts about code, I hope the surgery will give good results.
Chris
Experienced
 
Posts: 101
Joined: Mon Nov 24, 2014 9:27 am

Re: Package Conformal discussion

Postby sektor2111 » Tue Apr 11, 2017 9:38 pm

ScriptedPawn can be fooled to gain a fake team Without Leader. Attitude code is checking TeamTag without to recheck Leader (iterations problem) - see even Berserkers different at this point. Problem was trying to convince ScriptedPawn to keep TeamTag after iterator. So my real solution is as follows:
- Do nothing here during 100 milliseconds from pawn appearance ( timed actor attached to pawn right in first moment ) By waiting pawn's initialization you can add tweaks later because Auto state is NOT repeated so we "wait" its execution;
- After 100 Milliseconds (monster has finished Home/Leader scan) will gain TeamTag. At some future SetEnemy query will result with friends around - then Actor goes to destruction - Too many actors ? So what ? We have 10000 projectiles spawned/game with no major issues;
- If by chance is losing TeamTag later, we have to do slow checks from time to time (monstercounter is on duty) If a monster is a "new one" soon will get TeamTag again;
- master state Attacking - when monster around is friend - drives to a new iterations cycle;
- if they are still mooing in self combat (due to stupid original coding) we can stop their fight using... takedamage reducedamage, so it will not need any fast timed checks in PawnLists or other craps from this kind. Trust me, if I want good monsters focusing on player as priority this is very doable and even emulating a team attack for up to 2000 pawns (if CPU will not get burned - I know what I'm saying, C++ will work a lot here - Paths Seeking LineOfSight Trace, all natives devastators...)

I tested this strategy using a MindReader so I got real results ON-Screen 3 years ago - of course, "news" were fascinating. But... NsMonster is a team-monster (CTF MH ready) using Team byte properly. I used it as replacement until XCGE solutions and for direct spawn in random teams (1,0). Pretty much useful at defending flags at a moment and evil like devil - they were checking even noise-makers not only visible Pawns + that CTF controller was teaching them some assault techs... that was fun to do for me... They never attacked themselves and latest versions did not even moved at friends around - only if friend had a real enemy...

If you check how are acting monsters in my versions (MH2 more relevant) compared with default MH503 you'll figure what I mean.

Cons:
- Monster (in default package) has no prevention against Self Attack - AND THIS DO HAPPENS not that rare;
- Monster damaged, becomes angry, might lose love toward friend shooter turning it into an enemy - also it do happens;
- function Bump - is utter trash at SkaarjWarriors and the rest. The idiot attacks any pawn bumping it with no checks from any kind SetEnemy/Attitude;
- Due to this new "friendship" tweaking, we are going to have additional iterations added (Berserker will not find enemy to start attacking so might retry this increasing cycles number to boundaries due to code blabbering in duplicate executions ) - and we have... different new crash types.

What is doable:
A New UnrealShare (conformed btw) which can be written properly - removing bullshit original codes and even happily adding some Sleep sequences between SetHome-SetTeam in "auto state" + attacking suffering a small "reflex add-on" Sleep(0.1).
XCGE can rewrite functions but I don't see a state hack method at this moment. If by chance, a pawn calls Attacking Multiple times or we have maps with 3000+ creatures, iterations won't crash because they simply take a break.

How I get this solution ?
They were a bit wise (Epic), later Bot has Sleep in state roaming or else it would crash in their own messed up shite stock maps (those navigationpoint/s through each-other) because of fast cycles reaching to boundaries in a few seconds in old machines and almost instantly on machines from nowadays.

Another break solution exist even in MapVoteLA13 or else it would crash before to read/sort 800 maps due to cycles increased in checks/loads/sorts.
When I was solving crashes from that first UL MapVote I was doing same thing. Removing an Instant harmful execution to a "background" one, it's a voting system so I don't see why would it go for an instant operation (which lags a lot because is not so easy). I added that code even in some LA14 which I'm using and maps are loading with no red flag even on a rig machine.
As you see, SPEED is not an option for UE1 (not even when you drive a vehicle).
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby Chris » Wed Apr 12, 2017 7:21 pm

Yes that's true. I started playing around with UStates a bit a few hours ago, and now I have this:

Code: Select all
/*
   These functions can be made directly accessible in another class by simply copying the declarations and keeping the indices.
   This package (ChStReplace) however must be loaded in the environment and bound to ChStReplace.dll

*/
native(3810) static final function bool ReplaceState(class<Object> ReplaceClass, class<Object> WithClass, name TheState, name WithState);

//My own version that allows me to replace derivative functions, seems to be working good so far.
native(3811) static final function bool ReplaceLastFunction(class<Object> ReplaceLastClass, class<Object> WithClass, class<Object> ReplaceBaseClass, name ReplaceFunction, name WithFunction, optional name InState,optional name WithState);

//Copy a state from one class to another, not foolproof so handle with a little bit care and logic
native(3812) static final function bool AddStateTo(class<Object> DestinationClass, class<Object> SourceClass, name State);


I did as much testing as I could, and it seems to work fine so far.
Even adding a new state to a class if necessary.
I remade the ReplaceFunction a bit to support derivative function replacement with some new features:
-Only replace functions that hasn't been replaced yet, (This is designed to be called on objects which means that the same class can be called several times, adding a function flag will save some computation time)
-Faster hashed version of function searching in target class
-Allows you to specify a baseclass as a limit (anything below this will be ignored)

Some state replacement rules:
-Replace a non-auto state with an auto state is legal (but vice versa will keep the original state as auto if declared as such)
-The replacement state must have atleast the same labels as the target state, this is pretty obvious to avoid all the "GoToState can't find label" from default calls.
You can order the labels any way you want, and add new ones, and change the corresponding code as you want too
This function could be made faster by removing all the label safety checks, but I will leave them there for now.

Adding a state:
This simply adds a state to another class, I thought it could be a good idea to be able to add new states and not just replace them.
The function could use some more safety checks to make sure the target class doesn't already have the new state, so again, this just has to be handled with a little bit of logic

As for the package, it's purely ment to be serverside, and can therefore not be downloaded by a client.
To test this simply add:
ServerActors=ChStReplace.TestActor

And in order to use the package externally simply add it to ServerPackages (This wont make the client download it) This is necessary to make sure that the engine is binding to the dll and loading the native functions.
Then in order to not make a package dependant of this one, just do the same thing as with XC, copy the declarations to your class.

If Higor approves to do so, this could be simply merged into XC_GE. But running this parallel with XC should not cause any troubles.

EDIT:
Noticed that I forgot to add another BaseClass check, reuploaded.
Attachments
ChStReplace.rar
(545.03 KiB) Downloaded 13 times
Chris
Experienced
 
Posts: 101
Joined: Mon Nov 24, 2014 9:27 am

Re: Package Conformal discussion

Postby sektor2111 » Wed Apr 19, 2017 9:08 am

Being back from hospital but in a painful state I could check forum around.

Well, I went to conform bad things previous days and using ReplaceFunction only for some Net stuff related to firing projectiles. Because original packages are too crapped (thanks EPIC, I wish you my pain :cry: ) there are needed run-time replacements of projectiles fired and having originally dumb codes.
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby Aldebaran » Wed Apr 19, 2017 4:32 pm

In the last time I noticed some strange servercrashes in monster hunt and every time shortly before the log shows many "Accessed None" with "Function UnrealShare.BruteProjectile". So can the UnrealShare.BruteProjectile be bugged? I find it little bit curious because the map can be played long time first also with Brutes using this projectiles, I played the map about 50 mins before it crashes, so perhaps it happens only in very special situations.
Also I have to say that I used NW3 and let replace some weapons and ammo with NW3 once but not these BruteProjectile.

CRASHLOG1
ScriptWarning: BruteProjectile MH-[HUNX]-Monster_Of_War_1.BruteProjectile1659 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
ScriptWarning: BruteProjectile MH-[HUNX]-Monster_Of_War_1.BruteProjectile1660 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
ScriptWarning: BruteProjectile MH-[HUNX]-Monster_Of_War_1.BruteProjectile1662 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
Exit: Preparing to exit.
Critical: appError called:
Critical: Assertion failed: TopChunk==NULL [File:UnMem.cpp] [Line: 42]
Exit: Executing UObject::StaticShutdownAfterError
Critical: FMemStack::InitStack
Critical: FMemStack::Exit
Critical: appPreExit

CRASHLOG2
ScriptWarning: BruteProjectile MH-HeberekeGaiden3.BruteProjectile15194 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
ScriptWarning: BruteProjectile MH-HeberekeGaiden3.BruteProjectile15209 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
ScriptWarning: BruteProjectile MH-HeberekeGaiden3.BruteProjectile15205 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
ScriptWarning: MonsterHunt MH-HeberekeGaiden3.MonsterHunt0 (Function MonsterHunt2Gold.MonsterHunt.Killed:016D) Accessed None
ScriptWarning: BruteProjectile MH-HeberekeGaiden3.BruteProjectile15449 (Function UnrealShare.BruteProjectile.Flying.BlowUp:0017) Accessed None
Exit: Exiting.
Uninitialized: Name subsystem shut down
Last edited by Aldebaran on Thu Apr 20, 2017 12:08 pm, edited 1 time in total.
Aldebaran
Adept
 
Posts: 449
Joined: Thu Jan 28, 2016 7:30 pm

Re: Package Conformal discussion

Postby Barbie » Wed Apr 19, 2017 5:00 pm

Aldebaran wrote:So can the UnrealShare.BruteProjectile be bugged?
I don't think that this ScriptWarning is the reason for a server crash. It occurs if the Brute is dead, but his rocket is still flying:
Code: Select all
function BlowUp(vector HitLocation) {
   HurtRadius(damage, 50 + instigator.skill * 45, 'exploded', MomentumTransfer, HitLocation);
   MakeNoise(1.0);
   PlaySound(ImpactSound);
}
instigator is the dead Brute (=None) in this case. But this should not crash the program.

Aldebaran wrote:MH-HeberekeGaiden3.BruteProjectile15449
Perhaps there is an overflow somewhere else - 15449 brute projectiles is a lot... :omfg:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Barbie
Godlike
 
Posts: 1293
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Package Conformal discussion

Postby sektor2111 » Wed Apr 19, 2017 6:16 pm

These are contributors - for some valid reason log says "ScriptWarning". A script warning in my opinion is not something to be ignored. I know this error and I had different solutions.

Main older one
- subclass Projectile in cause into child class with BlowUp rewritten and replace bad projectile VIA SetPawnDifficulty;
Code: Select all
if (S.RangedProjectile == class'CRAP')
S.RangedProjectile = class'Good';

Will work for any monster mapped with this projectile.

Another solution
- use replacefunction from XCGE by Higor

If XCGE doesn't fit your needs:
- fix code from projectile (editor involved) compile changed scripts, (minimize Editor - and quickly do a copy of UnrealShare into a folder from UT server called SystemConform.
- save UnrealShare Package from Unreal Editor;
- CLOSE Editor;
- move to system and input UCC Conform UnrealShare.u ..\SystemConform\UnrealShare.u;
- check ucc.log for confirmation - now you have a new generation NOT FOR PUBLIC SHARING which will be moved to the server - SOLVED.

The rest of crashes have different reasons.
First crash-log seems that was a memory error (not enough memory ?). Server went exhausted by itself eating memory...
The second one is probably similar.

Edit:
My Proposal for a code fixed
Code: Select all
   function BlowUp(vector HitLocation)
   {
      if (instigator != None && instigator.health > 0) //Accessing Skill only exist a skilled Instigator
         HurtRadius(damage, 50 + instigator.skill * 45, 'exploded', MomentumTransfer, HitLocation);
      else
         HurtRadius(damage, 50 + Level.Game.Difficulty, 'exploded', MomentumTransfer, HitLocation); //I'm using Difficulty setup in RUN-LINE... not gonna check if projectile is flying out of Level.Game in Non Simulated stuff
      MakeNoise(1.0);
   }
Because I read somewhere that skill is related to difficulty in Pawn class if I'm not mistaking.

For a better work you should list all bugs, fix them at once and save file a single time for not increasing size useless with trash saved from Editor. See entire ScriptedPawn collection of bugs.
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby Aldebaran » Thu Apr 20, 2017 12:25 pm

Many thanx for your help. I will wait some more crashes and check log files.
Memory should not be a problem. MH-Planeshifter also crashes after these Bruteprojectile messages and is an old map played very often (I mean it should be stable).
If nobody has similar crashes and there is only this one UnrealShare package out perhaps something is wrong with my custom monster hunt mod. I will see...
Last edited by Aldebaran on Thu Apr 20, 2017 3:38 pm, edited 1 time in total.
Aldebaran
Adept
 
Posts: 449
Joined: Thu Jan 28, 2016 7:30 pm

Re: Package Conformal discussion

Postby sektor2111 » Thu Apr 20, 2017 2:12 pm

I did not see or not totally understand the memory management of U Engine but I guess it will allocate memory for null things and later because content was null, memory is no longer released - just presumption here. Else without Accessed None errors, even a MH server is capable of running at least one month without to crash ( I have even evidences from a comrade ) - we could not figure more time of activity because hosting company used to restart machines for cleaning things from time to time.
That ScriptWarning log has a logic to be shown and I got rid of it figuring an improved stability.
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby Aldebaran » Thu Apr 27, 2017 6:12 pm

I have found a problem caused by my custom mh mod, so perhaps these brute projectile crashes will no longer happen.
In my custom mod I set the MonsterSkill much higher, perhaps too high.
First I thought it would only change the monster health but it changed also:

ScriptedPawn.SightRadius
ScriptedPawn.Aggressiveness
ScriptedPawn.ReFireRate
ScriptedPawn.CombatStyle
ScriptedPawn.ProjectileSpeed
ScriptedPawn.GroundSpeed
ScriptedPawn.AirSpeed
ScriptedPawn.WaterSpeed

If these variables have values about 300% of the original monster hunt value it seems to produce some issues (you see the monsters not at the place where their munition come from, the moving of some monsters looks silly because they were not animated while moving very fast, cpu load can be 99%...).

Sorry that I posted this issue in this thread that has to do with other issues, it was the mentioned UnrealShare package why I thought it could fit here.
Last edited by Aldebaran on Thu Apr 27, 2017 7:08 pm, edited 1 time in total.
Aldebaran
Adept
 
Posts: 449
Joined: Thu Jan 28, 2016 7:30 pm

Re: Package Conformal discussion

Postby sektor2111 » Thu Apr 27, 2017 6:59 pm

If you look at some... "Pawns" you'll understand why I've added "clamp" type conditions. Max 500 GSpeed Max 400 WSpeed, etc. after computing "skill" values - and removing any "CrapDamage StabDamage, FartDamage" and all those useless things which SetPawnDifficulty has in initial stage, my code has something... simple: DamageScaling and nothing else.
Some of those MH related packages seems coded by karmic people or retards, then everyone is raining questions about issues toward a map. When your monster has aggressiveness 1000 how is supposed to move in combat ? Do NASA has such a machine for executing such code ? Probably Not...
An amazing MH stability will occur by only clamping craps in normal Limits. Yes, that Code takes time but... is healthy and gorgeous. Now you can see that MH do needs codes tuning more than colors tuning, because MAP's content sometimes is pure garbage.
My UT Mapping works...
User avatar
sektor2111
Godlike
 
Posts: 3083
Joined: Sun May 09, 2010 6:15 pm
Location: Into personal private location.
Personal rank: 0.11

Re: Package Conformal discussion

Postby Barbie » Thu Apr 27, 2017 8:08 pm

Aldebaran wrote:In my custom mod I set the MonsterSkill much higher, perhaps too high.
First I thought it would only change the monster health but it changed also:

ScriptedPawn.SightRadius
ScriptedPawn.Aggressiveness
...
I coded it in this way: MonsterSkill can be a value between -1 and +1: -1 = too easy, -0.5 = easy, 0 = normal (no changes), +0,5 = difficult, +1 = hardcore.
Furthermore I separated the difficulty into MonsterScaleDifficulty and MonsterScaleHealth, because sometimes the mapper already has set very high health for Pawns but he did not adjust other Pawn's properties like Speed, Melee strength, TimeBetweenAttacks and so on. In this case I set the MonsterScaleHealth to zero or below but keep my default MonsterScaleDifficulty of 0.2.

Setting difficulty requires a knowledge of what every value means and how it should be adjusted. TimeBetweenAttacks for example should vary between a minimum positive value (0.1s for example) and Pawn's default value if MonsterScaleDifficulty>0. But if MonsterScaleDifficulty<0 (makes game easier), another algorithm must be used: I have decided to vary it between Pawn's default value and 5s depending on MonsterScaleDifficulty.

CombatStyle as another example does not depend on difficulty: it is a specific property of a pawn (see code comment: "-1 to 1 = low means tends to stay off and snipe, high means tends to charge and melee"). There is no sense to change this if difficulty changes.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Barbie
Godlike
 
Posts: 1293
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Package Conformal discussion

Postby Aldebaran » Thu Apr 27, 2017 9:45 pm

Thanx for the detailed description. I have separated now difficulty and health too but in an easy way so that difficulty can't be more than 150% of the original monster hunt values. Monster health can be higher, in my case 300% is a good value.
Perhaps I will improve these methods later.
Aldebaran
Adept
 
Posts: 449
Joined: Thu Jan 28, 2016 7:30 pm

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest