Is there a workaround or override ?
-
All of the units shown in the build menu provide a DPS and Burst damage values based upon the units BP weapon values. Which don't get me wrong is really great. That being said, I've encountered a problem with this system when using a large number of dummy weapons. Soon as i mouse over an Engineer build icon for the unit i get the following..
WARNING: Error running HandleEvent script in CScriptObject at 1ddb6180: ...ever\gamedata\lua.nx2\lua\ui\game\unitviewdetail.lua(616): attempt to perform arithmetic on local `MuzzleCount' (a nil value) stack traceback: ...ever\gamedata\lua.nx2\lua\ui\game\unitviewdetail.lua(616): in function `WrapAndPlaceText' ...ever\gamedata\lua.nx2\lua\ui\game\unitviewdetail.lua(792): in function `Show' ...orever\gamedata\lua.nx2\lua\ui\game\construction.lua(1165): in function `OnRolloverEvent' ...mdata\faforever\gamedata\lua.nx2\lua\maui\button.lua(96): in function <...mdata\faforever\gamedata\lua.nx2\lua\maui\button.lua:77>
The unit in question is the 4DFAF Death Tentacle. It uses 12 dummy weapons to simulate the movements of a tentacle. With the 13th weapon being the main muzzle for the entire assembly.
Note will post a video with files shortly.
Edit (files) XSB2306.zip
Edit (video should be viewable soon'ish) https://youtu.be/P_Fb5vpBY74
Resin
-
Been doing some digging into this and have discovered that the issue is that the dummy weapons I'm using are missing:
MuzzleChargeDelay = 0, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 1,
Looks like the unitviewdetail.lua may not be seeing that this isn't a real weapon. Though I should be able to get the unit to work but the UI built menu will show all of the dummy weapons. See image below to confirm...
Unfortunately I can't use the weapon blueprint "DummyWeapon = true," as this would prevent the weapons from moving.
-
Within unitviewdetail.lua i see there are exceptions like...
Line 651
-- Do not display Reload stats for Kamikaze weapons elseif info.WeaponCategory == 'Kamikaze' then
Would it be possible to script in an exception for weapons that are being used as motion actors, such as is the case with the Beam Tentacle ?
-
Would it not be easier to just prohibit the UI from displaying Dummy Weapons in the rollover ?
-
@Resin_Smoker
If you remove the WeaponCategory field entirely, it won't show the weapons inunitviewdetail
(see line 532 of that file). Does that solution work for you?@sprouto said in Is there a workaround or override ?:
Would it not be easier to just prohibit the UI from displaying Dummy Weapons in the rollover ?
He's using the weapons'
AimManipulator
functionality for animations, so they're not actually dummy weapons, they just haveWeaponCategory = 'DummyWeapon'
, which is why they show up in the UI. -
@nomander Shit man thats awesome ! Will give that a try.
-
Success !
-
That unit does look great! I'm sure @CDRMV would love to see it too
-
@jip thanks!
Unfortunately it's still pretty buggy as getting all those turrets to work together consistently is like hurding cats.
-
@Resin_Smoker
Looks really similar like my Cybran Worms
However there are able to Move below the Land Layer (Underground).
So there are Not an Stationary Defense compared to your Seraphim Tentacle.
Here are two Screenshots of them:
Both are already included in CSK Units on my GitHub Repository for Early Access.
So If you want feel free to Check them Out.If you want I could Integrate your Seraphim Beam Tentacle as an Underground Unit into CSK Units. It needs a few Changes by myself but I think it would be more Interesting to be usable an full Underground Unit.
-
I've made progress and have gotten the turret to behave. I may post a video in the coming days.