Closed lL1l1 closed 1 month ago
How much does the Cybran Spy Plane consume for its maintenance? We could use that value instead of 1
, as 1
looks odd
The Cybran spy plane doesn't consume anything since stealth never needs to be toggled, but UEF frigates use 5 energy.
Let's go with 5 energy here too then.
What about allowing setting custom status from the bp? Currently it is completely overwritten by lua blueprint modification, but this would allow placing Jamming in AllIntel
and omni/radar into AllIntelMaintenanceFree
manually.
I'm not in favor of adjusting the blueprint process related to intel. The process is complicated and difficult to verify given that it also has to deal with numerous units from mods. If we can get away with just giving a unit an energy maintenance of 5 then that would be my preferred solution here.
Yeah that's a better fix. Currently it is impossible to disable free intel entirely, which you might want to do for intel types other than jamming if you're modding some custom intel resource.
I upvalued and optimized the intel logic quite a bit, it should work the same way as before. Tests:
EnableUnitIntel(disabler)
Cybran spy planes (MaintenanceFreeIntel
) and Cybran ASF (AllIntel
) landing in a carrier (carriers disable intel with the "cargo"
disabler).DisableUnitIntel(disabler)
Ctrl+k the Cybran spy planes and ASFDisableUnitIntel(disabler, intel)
and EnableUntilIntel(disabler, intel)
Toggle an ASF (AllIntel
) and a UEF spy plane (MaintenanceFreeIntel
)DisableUnitIntel("Energy")
and EnableUnitIntel("Energy")
Spawn some t3 pgens and a bunch of omnis to energy stall, then disable some of the omnis to stop energy stalling (AllIntel
). While energy stalling, fly a spy plane near some civilians and see that they do show up on radar (MaintenanceFreeIntel
).By the way, @clyfordv you can link files and their line numbers as a preview inside a comment by going to the file page, clicking+shift clicking the line numbers to select a line/range of lines, and then getting a permalink from the options menu. I saw you having trouble with that in another comment too so I thought I'd mention it.
The preview is this:
https://github.com/FAForever/fa/blob/87e6fb0ed883e404a407d727bc3baddf95341018/lua/defaultcomponents.lua#L198-L212
I ran all your tests, everything is good except for the cybran SACU:
So looks like that enhancement section probably did something after all.
All fixed. The enhancements section had nothing to do with that, the CCommandUnit script was just overriding the script bit behavior entirely instead of hooking, which broke the stealth toggle.
I'll be honest - these are scary changes because it's a complicated system. If you both trust the changes then feel free to approve and merge them. But please keep checking intel continuously once this is merged in.
@clyfordv If it's ready to go can you approve it so it can be merged?
Description of the proposed changes
Adds 1 energy cost for spy plane jamming to make the jamming retoggling feature work with spy planes.
Testing done on the proposed changes
Spawned a radar for myself and a UEF spy plane on the enemy team. Toggled the full map vision cheat on then off to clear the spy plane's jammer blips. After some time, the blips return.
Additional context
I looked into the
defaultcomponents.lua
DisableUnitIntel
function and how the intel status is created inblueprint-units.lua
and it seems like there is no way to create a free but toggleable intel since the tableAllIntel
isn't filled if all intel is free, butDisableUnitIntel(disabler, intelType)
requires theintelType
to be inAllIntel
.Checklist