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

Build/Weapon Costs

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
Been trying to think of a way to implement 'refits' into my game for a while now (because I really don't want 7 different ship yards like I have currently lol).

I think the best way to do it would be the "replaceWeapon" function that the patch project introduced.
My plan is for the ship to be refitted needs to be close to a starbase so that the weapon can be used - it should be possible without the base moving (case in point, I have a Defiant shuttle launch where the defiant doesn't move at all, the shuttle just moves down and out from it from the hanger area).

However, a refit wouldn't be a refit without some sort of cost associated (especially for balancing)

Does anyone know if its possible to associate a cost in metal/latinum/dilithium to use replace weapon (or even a special weapon for that matter, since we know that has an energy cost associated) ?:confused:

Also, is it possible to set a time delay on it as well?
 

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
Yes it is possible to make refits using the replaceweapon code cost resources, it's the sytem I use for refits in my own install. You just add the same code you'd use in a normal build to the special weapon odf:

Dilithium Cost = X
Latinum Cost = X
Metal Cost = X

However it isn't possible to make it time-delayed I'm afraid, the way the replaceweapon is coded makes the refit happen instantly.
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
Yes it is possible to make refits using the replaceweapon code cost resources, it's the sytem I use for refits in my own install. You just add the same code you'd use in a normal build to the special weapon odf:

Dilithium Cost = X
Latinum Cost = X
Metal Cost = X

However it isn't possible to make it time-delayed I'm afraid, the way the replaceweapon is coded makes the refit happen instantly.

Cheers for that Dan :), nice to have that confirmed. How've you been fella haven't seen you around for a while?
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,321
Age
39
Another option to go with this idea is with the shipyards. After researching the refit you could use the secondarybuild command that research stations use.

An example say your shipyard buildlist is this:

Code:
buildItem0 = "fscout"
buildItem1 = "fdestroy2"

secondaryBuildItem0 = "fscout_refit"
secondaryBuildItem1 = "fdestroy2_refit"

It means once set up in your techtree, after you research the refits they replace the originals in the shipyards.

I haven't tried this but plan to use it in some of my upcoming mods, if it works. Clash of Empires may find itself becoming a guinea pig for this idea. :lol:
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
Another option to go with this idea is with the shipyards. After researching the refit you could use the secondarybuild command that research stations use.

An example say your shipyard buildlist is this:

Code:
buildItem0 = "fscout"
buildItem1 = "fdestroy2"

secondaryBuildItem0 = "fscout_refit"
secondaryBuildItem1 = "fdestroy2_refit"

It means once set up in your techtree, after you research the refits they replace the originals in the shipyards.

I haven't tried this but plan to use it in some of my upcoming mods, if it works. Clash of Empires may find itself becoming a guinea pig for this idea. :lol:

I like this... it certainly makes sense for the Galaxy class post the Venture refits... and also for the Excelsior class. Although that leads to the problem of both varients being actively used in the TNG era...

I think i'm gonna try implementing both of these ideas, cheers guys :)
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,321
Age
39
If you could, please let me know if my idea works, as I am rather interested in this. I think if both work and used together, it would really shape up very well. :)
 

kjc733

Wibble
Staff member
Site Manager
Seraphim Build Team
Master Shipwright
Joined
30 Mar 2008
Messages
2,477
Age
39
Another option to go with this idea is with the shipyards. After researching the refit you could use the secondarybuild command that research stations use.

An example say your shipyard buildlist is this:

Code:
buildItem0 = "fscout"
buildItem1 = "fdestroy2"

secondaryBuildItem0 = "fscout_refit"
secondaryBuildItem1 = "fdestroy2_refit"

It means once set up in your techtree, after you research the refits they replace the originals in the shipyards.

Oh oh, wow. Been wondering if this sort of thing is possible. Will have to give this a go at some point.
 

Dan1025

Every Mods Biggest Fan :P
Joined
31 Jan 2007
Messages
1,883
Age
33
You're welcome mate :)

As for me, I'm good thanks, been busy since I went back to uni so I havn't done much modding or anything lately. Hopefully when things are a bit more settled I can be more active again :)
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
You're welcome mate :)

As for me, I'm good thanks, been busy since I went back to uni so I havn't done much modding or anything lately. Hopefully when things are a bit more settled I can be more active again :)

Glad to hear it fella, its always interesting to see what your developing. I hear rumours you have a dominion side in the works?
 

Starfox1701

Master of the Arwing
Warrant Officer
Joined
29 Jan 2008
Messages
2,560
Age
47
Their is a third option. You evolve the ships alla 8472.
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
Their is a third option. You evolve the ships alla 8472.

