Cap Issues

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on January 21st, 2014, 12:09 am
Hello there,

Yes another topic, just struggling to get some of the FleetOps-exclusive elements to work quite right :)

Basically, I want to set a cap that allows the Enterprise-A to be constructed once, and only once. Once it's gone, that's it.

I may have "over egged the pudding" a bit with the different lines, but nothing I try seems to work. I can still build as many of them as I like.

Here is my code thus far

Code: Select all
fleetCapClassX = "fenta"
maxCap = 1
simpleCapMode = 1
countconstructions = 1
capTooltipReached = "Enterprise-A already commissioned"


I have read that the old maxbuildable code has been removed from FleetOps compared to the patch project, else i'd simply use that (and not worry about the fact you can rebuild it).

Any ideas as to why I can still build more than one of these?
posted on January 21st, 2014, 12:20 am
That might be better to do with the tech tree - having a ship only buildable once.

i.e.
Code: Select all
unit1.odf -1


http://guide.fleetops.net/guide/modding ... imum-Build

Of course, if you want the cap text to be listed, you could also do that with some nasty instant replaceweapon on your hero ship, adding to the cap.
posted on January 21st, 2014, 12:25 am
Setting a ship to -1 in the techtree removes it entirely. What I am after is that once it is built, it either can never be built again even when lost (ideally) or only 1 can exist at a time. Not entirely sure why you linked to a page on AI since this is for a player ship not AI (not even telling the AI to build it) and setting it to -1 in the AI file as described actually means it will be built over and over when destroyed.
posted on January 21st, 2014, 2:19 am
Sorry, it wasn't clear to me in your post that this was to be for the player :)

You have a mistake in your code - the 'X' in 'fleetCapClassX' should be replaced with 0 -> fleetCapClass0
posted on January 21st, 2014, 11:08 am
Ah okay, the wiki could do with updating then :)

Code: Select all
 fleetCapClassX = ""
example: fleetcapclassX = "kli_bortasr2"


Just gave this a quick test. I can still build as many as I like.

Code: Select all
fleetCapClass0 = "fenta"
maxCap = 1
simpleCapMode = 1
countconstructions = 1
capTooltipReached = "Enterprise-A already commissioned"
posted on January 21st, 2014, 3:23 pm
That's just common to all commands which possess a variable in them - the X is just a placeholder that way you can add multiple caps if desired. I never intended for the fleetcap files to remain so long in the modding guide.... :pinch:


I'd have to see your 2 ODFs to understand what is wrong for certain. At this distance I'd say it's likely your craft ODF doesn't list your fleetcap ODF as a requirement. I.e. http://guide.fleetops.net/guide/modding ... eetCapFile
posted on January 21st, 2014, 4:07 pm
Does it sound foolish at this point to say "What fleetcap odf file?" :blush:

I am a little uncertain how these caps work. Here is my odf file for the Enterprise-A. Works no problem at all, other than the fact I can build as many as I like.

Code: Select all
#include "cruise.odf"

//Name of Ship class in Ship Display window & in edit mode & tooltip
unitName = "Constitution Class (R)"

tooltip = "USS Enterprise NCC-1701-A - Captain James.T.Kirk"
verboseTooltip = "A legendary ship, and a legendary crew. The USS Enterprise-A is the second ship to bear the name, and has served in the events of the insurrection of the rogue vulcan Sybok, and later in the War of Pacification."

//This ship is a hero.
isHero = 1

//Ship label provided because this is a unique ship.
label = "USS Enterprise NCC 1701-A"

//Race which can build ship & starting race of ship
race = "federation"

//Amount of time required to build ship
buildTime = 80.0

//Number of officers required to build this ship
officerCost = 6

//Number of crew required to build ship & Starting crew
crewCost = 500

saneCrewLossMethod = 1

//Dilithium Cost to build
dilithiumCost = 1000

//Metal Cost to build
metalCost = 750

//Max Shield Strength & Begining Shield Strength <500
maxHealth = 250

maxShields = 523

fleetCapClass0 = "fenta"
maxCap = 1
simpleCapMode = 1
countconstructions = 1
capTooltipReached = "Enterprise-A already commissioned"

