Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 11:54 pm
All times are UTC + 0
Wild attempt at railgun logic
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Tue Apr 21, 2015 7:53 am    Post subject:  Wild attempt at railgun logic Reply with quote  Mark this post and the followings unread

So, i decided i finally wanted to test making a more realistic railgun...
The concept is to have a laser be beige or grey coloured to give the impression of a bullet going by super fast creating condensation... and the particle effect being a no radius small smoke to come off where the laser was.

Code:
[zzztestvehicle]IsGattling=yes
TurretCount=1
WeaponCount=2
Weapon1=RailgunAmb
Weapon2=Railgun
WeaponStages=2
Stage1=2
Stage2=2
RateUp=1
RateDown=1

-------------weaps:
[RailgunAmb] ;invisible cannon ball shot to impact on buildings and walls etc
Damage=100
ROF=100
Range=8
Speed=80
Projectile=InvisibleCannonLow
Warhead=RailShotPre
Bright=yes

[Railgun] ;actual rail shot that goes through
Damage=100
ROF=50
Range=8
Speed=100
Projectile=InvisibleMedium
Warhead=RailShot
LaserInnerColor=200,175,150
LaserOuterColor=0,0,0
LaserOuterSpread=0,0,0
LaserDuration=5
Bright=yes
Report=exp17  ;ts expnew17, bangbang!
Charges=yes
IsRailgun=true
Anim=GUNFIRE
AttachedParticleSystem=RailgunSys

[InvisibleCannonLow]
Image=none
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes
Proximity=yes
Shadow=no
Arcing=yes

----------------warheads:
[RailShotPre]
Verses=100%,100%,100%,100%,100%,100%,100%,100%,100%,100%,100%
Rocker=no
ProneDamage=50%
InfDeath=2
AnimList=S_CLSN16
Wall=yes
Wood=yes
CombatLightSize=20%
Bright=yes

[RailShot]
Verses=100%,100%,100%,100%,100%,100%,100%,100%,100%,100%,100%
Rocker=no
ProneDamage=100%
InfDeath=2
AnimList=S_CLSN22,S_CLSN30
Wood=yes
CombatLightSize=30%
CellSpread=.5
Bright=yes

----------------particles:
[RailgunSys]
HoldsWhat=Railsmoke
BehavesLike=Railgun
SpiralRadius=1
ParticlesPerCoord=.01
SpiralDeltaPerCoord=.01
MovementPerturbationCoefficient=.3
PositionPerturbationCoefficient=20
VelocityPerturbationCoefficient=.2
Laser=yes
LaserColor=200,175,150

[Railsmoke]
Image=SGRYSMK1
MaxEC=50
Translucency=50
Velocity=2.0
Deacc=.05
WindEffect=0
BehavesLike=Smoke
DeleteOnStateLimit=yes
EndStateAI=20
StateAIAdvance=4

now i don't get an internal error, i get a fatal error.  i have no idea what i'm doing here, and no idea what is... disagreeing.
is there something i'm completely missing or perhaps 2 tags that can't get along?
i'm also not entirely sure if that gattling is set up right, though it wouldn't cause the crash.  (i do intend to add a buzzing charge-up sound, but i might just have to do it with a dummy weapon in the gattling)

note: i do NOT want traditional railgun ambiant damage.  i only want impacts on walls and buildings and cliffs, not units.

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Tue Apr 21, 2015 10:14 am    Post subject: Reply with quote  Mark this post and the followings unread

WeaponStages=2, WeaponCount=2... that's bad.

TBH your whole setting is bad. Gattling basics (since you didn't grasped this at Gattling Tank): Count is Stages*2, with every odd weapon used as anti-ground and every even as anti-air (use dummyweapons at slots which you don't intend to use), so if you keep 2 stages, use 4 weapons.

If you don't use AmbientDamage then replace IsRailgun=yes with UseSparkParticles=yes (decreases lag, since it does not enable ambientdamage logic, only railgun drawer logic if used along with a railgun particlesystem). Tho that railgun setup will still be laggy as hell - since it'll still draw all particles in a line - if you want smoke only appearing at the target location, you have to spawn that directly there, pick one from here http://modenc.renegadeprojects.com/Particles_and_ParticleSystems#Spawning

AFAIK this is the preferred lagfree railgun setup anyway:
Code:
[DummyParticleSys]
HoldsWhat=DummyPart
Slowdown=0
ParticleCap=0
BehavesLike=Smoke
[DummyPart]
Image=INVISO
BehavesLike=Fire
MaxEC=1
WindEffect=0
DeleteOnStateLimit=yes
EndStateAI=1
StateAIAdvance=1


Besides... particlesystems can have lasers on their own - IIRC SmallRailgunSys has one already.