That would give the time delay, and have an associated cost in resources too.
The problem with that is you can do it anywhere on the map, I'd prefer them to have to be close to a starbase or shipyard to be able to 'refit'.

Which is a shame, because it'd be darn near the perfect way to do it lol

EDIT: On a seperate note - Dan, how does your refit process work?

Ideally, what I want is to start off in a similar way to having the saucer and star-drive sections (where u need both highlighting to rejoin the ship) , but rather than just produce one vessel, i need it to leave the station intact and replace the ship, for example, a Galaxy with the Venture refit.

Looking at the replaceWeapon odf, I'm not sure thats going to be possible...
 
Last edited:

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
If you are willing to invest the time, all of those things are possible in FO3.1.3. I don't think the ReplaceWeapon has the ability to be set to a time delay in the patch project, though if you can link two replaceweapons together (one firing X amount of time after the first) then it will be possible :)

EDIT: nevermind, I've just been informed that autoreplace doesn't exist in the PP. Sorry for false hopes :sweat:
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
If you could, please let me know if my idea works, as I am rather interested in this. I think if both work and used together, it would really shape up very well. :)

Hmmm.... ok, so either I've done this wrong, or it unfortunately doesn't work.

I've got my shipyard set up the way you suggested:

//**********************************************************************
//Construction Parameters

buildItem0 = "ffrigate"
buildItem1 = "fgalaxy"
buildItem2 = ""
buildItem3 = "fspecial"
buildItem4 = "fnebulasr"
buildItem5 = "fmelbourne"
buildItem6 = "fbattle"
buildItem7 = "fprom"
buildItem8 = ""
buildItem9 = "fgalaxyx"

secondaryBuildItem0 = ""
secondaryBuildItem1 = "fgalaxy-v"
secondaryBuildItem2 = ""
secondaryBuildItem3 = ""
secondaryBuildItem4 = ""

//Hardpoint location for building.
buildHardpoint = "build"
//**********************************************************************
//**********************************************************************

Now, I've got a research station set up, that researches a pod for the galaxy upgrade, and my tech tree is set up as below (relevent entries only):

fgalaxy-v.odf 2 fyard2.odf fedpod29.odf // battleship (Venture refit Galaxy)
fedpod29.odf 1 fnovastation.odf // research pod (Galaxy refit)


Maj, do you think I'm missing something?
I've got the research pod set up, the tech tree entries, the shipyard odf... I can't think what I'm missing, but i'd love to get this working if its possible. I'm open to ideas :)
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,321
Age
39
I'll reply here rather than the PM mate.

I think it's one of those lovely hardcoded commands. As I can't see a thing wrong with what you've posted. It must be restricted to the research yards.

I wonder if you could turn the yard into a research station if it would still be able to build ships?

repairFacility = 1
classLabel = "research"
 

Terra_Inc

MSFC's Cheshire Cat
Staff member
Site Manager
Necromancer/Troll hunter
Kitten Commander
Joined
16 Dec 2009
Messages
3,132
Age
34
As far as I know, the secondaryBuildItem replaces the original buildItem after one of that one has been built. Just like the Lv3 upgrade replaces the Lv2 upgrade on the stock upgrade station.
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,321
Age
39
I thought it was determined by the techtree. :confused:
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
As far as I know, the secondaryBuildItem replaces the original buildItem after one of that one has been built. Just like the Lv3 upgrade replaces the Lv2 upgrade on the stock upgrade station.

I thought it was determined by the techtree. :confused:

I'm not sure on that one - I've done the refit research, and it still only wants to build Galaxy's not the Galaxy-V refit

I'll have to try that second idea Maj and let you know :)
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
I'll reply here rather than the PM mate.

I think it's one of those lovely hardcoded commands. As I can't see a thing wrong with what you've posted. It must be restricted to the research yards.

I wonder if you could turn the yard into a research station if it would still be able to build ships?

Well, it does see it as a research station, and it does have the build menu. Unfortunately, once you click on the ship, it doesn't do anything.

On a secondary note, it doesn't seem to change the Galaxy button once the refit upgrade is researched. Course, that may just be because i can't build the first one lol
 

Majestic

Administrator
Staff member
Administrator
Seraphim Build Team
Joined
17 Apr 2006
Messages
18,321
Age
39
Bummer looks like a dead end. I suppose it was worth a shot. I suppose at some point the Fleet Ops development team may fix that hard coding issue. It's our only hope.
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Bummer looks like a dead end. I suppose it was worth a shot. I suppose at some point the Fleet Ops development team may fix that hard coding issue. It's our only hope.

You can already accomplish that in Fleet Ops :sweat: . I have no clue if it is possible to modify it for PP though :cry:
 