// Hitpoints

shieldGeneratorHitPoints = 180
enginesHitPoints = 180
weaponsHitPoints = 120
lifeSupportHitPoints = 180
sensorsHitPoints = 180

//Rate at which shield recharges (points per second... we think)
shieldRate = 2

boardingPartyStrength = 2.5

// Federation Standard Sensors
rangeScan = 800.0f
//**********************************************************************
//SHIP NAMES

//Possible Craft Names
possibleCraftNames =
   "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A" "USS Enterprise NCC-1701-A"
//**********************************************************************
//ART PARAMETERS & WEAPON NAMES

// Phaser
weapon1 = "fbphas"
weaponHardpoints1 = "hp01"

weapon1iconpos = 0    24

// Phaser
weapon2 = "fbphas2"
weaponHardpoints2 = "hp02"

weapon2iconpos = 0    0

// Phaser
weapon3 = "fbphas3"
weaponHardpoints3 = "hp03"

weapon3iconpos = 0    -24

// Phaser
weapon4 = "fbphas4"
weaponHardpoints4 = "hp07"

weapon4iconpos = 11    24

// Photon Torpedo
weapon5 = "fphoton"
weaponHardpoints5 = "hp04"

weapon5iconpos = 22    24

// Photon Torpedo
weapon6 = "fphoton2"
weaponHardpoints6 = "hp09"

weapon6iconpos = 22    0

// Self Destruct Sequence
weapon7 = "gselfdes"
weaponHardpoints7 = "hp10"

// Tractor Beam
weapon8 = "gtracbm"
weaponHardpoints8 = "hp11" "hp08"

weapon8iconpos = 33    24

// Probe
weapon9 = "probe"
weaponHardpoints9 = "hp04" "hp09"

weapon9iconpos = 33    0

// Hardpoints to hit for various systems and other locations.
enginesTargetHardpoints = "hp05" "hp06"
lifeSupportTargetHardpoints = "hp04"
weaponsTargetHardpoints = "hp01" "hp02" "hp04"
shieldGeneratorTargetHardpoints = "hp08"
sensorsTargetHardpoints = "hp10"
hullTargetHardpoints = "hp01" "hp02" "hp07" "hp08"
criticalTargetHardpoints = "hp01" "hp02" "hp07" "hp08"


//**********************************************************************
//AI system parameters
//These parameters influence how the AI evaluates and compares craft.

//An abstract number that represents how much extra strength must be
//used to attack this craft due to its weapons.
// (0.0=no weapons, 0.5 = average weapons, 1.0=many good weapons)
attackPower = 96.0f

//The normalized intrinsic value of a target.  High value craft make good
//attack targets. (0.0=lowest value, 1.0=highest value)
intrinsicValue = 45.0f

//**********************************************************************

//**********************************************************************
//CREW STATUS MULTIPLIERS
//The multiplier for the delay between shots for weapons while in yellow status
weaponYellow = 1.0f

//The multiplier for the delay between shots for weapons while in red status
weaponRed = 2.0f
//**********************************************************************

eventSelect = "KirkSelect"
eventAcknowledge = "KirkAcknowledge"
eventAttack = "KirkAttack"
eventStop = "KirkStop"
eventMove = "KirkMove"
eventRepair = "KirkRepair"
eventTransport = "KirkTransport"
eventSelfDestruct = "KirkSelfDestruct"



physicsFile = "sconnyphys.odf"

baseName = "fenterprise"
ScaleSOD = 1.0


// Impulse Sound
ambientSound = "fedimp.wav"


From what you are telling me though, I need to have a separate odf file that defines a fleetcap? Could you provide an example of one? If I made a new odf file for it, I wouldn't currently know what to put in it! :lol:
posted on January 21st, 2014, 4:22 pm
Yes, that's right - fleetcap files are a separate file. Check any of the all_cap entries in the ODF.fpq for Fleet Ops :). In general, we try to build as many functions as reference material into FO, that way modders get a good look at how things can work.

All you need is a file that your craft ODF references, with just the lines pertaining to the fleet cap. What you have there currently won't work :)
Reply

Who is online

Users browsing this forum: No registered users and 5 guests