Page 1 of 1

Reveal unit when attacking

Posted: Sat Sep 15, 2012 7:10 am
by Ligerzero
I am trying to have a unit that is attacking from under the cover of the shroud, be revealed once they actually begin firing. Red Alert had a provision for this in their ini file as seen below:
; ******* Weapon Statistics *******
; The weapons specified here are attached to the various combat
; units and buildings.

; Anim = animation to display as a firing effect
; Burst = number of rapid succession shots from this weapon (def=1)
; Camera = Reveals area around firer (def=no)?
; Charges = Does it have charge-up-before-firing logic (def=no)?
; Damage = the amount of damage (unattenuated) dealt with every bullet
; Projectile = projectile characteristic to use
; ROF = delay between shots [15 = 1 second at middle speed setting]
; Range = maximum cell range
; Report = sound to play when firing
; Speed = speed of projectile to target (100 is maximum)
; Warhead = warhead to attach to projectile
; Supress = Should nearby friendly buildings be scanned for and if found, discourage firing on target (def=no)?
; TurboBoost = Should the weapon get a boosted speed bonus when firing upon aircraft?
Under "Camera", they allowed for provisions that pertained to a specific weapon so that whenever that weapon was fired, it would reveal the enemy by removing both the shroud and fog around that unit. Is this possible to implement for any given weapon for an RA mod?

Thanks!

Posted: Thu Sep 20, 2012 11:20 am
by Kanar
Interesting... would change gameplay a lot, but that does not need to be bad.
Maybe we just had to see how it works ingame.

My question is:
How far will the shround around that unit be revealed?
The size of the vision-radius of the unit/building that is attacked by it?
Or the vision-radius of the attacking unit?

I think best would be to have it a one-cell radius around the unit.
That's what it was in original game, as far as i recall.

Posted: Fri Sep 21, 2012 3:19 pm
by Ligerzero
Kanar wrote: I think best would be to have it a one-cell radius around the unit.
That's what it was in original game, as far as i recall.
That is what I had in mind. I just cannot figure out how to make it work correctly. Anyone have any ideas?

Posted: Fri Sep 21, 2012 9:14 pm
by tacozmeister
Personally, just add a parameter so it'd be like:

Unit
. . AttackFrontal
. . . . RevealOnShoot: true
. . . . . . RadiusRevealed: (int)

Posted: Sat Sep 22, 2012 1:36 pm
by Kanar
Also,it should be revealed only for like 5 seconds or something. After it stops firing and that time passed, it should be in shroud again if shroud is not being cleared otherwise.

That makes sense.

Posted: Mon Sep 24, 2012 10:07 pm
by Ligerzero
tacozmeister wrote: Personally, just add a parameter so it'd be like:

Unit
. . AttackFrontal
. . . . RevealOnShoot: true
. . . . . . RadiusRevealed: (int)
This does not have any effect in the game when I tested it. I do not think that the game recognizes the command "RevealOnShoot" and I do not know C# so I am unable to add it into the game.

Is there a list of possible parameters somewhere to use in the .yaml files?

Posted: Tue Oct 23, 2012 5:23 pm
by -Jes-
Of course it doesn't have any effect; It was a suggestion, not an actually implemented function. :P
Not that I wouldn't mind it being added - Artillery could use a few penalties imo.

And well, yes. There's SOME documentation on functionality, but a lot of stuff is missing from it. I personally have taken to scouring the readable code on Github OpenRA/OpenRA for my needs.