[DISCUSSION] A new thought on faking shields

Hi All,

Spent the afternoon on this concept which, while it seems to hold together logically is not performing as expected.

I have added a subsystem to my Federation flagship that is supposed to be acting as a health reservoir. When the ship is attacked the percentage lost is calculated and taken from the subsystem, and granted to the ship. Expected result is that the subsystem HP is drained and then the ship HP gets drained after that.

Actual result is that both the ship and subsystem stay at 100% health. I am assuming it is because SobGroup_SetHealth also sets the health of any subsystems on the ship. I am hoping that it’s an error of mine though that other practiced minds could point out!

Here’s my function:

function shieldUpdate(CustomGroup, playerIndex, shipID)

	local shipHP = SobGroup_HealthPercentage(CustomGroup)
	local shieldHP = SobGroup_GetHardPointHealth(CustomGroup, "Shield")
	
	if (shieldHP > 0) then

		print(">> Initital State >> | "..SOB_tShips[shipID].sShipClass.." belonging to player "..playerIndex.." has shipHP of "..shipHP.." and shieldHP of "..shieldHP)
		
		if (shipHP < 1) then
		
			local shipMissingHP = 1 - shipHP
			
			print(">> Missing Health >> | "..SOB_tShips[shipID].sShipClass.." belonging to player "..playerIndex.." has lost "..shipMissingHP.." health")
			
			if (shipMissingHP > 0) then
			
				local shieldNewHP = shieldHP - shipMissingHP
				local shipNewHP = shipHP + shipMissingHP
				
				print(">> New Shield HP >> | "..shieldNewHP.." ("..shieldHP.." - "..shipMissingHP..")")
				print(">> New Ship HP >> | "..shipNewHP.." ("..shipHP.." + "..shipMissingHP..")")
				
				SobGroup_SetHealth(CustomGroup, shipNewHP)
				
				if (shieldNewHP > 0) then 
					SobGroup_SetHardPointHealth(CustomGroup, "Shield", shieldNewHP)
				else
					SobGroup_SetHardPointHealth(CustomGroup, "Shield", 0)
				end
				
				print(">> Final State >> | "..SOB_tShips[shipID].sShipClass.." belonging to player "..playerIndex.." now has shipHP of "..shipNewHP.." and shieldHP of "..shieldNewHP)
				
			end
		
		end
		
	end

end

Thoughts?

I don’t see any good reason it should be behaving that way unless it’s the issue you’re supposing it is. one thing I’d try is to set the interval on the script to something longer like a full second or five, and see how the behavior of it’s health bars look under fire then. It might provide some insight, but it’s definitely fishing.

One thing you could do, though it’s very far from ideal, is to keep shield state entirely in script-side tables, and control of the existance or nonexistance of a shield subsystem that way. But I’m not sure how well that’d hold up when happening to every ship in the game.

1 Like

Testing with a shield value stored in the ship table lets the value of the shield recede… and it maintains the ship health until the other “shield” value is depleted… it just means that I’m going to have to take another approach… not using the subsystem at all perhaps :thinking:

There’s the question of where/how to get it to recharge if the subsystem isn’t handling that, and how to show a second blue health bar for the shields that is tied into that value… :thinking:

I must cogitate on this further!

can you show the output from your script?

Here’s the log from my last test, using a table to hold the ship’s shield value instead of relying on the subsystem health to hold the value

