• Hello and welcome to MSFC. We are a small and close knitted community who specialises in modding the game Star Trek Armada 2 and the Fleet Operations modification, however we have an open field for discussing a number of topics including movies, real life events and everything in-between.

    Being such a close community, we do have some restrictions, including all users required to be registered before being able to post as well as all members requiring to have participated in the community for sometime before being able to download our modding files to name the main ones. This is done for both the protection of our members and to encourage new members to get involved with the community. We also require all new registrations to first be authorised by an Administrator and to also have an active and confirmed email account.

    We have a policy of fairness and a non harassment environment, with the staff quick to act on the rare occasion of when this policy is breached. Feel free to register and join our community.

[Request] StarGate - Railgun Weapons

swilson0907

Crewman 1at Class
Joined
13 Jan 2011
Messages
156
No matter what I do with the railguns, they seem to always multi-fire but at nothing. I also got some phasers doing this that are multi-targetting for my Federation ships but the railguns right now are more or a nusance, they seem to fire all over the place well the ships missels target the dsignated target, well this is going on, I have sometimes have had planets being attacked by my railguns, and most of the time, they are my planets and I lose the colony thanks to these nusance railguns.

How can I sto the railguns from multi-targetiing at nothing when they have one designated target? What can I do to make the railguns only target on enemy vessel, not my planets or friendly ships?

Railgun1
Code:
#include "pulse.odf"

//Name of the ODF file for the ordinance for this weapon
ordName = "railpulse1o"

//Display name for this weapon
wpnName = "Pulse"

//Time Delay between shots
shotDelay = 0.1

//Sound which is played when the weapon fires
fireSound = "rgun1.wav"

//Firing Range
range = 1000.0f

// Use this fire arc restriction
fireArc = 1.61
hitChance = 0.6
classLabel = "areacannon"
needTarget = 0
hitCondition = 2
maxTargets = 2

railpulse1o
Code:
#include "pulseo.odf"

//The base amount of damage which the ordinance does with each hit
damageBase = 1500

//The sprite which is used for this ordinance
Sprite = "pphaser"

//Phaser specific: this modifies the color of the phaser
shotColor = 227

// Time to play through the animation for the sprite in seconds
spriteDuration = 8.0

// Length of the beam.
Length = 19.0

//How fast the shot moves
shotSpeed = 900

//Phaser specific: this is the thickness of the beam
Radius = .2

//Amount of time the ordinance will exists without hitting something
lifeSpan = 5.0

//lightColor = 1.0 1.0 0.0
//lightFalloffStart = 50.0
//lightFalloffRange = 5.0

Railgun3
Code:
#include "pulse.odf"

//Name of the ODF file for the ordinance for this weapon
ordName = "railpulse2o"

//Display name for this weapon
wpnName = "Pulse"

//Time Delay between shots
shotDelay = 0.1

//Sound which is played when the weapon fires
fireSound = "rgun1.wav"

// Firing Range
range = 900.0f

railpulse2o
Code:
#include "pulseo.odf"

//The base amount of damage which the ordinance does with each hit
damageBase = 2550

//The sprite which is used for this ordinance
Sprite = "pphaser"

//Phaser specific: this modifies the color of the phaser
shotColor = 227

// Time to play through the animation for the sprite in seconds
spriteDuration = 8.0

// Length of the beam.
Length = 20.0

//How fast the shot moves
shotSpeed = 1000

//Phaser specific: this is the thickness of the beam
Radius = .2

//Amount of time the ordinance will exists without hitting something
lifeSpan = 5.0

//lightColor = 1.0 1.0 0.0
//lightFalloffStart = 50.0
//lightFalloffRange = 5.0

Besides this, I want to make the Railguns a close range weapon system and the ships missels to be the long range. I do want the railguns to be multi-targetting when needed, but I don't want them to all be firing at once if there isn't a target in their firing range.

What coding do I need to add or what do I need to do to accomplish this?
 

Atlantis

