Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Give Charon more health

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
3/17/2019 10:11:12 PMFIrankterve886 before revert after revert
3/17/2019 9:41:10 PMFIrankterve886 before revert after revert
Before After
1 As some of you may know, I made earlier today a widget that allowed Charon to drop a Claymore it carried, give the Claymore order to drop its bomb and then repick it up before the Claymore fell to ground. Code here: 1 As some of you may know, I made earlier today a widget that allowed Charon to drop a Claymore it carried, give the Claymore order to drop its bomb and then repick it up before the Claymore fell to ground. Code here:
2 \n 2 \n
3 [spoiler] 3 [spoiler]
4 [quote] 4 [quote]
5 function widget:GetInfo() 5 function widget:GetInfo()
6 return { 6 return {
7 name = "ClaymoreBombing", 7 name = "ClaymoreBombing",
8 desc = "Allows Claymores to drop bombs while transported. Version 0,9", 8 desc = "Allows Claymores to drop bombs while transported. Version 0,9",
9 author = "terve886", 9 author = "terve886",
10 date = "2019", 10 date = "2019",
11 license = "PD", -- should be compatible with Spring 11 license = "PD", -- should be compatible with Spring
12 layer = 0, 12 layer = 0,
13 enabled = true -- loaded by default? 13 enabled = true -- loaded by default?
14 } 14 }
15 end 15 end
16 \n 16 \n
17 \n 17 \n
18 local CMD_FORCE_DROP_UNIT = 35000 18 local CMD_FORCE_DROP_UNIT = 35000
19 local CMD_INSERT = 1 19 local CMD_INSERT = 1
20 local CMD_DROP_BOMB = 35000 20 local CMD_DROP_BOMB = 35000
21 local GetUnitPosition = Spring.GetUnitPosition 21 local GetUnitPosition = Spring.GetUnitPosition
22 local GetMyAllyTeamID = Spring.GetMyAllyTeamID 22 local GetMyAllyTeamID = Spring.GetMyAllyTeamID
23 local GiveOrderToUnit = Spring.GiveOrderToUnit 23 local GiveOrderToUnit = Spring.GiveOrderToUnit
24 local GetUnitAllyTeam = Spring.GetUnitAllyTeam 24 local GetUnitAllyTeam = Spring.GetUnitAllyTeam
25 local GetMyTeamID = Spring.GetMyTeamID 25 local GetMyTeamID = Spring.GetMyTeamID
26 local GetUnitDefID = Spring.GetUnitDefID 26 local GetUnitDefID = Spring.GetUnitDefID
27 local nearest = Spring.GetUnitNearestAlly 27 local nearest = Spring.GetUnitNearestAlly
28 local IsUnitSelected = Spring.IsUnitSelected 28 local IsUnitSelected = Spring.IsUnitSelected
29 local Echo = Spring.Echo 29 local Echo = Spring.Echo
30 local Charon_NAME = "gunshiptrans" 30 local Charon_NAME = "gunshiptrans"
31 local Claymore_NAME = "hoverdepthcharge" 31 local Claymore_NAME = "hoverdepthcharge"
32 local GetSpecState = Spring.GetSpectatingState 32 local GetSpecState = Spring.GetSpectatingState
33 local GetUnitIsTransporting = Spring.GetUnitIsTransporting 33 local GetUnitIsTransporting = Spring.GetUnitIsTransporting
34 \n 34 \n
35 \n 35 \n
36 \n 36 \n
37 function widget:UnitCommand(unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOpts, cmdTag) 37 function widget:UnitCommand(unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOpts, cmdTag)
38 \n 38 \n
39 if ( cmdID == CMD_INSERT and cmdParams[2] == CMD_FORCE_DROP_UNIT and UnitDefs[unitDefID]. name == Charon_NAME) then 39 if ( cmdID==CMD_INSERT and cmdParams[2]==CMD_FORCE_DROP_UNIT and UnitDefs[unitDefID]. name==Charon_NAME) then
40 Echo("Drop command given to Charon:" .. unitID) 40 Echo("Drop command given to Charon:" .. unitID)
41 transportedUnit = GetUnitIsTransporting(unitID) 41 transportedUnit = GetUnitIsTransporting(unitID)
42 if (transportedUnit[1] == nil) then 42 if (transportedUnit[1] == nil) then
43 Echo("No unit being transported") 43 Echo("No unit being transported")
44 return 44 return
45 end 45 end
46 transportedUnitID = transportedUnit[1] 46 transportedUnitID = transportedUnit[1]
47 Echo("Transported unit is:" .. transportedUnitID) 47 Echo("Transported unit is:" .. transportedUnitID)
48 DefID = GetUnitDefID(transportedUnitID) 48 DefID = GetUnitDefID(transportedUnitID)
49 Echo("Transported unit DefID is:" .. DefID) 49 Echo("Transported unit DefID is:" .. DefID)
50 if (UnitDefs[DefID].name == Claymore_NAME) then 50 if (UnitDefs[DefID].name == Claymore_NAME) then
51 GiveOrderToUnit(transportedUnitID, CMD_DROP_BOMB, {},0) 51 GiveOrderToUnit(transportedUnitID, CMD_DROP_BOMB, {},0)
52 Echo("Bomb drop order given to unit:" .. transportedUnitID) 52 Echo("Bomb drop order given to unit:" .. transportedUnitID)
53 GiveOrderToUnit(unitID, CMD.INSERT,{0, CMD.LOAD_UNITS, CMD.OPT_SHIFT, transportedUnitID}, {"alt"}) 53 GiveOrderToUnit(unitID, CMD.INSERT,{0, CMD.LOAD_UNITS, CMD.OPT_SHIFT, transportedUnitID}, {"alt"})
54 Echo("Load order given to unit:" .. unitID) 54 Echo("Load order given to unit:" .. unitID)
55 end 55 end
56 end 56 end
57 end 57 end
58 \n 58 \n
59 \n 59 \n
60 -- The rest of the code is there to disable the widget for spectators 60 -- The rest of the code is there to disable the widget for spectators
61 local function DisableForSpec() 61 local function DisableForSpec()
62 if GetSpecState() then 62 if GetSpecState() then
63 widgetHandler:RemoveWidget() 63 widgetHandler:RemoveWidget()
64 end 64 end
65 end 65 end
66 \n 66 \n
67 \n 67 \n
68 function widget:Initialize() 68 function widget:Initialize()
69 DisableForSpec() 69 DisableForSpec()
70 end 70 end
71 \n 71 \n
72 \n 72 \n
73 function widget:PlayerChanged (playerID) 73 function widget:PlayerChanged (playerID)
74 DisableForSpec() 74 DisableForSpec()
75 end 75 end
76 [/quote] 76 [/quote]
77 [/spoiler] 77 [/spoiler]
78 The result is basically a Raven with timed, large AoE bomb. However, because Charons have so low amount of health, they are easily, almost instantly taken down by any form of AA and even many non-AA units are able to shoot down easily a low flying Charon. As such, I suggest that the health of Charon is increased to 700. 78 The result is basically a Raven with timed, large AoE bomb. However, because Charons have so low amount of health, they are easily, almost instantly taken down by any form of AA and even many non-AA units are able to shoot down easily a low flying Charon. As such, I suggest that the health of Charon is increased to 700.
79 \n 79 \n
80 While it may seem selfish to request that Charon gets buffed based on solely on a widget I made, I would like to point out that in general the transports can't be used offensively because of the low health pool they have and any other uses, such as moving units closer to frontlines from factory doesn't seem to get used that much either. 80 While it may seem selfish to request that Charon gets buffed based on solely on a widget I made, I would like to point out that in general the transports can't be used offensively because of the low health pool they have and any other uses, such as moving units closer to frontlines from factory doesn't seem to get used that much either.
81 For example, trying to launch a quick assault on enemy lines by transporting a squad of units to enemy lines doesn't work because Charons get shot down too quickly and of course that results in fall damage to the units being carried. Giving Charons more health would open up this possibility 81 For example, trying to launch a quick assault on enemy lines by transporting a squad of units to enemy lines doesn't work because Charons get shot down too quickly and of course that results in fall damage to the units being carried. Giving Charons more health would open up this possibility
82 \n 82 \n
83 Now, lets compare Raven to Charon + Claymore combo: 83 Now, lets compare Raven to Charon + Claymore combo:
84 * 300 metal versus 330 + 100 = 430 84 * 300 metal versus 330 + 100 = 430
85 * 1000 health versus 300 + 1650 = 1950 85 * 1000 health versus 300 + 1650 = 1950
86 * 800 damage AoE 16 versus 900 damage AoE 145 and timer 86 * 800 damage AoE 16 versus 900 damage AoE 145 and timer
87 * Speed 234 versus ?<234 not sure of the exact speed, but Charon carrying Claymore moves slower than a Raven. 87 * Speed 234 versus ?<234 not sure of the exact speed, but Charon carrying Claymore moves slower than a Raven.
88 * Needs to stop at airport/pad to reload versus needs to unload to ground to reload (reloading is disabled while Claymore is being transported). 88 * Needs to stop at airport/pad to reload versus needs to unload to ground to reload (reloading is disabled while Claymore is being transported).
89 * Altitude 220 versus 140 89 * Altitude 220 versus 140
90 \n 90 \n
91 Even if Charon had 700 health, I would say it would be safe to assume that Raven would still be far superior as bomber due to higher mobility, health and altitude, that would probably apply even if Charon had 1000 health like Raven does. 91 Even if Charon had 700 health, I would say it would be safe to assume that Raven would still be far superior as bomber due to higher mobility, health and altitude, that would probably apply even if Charon had 1000 health like Raven does.
92 \n 92 \n
93 Overrall I would like to see transport units like Charon getting more use. Other such unit that doesn't get much use is Djinn probably due to its high metal cost. 93 Overrall I would like to see transport units like Charon getting more use. Other such unit that doesn't get much use is Djinn probably due to its high metal cost.