Last test
Wed Feb 05 20:02:55 2020
 Version 2.1, Build Number 31, Changelist Number 1237961 
 Loaded Archive: 'Homeworld2.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateHomeworld2.big' 
 Loaded Archive: 'HW1Ships.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateHW1Ships.big' 
 Loaded Archive: 'HW2Ships.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateHW2Ships.big' 
 Loaded Archive: 'HWBackgrounds.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateHWBackgrounds.big' 
 Loaded Archive: 'English.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateEnglish.big' 
 Failed to Load Archive '..\..\DATAUPDATES\Compatibility.big' 
 LOCALIZER -- Duplicate string line 1579 in LOCALE:ui.dat 
 Uing ..profiles\ for profiles folder 
 GAME -- Using player profile Nathanius 
 Changing from a 32 bit colour depth in winNT (6.2 build 9200), 
 Display: (0, 0, 3840, 2160) - (0, 0) 
 Switching to a 3840x2160 32bit mode 
 GL Info: 4.6 - 4.6.0 NVIDIA 441.66 
 GL Vendor: NVIDIA Corporation 
 GL Renderer: GeForce GTX 1070/PCIe/SSE2 
 GL Part ID: 1070 
 GL Part EX: /PCIe/SSE2 
 Loaded Archive: 'EnglishSpeech.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateEnglishSpeech.big' 
 Loaded Archive: 'Music.big' 
 Failed to Load Archive '..\..\DATAUPDATES\UpdateMusic.big' 
 SOUND -- created destination [ fdaudio ], handle [ 4 ] with [ 48 ] channels created 
 SOUND -- created destination [ fda streamer ], handle [ 5 ] with [ 8 ] channels created 
 SOUND -- created destination [ dxa streamer ], handle [ 0 ] with [ 8 ] channels created 
 SOUND -- created destination [ dxaudio ], handle [ 1 ] with [ 48 ] channels created 
 Build name: 
 Data path : D:\Modding Tools\HW2TREKMOD\HWRM\STC - 2380 
 Font Load: data:UI\Font\Blender.rcf, 3840,2160 
 Font Attr: 14, Biu 
 No mapping for font 'LCARS' - using 'default' 
 No mapping for font 'Blender' - using 'default' 
 Unabled to find data:../../../../workshop/content/244160/759628723/STC_Logo.webm 
 Resetting fp PC control word. 
 CmdLine: -datapath D:\Modding Tools\HW2TREKMOD\HWRM\STC - 2380 -overrideBigFile -luatrace -mpbeta 
 11 Races Discovered 
 >> MAIN >> | Extended music playlist available 
 Race Filtering: STC_DEATHMATCH_TNG rules - @Deathmatch 
 Starting Level: DATA:\LevelData\Multiplayer\stc_deathmatch\Jupiter.level 
 Font Load: data:UI\Font\SmallFonts7.rcf, 3840,2160 
 Font Attr: 14, Biu 
 >> MAIN >> | Extended music playlist available 
 Unable to retrieve UI (animated) texture () 
 >> MAIN >> | Extended music playlist available 
 >> MAIN >> | The seed is 811396 
 >> MUSIC >> | 20 Ambient music tracks compiled for Federation player 
 >> MUSIC >> | 20 Battle music tracks compiled for Federation player 
 >> MUSIC >> | Switching to ambient music... 
 >> MUSIC >> | Now playing: Data:sound/music/trek/TNG/ambient/federation/fed_TNG_ambient_track009 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_shuttlepod with an ID of 800 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 816 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 832 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_bomber with an ID of 848 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 864 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_repairship with an ID of 880 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 896 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 912 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 928 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 1 
 >> MUSIC >> | Switching to battle music... 
 >> MUSIC >> | Now playing: Data:sound/music/trek/TNG/battle/federation/fed_TNG_battle_track007 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9939152598381043 and shieldHP of 1 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.006084740161895752 health 
 >> New Shield HP >> | 0.9939152598381043 (1 - 0.006084740161895752) 
 >> New Ship HP >> | 1 (0.9939152598381043 + 0.006084740161895752) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9939152598381043 
 >> STARSHIP >> | Player 1 has built car_TNG_repairship with an ID of 944 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9936802983283997 and shieldHP of 0.9939152598381043 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.006319701671600342 health 
 >> New Shield HP >> | 0.9875955581665039 (0.9939152598381043 - 0.006319701671600342) 
 >> New Ship HP >> | 1 (0.9936802983283997 + 0.006319701671600342) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9875955581665039 
 >> RESEARCH >> | Research completed by Player: 1, Research: car_TNG_CorvetteTech_F 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 960 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.9875955581665039 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.9875955581665039 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9947434067726135 and shieldHP of 0.9875955581665039 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.005256593227386475 health 
 >> New Shield HP >> | 0.9823389649391174 (0.9875955581665039 - 0.005256593227386475) 
 >> New Ship HP >> | 1 (0.9947434067726135 + 0.005256593227386475) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9823389649391174 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9788656234741211 and shieldHP of 0.9823389649391174 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02113437652587891 health 
 >> New Shield HP >> | 0.9612045884132385 (0.9823389649391174 - 0.02113437652587891) 
 >> New Ship HP >> | 1 (0.9788656234741211 + 0.02113437652587891) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9612045884132385 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9814475774765015 and shieldHP of 0.9612045884132385 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01855242252349854 health 
 >> New Shield HP >> | 0.94265216588974 (0.9612045884132385 - 0.01855242252349854) 
 >> New Ship HP >> | 1 (0.9814475774765015 + 0.01855242252349854) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.94265216588974 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9741392731666565 and shieldHP of 0.94265216588974 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02586072683334351 health 
 >> New Shield HP >> | 0.9167914390563965 (0.94265216588974 - 0.02586072683334351) 
 >> New Ship HP >> | 1 (0.9741392731666565 + 0.02586072683334351) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9167914390563965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9954561591148377 and shieldHP of 0.9167914390563965 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004543840885162354 health 
 >> New Shield HP >> | 0.9122475981712341 (0.9167914390563965 - 0.004543840885162354) 
 >> New Ship HP >> | 1 (0.9954561591148377 + 0.004543840885162354) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9122475981712341 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.9122475981712341 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.9122475981712341 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9923226833343506 and shieldHP of 0.9122475981712341 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.007677316665649414 health 
 >> New Shield HP >> | 0.9045702815055847 (0.9122475981712341 - 0.007677316665649414) 
 >> New Ship HP >> | 1 (0.9923226833343506 + 0.007677316665649414) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.9045702815055847 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecollector with an ID of 976 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.995422899723053 and shieldHP of 0.9045702815055847 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004577100276947022 health 
 >> New Shield HP >> | 0.8999931812286377 (0.9045702815055847 - 0.004577100276947022) 
 >> New Ship HP >> | 1 (0.995422899723053 + 0.004577100276947022) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.8999931812286377 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.8999931812286377 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.8999931812286377 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9794864654541016 and shieldHP of 0.8999931812286377 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02051353454589844 health 
 >> New Shield HP >> | 0.8794796466827393 (0.8999931812286377 - 0.02051353454589844) 
 >> New Ship HP >> | 1 (0.9794864654541016 + 0.02051353454589844) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.8794796466827393 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9711673259735107 and shieldHP of 0.8794796466827393 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02883267402648926 health 
 >> New Shield HP >> | 0.85064697265625 (0.8794796466827393 - 0.02883267402648926) 
 >> New Ship HP >> | 1 (0.9711673259735107 + 0.02883267402648926) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.85064697265625 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9743902087211609 and shieldHP of 0.85064697265625 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02560979127883911 health 
 >> New Shield HP >> | 0.8250371813774109 (0.85064697265625 - 0.02560979127883911) 
 >> New Ship HP >> | 1 (0.9743902087211609 + 0.02560979127883911) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.8250371813774109 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecontroller with an ID of 992 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9847299456596375 and shieldHP of 0.8250371813774109 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01527005434036255 health 
 >> New Shield HP >> | 0.8097671270370483 (0.8250371813774109 - 0.01527005434036255) 
 >> New Ship HP >> | 1 (0.9847299456596375 + 0.01527005434036255) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.8097671270370483 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.8097671270370483 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 1008 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.8097671270370483 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.99232417345047 and shieldHP of 0.8097671270370483 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.007675826549530029 health 
 >> New Shield HP >> | 0.8020913004875183 (0.8097671270370483 - 0.007675826549530029) 
 >> New Ship HP >> | 1 (0.99232417345047 + 0.007675826549530029) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.8020913004875183 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9954622983932495 and shieldHP of 0.8020913004875183 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004537701606750488 health 
 >> New Shield HP >> | 0.7975535988807678 (0.8020913004875183 - 0.004537701606750488) 
 >> New Ship HP >> | 1 (0.9954622983932495 + 0.004537701606750488) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7975535988807678 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7975535988807678 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7975535988807678 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7975535988807678 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9923478960990906 and shieldHP of 0.7975535988807678 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.007652103900909424 health 
 >> New Shield HP >> | 0.7899014949798584 (0.7975535988807678 - 0.007652103900909424) 
 >> New Ship HP >> | 1 (0.9923478960990906 + 0.007652103900909424) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7899014949798584 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9849358797073364 and shieldHP of 0.7899014949798584 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01506412029266357 health 
 >> New Shield HP >> | 0.7748373746871948 (0.7899014949798584 - 0.01506412029266357) 
 >> New Ship HP >> | 1 (0.9849358797073364 + 0.01506412029266357) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7748373746871948 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.995273768901825 and shieldHP of 0.7748373746871948 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004726231098175049 health 
 >> New Shield HP >> | 0.7701111435890198 (0.7748373746871948 - 0.004726231098175049) 
 >> New Ship HP >> | 1 (0.995273768901825 + 0.004726231098175049) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7701111435890198 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7701111435890198 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7701111435890198 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7701111435890198 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9950112104415894 and shieldHP of 0.7701111435890198 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004988789558410645 health 
 >> New Shield HP >> | 0.7651223540306091 (0.7701111435890198 - 0.004988789558410645) 
 >> New Ship HP >> | 1 (0.9950112104415894 + 0.004988789558410645) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7651223540306091 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9796869158744812 and shieldHP of 0.7651223540306091 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.0203130841255188 health 
 >> New Shield HP >> | 0.7448092699050903 (0.7651223540306091 - 0.0203130841255188) 
 >> New Ship HP >> | 1 (0.9796869158744812 + 0.0203130841255188) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7448092699050903 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.989918053150177 and shieldHP of 0.7448092699050903 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.010081946849823 health 
 >> New Shield HP >> | 0.7347273230552673 (0.7448092699050903 - 0.010081946849823) 
 >> New Ship HP >> | 1 (0.989918053150177 + 0.010081946849823) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> STARSHIP >> | Player 1 has built car_TNG_resourcecontroller with an ID of 1024 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7347273230552673 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9950523972511292 and shieldHP of 0.7347273230552673 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.00494760274887085 health 
 >> New Shield HP >> | 0.7297797203063965 (0.7347273230552673 - 0.00494760274887085) 
 >> New Ship HP >> | 1 (0.9950523972511292 + 0.00494760274887085) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 1040 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.7297797203063965 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9963667392730713 and shieldHP of 0.7297797203063965 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.003633260726928711 health 
 >> New Shield HP >> | 0.7261464595794678 (0.7297797203063965 - 0.003633260726928711) 
 >> New Ship HP >> | 1 (0.9963667392730713 + 0.003633260726928711) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7261464595794678 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9919015765190125 and shieldHP of 0.7261464595794678 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.008098423480987549 health 
 >> New Shield HP >> | 0.7180480360984802 (0.7261464595794678 - 0.008098423480987549) 
 >> New Ship HP >> | 1 (0.9919015765190125 + 0.008098423480987549) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7180480360984802 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9998798370361328 and shieldHP of 0.7180480360984802 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.0001201629638671875 health 
 >> New Shield HP >> | 0.717927873134613 (0.7180480360984802 - 0.0001201629638671875) 
 >> New Ship HP >> | 1 (0.9998798370361328 + 0.0001201629638671875) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.717927873134613 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.717927873134613 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.717927873134613 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9963736534118652 and shieldHP of 0.717927873134613 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.003626346588134766 health 
 >> New Shield HP >> | 0.7143015265464783 (0.717927873134613 - 0.003626346588134766) 
 >> New Ship HP >> | 1 (0.9963736534118652 + 0.003626346588134766) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.7143015265464783 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9536401033401489 and shieldHP of 0.7143015265464783 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.04635989665985107 health 
 >> New Shield HP >> | 0.6679416298866272 (0.7143015265464783 - 0.04635989665985107) 
 >> New Ship HP >> | 1 (0.9536401033401489 + 0.04635989665985107) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.6679416298866272 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.8843786120414734 and shieldHP of 0.6679416298866272 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.1156213879585266 health 
 >> New Shield HP >> | 0.5523202419281006 (0.6679416298866272 - 0.1156213879585266) 
 >> New Ship HP >> | 1 (0.8843786120414734 + 0.1156213879585266) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.5523202419281006 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.5523202419281006 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.8648843765258789 and shieldHP of 0.5523202419281006 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.1351156234741211 health 
 >> New Shield HP >> | 0.4172046184539795 (0.5523202419281006 - 0.1351156234741211) 
 >> New Ship HP >> | 1 (0.8648843765258789 + 0.1351156234741211) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.4172046184539795 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.991064190864563 and shieldHP of 0.4172046184539795 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.008935809135437012 health 
 >> New Shield HP >> | 0.4082688093185425 (0.4172046184539795 - 0.008935809135437012) 
 >> New Ship HP >> | 1 (0.991064190864563 + 0.008935809135437012) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.4082688093185425 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9087858200073242 and shieldHP of 0.4082688093185425 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.09121417999267578 health 
 >> New Shield HP >> | 0.3170546293258667 (0.4082688093185425 - 0.09121417999267578) 
 >> New Ship HP >> | 1 (0.9087858200073242 + 0.09121417999267578) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.3170546293258667 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9945895075798035 and shieldHP of 0.3170546293258667 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.005410492420196533 health 
 >> New Shield HP >> | 0.3116441369056702 (0.3170546293258667 - 0.005410492420196533) 
 >> New Ship HP >> | 1 (0.9945895075798035 + 0.005410492420196533) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.3116441369056702 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9793428778648377 and shieldHP of 0.3116441369056702 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02065712213516235 health 
 >> New Shield HP >> | 0.2909870147705078 (0.3116441369056702 - 0.02065712213516235) 
 >> New Ship HP >> | 1 (0.9793428778648377 + 0.02065712213516235) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.2909870147705078 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9791832566261292 and shieldHP of 0.2909870147705078 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02081674337387085 health 
 >> New Shield HP >> | 0.270170271396637 (0.2909870147705078 - 0.02081674337387085) 
 >> New Ship HP >> | 1 (0.9791832566261292 + 0.02081674337387085) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.270170271396637 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9825005531311035 and shieldHP of 0.270170271396637 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01749944686889648 health 
 >> New Shield HP >> | 0.2526708245277405 (0.270170271396637 - 0.01749944686889648) 
 >> New Ship HP >> | 1 (0.9825005531311035 + 0.01749944686889648) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.2526708245277405 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9919122457504273 and shieldHP of 0.2526708245277405 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.008087754249572754 health 
 >> New Shield HP >> | 0.2445830702781677 (0.2526708245277405 - 0.008087754249572754) 
 >> New Ship HP >> | 1 (0.9919122457504273 + 0.008087754249572754) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.2445830702781677 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 1056 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9770339131355286 and shieldHP of 0.2445830702781677 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02296608686447144 health 
 >> New Shield HP >> | 0.2216169834136963 (0.2445830702781677 - 0.02296608686447144) 
 >> New Ship HP >> | 1 (0.9770339131355286 + 0.02296608686447144) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.2216169834136963 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9900962114334106 and shieldHP of 0.2216169834136963 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.009903788566589356 health 
 >> New Shield HP >> | 0.2117131948471069 (0.2216169834136963 - 0.009903788566589356) 
 >> New Ship HP >> | 1 (0.9900962114334106 + 0.009903788566589356) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.2117131948471069 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.2117131948471069 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9963650107383728 and shieldHP of 0.2117131948471069 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.003634989261627197 health 
 >> New Shield HP >> | 0.2080782055854797 (0.2117131948471069 - 0.003634989261627197) 
 >> New Ship HP >> | 1 (0.9963650107383728 + 0.003634989261627197) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.2080782055854797 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9918765425682068 and shieldHP of 0.2080782055854797 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.008123457431793213 health 
 >> New Shield HP >> | 0.1999547481536865 (0.2080782055854797 - 0.008123457431793213) 
 >> New Ship HP >> | 1 (0.9918765425682068 + 0.008123457431793213) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1999547481536865 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9998918175697327 and shieldHP of 0.1999547481536865 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.000108182430267334 health 
 >> New Shield HP >> | 0.1998465657234192 (0.1999547481536865 - 0.000108182430267334) 
 >> New Ship HP >> | 1 (0.9998918175697327 + 0.000108182430267334) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1998465657234192 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9950743317604065 and shieldHP of 0.1998465657234192 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004925668239593506 health 
 >> New Shield HP >> | 0.1949208974838257 (0.1998465657234192 - 0.004925668239593506) 
 >> New Ship HP >> | 1 (0.9950743317604065 + 0.004925668239593506) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1949208974838257 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.1949208974838257 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.1949208974838257 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9896496534347534 and shieldHP of 0.1949208974838257 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01035034656524658 health 
 >> New Shield HP >> | 0.1845705509185791 (0.1949208974838257 - 0.01035034656524658) 
 >> New Ship HP >> | 1 (0.9896496534347534 + 0.01035034656524658) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1845705509185791 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9898816347122192 and shieldHP of 0.1845705509185791 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01011836528778076 health 
 >> New Shield HP >> | 0.1744521856307983 (0.1845705509185791 - 0.01011836528778076) 
 >> New Ship HP >> | 1 (0.9898816347122192 + 0.01011836528778076) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1744521856307983 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9760943055152893 and shieldHP of 0.1744521856307983 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02390569448471069 health 
 >> New Shield HP >> | 0.1505464911460877 (0.1744521856307983 - 0.02390569448471069) 
 >> New Ship HP >> | 1 (0.9760943055152893 + 0.02390569448471069) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1505464911460877 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9705585241317749 and shieldHP of 0.1505464911460877 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.0294414758682251 health 
 >> New Shield HP >> | 0.1211050152778626 (0.1505464911460877 - 0.0294414758682251) 
 >> New Ship HP >> | 1 (0.9705585241317749 + 0.0294414758682251) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1211050152778626 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9935846924781799 and shieldHP of 0.1211050152778626 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.006415307521820068 health 
 >> New Shield HP >> | 0.1146897077560425 (0.1211050152778626 - 0.006415307521820068) 
 >> New Ship HP >> | 1 (0.9935846924781799 + 0.006415307521820068) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1146897077560425 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.1146897077560425 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.1146897077560425 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9971925020217896 and shieldHP of 0.1146897077560425 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.002807497978210449 health 
 >> New Shield HP >> | 0.111882209777832 (0.1146897077560425 - 0.002807497978210449) 
 >> New Ship HP >> | 1 (0.9971925020217896 + 0.002807497978210449) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.111882209777832 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9919211268424988 and shieldHP of 0.111882209777832 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.008078873157501221 health 
 >> New Shield HP >> | 0.1038033366203308 (0.111882209777832 - 0.008078873157501221) 
 >> New Ship HP >> | 1 (0.9919211268424988 + 0.008078873157501221) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1038033366203308 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9990005493164063 and shieldHP of 0.1038033366203308 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.00099945068359375 health 
 >> New Shield HP >> | 0.1028038859367371 (0.1038033366203308 - 0.00099945068359375) 
 >> New Ship HP >> | 1 (0.9990005493164063 + 0.00099945068359375) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.1028038859367371 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.1028038859367371 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.1028038859367371 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9817072749137878 and shieldHP of 0.1028038859367371 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01829272508621216 health 
 >> New Shield HP >> | 0.0845111608505249 (0.1028038859367371 - 0.01829272508621216) 
 >> New Ship HP >> | 1 (0.9817072749137878 + 0.01829272508621216) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.0845111608505249 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9706018567085266 and shieldHP of 0.0845111608505249 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02939814329147339 health 
 >> New Shield HP >> | 0.05511301755905151 (0.0845111608505249 - 0.02939814329147339) 
 >> New Ship HP >> | 1 (0.9706018567085266 + 0.02939814329147339) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.05511301755905151 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9936248064041138 and shieldHP of 0.05511301755905151 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.006375193595886231 health 
 >> New Shield HP >> | 0.04873782396316528 (0.05511301755905151 - 0.006375193595886231) 
 >> New Ship HP >> | 1 (0.9936248064041138 + 0.006375193595886231) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.04873782396316528 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.04873782396316528 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9950311183929443 and shieldHP of 0.04873782396316528 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.004968881607055664 health 
 >> New Shield HP >> | 0.04376894235610962 (0.04873782396316528 - 0.004968881607055664) 
 >> New Ship HP >> | 1 (0.9950311183929443 + 0.004968881607055664) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.04376894235610962 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9971769452095032 and shieldHP of 0.04376894235610962 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.002823054790496826 health 
 >> New Shield HP >> | 0.04094588756561279 (0.04376894235610962 - 0.002823054790496826) 
 >> New Ship HP >> | 1 (0.9971769452095032 + 0.002823054790496826) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.04094588756561279 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 1072 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9866450428962708 and shieldHP of 0.04094588756561279 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01335495710372925 health 
 >> New Shield HP >> | 0.02759093046188355 (0.04094588756561279 - 0.01335495710372925) 
 >> New Ship HP >> | 1 (0.9866450428962708 + 0.01335495710372925) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.02759093046188355 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9989888072013855 and shieldHP of 0.02759093046188355 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.001011192798614502 health 
 >> New Shield HP >> | 0.02657973766326904 (0.02759093046188355 - 0.001011192798614502) 
 >> New Ship HP >> | 1 (0.9989888072013855 + 0.001011192798614502) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.02657973766326904 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.02657973766326904 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 1 and shieldHP of 0.02657973766326904 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9947674870491028 and shieldHP of 0.02657973766326904 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.005232512950897217 health 
 >> New Shield HP >> | 0.02134722471237183 (0.02657973766326904 - 0.005232512950897217) 
 >> New Ship HP >> | 1 (0.9947674870491028 + 0.005232512950897217) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.02134722471237183 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.97934889793396 and shieldHP of 0.02134722471237183 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.02065110206604004 health 
 >> New Shield HP >> | 0.0006961226463317871 (0.02134722471237183 - 0.02065110206604004) 
 >> New Ship HP >> | 1 (0.97934889793396 + 0.02065110206604004) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of 0.0006961226463317871 
 >> Initital State >> | fed_TNG_flagship belonging to player 0 has shipHP of 0.9899906516075134 and shieldHP of 0.0006961226463317871 
 >> Missing Health >> | fed_TNG_flagship belonging to player 0 has lost 0.01000934839248657 health 
 >> New Shield HP >> | -0.009313225746154785 (0.0006961226463317871 - 0.01000934839248657) 
 >> New Ship HP >> | 1 (0.9899906516075134 + 0.01000934839248657) 
 >> Final State >> | fed_TNG_flagship belonging to player 0 now has shipHP of 1 and shieldHP of -0.009313225746154785 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 1088 
 >> STARSHIP >> | Player 1 has built car_TNG_fighter with an ID of 1104 
 >> MUSIC >> | Now playing: Data:sound/music/trek/TNG/battle/federation/fed_TNG_battle_track019 
 >> RESEARCH >> | Research completed by Player: 1, Research: car_TNG_FrigateTech_F 
 >> STARSHIP >> | Player 1 has built car_TNG_sartan with an ID of 1120 

