• 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] Special Pulse Weapon

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 straightforward (or so I thought). I want to make a pulse weapon thats researchable but that fires without any player interaction. For example imagine the following scenario:

Ship has torpedoes and researchable pulse weapon.
Before research, selecting a target the ship will only engage with torpedoes.
After research, selecting a target the ship will engage with torpedoes and pulse weapons.

The problem is, I can't find a way to do it that doesn't involve having to press a button and select a target. I just want the ship to engage as normal but with the newly available weapons. It surely can't be that difficult (i.e. I'm doing something daft). Anybody have any suggestions?
 

CptBenSisko

The Emissary
Joined
2 Feb 2010
Messages
611
make it a special but have all the other options remarked out

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

//Location of the button in the speed panel
//buttonSlot = 1<--- have this line remarked out with '//'

// location of the button in the popup palette
//popupSlot = 1 <--- have this line remarked out with '//'

// Priority of button in the speed panel, this is only
// used if it is non-zero.
//buttonPriority = 1 <--- have this line remarked out with '//'

//Type of border to use for this button.
//0 = No border.
//1 = Offensive border.
//2 = Defensive border.
//buttonBorder = 1<-- have this line remarked out with '//'

// Mark this as a special weapon.
special = 1 <-- leave this as is...

This will enable to be a researchable weapon but be a passive weapon that fires at will
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
That was the first thing I tried, it came up with a button that didn't do anything and the weapon refusing to fire. :confused: Will try it again in case I did a type or something. Thanks.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
buttonSlot should be set to 0, as the default is 1 (so when you comment it out, it just sets buttonSlot to 1 :) ).

popupSlot isn't a command in A2, buttonBorder doesn't exist in A1 or A2, and buttonPriority is only applicable when buttonSlot is non zero as I recall :cool:
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
Thanks for the input. No button this time - but still no weapons fire. :confused:
I know the weapon itself works because it's a modified pulse weapon which I tested before trying to make it a special.
 

CptBenSisko

The Emissary
Joined
2 Feb 2010
Messages
611
make sure specials weapons aren't set to manual in the game options in quickbattle...
 

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,561
Age
48
Did you try just setting it up in the tech tree files?
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
The weapon is in the techtree and set to 0 requirements.
It is set to specials on auto in the settings.
I had forgotten about the specials autonomy :oops: and that may scupper me anyway (may as well have a button if we have to change the ship settings).

When the ships engage the special energy decreases as if the weapon is being fired, they just don't actually shoot the target (or anything, no discharge visable).

Thanks for the suggestions guys.

Heres the weps code:

Code:
#include "pulse.odf"

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

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

//Time Delay between shots
shotDelay = 8

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

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

// Mark this as a special weapon.
special = 1

buttonSlot = 0

// Burst fire settings
saveFire = 0
maxShots = 1
minimumShotInterval = 0.2f

and the ordinance file:
Code:
#include "pulseo.odf"

//The number of units which are subtracted from the Special Energy Reserve
specialEnergyCost = 250

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

//ignoreShield = 1

// 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.75

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

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

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

// Length of the beam.
Length = 150.0

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

//How fast the shot moves
shotSpeed = 230

// Burst fire settings
saveFire = 0
maxShots = 1
minimumShotInterval = 0.2f
 

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,561
Age
48
The weapon is in the techtree and set to 0 requirements.
It is set to specials on auto in the settings.
Thanks for the suggestions guys.

Theres part of your problem. Inorder to be reseachable the file needs research dependencies. It doesn't need to be a special inorder to be research I think. It also sounds like your sprite setings are off'.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
I believe he was doing no research requirements just for testing to make sure it worked in game :) . Special must equal 1 for it to be considered by the techtree I'm afraid :thumbsup:
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
bang on, its in the tech tree as a 0 because I dont want to waste time building stuff for test. That element of it works fine.

The sprite also works fine - it works as a normal weapon (very well in fact - I did all that before trying to make it a special).

Will try the NeedTarget at the next opportunity.
 
Top