• 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.

[Help] Attacking Stations and Craft

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
What I'm trying to do is load up a ship with a mixture of weapons that have a specific function, i.e. one for blasting stations and another for killing ships. Now I thought it'd simply be a case of using these lines, but I tried adding them to some photon torpedoes and it doesn't seem to be the case:

targetEnemyCraft = 1
targetEnemyBuildings = 0

Has anyone tried to do this sort of thing before and have any tips? (Stock A2 before anyone asks :D )
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,142
Age
34
What I'm trying to do is load up a ship with a mixture of weapons that have a specific function, i.e. one for blasting stations and another for killing ships. Now I thought it'd simply be a case of using these lines, but I tried adding them to some photon torpedoes and it doesn't seem to be the case:

targetEnemyCraft = 1
targetEnemyBuildings = 0

Has anyone tried to do this sort of thing before and have any tips? (Stock A2 before anyone asks :D )

That's weird. :confused: Mind posting the weapon/ordinance ODF?
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
Not really a lot to see.

Weapon odf:
Code:
#include "photon.odf"

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

//Display name for this weapon
wpnName = "Photon Torpedo"

//Time Delay between shots
shotDelay = 5.0

// Range within which the weapon will fire.
range = 400.0f

// Percent chance of hitting the target.
//Can be applied to specific ships in format default "shipname.odf" 0.9 (this is a percentage)
hitChance = 0.9
	

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

//restrictFireArc = 1

// Use this fire arc restriction
//fireArc = 0.5

targetEnemyCraft = 1
targetEnemyBuildings = 0


Ordinance odf:
Code:
//This is the main photon ordinance file

//Programming Stuff DO NOT CHANGE
classLabel = "photontorpedo"

damageBase = 10
ignoreShield = 1

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

//How fast the shot moves
shotSpeed = 300.0

// This affects the turning radius/rate somewhat unknown.
omegaTurn = 3.0

//The amount of time that the missile obeys the limitations of omegaTurn
//After that, it heads straight for the target
seekTime = 0.0

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

// Size of photon torpedo.
radius = 5.0f

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

//this modifies the color of the ordinance (not currently working)
shotColor = 227

lightColor = 0.0 1.0 1.0
lightFalloffStart = 50.0
lightFalloffRange = 5.0
 

Adm_Z

Gettin' down and GUI!
Joined
23 Nov 2009
Messages
2,745
You could simply change its valid targets to 0 for any station. :thumbsup: For example, my salvo fire weapons on my battlestars can't target fighters.

validtargets = 1
"BSG_fighter_raider.odf" 0
"BSG_fighter_raiderA.odf" 0
"BSG_fighter_viper_mk2.odf" 0
"BSG_fighter_viper_mk2A.odf" 0
"BSG_fighter_viper_mk7.odf" 0
"BSG_fighter_viper_mk7A.odf" 0
"BSG_fighter_blackbird.odf" 0
"BSG_fighter_blackbirdA.odf" 0
"BSG_raptor.odf" 0
"BSG_raptorA.odf" 0
"BSG_heavy_raider.odf" 0
"BSG_heavy_raiderA.odf" 0
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
You could simply change its valid targets to 0 for any station. :thumbsup: For example, my salvo fire weapons on my battlestars can't target fighters.

validtargets = 1
"BSG_fighter_raider.odf" 0
"BSG_fighter_raiderA.odf" 0
"BSG_fighter_viper_mk2.odf" 0
"BSG_fighter_viper_mk2A.odf" 0
"BSG_fighter_viper_mk7.odf" 0
"BSG_fighter_viper_mk7A.odf" 0
"BSG_fighter_blackbird.odf" 0
"BSG_fighter_blackbirdA.odf" 0
"BSG_raptor.odf" 0
"BSG_raptorA.odf" 0
"BSG_heavy_raider.odf" 0
"BSG_heavy_raiderA.odf" 0

I didn't know we could do that! Is that a stock A2 command or a FlOps change?
If all else fails then thats the approach I'll take, but it seems inelegant to me if there's supposed to be a single command that allows this.
 

Adm_Z

Gettin' down and GUI!
Joined
23 Nov 2009
Messages
2,745
To be honest, I"m not sure. :sweat: It could be a Flops change I suppose.


You could always try using Blade's a2 stock conversion mod for FO, and putting your mod either ontop of it, or as a module in it. Then it would all look like stock a2, but you could use FO improved code.
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
Thanks for that. Putting cannon into the weapons file has got me 50% of the way there. The torpedoes intended for ships no longer get fired at stations, but the ones aimed at stations still get shot at ships. I think I may need to check the odfs a bit more thoroughly to make sure I havent screwed up somewhere.
 
Top