So it looks like it’s working. This is presumably a better way of doing it than the subsystem anyway?

1 Like

Yes! As the number goes down at all :stuck_out_tongue:

keep in mind with this system, your shield HP is 1:1 with your ship HP

@radar3301 yes that’s true.

I can retrieve strings from a ship’s *.ship file by loading it when I’m building our SOB table for it with the “create” part of the custom command, storing the value (and a shield value) to be used in calculations but I’m not sure how much it’s worth doing.

In Star Trek the shields were used more as a tension mechanic by the writers than an actual means of protection, so there’s not much indication on if they doubled the life expectancy of a ship under fire or what. So I am thinking that I’ll have the shields as you described, 1:1 with the ship HP

Ok, ready for scruitiny! I am just needing to finish adapting the old “drop shields when cloaking” script that assumes the shields drop at 25% health and figure out a way to show the shield values in the UI

Script
dofilepath("data:scripts/continuum/lib/stc_dummyShipFunctions.lua")
dofilepath("data:scripts/continuum/lib/stc_cloak.lua")

function shieldUpdate(CustomGroup, playerIndex, shipID)

	local shipclass = SOB_tShips[shipID].sShipClass
	
	-- Retrieve the ship file content so we can refer to the armour family
	if (SOB_tShips[shipID].sArmourFamily == nil) then
		dofilepath("data:ship/"..shipclass.."/"..shipclass..".ship")
		SOB_tShips[shipID].sArmourFamily = NewShipType.ArmourFamily
	end
	
	-- If there's a shield set the global table value to a number
	if (SOB_tShips[shipID].sArmourFamily ~= "NoShieldArmour") and (SOB_tShips[shipID].fShieldHealth == nil) then
		SOB_tShips[shipID].fShieldHealth = 1
	end
	
	-- Do all the stuff for cloaking
	SHIELD_Cloak_Rule(CustomGroup, playerIndex, shipID)
	
	-- establish the ship and shield HP that we're working with
	local shipHP = SobGroup_HealthPercentage(CustomGroup)
	local storedShipHP = SOB_tShips[shipID].fShipHealth
	local shieldHP = SOB_tShips[shipID].fShieldHealth
	local underAttack = SobGroup_UnderAttack(CustomGroup)
	
	if (shieldHP ~= nil) then
		if (shieldHP > 0) then

			-- print(">> SHIELDS 01 >> | "..shipclass.." belonging to player "..playerIndex.." has shipHP of "..shipHP.." and shieldHP of "..shieldHP)
			
			if (underAttack == 1) and (shipHP < 1) then
			
				local shipMissingHP = SOB_tShips[shipID].fShipHealth - shipHP
				-- print(">> SHIELDS 02 - Ship Lost HP >> | "..shipMissingHP.." ("..SOB_tShips[shipID].fShipHealth.." - "..shipHP..")")
				
				-- -- print(">> SHIELDS 02 >> | "..shipclass.." belonging to player "..playerIndex.." has lost "..shipMissingHP.." health")
				
				if (shipMissingHP > 0) then
				
					local shieldNewHP = shieldHP - shipMissingHP
					local shipNewHP = shipHP + shipMissingHP
					-- print(">> SHIELDS 03 - New Shield HP >> | "..shieldNewHP.." ("..shieldHP.." - "..shipMissingHP..")")
					-- print(">> SHIELDS 04 - New Ship HP >> | "..shipNewHP.." ("..shipHP.." + "..shipMissingHP..")")
					
					-- Update the shipHP and the shieldHP
					if (shieldNewHP < 0) then
						SOB_tShips[shipID].fShieldHealth = 0
						-- This is the point that the shields fail, play the failure animation
						SobGroup_SetMadState(CustomGroup, "HyperspaceGateDeActivate")
						-- print(">> SHIELDS 05 >> | "..shipclass.." belonging to player "..playerIndex.." has lost shields")
					else
						SOB_tShips[shipID].fShieldHealth = shieldNewHP
					end
					
					SobGroup_SetHealth(CustomGroup, shipNewHP)
					SOB_tShips[shipID].fShipHealth = shipNewHP
									
					-- print(">> SHIELDS 06 >> | "..shipclass.." belonging to player "..playerIndex.." now has shipHP of "..shipNewHP.." and shieldHP of "..shieldNewHP)
					
				end
			end
				
			-- shields will only recharge when out of battle
			if (underAttack ~= 1) and (shieldHP < 1) then
			
				-- this is the recharge rate of the shields
				local shieldNewHP = shieldHP + 0.0001
		
				-- Update the shipHP and the shieldHP
				if (shieldNewHP > 1) then
					SOB_tShips[shipID].fShieldHealth = 1
				else
					SOB_tShips[shipID].fShieldHealth = shieldNewHP
				end
				
				-- Keep this value up to scratch too as there could be a repair ship on the job
				SOB_tShips[shipID].fShipHealth = shipHP
				
				-- print(">> SHIELDS 07 >> | "..shipclass.." belonging to player "..playerIndex.." now has shipHP of "..shipHP.." and shieldHP of "..shieldNewHP)
			
			end
		
		elseif (shieldHP == 0) then
			
			local shieldTimer = SOB_tShips[shipID].iShieldTimer
			local timerCount = 1000 -- ? seconds
			
			-- shields will restore on their own after ? seconds disabled
			if (shieldTimer < timerCount) then
			
				SOB_tShips[shipID].iShieldTimer = shieldTimer + 1
				-- print(">> SHIELDS 08 >> | "..shipclass.." belonging to player "..playerIndex.." has a shieldTimer value of "..shieldTimer)
			
			elseif (shieldTimer == timerCount) then
			
				-- shields up! They will randomly restore at 10% to 60% of capactiy 
				SOB_tShips[shipID].iShieldTimer = 0
				SOB_tShips[shipID].fShieldHealth = random(10,60)/100
				SOB_tShips[shipID].fShipHealth = shipHP -- make a note of the current ship health so we don't jump it back to 100%
				SobGroup_SetMadState(CustomGroup, "HyperspaceGateActivate")
				
				-- print(">> SHIELDS 09 >> | "..shipclass.." belonging to player "..playerIndex.." has restored shield to "..SOB_tShips[shipID].fShieldHealth)
				
			end
			
		end	
	end
