So I screwed up my detection script, since I just reused some old code and missed changing a line. So ACUs were being falsely accused of the bug! Instead, it was the mobile SMD unit I added, and forgot to remove the naval tag.
Posts made by Rama
Heh, I was just thinking of trying that. Will test it later. Any idea why ACUs would be counted as naval? Seems to occur after upgrading to T3.
I have a script that is supposed to monitor if teams are building naval units, and spawn a response. For whatever reason, ACU's will begin being counted as naval units and trigger the response. This happens regardless if players are using vanilla ACUs or BlackOpsACUs.
An example is in this replay, which triggers the naval response 18 minutes into gameplay.
#22118629
I confirmed it was the ACUs by running a script that would log and ping all units that had been added to the naval response monitor.
I have since added exclusions for the ACUs, but they are still being counted as naval units. The script for the Naval Response is below.
function MonitoringFunctionSeven() --Navy Counter
local circle = ForkThread(function(self)
repeat
WaitSeconds(60)
local totalT1Navy = CalculateTotalEnemyUnitsOfCategory(self, categories.MOBILE * categories.TECH1 * categories.NAVAL - categories.COMMAND - categories.SUBCOMMANDER - categories.CONSTRUCTION)
local totalExpNavy = CalculateTotalEnemyUnitsOfCategory(self, categories.MOBILE * categories.EXPERIMENTAL * categories.NAVAL - categories.COMMAND - categories.SUBCOMMANDER - categories.CONSTRUCTION)
if totalExpNavy >= 1 then
totalExpNavy = totalExpNavy - 1
end
local totalT2Navy = CalculateTotalEnemyUnitsOfCategory(self, categories.MOBILE * categories.TECH2 * categories.NAVAL - categories.COMMAND - categories.SUBCOMMANDER - categories.CONSTRUCTION)
local totalT3Navy = CalculateTotalEnemyUnitsOfCategory(self, categories.MOBILE * categories.TECH3 * categories.NAVAL - categories.COMMAND - categories.SUBCOMMANDER - categories.CONSTRUCTION)
NavalPowerAI = 0
NavalPowerAI = math.floor((totalExpNavy * 180) + (totalT3Navy * 60) + (totalT2Navy * 15) + (totalT1Navy * 3) + 0.5)
until GetGameTimeSeconds() > 20000 or won == true
end)
end
I've had a weird problem in chat. The main chat lobby frequently disconnects. And in older versions of the clients, when clicking to PM a player in-game, the side window would show the game they were in, the other players still in-game, and the game duration. This was incredibly useful when I would crash, would be able to quickly check if others had all crashed, and PM to let them know. Now, that window in the PM screen is blank, with zero information.
It is the map. It has major pathability issues. Only China, Japan, and the US can be reached by amphibious units. With the exception of hover units, all other land masses are unreachable. Overall, a poorly designed map for any type of AI play.
v279
- Added a mobile amphibious SMD unit for all factions. Can carry 4 anti-nukes, and has a smaller coverage area than regular SMD. Can be built by any T3 factory. Slow, mediocre health, and can be hit by torpedoes when on water. Should help with rear players helping provide SMD coverage to front or allowing front defenses to be moved.
- All bosses (land + air) will now have the ability to attack land, air, and submerged units. They will gain additional firepower as player's become stronger. Bosses should be easier to spot now because of the unique icons from the additional attached weapons.
- The rare bug of nukes launching at the NW corner should be fixed.
@Slykar
It spawns across the center of a map running East to West, avoiding spawning in the top and bottom thirds. I added it for maps like Dual Gap that have large sections of North and South blocked off. There is also a setting for spawning in the center running North/South. Guess I should see how to detect blocked sections so Support Bases don't spawn out of bounds.
Did add a mobile SMD unit and also made a separate Aquatic SMD mod that will allow regular SMD to be built on water. The new Aquatic SMD mod and the new mobile SMD unit both work with my lower cost AntiNuke mods. Should allow for more flexible play.
Did you try the observer fix I mentioned? Try to kick observers before launch. If you kick an observer and they aren't removed from the lobby, that means host will crash on launch. Turning on "Allow Observers" appears to allow game to launch without host crashing, if there is a stuck observer in lobby.
Sounds like support based are spawning in the blacked out regions of the map. You can prevent that from happening by setting Support Bases to only spawn Center E to W.
I've considered adding a mobile SMD unit, so that back players can build them to support forward players. The idea is a slow moving, hover unit with a lower max SMD capacity and range. Guess I will have to add it. In the meantime, there are also some mobile SMD mods in the mod vault, if I recall.
I haven't seen the support base bug in any replays I've checked, except the one of you on Fart Island map. You only get 2 support bases, regardless of the multiplier you set? Support bases can spawn in regions of maps that are blacked off, making them unreachable to players.
I've no idea what causes the lobby observer bug. I have found what appears to be a possible fix but I haven't been hosting much, so only tested once. Here is the forum post on the fix:
https://forum.faforever.com/topic/7292/observers-crashing-game-possible-fix
This warning keeps spamming log files in games using the mod AI Wave Survival. Starts showing up in the logs when boss units spawn that have additional units bound to them. Not sure if it is a specific unit causing the warning. Not even sure if it is this error causing the infinite loop, as the warning does not always result in an infinite loop occurring and freezing the game (gameplay stops, CPU use skyrockets, but UI is still functional).
Any ideas appreciated, or if this issue is present in other mods.
warning: Attempted to resume a thread that was already killed
stack traceback:
[C]: in function `ResumeThread'
...eplaydata\gamedata\lua.nx2\lua\defaultcomponents.lua(481): in function `CreateTreads'
...eplaydata\gamedata\lua.nx2\lua\defaultcomponents.lua(438): in function <...eplaydata\gamedata\lua.nx2\lua\defaultcomponents.lua:426>
...aydata\gamedata\lua.nx2\lua\sim\units\mobileunit.lua(84): in function `CreateMovementEffects'
...forever\replaydata\gamedata\lua.nx2\lua\sim\unit.lua(3291): in function <...forever\replaydata\gamedata\lua.nx2\lua\sim\unit.lua:3276>
...aydata\gamedata\lua.nx2\lua\sim\units\mobileunit.lua(131): in function <...aydata\gamedata\lua.nx2\lua\sim\units\mobileunit.lua:130>
V276
Doom Waves:
- Fixed a few bugs, Final Doom Wave won't deploy early any longer, among others.
- Dooms now damage HQ health immediately instead of after defeating entire wave. This should make them more satisfying to play against and help defeat the HQ quicker. Total damage per wave is divided between Dooms.
- 10% chance for random storms every time a Doom is defeated.
Aircraft Carriers:
- Now spawn their own attack craft. Default is 1 to 4 aircraft per carrier. This can be adjusted or disabled in settings.
- Will spawn T3 Torp bombers in increasing numbers to combat T3/T4 sub spam.
- Improved depth charges.
Navy:
- Attack scripts changed to increase naval focus on ships.
- Some units given hardened torpedos. These take 2 hits to be destroyed by anti torpedo countermeasures.
- T4 Abyss anti torpedo defense can destroy hardened torpedos in one hit.
Other Changes:
- T3PD for Aeon, Cybran, and Sera all received small buffs.
- T4AA now has a reload bar so players know it is working.
- Engineer stations will no longer spawn for HQ.
- Various messages have been added to chat to help keep players informed.
This issue appears to affect me and other hosts who use the mod AI Wave Survival. Don't know if it occurs for hosts using other mods too.
When hosting a game, and more than 1 observer joins, so that there are 2 or more observers when host launches game, when the dialogue asks to kick all observers, the host will then crash.
If a host tries to manually kick an observer by clicking on their name, and the observer is not removed, this is a guaranteed indicator that the host will crash when trying to launch.
Possible Fix:
- Enable "Allow Observers"
- Manually kick observers.
- Any observers who can't be kicked because of bug won't crash host, and also don't appear to load into game, causing no connection issues.
Hosted a game recently, had two AFK players, so moved them to observers. They still were AFK, so decided to launch. Manually tried to kick both observers, but was only able to remove one. The observer bug, that blocks hosts from kicking observers, would not allow me to remove them.
Decided to launch, even though I expected to crash. However, I happened to have "Allow Observers" enabled (usually I have it disabled). Instead of crashing on launch, the game played without issue.
As for the player who was an unkickable observer, I am not even sure they loaded (and if they didn't load/launch, it didn't cause game to lock up waiting for players on start). If they did, they remained an observer for the entire match, as they never DCed.
Are you sure they also aren't inspired by Thunder, from Super Giant Robot Brothers?
v272
-Added an optional Sub Spam retaliation script. Will spawn Sub Hunters in response to sub spam.
- Cybran T4 Daze Cannon buffed and targeting issues fixed.
- Cybran T3 Heavy Cruiser made a little smaller and faster, to help with potential log jams on land.
- Aircraft Carriers given depth charges, to provide some anti-sub support, and made 10% smaller to help with navy units clogging. They also have pitifully weak direct fire weapons.
Uploaded v270. Please let me know if that corrects the desync issue that was present in v269.
Small update:
- Support Base minimum number reduced to 2.
- Destroying support bases before build time is over only triggers negative random events, and may cause waves to start early.
- Some of UEF Atlantis' weapons can fire on surface targets.
- If navy spawn set to zero, but players build navy, counter naval units may spawn.
- EMP Tacs balanced. Reduced damage against HQ's and Support Bases.
About the drone stations, I'll have to check the script. The ASF response should only be against T3/T4 air units. The ASF response script is separate from the regular Air script, and does not reduce the amount of other air spawned.
The EMP launchers were a unit I introduced in a much earlier version, and no one ever really used, so I never bothered to balance. I am aware of their OP nature. The missiles cost the same as regular Tacs, as I never edited their costs. I was considering removing, as the Sera T4 Tacs are their balanced replacement, or making them a special weapon only unlocked after achieving a certain goal.
v268:
Navy:
-Some changes to late game Navy. Aircraft Carriers have all been given weak Direct Fire weapons so that they offer some threat to ships and structures, and have shrunk by 75% in size (their size can cause log jams). Nuclear subs all have long range torpedoes to attack naval vessels. A larger percentage of Naval vessels will choose a stand-off range to attack. And T2 Navy will continue to spawn, even in late game. These changes should help to make late game naval battles more interesting.
Dooms:
-On death, the storms left by Dooms will act as Rifts and spawn in T3 units that will disperse and attack players. Electron Storms that spawn randomly around the map have an increased chance of spawning in player's bases.
Wave Tech Progression Option:
-Reorganized so that slowing the tech progression is listed first.
Satellites/CZARS:
-Upped their damaged to 40% normal versus Dooms, Support Bases, and HQs. Previously it was 33%.
Over-Charge:
-Increased to 3x damage vs Dooms. Can do significant damage with enough energy storage.
- The nuke launchers spawn in, launch, and self-destruct. They aren't meant to be destroyable.
- Support Bases: I was actually considering improving their defenses! Actually, I was going to cap the max number of buildings they spawn in.
- Rifts: I was planning to add some more settings for the rifts.
- 2nd Spawn Settings: Yeah, they are a hassle, but allow for highly customized settings. It is a great way to set a secondary target that will weaken waves or open up avenues of attack for teams that successfully destroy. That is the idea, anyways. The customization also helps with hosting on oddly shaped maps or to limit waves from certain directions.
- Wave Tech Progression: I make the same mistake, and will probably change this around.
- ACU Hunters: I added those as a counter to high level players, as they go after players with lots of SACUs. Their spawn time can be delayed and their numbers reduced. I have nerfed them several times, so will consider lowering their health. But then I would be tempted to add stun to their death explosions! (That was in the original idea, but would be a nightmare for front players.)
- Thematic Suggestions: I've always left that up to the host to decide. I am currently looking into a Hybrid Hold To Win endgame option, where once the HQ takes a certain % of damage, difficulty will ramp up, but a time will starts that teams need to survive till to win.
- T3 Navy: Yeah, that stage was kinda boring. I've added T2 Navy into later Navy stages. Been meaning to do so, as there are some useful T2 navy ships. Also adjusted the behavior of Navy. An increased number of Navy ships will choose stand-off range against targets. The aircraft carriers are useful for AA and TMD, but their ability to not do direct fire is a limitation. I changed the aircraft carriers and nuclear subs to have weak direct attack weapons.
ACU Hunter Bots:
Reduced their torpedo damage by 20%. They have a habit of wiping out entire navies.
Added New T3 Heavy Cruisers to give naval players a few more options. These units also will appear in waves:
-Cybran T3 Heavy Cruiser: A good mix of weapons for submerged, surface, and air threats. Able to walk on land. Can beat the UEF Neptune T3 Cruiser at range, but will lose in close distance fights. Good Intel support.
-Seraphim T3 Missile Cruiser: Long-range tracking missiles effective at hitting moving targets and very good AA weapons. When toe-to-toe with an Aeon Torrent T3 Cruiser, both will eliminate one another. Good Intel support.
I started with no modding experience and only very minimal coding experience. Being a total noob, I found this (somewhat outdated) guide a very useful starting point.
https://supcom.fandom.com/wiki/Unit_Creation.
Next was having a list of all the Supreme Commander LUA functions. Since the list doesn't really explain how these functions work, I would then search the FA GitHub to see how others had implemented them (note: you need to create a free GitHub account to be able to search for code).
List of SC Lua functions:
https://supcom.fandom.com/wiki/LUADOC_1.5.3599
FA GitHub:
https://github.com/FAForever
And another useful step that is really helpful is to download a mod that is similar to what you are wanting to do and study their code to see how it is set up. Like, if you want to add your own unit, download a mod that adds a single new unit and see how the folders are organized, etc.
Then, when you try running your mod and nothing happens, pull up the FAF log of the game and search for "error". If there are errors in your mod, it will usually tell you the exact line and function to check.
One more useful resource is the Unit Database, if you are working on units. You can quickly check the GitHub of the unit, which will bring you to the unit's blueprint file. From there, you can quickly access the unit's script. If you aren't sure how to get something working, just check how a current unit that has those abilities works and use that as a template.
https://faforever.github.io/spooky-db/#/
This is a useful guide explaining what does what in the blueprint file.
https://wiki.faforever.com/en/Development/Modding/Blueprints