Here are some very useful scripting things I find in UT2004 at least for online play (or were fixed in UT '99):
*PostNetReceive() = Called on clients each time some replicated variable has been updated, only if actor's bNetNotify is true.
*PostNetBeginPlay() = Called on clients once all replicated variables have been replicated on client after PostBeginPlay.
*Enable simulated functions on pawns (client side): Tick, Timer, HitWall, Landed
*Pawns have physics replicated and set physics on client side like if pawn was walking and runs off a cliff for example.
*Make it possible to turn on replication for velocity/rotation/location on all actors like pawns.
*Add some sort of "bReplicateAnimations" variable for actor to disable animation replication.
*On Pawn make AdjustHitLocation a simulated function that projectiles dont penetrate the pawns on client side, aswell as on Nali and SkaarjTrooper.
I know workaround for (most) of these things, but they arent that effective as you could do with these things.
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
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
UScript improvements/ideas..
-
.:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
UScript improvements/ideas..
(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
-
.:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
Re: UScript improvements/ideas..
I found UT2004 version of Spawn function if it is any help with fixing on unreal 1.
(This code is from UT2004 public sources)
Seams like UT2004 dosent create a new name entry for each spawned actor in game (Nali0, Nali1, Nali2, Nali3 etc...) like on Unreal 1.
" // sjs - level's outer is not transient so we must do this
// doing this is a huge benefit for long running names, as the name table grows > 40 megs after long multiplayer games.
if( !GTransientNaming && InName==NAME_None)
InName = NAME_Transient;"
Code: Select all
AActor* ULevel::SpawnActor
(
UClass* Class,
FName InName,
FVector Location,
FRotator Rotation,
AActor* Template,
UBOOL bNoCollisionFail,
UBOOL bRemoteOwned,
AActor* Owner,
APawn* Instigator,
UBOOL bNoFail
)
{
guard(ULevel::SpawnActor);
if( GetFlags() & RF_Unreachable )
return NULL;
// Make sure this class is spawnable.
if( !Class )
{
debugf( NAME_Warning, TEXT("SpawnActor failed because no class was specified") );
return NULL;
}
if( Class->ClassFlags & CLASS_Abstract )
{
debugf( NAME_Warning, TEXT("SpawnActor failed because class %s is abstract"), Class->GetName() );
return NULL;
}
else if( !Class->IsChildOf(AActor::StaticClass()) )
{
debugf( NAME_Warning, TEXT("SpawnActor failed because %s is not an actor class"), Class->GetName() );
return NULL;
}
else if( !GIsEditor && (Class->GetDefaultActor()->bStatic || Class->GetDefaultActor()->bNoDelete) )
{
debugf( NAME_Warning, TEXT("SpawnActor failed because class %s has bStatic or bNoDelete"), Class->GetName() );
if ( !bNoFail )
return NULL;
}
// don't spawn bHighDetail actors if not wanted
if( !GIsEditor && Class->GetDefaultActor()->bHighDetail && !bNoFail )
{
if( GetLevelInfo()->DetailMode == DM_Low || GetLevelInfo()->bDropDetail || (GetLevelInfo()->NetMode == NM_DedicatedServer) )
{
//debugf(TEXT("%s not spawned"),Class->GetName());
return NULL;
}
}
#if 1
// sjs - level's outer is not transient so we must do this
// doing this is a huge benefit for long running names, as the name table grows > 40 megs after long multiplayer games.
if( !GTransientNaming && InName==NAME_None)
InName = NAME_Transient;
#endif
// Use class's default actor as a template.
if( !Template )
Template = Class->GetDefaultActor();
check(Template!=NULL);
// Make sure actor will fit at desired location, and adjust location if necessary.
if( (Template->bCollideWorld || (Template->bCollideWhenPlacing && (GetLevelInfo()->NetMode != NM_Client))) && !bNoCollisionFail )
if( !FindSpot( Template->GetCylinderExtent(), Location ) )
return NULL;
// Add at end of list.
INT iActor = Actors.Add();
AActor* Actor = Actors(iActor) = (AActor*)StaticConstructObject( Class, GetOuter(), InName, 0, Template );
Actor->SetFlags( RF_Transactional );
// Set base actor properties.
Actor->Tag = Class->GetFName();
Actor->Region = FPointRegion( GetLevelInfo() );
Actor->Level = GetLevelInfo();
Actor->bTicked = !Ticked;
Actor->XLevel = this;
// Set network role.
check(Actor->Role==ROLE_Authority);
if( bRemoteOwned )
Exchange( Actor->Role, Actor->RemoteRole );
// Remove the actor's brush, if it has one, because moving brushes are not duplicatable.
if( Actor->Brush )
Actor->Brush = NULL;
// Set the actor's location and rotation.
Actor->Location = Location;
Actor->Rotation = Rotation;
if( Actor->bCollideActors && Hash )
Hash->AddActor( Actor );
// init actor's physics volume
Actor->PhysicsVolume = GetLevelInfo()->PhysicsVolume;
// Set owner.
Actor->SetOwner( Owner );
// Set instigator
Actor->Instigator = Instigator;
#ifdef WITH_KARMA
// Initilise Karma physics for this actor (if there are any)
KInitActorKarma(Actor);
#endif
// Send messages.
Actor->InitExecution();
Actor->Spawned();
Actor->eventPreBeginPlay();
if( Actor->bDeleteMe && !bNoFail )
return NULL;
Actor->eventBeginPlay();
if( Actor->bDeleteMe && !bNoFail )
return NULL;
// Set the actor's zone.
Actor->SetZone( iActor==0, 1 );
// Update the list of leaves this actor is in.
Actor->ClearRenderData();
// Check for encroachment.
if( !bNoCollisionFail )
{
if( Actor->bCollideActors && Hash )
Hash->RemoveActor( Actor );
if( CheckEncroachment( Actor, Actor->Location, Actor->Rotation, 1 ) )
{
DestroyActor( Actor );
return NULL;
}
if( Actor->bCollideActors && Hash )
Hash->AddActor( Actor );
}
//if ( Actor->bCollideActors && !Actor->bBlockActors && !Actor->bUseCylinderCollision && (Actor->DrawType == DT_StaticMesh) )
// debugf(TEXT("%s shouldn't be using static mesh collision"),Actor->GetName());
// Send PostBeginPlay.
Actor->eventPostBeginPlay();
if( Actor->bDeleteMe && !bNoFail )
return NULL;
Actor->PostBeginPlay();
// Init scripting.
Actor->eventSetInitialState();
// Find Base
if( !GIsEditor && !Actor->Base && Actor->bCollideWorld && Actor->bShouldBaseAtStartup
&& ((Actor->Physics == PHYS_None) || (Actor->Physics == PHYS_Rotating)) )
Actor->FindBase();
// Success: Return the actor.
if( InTick )
NewlySpawned = new(GEngineMem)FActorLink(Actor,NewlySpawned);
// replicated actors will have postnetbeginplay() called in net code, after initial properties are received
if ( !bRemoteOwned )
Actor->eventPostNetBeginPlay();
return Actor;
unguardf(( TEXT("(%s)"), Class->GetName() ));
}Seams like UT2004 dosent create a new name entry for each spawned actor in game (Nali0, Nali1, Nali2, Nali3 etc...) like on Unreal 1.
" // sjs - level's outer is not transient so we must do this
// doing this is a huge benefit for long running names, as the name table grows > 40 megs after long multiplayer games.
if( !GTransientNaming && InName==NAME_None)
InName = NAME_Transient;"
Last edited by .:..: on Sun Oct 15, 2006 7:33 am, edited 1 time in total.
(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
-
TCP_Wolf
- Administrator
- Posts: 1078
- Joined: Sun Mar 03, 2002 12:04 pm
Re: UScript improvements/ideas..
Since some mods already have "workarounds" for the important missing events, including them may lead to incompatibilities. So far, all mods Smirftsch tested run with 227, and compatibility was one of the major points for the patch. So at least for that first patch, I would advise against anything potentially compromises that.
Also, I believe ut2k4 is a little too far away from u1 technology-wise, but that's just my opinion. I wrote some ut2k4 stuff and came to dislike it greatly in comparison to u1...
With that said, I have to point out that overall the suggested improvements do make sense. But consider who is going to use them and what it means for compatibility...!? How many modders are left in U1? Personally, I'm gonna be happy with fewer/no crashes and direct input 8-)
Also, I believe ut2k4 is a little too far away from u1 technology-wise, but that's just my opinion. I wrote some ut2k4 stuff and came to dislike it greatly in comparison to u1...
With that said, I have to point out that overall the suggested improvements do make sense. But consider who is going to use them and what it means for compatibility...!? How many modders are left in U1? Personally, I'm gonna be happy with fewer/no crashes and direct input 8-)
-=]HONESTY PAYS[=-
-
.:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
Re: UScript improvements/ideas..
Hum.. could you at least consider about that spawnactor thing, to not create new name entry for each spawned actor in game...
+ there would be another thing to fix on the navigation AI on function bool HandleTriggerDoor(pawn Other).
At current state it's extremly buggy, several times I see this problem where monsters/bots rush under elevator as it's on the way down... then it ends all jamming up.
+ there would be another thing to fix on the navigation AI on function bool HandleTriggerDoor(pawn Other).
At current state it's extremly buggy, several times I see this problem where monsters/bots rush under elevator as it's on the way down... then it ends all jamming up.
(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
-
TCP_Wolf
- Administrator
- Posts: 1078
- Joined: Sun Mar 03, 2002 12:04 pm
Re: UScript improvements/ideas..
Well since I am not writing the patch it is not up to me. If I was writing it, I would consider anything that does not change the in game workings codewise with respect to subclasses and interfaces. So, if HandleTriggerDoor is responsible for the stupid bots getting jammed under a lift, that would be a nice fix indeed. Even these 2
*Pawns have physics replicated and set physics on client side like if pawn was walking and runs off a cliff for example.
*On Pawn make AdjustHitLocation a simulated function that projectiles dont penetrate the pawns on client side, aswell as on Nali and SkaarjTrooper.
I would give a shot...
The "no numbering" spawnactor function would probably reduce RAM usage (although I don't quite understand why as references to all existing objects have to be kept either way) but it will immediately disable all "sockets" command parsers. I know a few mods that use it and would thus be incompatible. I don't really need a working sockets parser when we have Nephthys and 227 will have IP grabbing itself but somebody might... dunno :-/
Smirftsch....?
*Pawns have physics replicated and set physics on client side like if pawn was walking and runs off a cliff for example.
*On Pawn make AdjustHitLocation a simulated function that projectiles dont penetrate the pawns on client side, aswell as on Nali and SkaarjTrooper.
I would give a shot...
The "no numbering" spawnactor function would probably reduce RAM usage (although I don't quite understand why as references to all existing objects have to be kept either way) but it will immediately disable all "sockets" command parsers. I know a few mods that use it and would thus be incompatible. I don't really need a working sockets parser when we have Nephthys and 227 will have IP grabbing itself but somebody might... dunno :-/
Smirftsch....?
-=]HONESTY PAYS[=-
-
Smirftsch
- Administrator
- Posts: 9008
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
Re: UScript improvements/ideas..
I'm no scripter or modder, so as a matter of fact, I have to rely on people who really know what they are doing. Of course I have an understanding what this is about, but in the end its simple: I don't have the time to work it up and build it into 227. If those patches can be provided to me in a way that I can build it in, and test it for compatibility, I will do so. But this means for example a complete script, and /or the changed .uc files - if the fix needs c++ changes as well, I need every detail what the fix requires.
Everything else will be skipped for now, and only considered later for maybe a new release, or even a new patch. Otherwise 227 will never be finished...
Currently I have much to do to fix the remaining bugs and finish a 227beta. Although I promised it already quite a while ago I wasnt able yet to really release it, RL work eats me up in the moment.
So if you have a fix for it, send me please details and the necessary changes via mail
- this way everyone can participate in it, and like many of the other fixes I was sent everyone will have the advantage of it.
Everything else will be skipped for now, and only considered later for maybe a new release, or even a new patch. Otherwise 227 will never be finished...
Currently I have much to do to fix the remaining bugs and finish a 227beta. Although I promised it already quite a while ago I wasnt able yet to really release it, RL work eats me up in the moment.
So if you have a fix for it, send me please details and the necessary changes via mail
Sometimes you have to lose a fight to win the war.
-
Hyper
- OldUnreal Member
- Posts: 3558
- Joined: Fri Oct 11, 2002 5:41 pm
Re: UScript improvements/ideas..
I'm afraid that when you include scripting enhancements to the U227 version, you will probably create problems for Unreal 224, 225, 226 and Gold users, who do not support the newly created functions. Therefore, I think it is better to not include them.
Alter your reality...forever.
http://www.hypercoop.tk
unreal://hypercoop.tk
http://www.hypercoop.tk
unreal://hypercoop.tk