end

That looks good to me. The proof I is in the pudding though - does it work as intended?

EDIT: if you are running this script on lots of ships, you can make it more efficient by using @radar3301 global custom code script…

1 Like

I saw @radar3301’s custom code library, it seems to be a variation of the same SOB grouping that Stargazer set up for us in the old HW2 modding days but as we’ve already got something like that I’d not looked into it too closely.

The shields do now work as intended, surprisingly! Today I am going to work on:

  • Shields drop when ships are disabled
  • Shields drop when ships are cloaked
  • Showing shield value in the UI, hopefully with another (blue) health bar

//EDIT
Except for the UI part, the script is now complete :smiley:

Script
dofilepath("data:scripts/continuum/lib/stc_dummyShipFunctions.lua")
dofilepath("data:scripts/continuum/lib/stc_cloak.lua")

function shieldUpdate(CustomGroup, playerIndex, shipID)

	local shipclass = SOB_tShips[shipID].sShipClass
	
	-- Retrieve the ship file content so we can refer to the armour family
	if (SOB_tShips[shipID].sArmourFamily == nil) then
		dofilepath("data:ship/"..shipclass.."/"..shipclass..".ship")
		SOB_tShips[shipID].sArmourFamily = NewShipType.ArmourFamily
	end
	
	-- If there's a shield set the global table value to a number
	if (SOB_tShips[shipID].sArmourFamily ~= "NoShieldArmour") and (SOB_tShips[shipID].fShieldHealth == nil) then
		SOB_tShips[shipID].fShieldHealth = 1
	end
		
	-- establish the ship and shield HP that we're working with
	local shipHP = SobGroup_HealthPercentage(CustomGroup)
	local storedShipHP = SOB_tShips[shipID].fShipHealth
	local shieldHP = SOB_tShips[shipID].fShieldHealth
	local underAttack = SobGroup_UnderAttack(CustomGroup)
	local cloakStatus = SOB_tShips[shipID].iCloakStatus
	if (SobGroup_CanDoAbility(CustomGroup, AB_Steering) == 0) and (SobGroup_CanDoAbility(CustomGroup, AB_Targeting) == 0) then
		local disabledStatus = 1
	else
		local disabledStatus = 0
	end
	
	-- If the ship has shields and is not cloaked
	if (shieldHP ~= nil and cloakStatus == 0) then
		if (disabledStatus == 1) then
			-- print(>> SHIELDS 01 >> | "..shipclass.." belonging to player "..playerIndex.." is disabled! Wiping out shield HP")
			SOB_tShips[shipID].fShieldHealth = 0
		else
			if (shieldHP > 0) then

				-- print(">> SHIELDS 01 >> | "..shipclass.." belonging to player "..playerIndex.." has shipHP of "..shipHP.." and shieldHP of "..shieldHP.." and Cloak Status of "..cloakStatus)
				
				if (underAttack == 1) and (shipHP < 1) then
				
					local shipMissingHP = storedShipHP - shipHP
					-- print(">> SHIELDS 02 - Ship Lost HP >> | "..shipMissingHP.." ("..storedShipHP.." - "..shipHP..")")
					
					-- -- print(">> SHIELDS 02 >> | "..shipclass.." belonging to player "..playerIndex.." has lost "..shipMissingHP.." health")
					
					if (shipMissingHP > 0) then
					
						local shieldNewHP = shieldHP - shipMissingHP
						local shipNewHP = shipHP + shipMissingHP
						-- print(">> SHIELDS 03 - New Shield HP >> | "..shieldNewHP.." ("..shieldHP.." - "..shipMissingHP..")")
						-- print(">> SHIELDS 04 - New Ship HP >> | "..shipNewHP.." ("..shipHP.." + "..shipMissingHP..")")
						
						-- Update the shipHP and the shieldHP
						if (shieldNewHP < 0) then
							SOB_tShips[shipID].fShieldHealth = 0
							-- This is the point that the shields fail, play the failure animation
							SobGroup_SetMadState(CustomGroup, "HyperspaceGateDeActivate")
							-- print(">> SHIELDS 05 >> | "..shipclass.." belonging to player "..playerIndex.." has lost shields")
						else
							SOB_tShips[shipID].fShieldHealth = shieldNewHP
						end
						
						SobGroup_SetHealth(CustomGroup, shipNewHP)
						SOB_tShips[shipID].fShipHealth = shipNewHP
										
						-- print(">> SHIELDS 06 >> | "..shipclass.." belonging to player "..playerIndex.." now has shipHP of "..shipNewHP.." and shieldHP of "..shieldNewHP.." and Cloak Status of "..cloakStatus)
						
					end
				end
					
				-- shields will only recharge when out of battle
				if (underAttack ~= 1) and (shieldHP < 1) then
				
					-- this is the recharge rate of the shields
					local shieldNewHP = shieldHP + 0.0001
			
					-- Update the shipHP and the shieldHP
					if (shieldNewHP > 1) then
						SOB_tShips[shipID].fShieldHealth = 1
					else
						SOB_tShips[shipID].fShieldHealth = shieldNewHP
					end
					
					-- Keep this value up to scratch too as there could be a repair ship on the job
					SOB_tShips[shipID].fShipHealth = SobGroup_HealthPercentage(CustomGroup)
					
					-- print(">> SHIELDS 07 >> | "..shipclass.." belonging to player "..playerIndex.." now has shipHP of "..shipHP.." and shieldHP of "..shieldNewHP.." and Cloak Status of "..cloakStatus)
				
				end
			
			elseif (shieldHP == 0) then
				
				local shieldTimer = SOB_tShips[shipID].iShieldTimer
				local timerCount = 1000 -- ? seconds
				
				-- shields will restore on their own after ? seconds disabled
				if (shieldTimer < timerCount) then
				
					SOB_tShips[shipID].iShieldTimer = shieldTimer + 1
					-- print(">> SHIELDS 08 >> | "..shipclass.." belonging to player "..playerIndex.." has a shieldTimer value of "..shieldTimer)
				
				elseif (shieldTimer == timerCount) then
				
					-- shields up! They will randomly restore at 10% to 60% of capactiy 
					SOB_tShips[shipID].iShieldTimer = 0
					SOB_tShips[shipID].fShieldHealth = random(10,60)/100
					SOB_tShips[shipID].fShipHealth = SobGroup_HealthPercentage(CustomGroup) -- make a note of the current ship health so we don't jump it back to 100%
					SobGroup_SetMadState(CustomGroup, "HyperspaceGateActivate")
					
					-- print(">> SHIELDS 09 >> | "..shipclass.." belonging to player "..playerIndex.." has restored shield to "..SOB_tShips[shipID].fShieldHealth)
					
				end
				
			end	
		end
	end
	
	-- Check for the cloak stuff
	SHIELD_Cloak_Rule(CustomGroup, playerIndex, shipID)
	
end

X system provides a similar shield function. And it can display how many percent the shield left.

You guys are ahead of me there then! :smiley:

Can you share here how you display the remaining shields? That’s my next task… UI!

//Edit
Oh… you’re using pings… I see… :thinking:
I was hoping to use an ATI overlay, as it will stay static in relation to the health bar

I did some testing of this. SobGroup_SetHealth(<sobgroup>,<health>) only affects the ship(s) in the group (both for increasing and reducing the health) regardless of the subsystem health.

The thing you need to know about SobGroup_SetHardPointHealth(<sobgroup>,<subsystem>,<health>) is that <subsystem> is not the name of the subsystem but the name of the slot in the ship file. For example, from m02_hiigara.lua, line 1662: SobGroup_SetHardPointHealth( "EnemyCarrier", "Production 1", CurrentFighterFacilityHealth).

1 Like

I may have gotten it wrong… but for the following subsystem (extract from fed_TNG_flagship.ship)

StartShipHardPointConfig(NewShipType,"Shield","Hardpoint_Shield","System","Innate","Damageable","Shield_large","","","","","","","","")

I was using this set health line (taken from my first post)

SobGroup_SetHardPointHealth(CustomGroup, "Shield", shieldNewHP)

Perhaps I had something else causing the issue with the non-reducing health when I was trying this with a subsystem? :thinking:

//Edit
Maybe if it wasn’t innate?

ATI and Pings are very much similar, we don’t have lua functions to add/edit ATI, so we used pings. We added a new Ping template so that it displays right next the health bar.

What’s the name of that ping? :thinking:
I could only get a nice display of ping data when I added it to a mouseover

Ping Template
templates.shipmark_1_over = 
	{
		minGrowSize = 0,
		maxGrowSize = 0.1,
		minWorldSize = 0,
		growTime = 1,
		pauseTime = 0,
		lifespan = INFINITE,
		metaSelPriority = LowPriority,
		--metaSelPrioritySM = LowPriority,
		metaSelPrioritySM = NoPriority,
		--pingSfxPatch = "data:sound/sfx/ui/sensorsmanager/FIntelObjectivePing",
		circle = 
		{
			scaleParam = PPI_PingSize,
			mesh = 
			{
				colour = 
				{
					1,
					1,
					1,
					0,
				},
				lineWeight = 0.5,
				renderFlags = 
				{
					"scaleX",
					"scaleY",
				},
				LODs = 
				{
					1,
					"UI\\Pings\\Meshes\\Circle00.hod",
				},
			},
			placement2D = 
			{
				factorX = 0,
				factorY = 0,
				plusX = 0,
				plusY = 0,
				factorWidth = 0.1,
				factorHeight = 0.1,
				minWidth = WIDTH(8),
				minHeight = HEIGHT(8),
				maxWidth = WIDTH(55),
				maxHeight = HEIGHT(55),
				minATIArea = 0,
				maxATIArea = HUGE,
				visibility = 
				{
					"PVF_Pinging",
					"PVF_PingSize",
					"PVF_MouseOver",
				},
				invisibility = 
				{
					"PVF_SensorsManager",
				},
			},
		},
		description0 = 
		{
			stringParam = PPI_Description0,
			text = 
			{
				colour = 
				{
					0.5,
					0.7,
					1,
					1,
				},
				renderFlags = 
				{
					"justifyRight",
				},
				dropshadow = 1,
				LODs = 
				{
					LOD0,
					"ButtonFont",
					LOD1,
					"ButtonFont",
					LOD2,
					"ButtonFont",
				},
			},
			placement2D = 
			{
				factorX = 1,
				factorY = 1,
				--plusX = WIDTH(1),
				--plusY = HEIGHT(-94),
				plusX = WIDTH(90),
				plusY = HEIGHT(14),
				factorWidth = 1,
				factorHeight = 1,
				minWidth = WIDTH(32),
				minHeight = HEIGHT(12),
				maxWidth = WIDTH(32),
				maxHeight = HEIGHT(12),
				visibility = 
				{
					"PVF_PingSize",
					--"PVF_MouseOver",
					"PVF_Description0",
					--"PVF_SensorsManager",
				},
				invisibility = 
				{
					"PVF_SensorsManager",
				},
				--placementFlags = 
				--{
				--	"attachToMouse",
				--},
			},
		},
		description1 = 
		{
			stringParam = PPI_Description1,
			text = 
			{
				colour = 
				{
					0.7,
					0.7,
					0.7,
					1,
				},
				renderFlags = 
				{
					"justifyRight",
				},
				dropshadow = 1,
				LODs = 
				{
					LOD0,
					"ButtonFont",
					LOD1,
					"ButtonFont",
					LOD2,
					"ButtonFont",
				},
			},
			placement2D = 
			{
				factorX = 1,
				factorY = 1,
				--plusX = WIDTH(1),
				--plusY = HEIGHT(-106),
				plusX = WIDTH(130),
				plusY = HEIGHT(14),
				factorWidth = 1,
				factorHeight = 1,
				minWidth = WIDTH(32),
				minHeight = HEIGHT(12),
				maxWidth = WIDTH(32),
				maxHeight = HEIGHT(12),
				visibility = 
				{
					"PVF_PingSize",
					--"PVF_MouseOver",
					"PVF_Description1",
					--"PVF_SensorsManager",
				},
				invisibility = 
				{
					"PVF_SensorsManager",
				},
				--placementFlags = 
				--{
				--	"attachToMouse",
				--},
			},
		},
		description2 = 
		{
			stringParam = PPI_Description2,
			text = 
			{
				colour = 
				{
					0.2,
					1,
					0.2,
					1,
				},
				renderFlags = 
				{
					"justifyRight",
				},
				dropshadow = 1,
				LODs = 
				{
					LOD0,
					"ButtonFont",
					LOD1,
					"ButtonFont",
					LOD2,
					"ButtonFont",
				},
			},
			placement2D = 
			{
				factorX = 1,
				factorY = 1,
				--plusX = WIDTH(175),
				--plusY = HEIGHT(29),
				plusX = WIDTH(50),
				plusY = HEIGHT(14),
				factorWidth = 1,
				factorHeight = 1,
				minWidth = WIDTH(32),
				minHeight = HEIGHT(12),
				maxWidth = WIDTH(32),
				maxHeight = HEIGHT(12),
				visibility = 
				{
					"PVF_PingSize",
					--"PVF_MouseOver",
					"PVF_Description2",
					--"AVF_Visible",
					--"AVF_Selecting",
					--"AVF_TO_SelectionIcons",
					--"AVF_Selected",
					--"AVF_HealthBarStyle0",
					--"AVF_SquadLeader",
					--"PVF_SensorsManager",
				},
				invisibility = 
				{
					"PVF_SensorsManager",
				},
			},
		},
		description3 = 
		{
			stringParam = PPI_Description3,
			text = 
			{
				colour = 
				{
					0.9,
					0.7,
					0.1,
					1,
				},
				renderFlags = 
				{
					"justifyLeft",
					--"justifyRight",
				},
				dropshadow = 1,
				LODs = 
				{
					LOD0,
					"ButtonFont",
					LOD1,
					"ButtonFont",
					LOD2,
					"ButtonFont",
				},
			},
			placement2D = 
			{
				factorX = 1,
				factorY = 1,
				plusX = WIDTH(170),
				plusY = HEIGHT(14),
				--plusX = WIDTH(172),
				--plusY = HEIGHT(37),
				factorWidth = 1,
				factorHeight = 1,
				minWidth = WIDTH(32),
				minHeight = HEIGHT(12),
				maxWidth = WIDTH(32),
				maxHeight = HEIGHT(12),
				visibility = 
				{
					"PVF_PingSize",
					--"PVF_MouseOver",
					"PVF_Description3",
					--"PVF_SensorsManager",
				},
				invisibility = 
				{
					"PVF_SensorsManager",
				},
			},
		},
	}
1 Like

Nice! Thanks for sharing that. How would you link that to the custom code?