OLD Players

User avatar
Miauz55555
Posts: 33
Joined: Thu Jul 01, 2021 7:33 am

Re: OLD Players

Post by Miauz55555 »

loadout map .. wasn't the purpose to have a map where aer the vehicles so you don't need to search in packages but just copie and past them to a new map? Not think it was ever intended to be "played" in that layout at all.

Also when you map in "windows secure mode" in win 10, where the editor is smooth like silk, it will crash the game when testing with that much rendering.
ItsMeAgain
Posts: 35
Joined: Thu Nov 04, 2021 11:18 pm

Re: OLD Players

Post by ItsMeAgain »

I have fixed all suggestions except one. Not able to determine how to avoid plasma fire damage to others after vehicle destroyed, even own team? I have tested on -lanplay, seems to work fine. Here is latest version, we do need a git bucket or mercurial server or something.

LinkFlyer

UT2004_ONSLinkFlyer2.7z
User avatar
pooty
Posts: 4354
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: OLD Players

Post by pooty »

Not able to determine how to avoid plasma fire damage to others after vehicle destroyed, even own team? I
Most exploding vehicles do damage to everything don't they? Certainly to driver and opposing team.
loadout map .. wasn't the purpose to have a map where aer the vehicles so you don't need to search in packages but just copie and past them to a new map? Not think it was ever intended to be "played" in that layout at all.
Correct. I had left it on the server and a few times we had fun playing it with a few people, load up 10+ and server gets very taxed.
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: OLD Players

Post by captainsnarf »

pooty wrote: Mon Dec 13, 2021 2:58 pm
Not able to determine how to avoid plasma fire damage to others after vehicle destroyed, even own team? I
Most exploding vehicles do damage to everything don't they? Certainly to driver and opposing team.
Oh, if it's the explosion damage it's pretty simple:

Code: Select all

defaultproperties
{
    ExplosionDamage=0
}
there is a function in the ONSVehicle base class called 'VehicleExplosion' that does that actual explosion. You can override it to do whatever.
ItsMeAgain
Posts: 35
Joined: Thu Nov 04, 2021 11:18 pm

Re: OLD Players

Post by ItsMeAgain »

Oh, ok good to know about ExplosionDamage prop and the override. I was talking more about the plasma projectiles. If i shoot an array of plasma balls and then die in flyer, the plasmas do damage to everything even own team and team vehicles. Probably not very common but does smell bad, code wise. Not familiar enough yet with properties/overrides to grasp how to avoid yet, instigator?, Owner? weapon damage override.

Most things are pretty self explanatory but things like KarmaParams? ROLE_Authority? etc. will take some time to understand the inertial physics, effects. I have read what is noted in code but just flew over head :) ..... like, ok don't mess with this much or suffer the consequences :)
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: OLD Players

Post by captainsnarf »

ItsMeAgain wrote: Tue Dec 14, 2021 12:33 am If i shoot an array of plasma balls and then die in flyer, the plasmas do damage to everything even own team and team vehicles
It's hard to say. There are a lot of reasons why that could go wrong. I'm guessing maybe the owner wasn't set somewhere, or you need to pass self in to one of your spawn calls, or forgot to call super somewhere. It might be a property needing set somewhere but that's doubtful.

One of the things I did for LinkNuke was override 'HurtRadius'. You can cast the 'Victims' variable to a Pawn type and then check if it's Team value matches your own and if true either do nothing or set damage to 0. I overrode it to make a 'HealRadius' version.
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: OLD Players

Post by captainsnarf »

The best way to understand ROLE_Authority is to look in the Actor.uc class.

It's a client/server game. If there are three people playing online, then there are 4 copies of the game running, the server and three clients. It's mostly event based. An event happens (on server or client) and a function is called.

All actors have an event 'Touch'. This event is only called on the server. If your mod overrides 'Touch', your function is running on the server. It does not run on the clients at all. Usually, functions like these change variables or call other server methods, e.g. Explode(). Maybe explode changes your Health to 0. Since Health is in a replication{} block, it will get updated on the three clients also:
Pawn.uc:

Code: Select all

replication
{
	reliable if( bNetDirty && Role==ROLE_Authority )
         Health;
}
This means send the Health variable from server to clients (Role==ROLE_Authority) when bNetDirty flag is set.


Explode() may also want to show some graphics exploding. To do that it needs to call something on the clients to show graphics. Usually this is done with a 'simulated' function.

Code: Select all

function Explode()
{
    Health = 0;
    SpawnHitEffects(Location, Rotation, ... );
}

simulated function SpawnHitEffects(vector Location, rotator Rotation)
{
	if(EffectIsRelevant(Location, Rotation))
            spawn(class'SomeEmitter',,, location, rotation);
}
The 'EffectIsRelevant' is needed because we don't want to spawn graphics on dedicated servers.

There is a lot to go over but once it clicks it's not too difficult. There is also a lot of info here - https://wiki.beyondunreal.com/Replication_overview
ItsMeAgain
Posts: 35
Joined: Thu Nov 04, 2021 11:18 pm

Re: OLD Players

Post by ItsMeAgain »

captainsnarf wrote: Tue Dec 14, 2021 11:02 am There is a lot to go over but once it clicks it's not too difficult. There is also a lot of info here - https://wiki.beyondunreal.com/Replication_overview
No kidding, i read through the intros, will have to read several more times .... hasn't clicked yet :)

For the plasma problem, I will see if can resolve by "HurtRadius" this sounds like has potential, thanks snarf. Would hate to kill team member after someone offed me, or vice-versa :x

As far as i can tell, it is ready to be used or introduced in something like a randomizer, unless i need to adjust something else. Please feel free to mod it if needed, i would like to know what and why for reference or any future mods. This is where a repository would come in real handy. It could be hosted on server, maybe only add one just for vehicle mods, maybe another for maps ... maybe just for src files to keep it small and manageable.
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: OLD Players

Post by captainsnarf »

here is my current version control strategy -
Image
User avatar
pooty
Posts: 4354
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: OLD Players

Post by pooty »

Do we want to set up a github project? We could do that.
I'll look at getting the link flyer on a map tomorrow... maybe loadout map to test it and then place it on one of the other maps for play.
Post Reply