Statistics: Posted by Franck83 — 23 Oct 2018, 16:25
-- overwrite the original function. Destructive hook !
local LetterArray = { ["Aeon"] = "ua", ["UEF"] = "ue", ["Cybran"] = "ur", ["Seraphim"] = "xs" }
local BOLetterArray = { ["Aeon"] = "ba", ["UEF"] = "be", ["Cybran"] = "br", ["Seraphim"] = "bs" }
Callbacks.CapMex = function(data, units)
local units = EntityCategoryFilterDown(categories.ENGINEER, SecureUnits(units))
if not units[1] then return end
local mex = GetEntityById(data.target)
if not mex or not EntityCategoryContains(categories.MASSEXTRACTION * categories.STRUCTURE, mex) then return end
local pos = mex:GetPosition()
local msid
for _, u in units do
local FactionName = u:GetBlueprint().General.FactionName
if u:CanBuild(BOLetterArray[FactionName]..'b1106') then
msid = BOLetterArray[FactionName]..'b1106'
else
msid = LetterArray[FactionName]..'b1106'
end
IssueBuildMobile({u}, Vector(pos.x, pos.y, pos.z-2), msid, {})
IssueBuildMobile({u}, Vector(pos.x+2, pos.y, pos.z), msid, {})
IssueBuildMobile({u}, Vector(pos.x, pos.y, pos.z+2), msid, {})
IssueBuildMobile({u}, Vector(pos.x-2, pos.y, pos.z), msid, {})
end
end
Statistics: Posted by DDDX — 23 Oct 2018, 15:46
layout = {
['turret_btn_sel'] = {left = 1, top = 0, width = 63, height = 64},
['turret_btn_down'] = {left = 2, top = 2, width = 60, height = 60},
['turret_btn_over'] = {left = 2, top = 2, width = 60, height = 60},
['turret_btn_up'] = {left = 2, top = 2, width = 60, height = 60}
}
Description['alphaa1'] = "<LOC Unit_Description_20009> Level 1 ALPHA - a hero unit. While fairly basic, it is upgradeable into bigger, better versions, with special weapons and abilities. Can assist, repair and reclaim wrecks. Armed with weak air-to-ground weapons, and average anti-air weapons.\nEVOLVES into a level 2 ALPHA unit when it has killed 20.000 mass.\n\n---DO NOT LOSE YOUR ALPHA, you cannot get a new one!---"
Statistics: Posted by DDDX — 23 Oct 2018, 13:44
\hook\textures\ui\common\game\
layout = {
['haes_btn_sel'] = {left = 1, top = 0, width = 63, height = 64, },
['haes_btn_down'] = {left = 2, top = 2, width = 60, height = 60, },
['haes_btn_over'] = {left = 2, top = 2, width = 60, height = 60, },
['haes_btn_up'] = {left = 2, top = 2, width = 60, height = 60, },
['fsh1_btn_sel'] = {left = 1, top = 0, width = 63, height = 64, },
['fsh1_btn_down'] = {left = 2, top = 2, width = 60, height = 60, },
['fsh1_btn_over'] = {left = 2, top = 2, width = 60, height = 60, },
['fsh1_btn_up'] = {left = 2, top = 2, width = 60, height = 60, },
['fep1_btn_sel'] = {left = 1, top = 0, width = 63, height = 64, },
['fep1_btn_down'] = {left = 2, top = 2, width = 60, height = 60, },
['fep1_btn_over'] = {left = 2, top = 2, width = 60, height = 60, },
['fep1_btn_up'] = {left = 2, top = 2, width = 60, height = 60, },
}
Statistics: Posted by PhilipJFry — 23 Oct 2018, 13:06
Statistics: Posted by Franck83 — 23 Oct 2018, 12:55
UnitList = {
T4AirExperimental1 = {
UEF = {'bea0402', 70}, -- Citadel MKII (Experimental Aerial Fortress)
--Cybran = {'bra0409', 40}, -- Gargantuan (Experimental Assault Transport)
Aeon = {'alphaa1', 40}, -- RPG unit
},
}
Statistics: Posted by DDDX — 23 Oct 2018, 11:59
Statistics: Posted by Franck83 — 22 Oct 2018, 20:53
Enhancements = {
Slots = {
Back = {
name = '<LOC _Back>',
x = -2,
y = -5,
},
LCH = {
name = '<LOC _LCH>',
x = 50,
y = -10,
},
RCH = {
name = '<LOC _RCH>',
x = -12,
y = -10,
},
},
GuardianProtocol = {
BuildCostEnergy = 12000,
BuildCostMass = 720,
BuildTime = 500,
BuildableCategoryAdds = 'BUILTBYALPHAA1',
Icon = 'turret',
Name = 'Guardian protocol I',
NewBuildRate = 20,
NewHealth = 2000,
NewRegenRate = 20,
Slot = 'RCH',
},
GuardianProtocolRemove = {
BuildCostEnergy = 1,
BuildCostMass = 1,
BuildTime = 0.1,
Icon = 'turret',
Name = 'Remove Guardian protocol I',
Prerequisite = 'GuardianProtocol',
RemoveEnhancements = {
'GuardianProtocol',
'GuardianProtocolRemove',
},
Slot = 'RCH',
},
},
Code: Select all
CreateEnhancement = function(self, enh, removal)
AAirUnit.CreateEnhancement(self, enh)
local bp = self:GetBlueprint().Enhancements[enh]
if not bp then return end
local bp = self:GetBlueprint().Enhancements[enh]
--T2 Engineering
if enh =='GuardianProtocol' then
local cat = ParseEntityCategory(bp.BuildableCategoryAdds)
self:RemoveBuildRestriction(cat)
--self:updateBuildRestrictions()
--self:AddBuildRestriction( categories.AEON * (categories.BUILTBYTIER2ENGINEER + categories.BUILTBYTIER3ENGINEER - categories.SBROT1EXPD) )
--if not Buffs['AeonACUT2BuildRate'] then
BuffBlueprint {
Name = 'AeonACUT2BuildRate',
DisplayName = 'ALPHAT2BuildRate',
BuffType = 'ACUBUILDRATE',
Stacks = 'REPLACE',
Duration = -1,
Affects = {
BuildRate = {
Add = bp.NewBuildRate - self:GetBlueprint().Economy.BuildRate,
Mult = 1,
},
MaxHealth = {
Add = bp.NewHealth,
Mult = 1.0,
},
Regen = {
Add = bp.NewRegenRate,
Mult = 1.0,
},
},
}
-- end
Buff.ApplyBuff(self, 'AeonACUT2BuildRate')
elseif enh =='GuardianProtocolRemove' then
local bp = self:GetBlueprint().Economy.BuildRate
if not bp then return end
self:RestoreBuildRestrictions()
self:AddBuildRestriction( categories.AEON * (categories.BUILTBYALPHAA1 + categories.BUILTBYTIER1ENGINEER + categories.BUILTBYTIER2ENGINEER + categories.BUILTBYTIER3ENGINEER - categories.uab1105 - categories.uab1106) )
if Buff.HasBuff( self, 'AeonACUT2BuildRate' ) then
Buff.RemoveBuff( self, 'AeonACUT2BuildRate' )
end
end
end,
Statistics: Posted by DDDX — 22 Oct 2018, 16:10