Saturday, 22-Jul-2017  00:00:00
Enhanced Coop  
[ New messages · Members · Forum rules · Search · RSS ]
Page 2 of 3«123»
Forum moderator: MrLoathsome 
Forum » Map Packs, Mods & Mutators » Mutators » Mods, Monsters, ect (Different things for debates)
Mods, Monsters, ect
NelsonaDate: Monday, 17-Jun-2013, 7:22 AM | Message # 26
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Arghh, is unbelievable how many troubles might develop these freaky armed species... All common functions from Botpack having "pawnlist" leads nowhere when these freaks are enter the game - EVEN if I let them original. If SS spawns them right at begining and not later, they are causing only errors. If those functions can be reworked, for Bot I cannot do too much without reworking it too. Botpack.Bot.Orders --- CRAP.

I reworked all functions for CTF, now things are silent but exist a few errors based on Bot and client if insist to hunt with Old weapons (only at client) - original throwed from Skaarj. In first moments they are usable but invisible, not later, which means they should be precached or is other crappy bug happening before Starting game.

Because I reworked functions, I was thinking to add directly sprees and multikill messages for monsters too. Now they work as a charm even combining kills, human and 3 monsters and 2 humans in a few seconds will result MONSTERKILL. Stupid HeadShot and FirstBlood also are available... I have to test more...


Message edited by Nelsona - Monday, 17-Jun-2013, 7:23 AM
 
NelsonaDate: Tuesday, 18-Jun-2013, 7:01 AM | Message # 27
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Feign death - A.I.

I don't know who had this ideea, in fact is not only messed but is even incomplete. As I saw, Trooper feigning death will hold weapon in hand unthrowed not hidden as human being lied down - is easy to catch it when is not really dead. A dead Trooper will throw weapon not still holding it visible.


Message edited by Nelsona - Tuesday, 18-Jun-2013, 7:02 AM
 
MrLoathsomeDate: Tuesday, 18-Jun-2013, 9:51 AM | Message # 28
Lieutenant colonel
Group: Moderators
Messages: 150
Awards: 0
Reputation: 0
Status: Offline
99% of all the issues with any of the armed Troopers has been fixed by the still unreleased version of Swarmspawner.

You MUST try some games on the TDM and DOM servers to see a preview of what is fixed.

Currently have the troopers using OLweapons, and have them set to drop the weapons when killed.

Players can pickup the weapons and use them, if they are able before they get killed.

Thanks to that Crazy Thing I did last week, my next big problem is to find a way to REDUCE both
the monsters skill and the default UT bots skill.

Copy the 10 Dm maps that came with Unreal Gold into your Maps folder before you test on the servers.

Those maps do have the Do Not Download flag set, and I think it would be illegal to change that for those maps.

They all seem to work perfect online on a UT server that is running UT2U1 as well as a little mutator I wrote
tonight that replaces the Unreal guns with the OLweapons.

TRY IT NOW!!!


Moo

 
NelsonaDate: Tuesday, 18-Jun-2013, 7:08 PM | Message # 29
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Quote (MrLoathsome)
Those maps do have the Do Not Download flag set, and I think it would be illegal to change that for those maps.

........ After 15 years there are still players but they won't be so many continuing debating legal terms for old manure applications.


Message edited by Nelsona - Tuesday, 18-Jun-2013, 7:17 PM
 
NelsonaDate: Thursday, 20-Jun-2013, 7:38 AM | Message # 30
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Now I almost have confirmation, Skaarj presence in game before to start game is throwing an invisible crap. There is a timer set in that waiting state and it seems to bug things - we keep appreciating dumb Epic ideeas and model in setting up things.

I REMOVED any crappy wait and things works fine - is a timer dealing with a pawnlist, LOL.

also if bSpawnAtStart=False things works correctly for sure. Done !

I'll remove stupid protocol or I'll fix it properly (even for MH) - Time to work again sad


Message edited by Nelsona - Thursday, 20-Jun-2013, 7:39 AM
 
MrLoathsomeDate: Friday, 21-Jun-2013, 3:24 AM | Message # 31
Lieutenant colonel
Group: Moderators
Messages: 150
Awards: 0
Reputation: 0
Status: Offline
The method I posted in the SkaarjTroopers weapons hack thread works great.

That stuff is fixed for SwarmSpawner.   Still working on a few other details with that before
an update is posted.