Adm_Z

Gettin' down and GUI!
Joined
23 Nov 2009
Messages
2,745
Actually, as far as I"m aware(as my main station is a research station) it is not yet fixed. Research stations can only build stations. ships will just get stuck at port. However, you could do like I did and have the stations the research station builds, build your refits. You could have multiple ships building at once and it would look really cool if your hardpoints were rotated correctly.(unlike mine.:() You could even make some of the points repair docks and have them repair instead of build.
My stations are invisible so it looks like station is building the ships, but really, its the 'pods' you build from the station that build the ships.
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
Bummer looks like a dead end. I suppose it was worth a shot. I suppose at some point the Fleet Ops development team may fix that hard coding issue. It's our only hope.

Looks like it. I do actually like adm_z's idea as well, but im not sure how well it would work in my game as i'd like it to look like a yard lol (or how to go about it).

I'd be nice if the FO guys could get the secondary build to work for shipyards as well though lol. td be a nice addition to the code
 

Adm_Z

Gettin' down and GUI!
Joined
23 Nov 2009
Messages
2,745
Well, you could have it research only one 'pod' which can then build your refits, but have the research station look like a shipyard.
 

Knight

"What? Too flashy?"
Joined
27 Jun 2006
Messages
2,404
Well, you could have it research only one 'pod' which can then build your refits, but have the research station look like a shipyard.

Any chance I can see your odf's to get a better idea how it works?
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
Actually, as far as I"m aware(as my main station is a research station) it is not yet fixed. Research stations can only build stations. ships will just get stuck at port. However, you could do like I did and have the stations the research station builds, build your refits. You could have multiple ships building at once and it would look really cool if your hardpoints were rotated correctly.(unlike mine.:() You could even make some of the points repair docks and have them repair instead of build.
My stations are invisible so it looks like station is building the ships, but really, its the 'pods' you build from the station that build the ships.

Hm, maybe I didn't understand the issue correctly - correct me if I'm wrong: you want to have a station build a ship. Then you research something from that station that makes the original class of ship unavailable, and a new class of ship available from the same station. From talking with Blade you should be able to just work around that original A2/FO issue, like with the Fed yards pre 3.1.2 (where you could research and build ships there) or with the Dominion yards' prototype system (where instead you'd combine ship research causing the availability of the second class of ship, and the loss of the first class). :sweat:

I apologize for double posting (edit time woefully expired :oops:), but I just remembered another FO examples that might prove useful - the Romulan refit system. It lets you build the refits in the yards, and refit ships in the field - all you'd have to do is set the research to disallow the original class from being built at the yard and hide the button ... and stick that research in the yard like the pre 3.1.2 Antares, or use a modular/separate station like Zaxx did (if that's what you wanted).
 
Last edited by a moderator:

Amateur

Waiting for Godot
Joined
29 May 2006
Messages
755
Age
34
To echo what Dom' said, having a (very) brief look through the FLOPS Techtree yields the fact that the prototype is the tech requirement for the Dominion main ships.

This seems to be your best bet I'm afraid, though I will add that the coding side of it does confuse me a bit (the .odf lists something called 'builditemxavailability' with either a 16 or 32 which just left me like this :confused:)
 

Dominus_Noctis

Lasciate ogni speranza...
Joined
18 Aug 2010
Messages
409
To echo what Dom' said, having a (very) brief look through the FLOPS Techtree yields the fact that the prototype is the tech requirement for the Dominion main ships.

This seems to be your best bet I'm afraid, though I will add that the coding side of it does confuse me a bit (the .odf lists something called 'builditemxavailability' with either a 16 or 32 which just left me like this :confused:)

Yup, the builditemxavailability stuff is (partially) explained in the temporary ODF command list on the modding guide (along with a bunch of other commands that would prove useful) :) . I think that if it is 16 it starts off hidden and shows itself when available. If 32 it has the opposite behavior... we think. Doca has been awfully busy lately, so the 'real' ODF list has been put on temporary hold unfortunately.

Personally I think that the Romulan Refit system requires the least work to "redo" for a mod, since you can see exactly how they got the new refitted ship to appear in the construction menu - but of course you'll also need to add the refit research into the yard, just like the 3.1.1 Antares yards used to have research.
 

Atlantis

Master Chief Petty Officer of Starfleet
Joined
1 May 2006
Messages
518
To echo what Dom' said, having a (very) brief look through the FLOPS Techtree yields the fact that the prototype is the tech requirement for the Dominion main ships.

Just to note that this does not mean that it MUST be like that. You can set the techtree up so that anything can "release" the second unit, be it a prototype/first unit, research, or anything else like that.
 
Top