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 Tue Apr 23, 2024 7:21 am
All times are UTC + 0
weap range question
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [17 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Mon Jan 28, 2013 9:05 am    Post subject:  weap range question Reply with quote  Mark this post and the followings unread

does weap range go in whole numbers only ? (1, 2,3 ...)
or can be decimal like 0.1 ?

I ask, for case that I want to make unit fire at most closest range its possible
so for that case, is it better to make Range=1 and MinimumRange=0

or, (as asked) use decimal numbers ? (like 0.1)

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


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Mon Jan 28, 2013 9:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes, Range is a float, it can be decimal.

_________________
"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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 9:59 am    Post subject: Reply with quote  Mark this post and the followings unread

The closest possible range is 0. But this only works if it's a vehicle force firing on the same cell where it stands and with FireFLH=0,0,0 and TurretOffset=0.

If you want to attack directly adjacent cells, you have to include
-unit position (e.g. infantry are off center on 3 different points in a cell)
-target position (like unit position, the target can be at 4 different points: center and the 3 infantry points)
-FireFLH,TurretOffset: this is taken into the range calculation as well.
-flightlevel: if unit or target is flying, the flying height adds to the distance

A perfect melee weapon which can only attack directly adjacent targets is not possible. With a range high enough to attack the cells directly horizontal or vertical adjacent, you'll automatically have a range that is enough to attack the second next diagonal cell too.
A range around 1.75 to 2.5 works good for melee fighters.


MinimumRange is by default 0.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

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


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Mon Jan 28, 2013 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

3 infantry can be on a single cell but an infantry can stand on 5 different positions within one.

_________________
"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
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 10:13 am    Post subject: Reply with quote  Mark this post and the followings unread

In TS, there are only 3 different points.



infantry.png
 Description:
 Filesize:  462 Bytes
 Viewed:  1489 Time(s)

infantry.png



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

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


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Mon Jan 28, 2013 11:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Hm. And indeed. Thought there are no differences on this level within RA2 and TS. Seems I was wrong. RA2 has all the preTS inf subpositions.

_________________
"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
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Mon Jan 28, 2013 12:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

if I apply range of 0 to just infantry
then there wouldn't be any problem right?

(as LKO described if I understood correcly only for vehicles/aircrafts, those complications)

(sorry if it looks I'm lazy to check, but I don't have TS installed yet #Tongue)

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 1:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

Exley wrote:
if I apply range of 0 to just infantry
then there wouldn't be any problem right?

It wouldn't be able to shoot, if that's what you want. As written above only vehicles stand in the center and thus can reach the center of a cell with Range=0.

Exley wrote:
(as LKO described if I understood correcly only for vehicles/aircrafts, those complications)

vice versa. Vehicles/Aircraft are centered, thus no issues. Infantry are off the center on the 3 points inside a cell, thus problematic with Range=0


What do you want to do anyway? Such a short range is definitely not working always the way you want it to be.
With Range=0 a unit would be unable to ever attack any enemy.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Mon Jan 28, 2013 2:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

well I just wanted to make some sort of suicide infantry
like ra2 has that guy who explodes on others #Tongue
(but this one wouldn't explode, just needs to come very close)

and for that minimal weapon range is needed
unfortunately I think value of 1 cell difference would be kinda too unrealistic #Tongue

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 3:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

RA2 has only crazy ivan which plants bombs on others, but IIRC no suicide infantry.

here the code i gave the sensordrone in DTA. It's an infantry unit but with a mechanical image. Since infantry can't use an independent explosion animation, i had to use a workaround, which would work well for you too.
rules.ini
Code:

;this on the infantry
[SUICIDEINFANTRY]
Primary=DeathExplo   ;LKO: just a dummy weapon whose warhead explosion is used when it gets destroyed
Explodes=yes      ;use the weapons warhead explosion since Explosion= doesnt works on infantrytypes

[DeathExplo]
Damage=0
ROF=100
Range=0      ;can never shoot anything, but will move right next to target
Projectile=Invisible
Speed=100
Warhead=DeathExpWH   ;create a new warhead which you give an animation that does area damage


you can enhance the code by giving the unit NoAutoFire=yes and the weapon
Range=2
Anim=SUICIDE
while SUICIDE is an animation that is doing enough damage to kill the unit.

Then the unit can destroy itself when shooting at something and the explosion would still come from the unit and not the point where the weapon was shooting at.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Last edited by Lin Kuei Ominae on Mon Jan 28, 2013 3:27 pm; edited 2 times in total

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Mon Jan 28, 2013 3:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
RA2 has only crazy ivan which plants bombs on others, but IIRC no suicide infantry.
Of course there is. It's the terrorist. He blows up.

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 3:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oh right, one of the sub-countries which also had the chemical demo truck right?

Was the explosion done on the target or always on the terrorist?

Last edited by Lin Kuei Ominae on Mon Jan 28, 2013 3:24 pm; edited 1 time in total

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Mon Jan 28, 2013 3:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

IIRC, it's on the terrorist. RA2 has Suicide=yes for, well, suicidal weapons. #Tongue

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 3:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is the code for my Nod Fanatic suiciding unit. Can't remember why I gave him a primary and a secondary. The secondary kills the unit itself, setting off the primary. Basically it works like LKO's example.

Code:

[FANATIC]
...
Primary=FanaBomb      ; This is the real damage dealer, but only used by Explodes=yes logic...
Secondary=FanaSuicide ; ... this is the "weapon" the Fanatic fires to kill himself, thus releasing the Primary.
Explodes=yes          ; Applies primary weapon over the unit when it dies
CollateralDamageCoefficient=0.7 ; Balances the damage done by FanaBomb
Strength=70           ; Note that this affects damage as well (due to Explodes=yes logic)!!!


[FanaBomb]
Damage=50              ; DO NOT TOUCH THIS! Adjust the CollateralDamageCoefficient= key instead.
ROF=800
Range=0.1              ; So the Fanatic will always fire the secondary weapon (suiciding). Don't put 0 here!
Speed=100
;Report=               ; Sound is played in art.ini anim
Projectile=CarBombFake ; Prevents the unit from firing this. This weapon is only used by Explodes=yes key.
Warhead=FanaBombWH

[FanaSuicide]
Damage=10           ; Leave something here so the unit always fires this
ROF=800             ; So he won't get a chance to fire twice
Range=1.8           ; As close as possible without causing targetting problems
Projectile=Invisible
Speed=100           ; Instant effect
Warhead=ZeroWH      ; All verses at 1% to ensure targetting works
Anim=FANADIE        ; Used to suicide the Fanatic with pure anim damage (adjusted InfDeath on [Fire2] warhead).

[CarBombFake]
Inviso=yes
Image=none
AA=no
AG=no

_________________

Back to top
View user's profile Send private message
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Mon Jan 28, 2013 11:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

thank you guys, will install TS soon and try it in next few days

_________________
Quote:

how did we end up here ?

this place is horrible ...

smells like balls ...


Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue Jan 29, 2013 3:45 am    Post subject: Reply with quote  Mark this post and the followings unread

SuperJoe wrote:

Code:

CollateralDamageCoefficient=0.7 ; Balances the damage done by FanaBomb


Can't say I've modded FS alot really, but I did mod TS alot and I've never come across this tag... Shocked How does that work? What does it do?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Jan 29, 2013 7:23 am    Post subject: Reply with quote  Mark this post and the followings unread

It's supposed to adjust the damage done when a unit with Explodes=yes explodes.
Grenadiers in FS use this to reduce the chance/damage for chainreaction explosion when one of them dies in a group of grenadiers.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [17 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.1956s ][ Queries: 14 (0.0104s) ][ Debug on ]