Experimental NUKE Silo - fire several nukes at each launch

Everything about mods can be found here.

Moderator: Morax

Experimental NUKE Silo - fire several nukes at each launch

Postby AntaresOne » 23 Jan 2019, 22:11

Hello, everyone!

I have some trouble in making a mod unit to fire as following and I need support to solve this matter:

- i try to make a new Seraphim experimental building, able to fire 4 nukes simultaneously (each nuke via its own rack, all four racks fire together);
- the PROBLEM is that I make it to fire, but the silo nuke projectile counter is going on MINUS at value!!! The nukes should be fired when there are min 4 in silo, but actually four nukes are released when ony one is build!!!
- first see below the script part:

InainoMissiles = Class(SIFInainoWeapon) {
RackSalvoFireReadyState = State(SIFInainoWeapon.RackSalvoFireReadyState) {
Main = function(self)
if self.unit:GetTacticalSiloAmmoCount() < 4 then
self:ForkThread(
function(self)
WaitTicks(1)
if self.unit:GetTacticalSiloAmmoCount() > 3 then
SIFInainoWeapon.RackSalvoFireReadyState.Main(self)
end
end
)
return
else
SIFInainoWeapon.RackSalvoFireReadyState.Main(self)
end
end,
},

- and now the unit.bp part:

MuzzleSalvoDelay = 0,
MuzzleSalvoSize = 1,
MuzzleVelocity = 10,
NukeInnerRingDamage = 70000,
NukeInnerRingRadius = 30,
NukeInnerRingTicks = 24,
NukeInnerRingTotalTime = 0,
NukeOuterRingDamage = 500,
NukeOuterRingRadius = 40,
NukeOuterRingTicks = 20,
NukeOuterRingTotalTime = 0,
NukeWeapon = true,
ProjectileId = '/projectiles/SIFInainoStrategicMissile01/SIFInainoStrategicMissile01_proj.bp',
ProjectilesPerOnFire = 1,
RackBones = {
{
MuzzleBones = {
'Nuke01',
'Nuke02',
'Nuke03',
'Nuke04',
},
RackBone = 'Nuke01',
},
},
RackFireTogether = true,
RackRecoilDistance = 0,
RackReloadTimeout = 10,
RackSalvoChargeTime = 0,
RackSalvoReloadTime = 0,
RackSalvoSize = 1,

Many thanks for your help or relevant info!
AntaresOne
 
Posts: 2
Joined: 23 Jan 2019, 21:59
Has liked: 0 time
Been liked: 0 time
FAF User Name: AntaresOne

Re: Experimental NUKE Silo - fire several nukes at each laun

Postby DDDX » 23 Jan 2019, 23:10

an easy and cheap fix would perhaps be to have the silo fire when just 1 nuke is built, then having a script that states if the number of missiles is less than 0, add 1 missile (till the number is 0). Then the silo rebuilds the nuke and is ready to fire a salvo of 4 nukes again.
That way you would not go in a minus, and would be able to fire 4 each time 1 is built. Which would also make it a t4 nuke launcher - having to build just 1 nuke, but able to fire 4 for the time and price of 1.

Also, there's a bug that basically gives you unlimited nukes if the number is negative, so this would neutralize that i believe.

I am sure there is a better and more classy solution to your problem, though ;)

p.s. would you happen to have an idea how would one make several different nuke types be controlled by a same RULEUCC command, depending which of the nuke weapons is enabled/disabled at the moment?
Check out my 2 maps: "Survival_Mayhem&BO_3d_v1" "Survival_Mayhem&BO_3d_RPG"
as well as my mod: "Survival Mayhem&BO balance"
-- let me know of any bugs or issues regarding those 3.
DDDX
Avatar-of-War
 
Posts: 170
Joined: 21 Mar 2016, 16:13
Has liked: 18 times
Been liked: 16 times
FAF User Name: DDDX

Re: Experimental NUKE Silo - fire several nukes at each laun

Postby AntaresOne » 26 Jan 2019, 11:22

Many thanks foy your prompt reply. Looks interesting, I will chwck as soon as I will have some available time.

Regarding your matter I think is not so easy, at this moment I can not see what kind of script can automaticaly "rotate" the type of nuke in order to release it by same RULEUCC command.

But I can advise that you may create a unit containing two silos, one tactical and one nuclear. For example the tactical silo can fire regular seraphim nuke, while the nuke silo can be set to fire the experimental one.

Other posibility is to create the unit showing only one silo but two weapons (two different nukes) and to edit the script making to switch between them before to engage manual fire (something like the script of the missiles that allows to switch between anti-air to ground fire, see the paricular ability of Cybran T2 Cruiser).

Kind regards and good luck!
AntaresOne
 
Posts: 2
Joined: 23 Jan 2019, 21:59
Has liked: 0 time
Been liked: 0 time
FAF User Name: AntaresOne


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest