FireArc

FireArc

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

FireArc

Post by MrSpontaneous »

I appologize for this post, but I can not find the information I need and my other post is being fruitless

How do I use/Were do I find information to use The fire arc tags to control how much area a weapon can cover.
Thank you
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

Kiss the wiki. And make sure you're searching for the correct tag names.

Yes, that Kiss the Wiki part is a link.
User avatar
centurion-1
Posts: 169
Joined: 31 Jan 2006, 20:53

Post by centurion-1 »

I think that article could use with some examples, straight ahead copy and pastable, for us that can't do trigonometry for the life of us and gets a headache from reading that article. For example, how would a 90 degree forward cone look like?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

That article is way too much unneccessary complicated. I have no idea why people comes up with such confusing explanation when in reality it's oh so simple.
WeaponMainDir1 is the coordinate of a vector showing the axe of the cone.
MaxAngleDif is the angle of the cone.

If you aren't familiar with vectors, let's just say that WeaponMainDir1 is the coordinate of a point, and that the weapon has to be fired toward that point.

A 90 degree forward cone would look like:
WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward!
MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction

To precisely choose your main direction, you could simply move an empty piece around in UpSpring, and copy back its coordinate (while keeping in mind UpSpring invert axis x and z).
User avatar
centurion-1
Posts: 169
Joined: 31 Jan 2006, 20:53

Post by centurion-1 »

Oh ok that is much simpler, thank you
Would the "1" in WeaponMainDir1 represent "Weapon1" ?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

zwzsg wrote:That article is way too much unneccessary complicated. I have no idea why people comes up with such confusing explanation when in reality it's oh so simple.
WeaponMainDir1 is the coordinate of a vector showing the axe of the cone.
MaxAngleDif is the angle of the cone.

If you aren't familiar with vectors, let's just say that WeaponMainDir1 is the coordinate of a point, and that the weapon has to be fired toward that point.

A 90 degree forward cone would look like:
WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward!
MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction

To precisely choose your main direction, you could simply move an empty piece around in UpSpring, and copy back its coordinate (while keeping in mind UpSpring invert axis x and z).
Ohh thank god. I was reading the article imagining some monstrous hacked-up piece of crap. Reassuring to know it's that simple. Plz update the wiki.
User avatar
centurion-1
Posts: 169
Joined: 31 Jan 2006, 20:53

Post by centurion-1 »

I don't know if i got this straight, so here is a excerp from my hunters fbi file

Code: Select all

	//    Weapons
	Weapon1=LAC;
	WeaponMainDir1=0 0 1;	
	MaxAngleDif1=90;
	Weapon2=LRP8;
	WeaponSlaveTo<2>=1;
	Weapon3=APGL;
	WeaponSlaveTo<3>=1;
	wpri_badTargetCategory=ANTIEMG;
	BadTargetCategory=ANTIEMG;
	ExplodeAs=SMALL_UNITEX;
	SelfDestructAs=SMALL_UNIT;
	NoChaseCategory=VTOL;
	
Would this prevent it from spinning its torso 360 degrees like a tank? Cause it doesnt seem to work. Should i add maindirs to weapon2 and 3 as well? Cause in the script they also turn the torso first in y-axis to aim the weapon.
User avatar
MrSpontaneous
Posts: 242
Joined: 09 Sep 2005, 22:39

Post by MrSpontaneous »

thank you! Have to try things out now once I get some time again :-)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I would have written:
WeaponSlaveTo2=1;
WeaponSlaveTo3=1;
But I'm not familair with WeaponSlaveTo anyway. Otherwise looks correct to me. Of course, the only way to be sure is to test. And if doesn't work, simplify it (like, use only one weapon) so it's easier to see what part exactly cause the bug (hint: it's always the one you'd have never suspected).
maestro
Posts: 352
Joined: 08 Jun 2005, 11:10

Post by maestro »

Hi zw. explain me about hightrajectory stuff plz ?
what is the meaning of hightrajectory=2; ?

Also is maxangledif is to limit turret aiming range ? (so I can make side turret of a ship that wont shot to otherside crossing the superstructure ?)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

maestro wrote:Hi zw. explain me about hightrajectory stuff plz ?
what is the meaning of hightrajectory=2; ?

Also is maxangledif is to limit turret aiming range ? (so I can make side turret of a ship that wont shot to otherside crossing the superstructure ?)
hightrajectory
=0; - no high trajectory
=1 - always high trajectory, like a mortar
=2 - enables a gui button to toggle inbetween, like a gun-howitzer.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

hightrajectory=1; is forced on, 2 is toggleable. Might be the other way around, but I think that's it.

For once, I know more than Zwzsg here. What he's said is accurate, but didn't give a complete picture.

First number is left and right (1 is left, -1 is right). Second number is up and down (1 being up, -1 being down), last number is forward and back (1 forward, -1 back)

Examples:

This is the Arm Epoch from AA. Upon examining its aiming pattern, I've realized I'm an idiot and rewrote it so it actually worked right... I hope no one was using it as an example, cos holy crap was it screwed.

Weapon 1 and 3 are the main guns, designed to fire over most of the ship's arc. Weapon 1 has no arc whatsoever, since it is raised up and at the back of the ship. Weapon 3 can fire only in the front (240 degree arc facing forward).

Weapon 2 is one of the secondary weapons, battleshipx guns. This one is on the front of the ship and can fire in a 320-degree arc, again facing forward.

Finally, weapons 4 and 5 are a little more interesting. Notice the maindir is "4 0 1" or "-4 0 1". If the first number (indicating left and right) is positive, it means to the left. If it's negative, it means to the right. Why is there a 4? This is so that the 1 is relatively low. This indicates that I want it to fire MOSTLY to the right, but also a little forwards. (11.25 degrees to be precise, but I'll come to that later)

Weapons 6 and 7 are much simpler, just flak guns aiming to the left and right exclusively in 200 degree arcs. You do NOT want to be a gunship attacking this thing head-on.

Code: Select all

	Weapon1=SEADRAGPRIME;
	OnlyTargetCategory1=NOTAIR;

	Weapon2=ARM_BATSAFTx;
	OnlyTargetCategory2=NOTAIR;
	WeaponMainDir2=0 0 1;
	maxangledif2=320;

	Weapon3=SEADRAGPRIME;
	OnlyTargetCategory3=NOTAIR;
	WeaponMainDir3=0 0 1;
	maxangledif3=240;

	Weapon4=ARM_BATSAFTx;
	OnlyTargetCategory4=NOTAIR;
	WeaponMainDir4=-4 0 1;
	maxangledif4=180;

	Weapon5=ARM_BATSAFTx;
	OnlyTargetCategory5=NOTAIR;
	WeaponMainDir5=4 0 1;
	maxangledif5=180;

	Weapon6=SEADRAGONFLAK;
	WeaponMainDir6=1 0 0;
	maxangledif6=200;

	Weapon7=SEADRAGONFLAK;
	WeaponMainDir7=-1 0 0;
	maxangledif7=200;
Think of it this way, whatever number is highest is the direction the gun shoots mainly. The smaller numbers "pull" the arc in their direction by varying amounts, depending on how high they are compared with the highest (main) direction. So, weapon 4 shoots directly to the left while 5 shoots directly to the right, but are both "pulled" forward by about 20%.

Examples: arc "1 0 1" is 45 degrees to the left, from the front of the unit. arc "2 0 1" is 22.5 degrees to the left. "3 0 1" is 15 degrees to the left. "3 0 2" is 30 degrees to the left. "3 0 3" is 45 degrees to the left again, because both numbers are equal.

Core Black Hydra flaghip: (also fixed its borked aiming restrictions)

This ship has a main gun, COR_BATS, with no firing arc defined. Also got 3 heavy lasers of teh doom, "HYDRA_GUN", which can fire in every direction except backwards.

Code: Select all

	Weapon1=COR_BATS;
	onlytargetcategory1=notair;

	Weapon2=HYDRA_GUN;
	onlytargetcategory2=notair;
	WeaponMainDir2=0 0 1;
	maxangledif2=300;

	Weapon3=HYDRAMISS;

	Weapon4=HYDRA_GUN;
	onlytargetcategory4=notair;
	WeaponMainDir4=0 0 1;
	maxangledif4=300;

	Weapon5=HYDRA_GUN;
	onlytargetcategory5=notair;
	WeaponMainDir4=0 0 1;
	maxangledif4=300;

	Weapon6=HYDRAMISS;
Ready for some complexity? Galactic Empire "Cahudhri" Heavy Cruiser:

Code: Select all

	weapon1=MESON_GUN; //port tri-gun
	OnlyTargetCategory1=SHIP;
	badTargetCategory1=SMALLSHIP;
	WeaponMainDir1=-1 0 8;
	Maxangledif1=45;

	weapon2=MESON_GUN; //starboard tri-gun
	OnlyTargetCategory2=SHIP;
	badTargetCategory2=SMALLSHIP;
	WeaponMainDir2=1 0 8;
	Maxangledif2=45;

	weapon3=MISSILE1; //rocket bay
	OnlyTargetCategory3=SPACE;
	badTargetCategory3=NOTSHIP;
	WeaponMainDir3=0 0 1;
	Maxangledif3=60;

	weapon4=MISSILE1; //rocket bay
	OnlyTargetCategory4=SPACE;
	badTargetCategory4=NOTSHIP;
	WeaponMainDir4=0 0 1;
	Maxangledif4=60;

	weapon5=ANTIFIGHTER_UVLASER2; //turret1 - port bottom nose turret
	OnlyTargetCategory5=SPACE;
	badTargetCategory5=SHIP;
	WeaponMainDir5=0 -1 0;
	Maxangledif5=175;

	weapon6=ANTIFIGHTER_UVLASER2; //turret2 - starboard bottom nose 

turret
	OnlyTargetCategory6=SPACE;
	badTargetCategory6=SHIP;
	WeaponMainDir6=0 -1 0;
	Maxangledif6=175;

	weapon7=ANTIFIGHTER_UVPULSELASER2; // turret3 - center top nose 

turret
	OnlyTargetCategory7=SPACE;
	badTargetCategory7=SHIP;
	WeaponMainDir7=0 9 1;
	Maxangledif7=200;

	weapon8=ANTIFIGHTER_PULSELASER3; //turret4 - starboard top neck 

turret
	OnlyTargetCategory8=SPACE;
	badTargetCategory8=SHIP;
	WeaponMainDir8=-1 1 0;
	Maxangledif8=135;

	weapon9=ANTIFIGHTER_PULSELASER3; //turret7 - port top neck turret
	OnlyTargetCategory9=SPACE;
	badTargetCategory9=SHIP;
	WeaponMainDir9=1 1 0;
	Maxangledif9=135;

	weapon10=ANTIFIGHTER_UVPULSELASER2; //turret8 - center bottom neck 

turret
	OnlyTargetCategory10=SPACE;
	badTargetCategory10=SHIP;
	WeaponMainDir10=0 -1 0;
	Maxangledif10=170;

	weapon11=ANTIFIGHTER_UVLASER1; //turret9 - port bottom main turret
	OnlyTargetCategory11=SPACE;
	badTargetCategory11=SHIP;
	WeaponMainDir11=1 -2 0;
	Maxangledif11=135;

	weapon12=ANTIFIGHTER_UVLASER2; //turret10 - port wing gun
	OnlyTargetCategory12=SPACE;
	badTargetCategory12=SHIP;
	WeaponMainDir12=1 1 0;
	Maxangledif12=150;

	weapon13=ANTIFIGHTER_UVLASER1; //turret11 - port top main turret
	OnlyTargetCategory13=SPACE;
	badTargetCategory13=SHIP;
	WeaponMainDir13=1 2 0;
	Maxangledif13=135;

	weapon14=ANTIFIGHTER_UVLASER1; //turret12 - starboard top main 

turret
	OnlyTargetCategory14=SPACE;
	badTargetCategory14=SHIP;
	WeaponMainDir14=-1 2 0;
	Maxangledif14=135;

	weapon15=ANTIFIGHTER_UVLASER1; //turret13 - starboard bottom main 

turret
	OnlyTargetCategory15=SPACE;
	badTargetCategory15=SHIP;
	WeaponMainDir15=-1 -2 0;
	Maxangledif15=135;

	weapon16=ANTIFIGHTER_UVLASER2; //turret14 - starboard wing turret
	OnlyTargetCategory16=SPACE;
	badTargetCategory16=SHIP;
	WeaponMainDir16=-1 1 0;
	Maxangledif16=150;
Yes, it kicks ass onscreen.
User avatar
centurion-1
Posts: 169
Joined: 31 Jan 2006, 20:53

Post by centurion-1 »

Got it to work now, I think, but the turret still aims at the targets in a 360 degree radious, but it only fires in the frontal cone? Is this correct?

the main reason i didn't want the 360 degree aiming is that the Gears are only supposed to be capable of swiveling their torso in a 180 degree forward radious. Also, the gear just stands around dumbly now when faced with enemys in the rear quadrant, it doesnt understand to turn around and face the threat.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

centurion-1 wrote:Got it to work now, I think, but the turret still aims at the targets in a 360 degree radious, but it only fires in the frontal cone? Is this correct?

the main reason i didn't want the 360 degree aiming is that the Gears are only supposed to be capable of swiveling their torso in a 180 degree forward radious. Also, the gear just stands around dumbly now when faced with enemys in the rear quadrant, it doesnt understand to turn around and face the threat.
Correct. Sign here: http://taspring.clan-sy.com/phpbb/viewtopic.php?t=5037 and maybe that'll get fixed.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

About turrets turning outside of the allowed arc: I think that happens when currently targeted unit moves out of the arc. The turret still tracks the unit, but cannot fire. When the unit was first targeted, it was in the firing arc.
User avatar
centurion-1
Posts: 169
Joined: 31 Jan 2006, 20:53

Post by centurion-1 »

I don't really get the hightrajectory thingy, where does it go, into the weapon.tdf or into the units .fbi file? If into the .fbi file, does it cover all weapon ie you cant have a mix of direct and indirect fire weapons? I suspect this is not the case but asking never hurts...
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

That's right. The hightrajectory tag was intended just for TA-style artillery units, I guess... I'll post a nag about it.
Post Reply

Return to “Game Development”