For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Project Zephon On Unreal 1, Fatal Crash against a specific enemy

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
Post Reply
User avatar
XenophobicSkaarj
OldUnreal Member
Posts: 35
Joined: Thu Dec 17, 2015 1:24 am
Location: Na Pali

Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by XenophobicSkaarj »

Hello everyone!
After porting most assets from UT99 to U1, I noticed that most campaigns work fine on the original Unreal, one of my favorites being Project Zephon, I knew I had to replay it again...It worked great and I made my way to the penultimate level where you fight those "Deus Ex Military Bots"...only to encounter a fatal crash (copy/pasted from Unreal Log):

Code: Select all

Critical: appError called:
Critical: Failed to find function PreventDeath in Mutator Save2.Mutator4
Critical: Windows GetLastError: An operation was attempted on something that is not a socket. (10038)
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UALAudioSubsystem::ShutdownAfterError
Log: DirectDraw End Mode
Exit: UOpenGLRenderDevice::ShutdownAfterError
Log: Resetting gamma
Critical: UObject::ProcessEvent
Critical: (RazorBlade Save2.RazorBlade35, Function Engine.Projectile.Touch)
Critical: TouchTo
Critical: AActor::BeginTouch
Critical: ULevel::MoveActor
Critical: AActor::physProjectile
Critical: AActor::performPhysics
Critical: AActor::Tick
Critical: TickAllActors
Critical: ULevel::Tick
Critical: (NetMode=0)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 08/13/17 16:54:03
This happens every time a military bot dies by any weapon or even friendly fire by another enemy. I must admit that i'm not a coder so I need help to potentially fix this and continue on with my playthrough of Zephon. :-[

Below is the code of the base pawn which is used mostly in Coop, with MilitaryBot2 assigned to Solo play most of the time and having the same code with the only difference being its stats in-game such as HP number and Aggressiveness.

Code: Select all

//=============================================================================
// MilitaryBot.
//=============================================================================
class MilitaryBot extends ScriptedPawn;

#exec MESH IMPORT MESH=MilitaryBot ANIVFILE=MODELS\MilitaryBot_a.3d DATAFILE=MODELS\MilitaryBot_d.3d
#exec MESH ORIGIN MESH=MilitaryBot X=0.00 Y=0.00 Z=128.00 YAW=-64.00 ROLL=128.00 PITCH=128.00

#exec MESH SEQUENCE MESH=MilitaryBot SEQ=All       STARTFRAME=0 NUMFRAMES=35
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Still     STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Walk      STARTFRAME=1 NUMFRAMES=20 RATE=10.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Run       STARTFRAME=1 NUMFRAMES=20 RATE=10.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Shoot     STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=BreatheLight STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=DeathFront STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=DeathBack STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Idle      STARTFRAME=21 NUMFRAMES=14 RATE=3.00
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Disabled1 STARTFRAME=4 NUMFRAMES=1
#exec MESH SEQUENCE MESH=MilitaryBot SEQ=Disabled2 STARTFRAME=14 NUMFRAMES=1

#exec TEXTURE IMPORT NAME=MilitaryBotTex1 FILE=MilitaryBotTex1.PCX GROUP=Skins

#exec MESHMAP SETTEXTURE MESHMAP=MilitaryBot NUM=0 TEXTURE=MilitaryBotTex1

#exec MESHMAP SCALE MESHMAP=MilitaryBot X=0.2 Y=0.2 Z=0.2

#exec MESH NOTIFY MESH=MilitaryBot SEQ=Walk      TIME=0.05 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Walk      TIME=0.50 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Run       TIME=0.05 FUNCTION=PlayFootStep
#exec MESH NOTIFY MESH=MilitaryBot SEQ=Run       TIME=0.50 FUNCTION=PlayFootStep


var() byte WhipDamage;            // Basic damage done by pistol-whip.
var bool   bBerserk;
var bool   bLongBerserk;
var() bool bTurret;                  // Doesn't move

// Sounds
var(Sounds) sound Footstep;
var(Sounds) sound Footstep2;
var(Sounds) sound PistolWhip;
var(Sounds) sound GutShot;
var(Sounds) sound PistolHit;
var(Sounds) sound Die2;

function PostBeginPlay()
{
      Super.PostBeginPlay();
      if (Skill > 1)
            bLeadTarget = true;
      if ( Skill == 0 )
            ProjectileSpeed *= 0.85;
      else if ( Skill > 2 )
            ProjectileSpeed *= 1.1;
}

function eAttitude AttitudeToCreature(Pawn Other)
{
      if ( Other.IsA('MilitaryBot') )
            return ATTITUDE_Friendly;
      else if ( Other.IsA('ScriptedPawn') )
            return ATTITUDE_Hate;
      else
            return ATTITUDE_Ignore;
}