Moo

 
NelsonaDate: Sunday, 23-Jun-2013, 8:20 AM | Message # 32
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
I don't know if is so important for A.I. to have a threat very declared since Attraction seems to manage a bit things properly. This one was a headache and I still have doubts about it - I used a log to scan it properly and how often is called. And... is enough called.
Original

Code
function float GameThreatAdd(Bot aBot, Pawn Other)
{
       local CTFFlag aFlag;

       if ( Other.PlayerReplicationInfo.HasFlag != None )
          return 10;
       else
          return 0;
}


Another one modified is not so cute with Skaarj - is called when we have a flag carrier and... LOL.

Code
function float GameThreatAdd(Bot aBot, Pawn Other)
{
//local CTFFlag aFlag;

       if (Other.bIsPlayer && Other.PlayerReplicationInfo.HasFlag != None)
          return 10;
       else
          return 0;
}


I have a proposal but it looks still unfinished even I have things more aggressive now.

Code
function float GameThreatAdd(Bot aBot, Pawn Other)
{
       local CTFFlag FriendlyFlag;
       local float Threaten;

       Threaten = 0;
       FriendlyFlag = CTFReplicationInfo(GameReplicationInfo).FlagList[aBot.PlayerReplicationInfo.Team];
       if ( FriendlyFlag.Holder != None && FriendlyFlag.Holder == Other && Other.PlayerReplicationInfo.HasFlag != None )
          Threaten = 10;
       if ( Other.IsA('ScriptedPawn') || (Other.PlayerReplicationInfo.Team != aBot.PlayerReplicationInfo.Team) || ( FriendlyFlag.Holder != None && FriendlyFlag.Holder != Other ))
          Threaten = FClamp(2000/VSize(Other.Location-aBot.Location),1,5);
//   log ("Game threat for "$aBot.GetHumanName()$" is "$Threaten$ " at "$Other.GetHumanName());
       return Threaten;
}


Looking at log, I need a timing or... even a boolean value to scan when exist a carrier and to pay attention only to that guy with extreme priority.


Message edited by Nelsona - Sunday, 23-Jun-2013, 12:31 PM
 
NelsonaDate: Sunday, 23-Jun-2013, 12:35 PM | Message # 33
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
And I think I'll keep this one:

Code
function float GameThreatAdd(Bot aBot, Pawn Other)
{
    local CTFFlag FriendlyFlag;
    local float Threaten;
    local bool bFoundMainThreat;

    Threaten = 0;
    FriendlyFlag = CTFReplicationInfo(GameReplicationInfo).FlagList[aBot.PlayerReplicationInfo.Team];
    if ( FriendlyFlag.Holder != None && FriendlyFlag.Holder == Other && Other.PlayerReplicationInfo.HasFlag != None )
    {
       Threaten = 10;
       bFoundMainThreat=True;
//      log (Other.GetHumanName()$ " is Main Threat for "$aBot.GetHumanName());
    }
    if (!bFoundMainThreat)
    if ( Other.IsA('ScriptedPawn') || (Other.PlayerReplicationInfo.Team != aBot.PlayerReplicationInfo.Team) || ( FriendlyFlag.Holder != None && FriendlyFlag.Holder != Other ))
       Threaten = FClamp(2000/VSize(Other.Location-aBot.Location),1,5);
//   log ("Game threat for "$aBot.GetHumanName()$" is "$Threaten$ " at "$Other.GetHumanName());
    return Threaten;
}


Checking logs, I can see what's going one pretty well, maybe second calls to carrier aren't important but they doesn't hurt this time.
 
MrLoathsomeDate: Monday, 24-Jun-2013, 9:36 AM | Message # 34
Lieutenant colonel
Group: Moderators
Messages: 150
Awards: 0
Reputation: 0
Status: Offline
Looks very interesting.   After I release the next version of MegaTDM/DOM and finish up a couple other projects CTF is
next on the list for the new gametypes.

Some of that might even find its way into the other gametypes.  I have not even looked at that function in my previous
stuff.  At least not very closely....

Will have to test it out, and see what happens.


Moo

 
NelsonaDate: Monday, 24-Jun-2013, 10:31 PM | Message # 35
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
I added this, and ... I don't know, or I'm older and bored, or they attack more aggressive all life-forms arround, I set medium skill and I got more troubles than in previous instances, Loque is no longer kidding and neither Tamerlane...  pray
Actually as I noticed, Epic used maximum threat at value 10. This value I think can grow inside Bot depending on game situation increasing value if has a visual contact with that enemy or if is hunting directly. I followed normal values giving a bit of threat for pawns depending on distance. They seems a bit more interested in cleaning area.