Master Chief Petty Officer of Starfleet
Joined
1 May 2006
Messages
518
In your first ODF shown:

Code:
needTarget = 0

should be

Code:
needTarget = 1

=)
 

swilson0907

Crewman 1at Class
Joined
13 Jan 2011
Messages
156
In your first ODF shown:

Code:
needTarget = 0

should be

Code:
needTarget = 1

=)

Ok, I'll fix that. Will that stop the random firing too? I'm guessing yes because of the fact that it is designating a target.

Thank you.
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,139
Age
34
When an enemy can be seen, but is not within firing range of the ship, the ship's multi-targeting weapons will often begin to fire without locking on a target. It's a bug of the A2 engine.
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
As the others say, there is no (known ;-) ) way of stopping the random firing.

To prevent hits on your own ships, you need to make sure the hitcondition is correct. I believe it should be
Code:
hitCondition = 0
I don't have any A2 files to hand so I can't confirm. Some of the area weapons (eg the sensor jammer) will actually list what the options are.

To reduce the range of the guns alter the
Code:
//Firing Range
range = 1000.0f
To a much smaller number. From memory, 300-400 is about standard range.

I'd also suggest reducing the damageBase, that's the damage for each shot and thus is probably excessive for a railgun! I think I had damage of 1.5 for my railguns (but they are very rapid firing).
 

swilson0907

Crewman 1at Class
Joined
13 Jan 2011
Messages
156
When an enemy can be seen, but is not within firing range of the ship, the ship's multi-targeting weapons will often begin to fire without locking on a target. It's a bug of the A2 engine.

I've had random multi-targeting firing occur a lot of times in the game, including with phasers. Now it is good to know why it is happening. It is annoying though when it happens, but for phasers its almost like a message "enemy approaching from this direction..."

As the others say, there is no (known ;-) ) way of stopping the random firing.

To prevent hits on your own ships, you need to make sure the hitcondition is correct. I believe it should be
Code:
hitCondition = 0
I don't have any A2 files to hand so I can't confirm. Some of the area weapons (eg the sensor jammer) will actually list what the options are.

To reduce the range of the guns alter the
Code:
//Firing Range
range = 1000.0f
To a much smaller number. From memory, 300-400 is about standard range.

I'd also suggest reducing the damageBase, that's the damage for each shot and thus is probably excessive for a railgun! I think I had damage of 1.5 for my railguns (but they are very rapid firing).

Ok, I'll change the hitcondition to 0 and see if that helps with my own vessels and planets being hit. I believe you're right though and that it will fix the problem.

Also, I'll lower the Railguns target range from 1000 (900) to 400 and 300.
 

Chiletrek

Warriors from Fluidic Space
Staff member
Forum Moderator
Toaster
Joined
22 Oct 2006
Messages
3,485
Age
42
Hello:
The code hitCondition must be hitCondition = 2, that way it will target all enemy ships, but be careful that it will also target Ferengi ships (the random traders and the marauders).

About the pulse type firing at nothing, that is because they will start firing when your ship sees any enemy ship, no matter if those railguns are or aren't the weapons with the longer range for your ship. I get the same effect with Battlestars, but in their case is better because it is like onscreen, with the shower-like firepower.

Good luck with your weapons.
 

swilson0907

Crewman 1at Class
Joined
13 Jan 2011
Messages
156
Hello:
The code hitCondition must be hitCondition = 2, that way it will target all enemy ships, but be careful that it will also target Ferengi ships (the random traders and the marauders).

About the pulse type firing at nothing, that is because they will start firing when your ship sees any enemy ship, no matter if those railguns are or aren't the weapons with the longer range for your ship. I get the same effect with Battlestars, but in their case is better because it is like onscreen, with the shower-like firepower.

Good luck with your weapons.

Ok, so I am to keep hitCondition = 2 (any ways, I usually go and target Ferengi vessels myself, especially if they are stealing a vessel I want to save).

So the firing at nothing can't really be changed, understood.
 
Top