IPB

Welcome Guest ( Log In | Register )


 
Reply to this topicStart new topic
> [solved] Long and short-range weapons, both on a single unit
KajiTetsushi
post Jun 20 2010, 08:03 PM
Post #1


Flamethrower Infantry
Group Icon

Group: Members
Posts: 141
Joined: 22-October 06
Member No.: 92



Okay, like this: I happen to remember a game called Warzone 2100. There's a rocket artillery in this game that works in a way that:

  • If the enemy is far away (say, middle to maximum range), the rocket artillery will launch rockets in a low arc, like a Tick Tank's gun ballistic.
  • If the enemy is up close (in this case, below middle range), the rocket artillery will launch rockets in a high arc, like the Artillery's gun ballistic.

So, I experimented with it. I made two weapons, say,
[227mmLo] and [227mmHi], for low-arc and high-arc ballistics respectively.

Both weapons deal the same amount of damage, use the same warhead, reload in the same rate - everything is the same,
except in certain conditions,
where [227mmLo] has a Range=14, a MinimumRange=6 and Lobber=no
where [227mmHi] has a Range=5 and Lobber=yes.


Result? It didn't work. What the TS engine would do is force the launcher to forever use 227mmLo. I've tried with other methods such as raising damage of 227mmHi so that the game will conclude this weapon is more damaging and hopefully start raising hell when units are up close. Tweaking the warhead didn't help, either. One weapon went only for buildings, the other for everything else.


Correct me if I'm wrong: my understanding of the Primary and Secondary is just a question of which weapon is more useful against what. I mean, I know how to make a Mammoth Tank fire shells on tanks and missiles on infantry RA1 style with the right warhead and damage, but how about this one?

Again, to sum it up, this is about making a unit's weapon behave differently depending on the distance of the enemy from the unit.


Problem solved. Those who are reading can refer to LKO's solution and my correction in the post after that.

This post has been edited by Chris Ichikawa: Jun 27 2010, 08:37 PM


--------------------
Go to the top of the page
 
: | +Quote Post
ORCACommander
post Jun 20 2010, 11:45 PM
Post #2


SSM Launcher
Group Icon

Group: Members
Posts: 763
Joined: 5-October 06
From: GDI Command Base, Southern Cross
Member No.: 14
Alliance: GDI
Favorite game: Tiberian Sun



yes it determines which is more useful but only considers the wh and damage in that


--------------------
Go to the top of the page
 
: | +Quote Post
KajiTetsushi
post Jun 21 2010, 02:08 AM
Post #3


Flamethrower Infantry
Group Icon

Group: Members
Posts: 141
Joined: 22-October 06
Member No.: 92



So... what? Does that mean this isn't possible?


--------------------
Go to the top of the page
 
: | +Quote Post
Lin Kuei Ominae
post Jun 21 2010, 11:09 AM
Post #4


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



A unit will always try to use first the primary weapon and then if it's not possible the secondary.
In addition it will only consider the warhead if both weapons are able to shoot at the target. This shouldn't play a role in your case.

It could be that MinimumRange isn't used correct when both weapons are mainly the same.
Try Primary=[227mmHi] and Secondary=[227mmLo]
With the long range weapon as secondary it should use it correct when standing still and firing automatically on incoming units.

Also give [227mmHi] Range=6. With Range=5 there would be a gap between the two weapons where it can't fire: from Range=5.1 to Range=5.9

If the above fails you can possibly force the game to use the other weapon using the warhead.
e.g.
Primary=[227mmLo] WarheadVerses=50% Damage=100
Secondary=[227mmHi] WarheadVerses=100% Damage=50

The game will notice that the secondary shortrange weapon [227mmHi] has a more effective warhead, thus using this one instead. Though the dealt damage will be the same due to the halved damage.

This post has been edited by Lin Kuei Ominae: Jun 21 2010, 11:17 AM


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post
KajiTetsushi
post Jun 23 2010, 09:53 AM
Post #5


Flamethrower Infantry
Group Icon

Group: Members
Posts: 141
Joined: 22-October 06
Member No.: 92



Okay. I tested it. It still used 227mmLo against all targets. I even reversed the Primary and Secondary. Nothing.

Wait a minute- it works. Cool! The only two problems I noticed is that the default force fire weapon (on the ground) is always 227mmHi. It only starts using 227mmLo when the rocket artillery has a real enemy target. Also, LKO, your weapon logic didn't work, sadly. The unit picked the 227mmLo all the time.