Later I was busy to check source-code for SwarmSpawner - I found a few errors and I think I have some fixes. All are based on wrapper checking - "If (aThing != None)". A version of CTF-Coret spreaded errors even boosted others for default CTF not only that one reworked (first time assuming I did something wrong). That map has small places, I set 3 Brutes to spawn. They did not spawned but their properties were tuned accesing "null content" and also (I think were skaarj) bugging logout.

I don't recall if If I posted a safe code for logout (I noticed 0 troubles), if server is fast then is a faster protection as I deducted.

Code
function Logout(pawn Exiting)
{
    local Projectile Pr;
    local bool logged;

    if (Exiting.IsA('ScriptedPawn') || Exiting.IsA('FlockPawn')) //Suggestion
       return;
    if ( Exiting.PlayerReplicationInfo.HasFlag != None && Exiting.PlayerReplicationInfo != None)
       CTFFlag(Exiting.PlayerReplicationInfo.HasFlag).SendHome();

    foreach AllActors (class 'Projectile', Pr) //um... let's play then
    {
       if ( Pr != None )
       {
          if (Pr.Instigator == Exiting)
          {
             Pr.bReplicateInstigator = False;
             Pr.Instigator = None;
             Pr.Destroy();
             if (!logged)
             {
//               log (Exiting.GetHumanName()$" left server, removing trash behind...");
                logged = True;
             }
          }
       }
    }
    logged = False;
    Super(DeathMatchPlus).Logout(Exiting);
Teams[Exiting.PlayerReplicationInfo.Team].Size--;
    ClearOrders(Exiting);
    if ( !bGameEnded && bBalanceTeams && !bRatedGame )
       ReBalance();
}


I think this is corect to not see troubles.


Message edited by Nelsona - Monday, 24-Jun-2013, 10:48 PM
 
NelsonaDate: Monday, 24-Jun-2013, 11:28 PM | Message # 36
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Breaking news !!! LOL  smile
Crash - fragment said:

Code
Critical: appError called:
Critical: SS CTF-NovemberCE105.SS0 (Function Engine.Mutator.PreventDeath:0000) Infinite script recursion (250 calls) detected
Exit: Executing UObject::StaticShutdownAfterError
Critical: FFrame::Serialize
Critical: AActor::ProcessState
Critical: Object LeglessKrall CTF-NovemberCE105.LeglessKrall0, Old State State UnrealShare.ScriptedPawn.Attacking, New State State UnrealShare.ScriptedPawn.Attacking
...


This is closer to a previous crap:

Code
Critical: appError called:
Critical: SkaarjBerserker CTF-NovemberCE105.SkaarjBerserker2 (Function UnrealI.SkaarjBerserker.WhatToDoNext:00A6) Runaway loop detected (over 10000000 iterations)
Exit: Executing UObject::StaticShutdownAfterError
Critical: FFrame::Serialize
Critical: AActor::ProcessState
Critical: Object SkaarjBerserker CTF-NovemberCE105.SkaarjBerserker2, Old State State UnrealShare.ScriptedPawn.Attacking, New State State UnrealShare.ScriptedPawn.Attacking
.....


As I mentioned, now I think I'll go to finish my monsters, I have confirmation at what I noticed:

Code
state charging
.....
.....
CloseIn:
     if ( (Enemy == None) || (Enemy.Health <=0) )
        GotoState('Attacking'); //is a kind of stupidity or must be dumbass or idiot ?


or something