function GoBerserk()
{
      bLongBerserk = false;
      if ( (bBerserk || ((Health < 0.75 * Default.Health) && (FRand() < 0.65))) 
            && (VSize(Location - Enemy.Location) < 500) )
            bBerserk = true;
      else 
            bBerserk = false;
      if ( bBerserk )
      {
            AccelRate = 4 * AccelRate;
            GroundSpeed = 1 * Default.GroundSpeed;
      }
}

simulated function skinnedFrag(class FragType, texture FragSkin, float DSize, int NumFrags) 
{
      local int i;
      local actor A, Toucher;
      local Fragment s;
 
      if (Event!='')
            foreach AllActors( class 'Actor', A, Event )
                  A.Trigger( Toucher, pawn(Toucher) );
      if ( Region.Zone.bDestructive )
      {
            Destroy();
            return;
      }
      for (i=0 ; i
User avatar
han
Global Moderator
Posts: 686
Joined: Wed Dec 10, 2014 12:38 am

Re: Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by han »

Critical: Failed to find function PreventDeath in Mutator Save2.Mutator4
HX on Mod DB. Revision on Steam. Löffels on Patreon.
User avatar
XenophobicSkaarj
OldUnreal Member
Posts: 35
Joined: Thu Dec 17, 2015 1:24 am
Location: Na Pali

Re: Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by XenophobicSkaarj »

(PreventDeath in Mutator Save2.Mutator4)
^ Yeah I know the source of the error ^
so... what do I do to fix this?  ;D

Never tried to change the code of anything so i'm not sure what to do to fix this without messing something up...
Last edited by XenophobicSkaarj on Mon Aug 14, 2017 1:09 am, edited 1 time in total.
User avatar
han
Global Moderator
Posts: 686
Joined: Wed Dec 10, 2014 12:38 am

Re: Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by han »

Either talk Smirftsch into adding PreventDeath() handling to Mutator (in case thats ut only stuff) or rebuild the package (in unreal) you are apperently just copying over and remove the lines of code calling this.
Last edited by han on Mon Aug 14, 2017 3:51 am, edited 1 time in total.
HX on Mod DB. Revision on Steam. Löffels on Patreon.
User avatar
XenophobicSkaarj
OldUnreal Member
Posts: 35
Joined: Thu Dec 17, 2015 1:24 am
Location: Na Pali

Re: Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by XenophobicSkaarj »

Either talk Smirftsch into adding PreventDeath() handling to Mutator (in case thats ut only stuff) or rebuild the package (in unreal) you are apperently just copying over and remove the lines of code calling this.
Yeah I followed Dots instructions on how to link UT assets in U1 (including a custom "BotPack") so I can play Nali Chronicles in Coop with friends, ended up trying the other campaigns in the process :)

Even though I know the basics of UED 2.1, I really do appreciate your help m8 but I got no clue on how to "rebuild a package", care to share any tutorials about this? The wiki has so many pages that lead to nothing that I couldn't find anything about this.

I tried to modify the code manually in the editor with 0 knowledge as well, so it ended up being trial and error until no more errors showed up when compiling the code...the only problem is that it doesn't want to save the package with the modified script and I don't know why...so I can't test the results in-game :-[ (Strange since it always saves if I modify something like the "Default properties" of a pawn but not the script of the .u file)
User avatar
Masterkent
OldUnreal Member
Posts: 1469
Joined: Fri Apr 05, 2013 12:41 pm

Re: Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by Masterkent »

For compiling the changed scripts you need to use Tools -> Compile Changed on the script editor window. Then you can use View -> Actor Class Browser... from the main menu to open the window where you can check the corresponding package and save it either by clicking on the diskette icon or using File -> Save Selected Packages. The name of the selected package should be the same as the leftmost name within the full class name that you altered. For example, if you modified class Engine.Mutator, then you need to save package Engine.

Last edited by Masterkent on Mon Aug 14, 2017 7:28 pm, edited 1 time in total.
User avatar
XenophobicSkaarj
OldUnreal Member
Posts: 35
Joined: Thu Dec 17, 2015 1:24 am
Location: Na Pali

Re: Project Zephon On Unreal 1, Fatal Crash against a specific enemy

Post by XenophobicSkaarj »

For compiling the changed scripts you need to use Tools -> Compile Changed on the script editor window. Then you can use View -> Actor Class Browser... from the main menu to open the window where you can check the corresponding package and save it either by clicking on the diskette icon or using File -> Save Selected Packages. The name of the selected package should be the same as the leftmost name within the full class name that you altered. For example, if you modified class Engine.Mutator, then you need to save package Engine.
You know when you do something and it doesn't work, then you ask for guidance from someone else and they explain how to proceed...the exact same way you did before but now suddenly it's working? :-?

Thanks to you I was able to finally test out the pawn I modified in-game and yeah the robot is now bleeding when it shouldn't be and it's suicidal attack works more or less but it doesn't cause any fatal crashes and the pawn now works great on Unreal 1! (Finally done with Zephon since I could actually finish the campaign with this fixed)


Thanks again Masterkent for my compiling/saving issues and thanks han since I didn't realise you could modify the code with ease by removing specific lines. :D :D
Post Reply

Return to “UScript Board”