Greetings! As a modder from the 9CCN team, bugs related to effects(those defined in ship tuning’s .effect files) are spotted for quite a while. I’ve managed to get rid of them first with differenct approaches, but our recent modding reveals more “gone FXs” frequently. And now, I’ve come up with a simple gamerule script to demostrate this bug - it happens 100% as long as the conditions meet.
The main issue of this bug is that in SOME CONDITIONS, a ship’s “EFFECTS” would completely vanish, this includes firing, death, and all the stuffs that are defined in the ship’s .effect file.
Shots of the bug triggered
1-Conditions that cause this
This bug is spotted under different conditions. In the creation of mod FXLF(FX:Legendary Fleet), I met strange things that the 9CCN ships that I manually added into the persistXX.lua for testing(the starting fleets of campaign) has no effects, but PERFORMING A HYPERSPACE JUMP can solve this. I didn’t paid much attention to this since this is just for testing.
However, in later modding this bug showed up again. After some testing, I wrote this gamerule script for easy reproduction of the bug.
Get the script here:
Place it in Data\leveldata\multiplayer
Add the -overrideBigFile command
Start a Skirmish with race HIIGARA, and rule Classical Homeworld 2
As far as I know, this bug happens when a ship RECIEVES ORDERS(move, attack ,etc) when it is EXITING HYPERSPACE.
Let’s look at the script:
... SobGroup_Create("Mothership") Player_FillShipsByType("Mothership", 0, "hgn_mothership")--get the mothership SobGroup_CreateShip("Mothership", "hgn_battlecruiser") SobGroup_Create("HBCs") Player_FillShipsByType("HBCs", 0, "hgn_battlecruiser") SobGroup_Move(0, "HBCs", "Mid_Pos") -- I used the SobGroup_CreateShip function above to add a HBC in the "Mothership" Sobgroup, and the BC jumps in since there's no dockpath for it. --In the last line, issuing "SobGroup_Move" will make the BC move. Conditions meet here, and the BC lost all its effects. SobGroup_Create("VBOM"..UX_demo_times) SobGroup_SpawnNewShipInSobGroup(0,"vgr_bomber","VBOMSQUAD_"..UX_demo_times,"VBOM"..UX_demo_times, "Mid_Pos") SobGroup_SpawnNewShipInSobGroup(0, "vgr_battlecruiser","VBCSQUAD_"..UX_demo_times, "VBOM"..UX_demo_times, "Mid_Pos") SobGroup_SpawnNewShipInSobGroup(0, "vgr_assaultfrigate","VFFSQUAD_"..UX_demo_times, "VBOM"..UX_demo_times, "Mid_Pos") SobGroup_SpawnNewShipInSobGroup(0, "kus_carrier","KCVSQUAD_"..UX_demo_times, "VBOM"..UX_demo_times, "Mid_Pos") SobGroup_ParadeSobGroup("VBOM"..UX_demo_times, "Mothership", 1) SobGroup_MoveToSobGroup("VBOM"..UX_demo_times, "Mothership") end --Here is another demo that uses "SobGroup_ParadeSobGroup" 's pattern "1" which will make units HYPERSPACE PARADE with Mothership group. the move order after it completes the condition as well.
I personally consider this bug as something like “unfinished hyperspacing”. It should be noticed that once a ship losts its effect, docking won’t help. The only known way to restore this is make the ship JUMP AGAIN. You can orer the Kushan carrier to jump and see its effect back.
(#if you dock the Vaygr bomber with Kushan carrier and make the carrier jump, the bombers won’t be fixed.)
One Carrier's FXs are back after hyperspacing.
Also, if you quote the two lines that make the sobgroup move
then the bug won’t happen. In normal hyperspace exit you should have NO CONTROL of the ship. However scripts can do this, and once the move functions are called, player control is restored even when the hyperspacing is not finished.
In current FXMOD Series, we’re using alternate approaches to solve this. In FXLF’s Survival, I created “jumpholes” that are far away from the map and make units spawn there first, and then jump them to positions within the map range.
FX Galaxy’s Balcora Gate has the same issue (but we don’t know why - there could be more conditions to trigger this maybe?) and we’re currently using an instant-replacing script to solve this(that’s really a bad approach I think).
These conditions mentioned above(e.g. hyperspace spawning ships with either CreateShip or Parade) are very frequent in modding, and the bug really have a strong influence(we’ve also spotted AI’s ships lost their FXs, maybe AI issued order when their ships are currently hyperspacing?).
Wish GBX could notice this and give it a fix!