Target priority for ship with two different weapons

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on July 13th, 2014, 9:00 pm
I've been checking out the Avalon and it's fighter files and had a question. There is this for the Avalon phaser:
hitchance = 1
"fed_canaveralMI.odf" 0

So the weapon will hit every ship except a canaveralMI. Does this mean it won't even try to attack that canavaral or just that if it does it will never hit it? I wasn't sure if a target has an intrinsic value over 1 if it will still try to attack it even if it's hitchance was 0? Does a hitchance of 0 completely exclude the ship from being considered a target?

Reason I'm asking is because let's say I have a fighter with a phaser and a torpedo. I want the fighter to be able to attack other fighters with the phaser only, but I want it to fire its torp at stations. So would the following weapon values set it up properly?:

phaser.odf
hitchance = 1

and

torpedo.odf
hitchance = 1
"enemy_fighter.odf" 0

If an enemy fighter and an enemy station are both in weapon range which one will it attack first?
posted on July 14th, 2014, 6:45 pm
The way you do this is to set the torpedoes so they only target ships and stations.

For example:
Code: Select all
hitchance = 0
"fed_sf_commandY.odf" 1
"fed_sf_commandZ.odf" 1


This weapon wont shoot at anything except for the Federation Starfleet Command.

Good luck.
posted on July 14th, 2014, 9:56 pm
Hitchance just indicates the chance of the weapon to hit its target. Has no impact on the target's priority whatsoever. The weapon will still fire - but miss always - at the target if it is valid and has 0 hitchance.

ValidTargets will set whether the weapon can fire on a target. The unit will still attempt to fire on targets, but will be unable to.

You can only set target priority through the less precise attack priority command.
posted on July 15th, 2014, 6:20 am
Oh yeah, forgot about that. :sweatdrop:
So, Correction:
Code: Select all
validtargets = 0
"fed_sf_commandY.odf" 1
"fed_sf_commandZ.odf" 1
:D
posted on July 27th, 2014, 12:28 am
I have a couple more questions related to this. I have my carrier set up to launch fighters when I click the launch button. My concurrentchilds value is set at 4 so I'll get 4 fighters however, I have to click the launch button 4 times instead of all 4 launching at once. If I leave the replacementinstantplayer value at 1 then all 4 do launch at once, but I want to manually launch them. Can this be achieved?

If I attack a ship with my carrier all my fighters will attack that ship as well whether the replacementmaintainorders value is 0 or 1. Is this how it's intended?

Conversely, if a ship attacks me my fighters won't automatically attack it in defense. Is there some coding needed to be able to have my fighters defend automatically?
posted on July 27th, 2014, 2:47 am
It's hard to say just what's going wrong without the files, best guess is for issue 1:

That you don't have your replaceweapon replacing 4 fighters at once. Concurrentchilds only refers to the max number of units that can be held by the owner.

Yes, replacementmaintainorders only affects inheriting the current command. Fighters obey the carriers command always.

For issue 2, re fighters not defending - is the carrier standing still? Is there only one opponent? Is the carrier able to attack? Not enough details here yet :)
posted on July 27th, 2014, 3:34 am
Well, partially never mind. You can't perform a successful test if you don't set the test up right in the first place. :blush: I was only placing two ships in the editor and having one attack the other which was incorrect. I needed to assign one of the carriers to another team then start the test. Works great, each ship defends itself when attacked including the fighters.

The one thing I don't understand is how to make the replaceweapon launch all 4 fighters at once? I'm basically duplicating Adm_Z's files in his Star Wars mod, but his files are essentially identical to mine and his launch multiple fighters at once. Is this part of the reason:

replacement0class0 = "sw_rep_v-wing"
replacement1class0 = "sw_rep_v-wing"
replacement2class0 = "sw_rep_v-wing"
replacement0class0position = 10,0,-20
replacement1class0position = -10,0,-20

My file only has one entry like this:

replacement0class0 = "sw_rep_v-wing"
posted on July 27th, 2014, 4:22 am
Yes, his file is set up to replace 3 fighters. Yours is set up to replace 1 :).
posted on July 28th, 2014, 3:40 pm
Exactly, your file is only told to launch one fighter at a time. The concurrentchilds line shows the maximum fighters the carrier can sustain at any time, not the amount that it will launch at once.

For 4 fighters you'll want something like this:

replacement0class0 = "sw_rep_v-wing"
replacement1class0 = "sw_rep_v-wing"
replacement2class0 = "sw_rep_v-wing"
replacement3class0 = "sw_rep_v-wing"
replacement0class0position = 10,0,-20
replacement1class0position = 0,0,-20
replacement2class0position = -10,0,-20
replacement3class0position = -20,0,-20
posted on July 28th, 2014, 4:22 pm
Thanks Dominus and thank you Atlantis. That's exactly how I did mine. Instead of being so useless and posting every single question I tried adding the 4th ship on my own as you have it and it worked. :lol: Guess I like to ask a lot of questions up front instead of experimenting on my own. I need to get better with that.

replacement3class0position = -20,0,-20: I happened to use this exact setting as well as I just assumed 20 would be the next logical step. I don't exactly know what this does though. Is it the position of the ship as it launches from the carrier relative to other fighters?
posted on July 28th, 2014, 7:17 pm
It's the position the child craft spawns at relative to the parent's root. The numbers given by Atlantis would spawn them all in a line along the X axis, ten units apart.
Reply

Who is online

Users browsing this forum: No registered users and 2 guests

cron