Although, I can improvise a little bit:
Primary=227mmLo WarheadVersus=90% Damage=90
Secondary=227mmHi WarheadVersus=100% Damage=100

MinimumRange=6 also had to be removed from 227mmLo or else the artillery would be moving away from the target and back again, shuffling between 227mmLo and 227mmHi. Weird.

Otherwise, yeah. Perfect. It works like a charm. Thanks, LKO. =)

This post has been edited by Chris Ichikawa: Jun 27 2010, 08:36 PM


--------------------
Go to the top of the page
 
: | +Quote Post
Bittah Commander
post Jun 25 2010, 12:41 PM
Post #6


Forum Administrator
Group Icon

Group: Administrators
Posts: 1,340
Joined: 1-October 06
From: The Netherlands
Member No.: 5
Alliance: GDI
Favorite game: Tiberian Sun



You made the warhead of 227mmHi do more damage than the warhead of 227mmLo, but also removed MinimumRange=6 from 227mmHi? It seems to me like it'd then always keep using 227mmHi (so it'll then never use 227mmLo at all).


--------------------
Go to the top of the page
 
: | +Quote Post
Lin Kuei Ominae
post Jun 25 2010, 04:10 PM
Post #7


Stealth Tank
Group Icon

Group: Members
Posts: 1,065
Joined: 14-November 06
From: Germany
Member No.: 281
Alliance: CABAL
Favorite game: Tiberian Sun



"Lo" is the one with the farther range and "Hi" with the shorter, thus "Hi" should replace "Lo" when the enemy is near. His "Lo" and "Hi" refer to the projectile flying height and not the Range. wink1.gif


--------------------
Co-Leader of Twisted Insurrection
my public units for you
Nod units:____________________________GDI units:
Nod Scorpion__________________________GDI 3A Kodiak
Nod Tachyon Tank______________________GDI Medusa (Triple Cannon Mech)
Nod Goliath___________________________GDI Behemoth (medium size Mech)
Nod Cobra (fast medium mech)__________GDI Battleship Aurora
Nod Siegebot (light MG-Mech)__________GDI Fortress Tower (Heavy Base Defense)
Nod Redeemer (4 legged heavy Cyborg)__GDI Triton (Titan support Mech)
Nod/Scrin WotW Tripod_________________GDI Exciter
______________________________________GDI Ion Charge Collector
Misc and Fun units:
X-Mech Calendar 28 SHP Units
Star Wars Mechs ATAT/ATST
Cyborg Barrack on PPM_________________Mech Factory
Mutant Tiberium Flyer
yt1300 (Millenium Falcon + BIG version)

if you use my units in your mod, please credit me.if you want to use my units on your website please ask me before.
Go to the top of the page
 
: | +Quote Post
Bittah Commander
post Jun 25 2010, 05:24 PM
Post #8


Forum Administrator
Group Icon

Group: Administrators
Posts: 1,340
Joined: 1-October 06
From: The Netherlands
Member No.: 5
Alliance: GDI
Favorite game: Tiberian Sun



Ohh... How confusing tongue.gif


--------------------
Go to the top of the page
 
: | +Quote Post
KajiTetsushi
post Jun 27 2010, 08:35 PM
Post #9


Flamethrower Infantry
Group Icon

Group: Members
Posts: 141
Joined: 22-October 06
Member No.: 92



QUOTE (Bittah Commander @ Jun 26 2010, 01:24 AM) *
Ohh... How confusing tongue.gif

Oh, ho... Yeah... Right. Sorry about that. tongue.gif

I used it to remember how the Warzone 2100 Rocket Artillery works in terms of the rocket's angle of trajectory, not by range, since almost everything in that game can only shoot from one end of the screen to the other. Not very far, given the scale of the viewable area.

At short range, the rocket artillery shot upwards so that the rockets land nearby the unit.
At long range, the rocket artillery shot straight and the rockets could reach further.

I think it's a lot easier to understand if I just drew it. I could, but I'm rather busy.

Also, MinimumRange=6 belonged to the longer-ranged 227mmLo. I should edit my post for myself and future readers...
But seriously, I find this a good insight.


--------------------
Go to the top of the page
 
: | +Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 4th July 2025 - 06:45 PM


XGhozt.com