ScriptedPawns projectiles speed and velocity

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

ScriptedPawns projectiles speed and velocity

Post by Barbie »

I wondered why the server side changes of ScriptedPawns ProjectileSpeed leads to different results for several ScriptedPawns. I had a look at the code of some projectiles and got the impression that every Epic coder set the initial velocity in his own way:

SpinnerProjectile.uc, SkaarjProjectile.uc, GasbagBelch.uc, KraalBolt.uc:

Code: Select all

Speed = ScriptedPawn( Instigator ).ProjectileSpeed;
Velocity = Vector( Rotation ) * speed;
SlithProjectile.uc, StingerProjectile.uc, RazorBlade.uc:

Code: Select all

Velocity = Vector(Rotation) * speed;
rocket.uc

Code: Select all

Velocity = speed*initialDir;
BruteProjectile.uc (where I guess the order is wrong):

Code: Select all

Velocity = Vector(Rotation) * speed;
Speed = ScriptedPawn(Instigator).ProjectileSpeed;
(incomplete list)

So the only conclusion to adjust the projectile speed of a ScriptedPawn would be adjusting and setting ScriptedPawn.ProjectileSpeed and Projectile.Speed to the same value?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: ScriptedPawns projectiles speed and velocity

Post by JackGriffin »

Different pawns need to declare projectile values in different ways. For instance rocket needs initial direction in case it is asked to adjust in-flight for the seeking code. Don't try to make an all encompassing mutator to try to adjust everything at once. Spawn notifies work but it's messy and could be pretty intensive depending on the amount of projectile spamming that goes on. Your best bet is to replace the projectile before it spawns by adjusting the s.pawns in the map to use your newer class(es) and then code them as you want them to behave.

Monster code is messy and incomplete. I don't think Epic ever envisioned it being used as extensively as it is and it's not until 2k4 that it gets the love it deserves.
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ScriptedPawns projectiles speed and velocity

Post by sektor2111 »

BruteProjectile code is messed up anyway, see Blowup, they don't have decals and Net codes lacks. You should rewrite them and change them right in "SetPawnDifficulty", if you want to clean codes else do what you think is better.
User avatar
Barbie
Godlike
Posts: 2808
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: ScriptedPawns projectiles speed and velocity

Post by Barbie »

Yep, sub classing the projectiles and assigning them to ScriptedPawn.RangedProjectile as the Pawn spawns seems to be the best solution. (How many hundreds hours may it take to get a smooth running MH server? And not even considering Bot support ;)
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ScriptedPawns projectiles speed and velocity

Post by sektor2111 »

Barbie wrote:Yep, sub classing the projectiles and assigning them to ScriptedPawn.RangedProjectile as the Pawn spawns seems to be the best solution. (How many hundreds hours may it take to get a smooth running MH server? And not even considering Bot support ;)
Umm that's depend on free time and speed. For me out of time and a slow speed took around 4 years ? Involving:
- Teaming monsters;
- Setting up things properly (clamp crap from mapping);
- Ending game Only Once;
- Weapon - Holders - a permanent stupid push is required thanks to EPIC;
- Weaponry - meshes are not done properly and speed of execution is affected by heavy push-timers;
- However a better timer comes if you have GameSpeed (TimeDilation) set ONCE ONLY - and made sure about changes to reach at each player new comer since some values are blabbering with new comers;
- Keeping music events changed even for new comers;
- Preventing bad mover setup - requires a mountain of checks;
- Replacing counters;
- Hack to SpawnPoints (optional + Factory);
- Operating hacks toward factories - against spaming, bad touchers, infinite spawning which are not for UnrealEngine;
- Pickups for a better people (prevent multiple loads for the same items);
- Projectiles - pretty nasty chapter. Optional addons - decals blocking visual and audio effects in clients as much as possible;
- Karmic spirit prevention - hating null pawns - this is doable in the best way by replacing creatures (I'm stay at stock, all the rest have 0 fix here - read again 0 fix in many cases are just a stupid mesh-show with colors and no FIX);
- Clamp items dropped;
- A.I. controller is also time consumer but it's mainly fixable;

Optional stuff:
- changing some combat based on some random factor;
- changing some visuals in player when stuff looks as crap;
- ect.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: ScriptedPawns projectiles speed and velocity

Post by JackGriffin »

Your stuff is crap nels. It's all perfect and smooth. Why I can't even see error lines after playing your server. What kind of MH is that?
Image
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: ScriptedPawns projectiles speed and velocity

Post by sektor2111 »

At using setup for original Old weapons, always client has errors, unless Higor will want to participate in stage at hacking those calls to unexistent weapon states which only TournamentWeapon have - so to speak hook TournamentWeapon making it to deal ONLY with another TournamentWeapon and stop bullshitting calls to unexistent states in Weapon class - client XCGE. The rest of stuff... we have a mountain of "great things" :ironic: which I won't start for fixing GB of "codes".

Aside for stuff from last time: MHv504 was running with my stock (EPIC is fired from my living-room :arrow: ) that's might explain little changes.
MH2 there runs with Virtualization - Monsters doing checks "pawnlist" will have in stock config Levels a faster speed. Technically we have 40 creatures when they would be 300 . They are still 300 to kill but unavailable from far away rooms, accelerating "pawnlist" closer to DM speed.
Cons:
- Checking logs I'm sad. Virtualization seems to develop tiny flaws if Monster is bad placed. Huge pawn in small location - this will need a change (XCGE helps but I still have to work around);
- New Levels a la 2012-2015 - is mythology we don't have many - ALL of them have tweaks logged, and I could see some of them with 0 Net playability executed "properly" by people which were playing in servers but learning NOTHING.
- Latest 2 weeks (if I'm well recall I didn't fired up any MH). I made changes at the rest of stuff with Monsters (which is another MH tunning type).
Last edited by sektor2111 on Wed Dec 16, 2015 10:10 pm, edited 2 times in total.
User avatar
EvilGrins
Godlike
Posts: 9731
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: ScriptedPawns projectiles speed and velocity

Post by EvilGrins »

JackGriffin wrote:Your stuff is crap nels. It's all perfect and smooth. Why I can't even see error lines after playing your server. What kind of MH is that?
Oh yes, perish forbid the game should be flawless.
Image
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
Post Reply