Non-Special Replaceweapon

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on November 6th, 2014, 4:36 am
I have a fighter spawning replaceweapon with special = 0. I forced it to obey replacementinstantcycle and replacementinstantdelay when engaging an enemy ship by setting an equivalent shotdelay. Unfortunately, setting range = 1 and validtargets = 0 did nothing to stop it spawning fighters at the enemy's root instead of the hangar. Is there a way to force the replaceweapon to target the firing ship instead?

EDIT: Found a neat trick as well. replacementregisterasnew = 0 will keep the fighters out of the admiral's log and attribute their kills to the carrier.
posted on November 6th, 2014, 5:54 am
As I recall, you will need a workaround - a cannonimp that fires at the owner, granting it an auto firing special=1 replaceweapon

Yup, that's the only purpose of that replaceweapon command :)
posted on November 6th, 2014, 3:01 pm
Thanks! A quick test showed that you can actually skip the cannonimp and just make an autofiring special replaceweapon. Also, replacementregisterasnew = 0 also attributed the fighters' deaths to the carrier, so it's not as useful as I thought. Unless there's not anti-fighter weaponry in your mod, then it's perfect.

Here's the really simple ODF for better fighters if anybody wants it.
Code: Select all
wpnname = "Hangar"
tooltip = "Hangar"
verbosetooltip = "AUTOTOOLTIP-fed_avalonFR.odf"
buttonslot = 0
replacementkeepowner = 1
replacementresetspecialenergy = 1
selectmode = 2
replacementinstantai = 1
replacementinstantplayer = 1
replacementinstantcycle = 4
replacementinstantdelay = 4
shotdelay = 4
transferstats = 0
replacement0class0 = "fighter1"
concurrentchilds = 7
preservestatus = 1
classlabel = "replaceweapon"
special = 1
replacementmaintainorders = 1
overridesubsystem = 1
speakonattack = 0
attackspeech = 0
replacement0Class0Position = 0,-13,0
posted on November 6th, 2014, 3:39 pm
If I recall, the 'problem' with your weapon is that it will spawn when you target friendlies as well :thumbsup: . You can "cheat" in that case to create large numbers of fighters.
posted on November 6th, 2014, 4:07 pm
That's what was happening before, all seven fighters would spawn at once when engaging anything. The shotdelay bit is critical, as it enforces replacementinstantdelay and replacementinstantcycle. With all three matching, there is always the same amount of time between individual fighter spawns regardless of circumstances. Combined with special = 1 forcing the fighters to spawn at the carrier, it works perfectly with no drawbacks.
Reply

Who is online

Users browsing this forum: No registered users and 14 guests

cron