And finally: Fatal Error is the same as Internal Error, except it got a different name in Ares. Always use the "-log" option in the launching method (add to RunAres.bat, etc.) to generate debug.logs into your RA2/debug folder which can give you hints why the game crashed. (Your except.txts will also end up under your RA2/debug folder with a timestamped crashdump if you told it to save that (99% of times it's unneeded) and a timestamped debug.log if "-log" was enabled).

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Tue Apr 21, 2015 10:43 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm well aware it was copletely bad, hence why it exploded on me.

I want a line of smoke puffs to come from the laser itself, not from the target.  I don't have any lag issue with any amounts of transparencies or anything. ddraw solves all of that.  The only time i experience lag is when really excessively spamming the ion-cannon particle effect (the one where the spark particles go in and out crossing at point of origin)

gattling tank showed 6 total weapons, 3 ground and 3 air (elites included) and 3 stages per.
so does it have to have "air weapons" (holdable by dummies) as well or something?
(as in requirement 1:1 ratio ground/air weapons)?
my previous attempts at fixing up gatling hasn't gotten me far... it's easy to make 1 weap,  did it for my laser gatling, but i wanted to have an additional laser that occasionally lit a fire (otherwise it'll spam fires everywhere)

ingame if this is set up right, having a ever so slgihtly slowed invisible cannonball will hit buildings and walls almost on the frame that it gets to firing the actual "railgun" effect weapon... which i intend to have it as a laser with smoke coming off it instead of pixel particles (obviously i want to lower the spawn count or i'd get hundreds of overlapping smokepuffs..)
again, i'm brand new to particles systems so i'm just winging it.

i know people often make smoke particles come from impacts, but i don't care about that really.

simplified concept: railgun = magnetically propelled ordnance through the railgun mechanism. mass driver logic allows extremely fast travelling projectiles, several times mach. hence, condensation.  using laser logic to imitate a condensation trail. similar to TS railgun, except less quake-y.
I don't intend for this to be a numerous arsenal weapon, more like a hero unit type deal, so even if it gets a little bogged down after you got like 4 or more on the screen, it doesn't matter cuz that's hardly ever gonna happen.

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Tue Apr 21, 2015 1:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

It requires the slots be used. By anything. I prefer this method. Chinese usually double them - so they'd throw the same weapon to 1-2 another to 3-4 etc.
Code:
[AMD]
[...]
WeaponCount=6
Weapon1=ArmadilloMGun
EliteWeapon1=ArmadilloMGunE
Weapon2=GattlingDummy
EliteWeapon2=GattlingDummy
Weapon3=ArmadilloMissile
EliteWeapon3=ArmadilloMissileE
Weapon4=GattlingDummy
EliteWeapon4=GattlingDummy
Weapon5=ArmadilloGun
EliteWeapon5=ArmadilloGunE
Weapon6=GattlingDummy
EliteWeapon6=GattlingDummy
WeaponStages=3

[GattlingDummy]
Damage=0
ROF=30
Range=5
Projectile=InvisibleAll
Speed=100
Warhead=DummyWarhead

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Tue Apr 21, 2015 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

so you need to use all 6? or can you do less but just make sure you put a dummy in between?  i just want a very simplified sense of how this works so i don't find myself going with crazy redundancies or wondering why it's not working...

do i need a dummy in between each weapon?
do i need to always have 2:1 weaponcount:weaponstages, or always 6:3? does that cause a loop or does it repeat last one till forever? can you make it loop? lol

-
edit: making a random guess here, are dummy weapons used in between as things that can't target anything in order to force it to move to the next weap in the cycle? (like dummy weap at the end making it restart for example?) but then thinking about that what would make it go onto the dummy weapon?
i just need to know how gattling works at a fundamental basis, i can figure out how to work out the numbers myself.
-

(ps: i've gotten internal errors with ares as well...)

as far as the weapon itself, i'm trying to make it fire a laser -with- smoke particles along it's trail, smoke instead of pixel particle spiral, NOT railgun ambiant damage, i have the inviso cannon to do that with different effects. making a weapon akin to a real life railgun, rather than the laser-swirly-kill-everything-in a-line gun)  when i bummed up gattling before it just only did first weapon... i'm trying to find out what caused the error.

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Tue Apr 21, 2015 2:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, you can figure out.... really... I can totally see that. I have to repeat myself, you're doing this that good.

You can have up to 6 Stages.

1 Stage = 2 weapons.
2 Stage = 4 weapons.
3 Stage = 6 weapons.
4 Stage = 8 weapons.
5 Stage = 10 weapons.
6 Stage = 12 weapons.

Weapons at slot 1 3 5 7 9 11 will be fired against ground targets only.
Weapons at slot 2 4 6 8 10 12 will be fired against air targets only.
You must define a weapon for all slots you're using.

To loop, use Ares's Gattling.Cycle. http://ares-developers.github.io/Ares-docs/new/gattlingcycle.html

Damn, it was a while ago since I had to go such level of spoonfeeding. This was my last aid for a while, you need to get some brainz, dude.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Tue Apr 21, 2015 2:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
Yeah, you can figure out.... really... I can totally see that.
the point in asking is to avoid spending needless hours testing and figuring out what's already been tested and figured out, and sooner get to working out things maybe others haven't done yet.

i totally glossed over than it was staggered between air and ground, my mind kept seeing AG,AG,AG,AA,AA,AA >.<
and yes i do feel like an idiot for not noticing that. but not everyone notices the same patterns naturally.

i'm not used to thinking with this sort of script logic stuff, i'm usually in the realm of physics and philosophy.  if you don't want to help, you don't have to, i'd be more than willing to await if someone else answered.

"needs ground,air,ground,air ... 2:1 weap:stages" was all i needed to know lol.

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
Trans_C
AA Infantry


Joined: 17 Nov 2014
Location: Somewhere in China

PostPosted: Tue Apr 21, 2015 3:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

This won't happen if you have ever checked the original gattling tank's code.
And the explanation notes in the original ini are sufficient enough imo. Ctrl+F and all is done.

_________________
Aka DirtyChicken

Back to top
View user's profile Send private message
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Tue Apr 21, 2015 3:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

ah, yeah, my version didn't have those notes heh... and looking in the proper one now i didn't know there was this much notes O.o  i only ever saw bits and bobs... random tiny side notes and section overviews and that was it...
definitely feel like a twit.  i prob woulda gone and looked if someone told me to go find the original rules notes :X

that said the problem still lies within my crashing weapon build.
edit: lol now it explodes just by me clicking on it in the sidebar XD my gawd.

edit2:progress!!! it's not exploding! but it's not doing what i wanted at all XD

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Tue Apr 21, 2015 8:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:
[zzztestvehicle]IsGattling=yes
Gattling.Cycle=yes
TurretCount=1
WeaponCount=4
Weapon1=RailgunAmb
Weapon2=GattlingDummy
Weapon3=Railgun
Weapon4=GattlingDummy
WeaponStages=2
Stage1=2
Stage2=100
RateUp=1
RateDown=1

-------------weaps:
[RailgunAmb] ;invisible cannon ball shot to impact on buildings and walls etc
Damage=100
ROF=100
Range=10
Speed=90
Projectile=InvisibleCannonLow
Warhead=RailShotPre
Bright=yes

[Railgun] ;actual rail shot that goes through
Damage=200
ROF=100
Range=10
Speed=100
Projectile=InvisibleMedium
Warhead=RailShot
LaserInnerColor=200,150,150
LaserOuterColor=200,150,150
LaserOuterSpread=200,150,150
LaserDuration=8
IsLaser=true
Bright=yes
IsRailgun=true
Anim=flashy2  ;gave fire sound to muzzle to get around sound glitch issue
AttachedParticleSystem=RailgunSys


[InvisibleCannonLow]
Image=none
ROT=1
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes
SubjectToBuildings=yes
Proximity=yes
Shadow=no
Arcing=no
Acceleration=100
Ranged=yes

----------------warheads:
[RailShotPre]
Verses=100%,100%,100%,100%,100%,100%,100%,100%,100%,100%,100%
Rocker=no
ProneDamage=50%
InfDeath=2
AnimList=S_CLSN16
Wall=yes
Wood=yes
CombatLightSize=20%
Bright=yes

[RailShot]
Verses=100%,100%,100%,100%,100%,100%,100%,100%,100%,100%,100%
Rocker=no
ProneDamage=100%
InfDeath=2
AnimList=S_CLSN22,S_CLSN30
Wood=yes
CombatLightSize=30%
CellSpread=.5
Bright=yes

----------------particles:
[RailgunSys]
HoldsWhat=Railsmoke
BehavesLike=Railgun
SpiralRadius=1
ParticlesPerCoord=.01
SpiralDeltaPerCoord=.02
MovementPerturbationCoefficient=.4
PositionPerturbationCoefficient=30
VelocityPerturbationCoefficient=.3
Laser=yes
LaserColor=200,150,150

[Railsmoke]
Image=LGRYSMK1
MaxEC=50
Translucency=50
Velocity=4.0
Deacc=.05
WindEffect=0
BehavesLike=Smoke
DeleteOnStateLimit=yes
EndStateAI=20
StateAIAdvance=4
so, where i'm at now, i doubt the particles and warheads have anything to do with it...

but there's the 2 weapons RailgunAmb, and Railgun

what i'm trying to do: have Railgun fire 1 frame after RailgunAmb
what is happening: Railgun is firing on ROF and RailgunAmb never fires

whenever i mess with the ROF's of the 2 weapons, i get a lot of things where like one weapon fires 3 times and the other fires once, and then the one fires 5 times and the other once, and then the one fires ones and th eother 3 times, it gets all random....

i'll keep working at it, but if anyone has any fantastic insight...

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1778s ][ Queries: 11 (0.0084s) ][ Debug on ]