Below is my code:
--#****************************************************************************
--#**
--#** Hooked To: /lua/system/blueprints.lua
--#**
--#** Modded By: Rockoe
--#**
--#*********************************************************************
HandicapPercentAeon = 1
HandicapPercentUEF = 1
HandicapPercentCybran = 1
HandicapPercentSeraphim = 1
local Handicap = function(all_bps)
for _, bp in all_bps do
-- Aeon Handicap
if bp.Categories.COMMAND and bp.Categories.AEON then
if bp.Economy.ProductionPerSecondEnergy then
bp.Economy.ProductionPerSecondEnergy = bp.Economy.ProductionPerSecondEnergy * HandicapPercentAeon
end
if bp.Economy.ProductionPerSecondMass then
bp.Economy.ProductionPerSecondMass = bp.Economy.ProductionPerSecondMass * HandicapPercentAeon
end
end
-- END Aeon Handicap
-- UEF Handicap
if bp.Categories.COMMAND and bp.Categories.UEF then
if bp.Economy.ProductionPerSecondEnergy then
bp.Economy.ProductionPerSecondEnergy = bp.Economy.ProductionPerSecondEnergy * HandicapPercentUEF
end
if bp.Economy.ProductionPerSecondMass then
bp.Economy.ProductionPerSecondMass = bp.Economy.ProductionPerSecondMass * HandicapPercentUEF
end
end
-- END UEF Handicap
-- Cybran Handicap
if bp.Categories.COMMAND and bp.Categories.CYBRAN then
if bp.Economy.ProductionPerSecondEnergy then
bp.Economy.ProductionPerSecondEnergy = bp.Economy.ProductionPerSecondEnergy * HandicapPercentCybran
end
if bp.Economy.ProductionPerSecondMass then
bp.Economy.ProductionPerSecondMass = bp.Economy.ProductionPerSecondMass * HandicapPercentCybran
end
end
-- END Cybran Handicap
-- Seraphim Handicap
if bp.Categories.COMMAND and bp.Categories.SERAPHIM then
if bp.Economy.ProductionPerSecondEnergy then
bp.Economy.ProductionPerSecondEnergy = bp.Economy.ProductionPerSecondEnergy * HandicapPercentSeraphim
end
if bp.Economy.ProductionPerSecondMass then
bp.Economy.ProductionPerSecondMass = bp.Economy.ProductionPerSecondMass * HandicapPercentSeraphim
end
end
-- END Seraphim Handicap
end
end
local OldModBlueprints = ModBlueprints
function ModBlueprints(all_blueprints)
OldModBlueprints(all_blueprints)
Handicap(all_blueprints.Unit)
end
--]]
My dream is to have a mod that could find each player in a game (maybe through their positions on the map) and in game have it voted on (or just set by the lobby) how much of a handicap that player would get.