Code
state Melee Attack
function KeepAttacking()
     {
        if ( (Enemy == None) || (Enemy.Health <= 0)  // ???????????????????????????? Too much wine ?
           || (VSize(Enemy.Location - Location) > (MeleeRange + Enemy.CollisionRadius + CollisionRadius)) )
           GotoState('Attacking');
... //the same state later
Begin:
     if ( Enemy == None )
        GotoState('Attacking'); //Attacking my pants... Kill them !!!!!!


and keep attacking ghosts

Code
state RangedAttack
...
     function KeepAttacking()
     {
        if ( !bFiringPaused && ((FRand() > ReFireRate) || (Enemy == None) || (Enemy.Health <= 0) || !CanFireAtEnemy()) ) //These conditions were copied from Lunatic Asylum, right ? They were writed on a toillete wall...
           GotoState('Attacking');
     }


I'm no longer wander about that idiotic behavior to fire at walls - somewhere will loop in infinity... As I said, even a kid is laughing at these sections as replacement to not get mad.

Looking at some line, I think I'll try a deal in PreventDeath - I hope to work, as I saw a crappy triangle, is really preventing pawn to die and I want it dead and destroyed - no crappy saving of life, is just ruining game.


Message edited by Nelsona - Monday, 24-Jun-2013, 11:33 PM
 
MrLoathsomeDate: Wednesday, 26-Jun-2013, 4:35 AM | Message # 37
Lieutenant colonel
Group: Moderators
Messages: 150
Awards: 0
Reputation: 0
Status: Offline
Swamspawner is about to be updated.    It will now spawn ACTORS.   Not just ScriptedPawns.

ALL monsters should have bIsPlayer=False.     That stops LOTS of those errors you are chasing.

My new gametypes will handle the team scoring AND control the monsters so they are on the correct
team, WITHOU setting bIsPlayer=True.

If you post the errors  you think you found there, I can check to make sure I have them corrected or eliminated in
the new version prior to release.


Moo

 
NelsonaDate: Tuesday, 02-Jul-2013, 11:48 PM | Message # 38
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Now... I have to tell you other things. Checking different pawns - I did not like anything. I tested a bit some crappy map modified by me using alarmpoints and targets. Default creatures are really do sucks. Others ? .... after getting a hit from nowhere say bye to "guarding" "patroling" etc. Why ? Simple. At some take damage function shouldn't ever be welcomed any return if is not any enemy around. Orders need to be respected. A wrapped check "if (Enemy != None)" would be much better than any return. Also if we want a return with any price, is recommended to call "WhatToDoNext" before return, else creature will forget order doing a dumb sleep. Eheh, I have to work a lot to recode ScriptedPawn in a new child formula, of course useless lines are going to be throwed out and wrappers added as needed.

Message edited by Nelsona - Tuesday, 02-Jul-2013, 11:49 PM
 
NelsonaDate: Sunday, 21-Jul-2013, 10:20 PM | Message # 39
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Back, as I could see, indeed doors left opened might influence game. Projectile is no longer blocked and will kill carrier or other pawns which could survive more time. So.. I tried a fix, maybe in not the best. In CTF-Coret worked, at least I couldn't notice more troubles, in map CTF-Niven door from BlueBase was temporary ruined but returned to normal pretty well, the mostly was OK, better than nothing. I still wanna check what's happening when a serious ambush is occuring at door. As I noticed, an actor will count other actors which are touching it no more than 4 pieces ? Eh, maybe in this pawn soup with touchers engine cannot manage well what is happening. Pawn is killed (Bot), door stays open until Bot is respawning. Killed seems to not call UNTOUCH and I think I can be again gratefull to Epic. I don't think is normal for a killed pawn to not quit touching other actors since is no longer alive. Also projectiles fired by ghosts are ruined at once with their deleted instigator. I don't need Attitude to Nobody called. In PreventDeath I put something for actors generally (not worked so well only for triggers):

Code
if ( Killed != none )
             {
                if (Killed.IsA('ScriptedPawn') || !Killed.bIsPlayer)
                {
                   foreach Killed.RadiusActors (class'Actor', T, 700)
                   {
                      if (T != None)
                      {
                         for (i=0;i<4;i++)
                         if (T.Touching [i]  == Killed)
                            T.UnTouch(Killed);
                      }
                   }
                   Killed.GoToState('Dying'); //Bye, Bye Mr. Legless ... Solved previous crash
                }
             }[/i]

Forum editing syntax might bug code.


Message edited by Nelsona - Sunday, 21-Jul-2013, 10:30 PM
 
NelsonaDate: Monday, 29-Jul-2013, 7:38 AM | Message # 40
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
I checked more time these issues. They seems to happen more when a monster is heavy gibbed near door. Repeating this killing type seems to restore mover. Here I observed some crappy error Engine.Mover... Accesed None, and after that, Mover was stucked. Now I've done other codes to regain movers, for the moment they are a bit better. I'll check more intensive tonight when I'll be back home.

Mover seems to have an instigator at a moment. If this one is vanished, mover has chances to be ruined. I also called UnTouch and UnTrigger (for mover) to see how is acting in other environments.


Message edited by Nelsona - Monday, 29-Jul-2013, 6:26 PM
 
NelsonaDate: Tuesday, 30-Jul-2013, 11:43 PM | Message # 41
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
It looks like this code won't cause errors, still need a lot of tests of course.
Code

function bool PreventDeath (Pawn Killed, Pawn Killer, name DamageType, Vector HitLocation)
{
  local bool PD;
  local Actor T;
  local int i;

  PD = Super.PreventDeath(Killed,Killer,DamageType,HitLocation);
  if ( Killed != none )
  {
   if (Killed.IsA('ScriptedPawn') || !Killed.bIsPlayer)
   {
    foreach Killed.RadiusActors (class'Actor', T, 1500)
    {
     if (T != None)
     {
      for (i=0;i<4;i++)
      {
      if (T.Touching[i] == Killed && !T.IsA('Mover'))
       T.UnTouch( Killed );
      }
      if (T.IsA('Mover') && Mover(T).Instigator != None && Mover(T).Instigator == Killed && !Mover(T).bTriggerOnceOnly)
      {
       Mover(T).UnTrigger(Killed,Instigator);
//      log ("Attempt to restore Mover "@T);
      }
     }
    }
    CheckTouchers();
    Killed.GoToState('Dying');
   }
  }
  return PD;
  return false;
}
...
function checktouchers()
{
  local Actor A, Other;
  local int i;

  foreach AllActors (class 'Actor', Other)
  {
   if (Other.bDeleteMe /*|| ( Other.bIsPawn && Pawn(Other).Health < 0)*/ )
   {
    log ("Actor "$Other$ " found... checking status...");
    foreach Other.RadiusActors (Class 'Actor', A, 1500) //Assuming dying slow boosted by deemers ?
    {
     if (A != None)
     {
      for (i=0;i<4;i++)
      if ( A.Touching[i] == Other )
      {
       log ("Found Invalid Toucher for "@A@" at "$A.Touching[i]$" being "$Other);
       A.Untouch(Other);
      }
     }
    }
   }
  }
}

If you don't like these, adjust them as you think is good. For the moment I have only default monster errors and general BotPack problems. Movers seems silent for the moment.
 
NelsonaDate: Tuesday, 13-Aug-2013, 9:05 PM | Message # 42
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Hello ... o ... o
I think if I'll slap a kind of DM game with Monsters involved in battle by SIR SwarmSpawn I have to try a code which somehow proved functionality. A small thing:
Code

class Tweaker extends Actor;

function PostBeginPlay()
{
SetTimer(1.50,True);
log ("A tweaker has been spawned");
Super.PostBeginPlay();
}

event timer()
{
local ScriptedPawn S;
local Pawn P, En;

for ( P=Level.PawnList; P!=None; P=P.NextPawn )
{
S = ScriptedPawn(P);
if ( S != None && S.Health > 0 && !S.IsA('Nali') && !S.IsA('Cow'))
{
foreach S.VisibleActors (class'Pawn',En,S.SightRadius)
{
if (En != None && !En.IsA('ScriptedPawn') && En.Health > 0 && !En.IsA('PlayerPawn') && En.bBlockActors)
{
if ( S.Enemy == None )
{
S.Hated = En;
S.Enemy = En;
S.Target = En;
//log ("Tweaker works for "$S$" - Enemy is "$En);
if (!S.IsInState('Attacking'))
S.GotoState('Attacking','');
}
if (S.Enemy != None && FRand() > 0.6)
{
S.Hated = En;
S.Enemy = En;
S.Target = En;
//log ("Tweaker works for "$S$" - Enemy is "$En);
}
}
}
if (S.Enemy != None && S.Enemy.IsA('ScriptedPawn'))
{
S.Hated = None;
S.Enemy = None;
S.bHunting = False;
if (S.OldEnemy.IsA('ScriptedPawn'))
S.OldEnemy = None;
S.GotoState('Waiting');
}
S.TeamTag = 'Arn'; //Or another random bullshit string
}
}
if ((Level.Game).bGameEnded) Destroy();
}

defaultproperties
{
RemoteRole=ROLE_None
bGameRelevant=True
}

Called by a kind of PostBeginPlay seems to do some noise, if not, means it needs some love. Code is not a need to be in Client.


Message edited by Nelsona - Tuesday, 13-Aug-2013, 9:08 PM
 
MrLoathsomeDate: Wednesday, 14-Aug-2013, 2:33 AM | Message # 43
Lieutenant colonel
Group: Moderators
Messages: 150
Awards: 0
Reputation: 0
Status: Offline
Looks like it should work.

It is almost exactly what I have the new control points in the MegaDOM and TDM gametypes doing......


Moo

 
NelsonaDate: Wednesday, 14-Aug-2013, 7:31 AM | Message # 44
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
For the moment is part of MonsterHuntArena (you forgot to tell me what you did with monsters in TDM, in domination I understood what's there). This thing has a double purpose - I need Instigator for DM, attraction cannot be used in DM. In fact I think I'll remove wild code from CTF attraction - that one need small fixes not attaching codes... eh... and a bunch of tests.
 
NelsonaDate: Thursday, 22-Aug-2013, 10:40 PM | Message # 45
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
In case I forgot some stuff to ruin but NOT monsters.

Code

function bool ReplaceWith(actor Other, string aClassName)
{
     local Actor A;
     local class<Actor> aClass;
     local Pawn P;
     local Weapon W;

     if ( Other.IsA('Inventory') && (Other.Location == vect(0,0,0)) )
      return false;
     aClass = class<Actor>(DynamicLoadObject(aClassName, class'Class'));
     if ( aClass != None )
      A = Spawn(aClass,Other.Owner,Other.tag,Other.Location, Other.Rotation);
     if ( Other.IsA('Inventory') )
     {
      if ( Inventory(Other).MyMarker != None )
      {
       Inventory(Other).MyMarker.markedItem = Inventory(A);
       if ( Inventory(A) != None )
       {
        Inventory(A).MyMarker = Inventory(Other).MyMarker;
        A.SetLocation(A.Location     
         + (A.CollisionHeight - Other.CollisionHeight) * vect(0,0,1));
       }
       Inventory(Other).MyMarker = None;
      }
      else if ( A.IsA('Inventory') )
      {
// To work here
       Inventory(A).Respawntime = 0.0;
       Inventory(A).bHeldItem = True;
       if (Inventory(A).IsA('Weapon'))
       {
        W = Weapon(Inventory(A));
        W.PickupMessageClass = Class'Botpack.PickupMessagePlus';
        Foreach W.RadiusActors(class 'Pawn', P, W.CollisionRadius-3)
        {
         if (P != None && P.FindInventoryType(aClass) == None && P.Health > 0)
         {
          log ("Found closer Pawn "$P$" for "$Inventory(A)$" as replacement for "$Other); //log says ...
          if (!P.bIsPlayer)
           P.bIsPlayer=True;
          W.Touch(P); //Love comes VIA Touching - Only Players
//I think "ChangedWeapon" is called or simply they don't make troubles
//Of course I don't care about some "MyWeapon" aka "WeaponType" and so on
         }
        }
       }
// Will check if still bug me. No... It looks fine.
      }
     }
     if ( A != None )
     {
      A.event = Other.event;
      A.tag = Other.tag;
      A.RotationRate = Other.RotationRate;
      return true;
     }
     return false;
}


Message edited by Nelsona - Thursday, 22-Aug-2013, 10:45 PM
 
NelsonaDate: Sunday, 22-Sep-2013, 0:43 AM | Message # 46
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Back in discutions related to monsters - Weapon-holders any...

First wrong thing noticed by me when I toyed with a class like SevenB and/or Xidia, is ideea to spawn weapon in PostBeginPlay. In a server, right in these moments renders or whatever diplay modules aren't ready yet. A weapon which is bHeldItem tends to initialize HUD for player. If functions are missing Weapon is simply altered and bye HUD. This invisible drop not happens at monsters spawned later, after all display modules have been loaded-initialized. I modified a pawn to spawn weapon only if is bumped by other pawn or when wants to attack (looks like it gets weapon from pocket). This thing could be better to happen for default SkaarjTroopers but... LOL.

I did not try yet to do a second call to some lost functions when first human is joining or in whatever delayed occurence. I have to see what is happening when I recall some SetDisplayProperties and/or other things from Pawn/weapon. Anyway for my pawn I used AddInventory not Touch eh, better directly view:
Code

state Attacking
{
ignores SeePlayer, HearNoise, Bump, HitWall;

    function ChooseAttackMode()
    {
     local eAttitude AttitudeToEnemy;
     local float Aggression;
     local pawn changeEn;
     local Weapon W;

     if (!bSpawnedWeapon)
     {
    //  bIsPlayer = true; // temporarily, till have weapon - TOO EARLY
      if ( WeaponType != None )
      {
       bIsPlayer = true; //ONLY IF WEAPONTYPE EXIST not always
        myWeapon = Spawn(WeaponType,Self,,Self.Location);
       if ( myWeapon != None )
       {
        myWeapon.ReSpawnTime= 0.0;
        myWeapon.Instigator=Self;
        myWeapon.BecomeItem();
        AddInventory(myWeapon);
        myWeapon.GiveAmmo(Self);
        myWeapon.WeaponSet(Self); //will slap down bIsPlayer in here :|
       }
       else //Maybe some bullshit bugs me
       {
        foreach Self.RadiusActors(class 'Weapon', W, 50)
        {
         if ( W != None )
         {
          W.Touch(Self); //Use old code ... Just ... Nvm
          break;
         }
        }
       }
      }
     bSpawnedWeapon=True;
     }
...... //continuing ScriptedPawn code

I added boolean to made sure for happening only once.


Message edited by Nelsona - Sunday, 22-Sep-2013, 0:51 AM
 
MrLoathsomeDate: Tuesday, 24-Sep-2013, 6:12 AM | Message # 47
Lieutenant colonel
Group: Moderators
Messages: 150
Awards: 0
Reputation: 0
Status: Offline
Interesting.

I will have to play around with some of this when I get around to resuming work on things....


Moo

 
NelsonaDate: Monday, 14-Oct-2013, 10:41 PM | Message # 48
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Assuming Bot is not really a monster but is an extended ScriptedPawn code (as I saw) with new things implemented, I toyed with a tool, I have to very check this one to not cause some craps due to Bot Secret deals with Movers. Fixing BumpOpenTimed small problem... Or better Not ?
Code

class NoBump expands Mutator;    //No config nothing in here
         //Just don't use this if you think is bad
function PostBeginPlay()
{
  local Mover M;
  local Mutator Mu;
  local NavigationPoint N, N1, LE1, LE2;
  local bool bHaveExits;

  //Precheck against already loaded call
  ForEach AllActors (class 'Mutator', Mu )
  {
   if ( Mu != None && Mu.Class == Self.Class && Mu != Self )
   {
    log ("Already loaded "$Mu$" will self eliminate other copy "$Self );
    Destroy();
    return;
   }
  }
  //Attempt High Speed
  log ("NoBump mutator is loaded and started CHECK MODE... at "$GetAbsoluteTime());
  for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
  {
   if ( N != None )
   {
    if ( N.IsA('LiftCenter') && LiftCenter(N).LiftTag != '') //Found something
    {
     ForEach AllActors(class'Mover', M, LiftCenter(N).LiftTag )
     {
      if ( M != None && M.InitialState == 'BumpOpenTimed' )
      {
       log("NoBump report - Found Mover: "$M$" with <BumpOpenTimed>. Will check if need to modify InitialState.");
       for ( N1=Level.NavigationPointList; N1!=None; N1=N1.NextNavigationPoint ) //Recheck for Exits
       {
        if ( N1.IsA('LiftExit') && LiftExit(N1).LiftTag == LiftCenter(N).LiftTag && LE1 == None ) //Found one
        {
         LE1 = N1;    //Save it.
         log ("Found probably first LiftExit as a "$LE1$" for "$N);
        }
        if ( LE1 != None && N1.IsA('LiftExit') && N1 != LE1 && LiftExit(N1).LiftTag == LiftCenter(N).LiftTag && LE2 == None) //Found the second
        {
         LE2 = N1;    //Save it too.
         log ("Found probably second LiftExit as a "$LE2$" for "$N);
        }
        if ( LE1 != None && LE2 != None && LE1 != LE2 ) //Assure are different and both exist to check something
        {
         if ( ( LE1.Location.Z - LE2.Location.Z < 650
         && LE1.Location.Z - LE2.Location.Z > 30 )
         || ( LE2.Location.Z - LE1.Location.Z < 650
         && LE2.Location.Z - LE1.Location.Z > 30 ) )
         {
          bHaveExits = True;  //Long-ranged lifts aren't tuned... Bot can cheat by summoning Lift. So leave it alone or will mess up Navigation through this Lift.
         }      //Content added because of some map like CTF-MafiaCity.unr
        }
       }
       if ( bHaveExits ) //Assuming only if exiting points are a bit closer
       {
        M.InitialState = 'StandOpenTimed';
        if (M.InitialState == 'BumpOpenTimed')
         log("Fail to fix Mover >>> "$M$".");
        else
         log("Mover "$M$" is now "$M.InitialState$".");
        if ( !M.bTriggerOnceOnly && M.BumpType == BT_PlayerBump )
         M.BumpType = BT_PawnBump;
       }
      }
      if ( M != None && M.InitialState == 'BumpOpenTimed' && !bHaveExits ) //Else leave this
       log (M$" having "$N$" was skipped because of high distance.");
      break;
     }
     LE1 = None; //Clean values for next node in first iteration if this previous has been studied.
     LE2 = None;     
    }
    bHaveExits = False;
   }
  }
  log ("NoBump ended CHECK MODE at "$GetAbsoluteTime()); //Should be fast or simply clock is blocked ? I cannot see a milisecond passing ?
  Super.PostBeginPlay();
}

function string GetAbsoluteTime()
{
  local string AbsoluteTime;
  local string GMTRef;

  AbsoluteTime = string(Level.Year);

  if (Level.Month < 10)
   AbsoluteTime = AbsoluteTime$"/0"$Level.Month;
  else
   AbsoluteTime = AbsoluteTime$"/"$Level.Month;

  if (Level.Day < 10)
   AbsoluteTime = AbsoluteTime$"/0"$Level.Day;
  else
   AbsoluteTime = AbsoluteTime$"/"$Level.Day;

  if (Level.Hour < 10)
   AbsoluteTime = AbsoluteTime$" Time > 0"$Level.Hour;
  else
   AbsoluteTime = AbsoluteTime$" Time > "$Level.Hour;

  if (Level.Minute < 10)
   AbsoluteTime = AbsoluteTime$":0"$Level.Minute;
  else
   AbsoluteTime = AbsoluteTime$":"$Level.Minute;

  if (Level.Second < 10)
   AbsoluteTime = AbsoluteTime$":0"$Level.Second;
  else
   AbsoluteTime = AbsoluteTime$":"$Level.Second;

  if (Level.Millisecond < 10)
   AbsoluteTime = AbsoluteTime$".0"$Level.Millisecond;
  else
   AbsoluteTime = AbsoluteTime$"."$Level.Millisecond;
  return AbsoluteTime;
}
defaultproperties
{
}

Second class for server-only
Code

[Flags]
ServerSideOnly=True
AllowDownload=False
ClientOptional=False

second belongs to file "NoBump.upkg".
 
NelsonaDate: Sunday, 20-Oct-2013, 10:47 AM | Message # 49
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Continuing topic with something from EPIC:
Code

event PreBeginPlay()
{
  //Don't call Actor PreBeginPlay()
}

This section belongs to ENGINE.MUTATOR
Assuming that must be a good reason for their suggestion, I fixed my dumbness to deal with PreBeginPlay() into my craps coded.
Problem... Looks like other dudes coded different server-tools calling SUPER.PREBEGINPLAY(). Actually I'll quit calling that SUPER from now on. That's why MapVote bugged me in the past and other rebel mods like that. Beside this... a server-tool will be marked ServerSideOnly=True.
 
NelsonaDate: Sunday, 22-Dec-2013, 3:06 AM | Message # 50
Lieutenant colonel
Group: Checked
Messages: 122
Awards: 0
Reputation: 0
Status: Offline
Moving a bit forward. I noticed other thing as a "curse" from Epic. I did not see too many classes from UnrealI and UnrealShare using the call "Super.Tick". Even with this supposed rule, more coders did server-tools using this nasty thing. My question is why ? Exist a reason to do another jump call each tick to root actor which has an event declared for tick - probably for child classes not for calling it back - a preservation in case of a future need. I observed these two things used in a version of MapVote. The dude who removed that supposed encyption which crashed clients at first contact did not fix anything, in fact he bugged colors of player in vote-menu (only red is available) he bugged "state loading" (of maps) and he assigned succesfully other bug in "after-vote" instance. This was not enough, even I found a "full-server" dated 2013 containing all kinda crappy things 100 times worst than Baiter-Server which was enough tuned for that time. In 2013 after so many years I still cannot see good things in UT, just idiotic things to bug new admins making things harder. Probably will be my turn to retreat away from any such mess because I don't see more reasons to spent time trying to understand why the heck I need to see only trash each day.
 
Forum » Map Packs, Mods & Mutators » Mutators » Mods, Monsters, ect (Different things for debates)
Page 2 of 3«123»
Search:

Copyright MyCorp © 2017
Powered by uCoz