Hanger weapon question

1, 2
posted on October 10th, 2013, 4:48 am
I think I've asked this question before but I want to have hanger weapons that become available after researching the required technology like a special weapon. Could I add the 'specialweapon = 1' line to the odf or would it cause a crash. This is for my star wars mod, right now I have several odfs for one ship. It would be nice to be able to research the required programs and have the hangers become available upon completion of the programs. Like the 'Canaveral level 1/2' upgrade items.
posted on October 11th, 2013, 10:00 pm
Try it with the original fed_avalonFR. It does have special = 1. And it also does have a techtree entry. You can specify which upgrade is required by adding the specific techtree entry like this:
Code: Select all
fed_avalonFR.odf 2 fedR_chassis1.odf fedR_weapons1.odf

The first "odf" is the one you want to be unlocked. The "2" stands for the total number of research items required. The two other odfs are the ones that need to be researched to unlock the special weapon/ship/station
posted on October 11th, 2013, 10:10 pm
I looked at my hanger odfs and realized they already had the 'specialweapon =1' line in it. I've also tried the techtree approach but it doesn't work. I also tried using a research pod on the ship itself but all I got was a crash to desktop. This question is for my Star Wars mod. It's very fighter dependent so I have several ships that have fighters. I'm having to use replaceweapons in order to trigger the hanger (which result in two or more odfs for each ship). But I want the hanger to trigger like a normal special weapon, therefore saving me odfs and space in the system folder. I'm also making my first forays into Artificial Intelligence files. I've got a basic AI going for the Rebellion but to go any further I either have to double a bunch of ships and stations to tell the ai to build the carrier versions separately or try something else.
posted on October 11th, 2013, 10:17 pm
SPARTAN078 wrote:I looked at my hanger odfs and realized they already had the 'specialweapon =1' line in it.

Make sure it is special = 1 and not specialweapon = 1
posted on October 11th, 2013, 11:06 pm
Auto firing replaceweapons cannot be limited by the techtree. The weapon is flagged as a special in order that the replacee is not replaced at the craft's main target's center.
posted on October 12th, 2013, 1:23 am
If that is the case I think I'll have to work out something similar to Adm. Zaxxon's fighter launch command programming. I'll have to look at his mod again and see how he did it. I wonder how I can make it a non-auto firing replace weapon.
posted on October 12th, 2013, 2:58 am
I wonder if I can achieve my goal by making the 'replacementinstantai and player' lines = 0 instead of 1. Would that prevent the weapon from firing?
posted on October 12th, 2013, 6:00 am
For the most part, yes. You could also add a replacementCondition to the ship so that it requires your research to work. You can't do it with an automatic replaceweapon, but you can if it requires manual activation. :thumbsup:
posted on October 12th, 2013, 2:35 pm
Where would I put a replacement-condition line? In the hanger odf itself? Or like something you did for Star Wars Fleet Ops, where you have a 'trigger' odf then the fighter then the hanger. What would it look like? Something like this?

'replacement0condition = "RebR_basictraining1"'
'replacement0class0 = "Reb_earlyhanger1"'
posted on October 12th, 2013, 6:03 pm
I believe it would, but the best place to be sure is to look in the guide. :thumbsup:

As for the trigger, I did that because of some problem with the fighter movement I think. For some reason in one of the latest versions FO, ships stopped being able to spawn in movement, but would be stuck where they were if controllable. If your fighters aren't controllable, you don't need it.


If you are using a manual replace weapon though, I'm pretty sure you can just use the techtree to limit their use. The replacement condition may be entirely unnecessary.
posted on October 12th, 2013, 8:10 pm
A manual replace weapon meaning one I have to toggle/make a button for. Shouldn't be too hard. I tried limiting the hanger itself with the tech tree but that doesn't work at all. What I want is for it to become available upon completing the research then automatically trigger itself.

What about a separate weapon that replaces itself as the hanger upon completion of the research. Like my 'assign fighters' replace weapon on the mod itself, except instead of replacing the entire ship it just replaces the one weapon to an active hanger.

This will also help as I'm experimenting with a Rebellion AI. I don't want to have to make separate shipyard/ship odfs for the carrier versions. It would be much easier if I could simply tell the AI to build a ship then research the hanger and the hanger fires automatically.
posted on October 13th, 2013, 2:19 am
You could always use the line showOnlyIfHasTech. It sounds to me like that is what you want. The button for the weapon will only appear if you have the tech required in the tech tree.



That won't make it automatically trigger itself though. There is no way to limit an automatic replaceweapon with tech. You can put a timer on it, but usually a manual button is easiest.
posted on October 14th, 2013, 3:46 am
So I can just use the same replace weapon I use for ship upgrades and just have it restricted by the techtree and when the research is completed it will replace itself to an active hanger correct? something like this? I'd probably take out the resource cost. And I would just take the research buttons and use them for this weapon.

wpnname = "Ship Upgrade"
tooltip = "Assign Fighters"
verbosetooltip = "Assigns a half-squadron of T-wing Interceptors"
buttonslot = 3
replacementmode = 2
replacement0condition = "Reb_basictraining1"
replacement0class0 = "Reb_earlyhanger1"
replacementevent = "ShipRefit"
dilithiumcost = 300
latinumcost = 150
replacementkeepname = 1
replacementdontremovefootprint = 1
overrideceasefire = 1
classlabel = "replaceweapon"
special = 1
replacementmaintainorders = 1
replacementregisterasnew = 0
replacementcreationtype = 1
overridesubsystem = 1
speakonattack = 0
attackspeech = 0

I tried it out just now and there weren't any crashes but the weapon didn't replace. I could click the button all i wanted it wouldn't do anything. I may have to stick with the separate ship odfs for now.
posted on October 14th, 2013, 4:13 am
I wouldn't know for sure without running it myself, but I still don't think you are going to get an automatic replaceweapon to work with a tech tree requirement.


Something you could try is to use a cannon special weapon that fires a u_ball with a replaceweapon. The cannon can be limited by the techtree, and as soon as the tech is done the ship can fire the weapon.

I still don't know if that would do what you want though.
posted on October 14th, 2013, 1:41 pm
Which cannon weapon? cannon or cannonimp? I would use the 'targetself =1' line right? i tried to find uball in the guide but couldnt.
1, 2
Reply

Who is online

Users browsing this forum: No registered users and 1 guest

cron