regul
| Ведущий раздела |
Join Date: Apr 2007
Posts: 991
|
Параметр корабля 'EFF'
Что это за хрень, на что влияет и как влиять на неё?
Пока пусть будет отдельной темой, потом в вопросницу добавим.
Вроде как, действительно влияет на характеристики корабля, как-то я тестил ребаланс и у мого апгрейденного баттла случилось eff -6 - так его три дестра чуть не укокошили за минуту. Замечал и сильную слабину корабля при eff -2. Но, как это влиет и что с этим делать?
Кто-нибудь разбирался?
Нашел в недрах мода код, описывающий эту штуку, но не разобрался пока. Кто в луа сечет? И в итальянском
код из файла efficency.lua
Lua:
function efficency()
local playerIndex = 0
while playerIndex < Universe_PlayerCount() do
if (Player_IsAlive(playerIndex) == 1) then
if (Player_HasShipWithBuildQueue(playerIndex) == 1) then
playerIndexList = playerIndex + 1
hapagatoList[playerIndexList] = Player_GetRU(playerIndex) - maintenanceList[playerIndexList]
---Calcola ru se il giocatore ha i soldi (Рассчитать RU Если у игрока есть деньги)
if hapagatoList[playerIndexList] >= 0 then
Player_SetRU(playerIndex, hapagatoList[playerIndexList])
if playerIndex == Universe_CurrentPlayer() then
UI_SetTextLabelText("YearMenu", "lblmaintenance1", "(Paid)");
end
else
if playerIndex == Universe_CurrentPlayer() then
UI_SetTextLabelText("YearMenu", "lblmaintenance1", "(Unpaid)");
end
end
end
end
playerIndex = playerIndex + 1
end
---calcola efficenza su ogni singola nave (эффективность рассчитывается на каждый корабль)
efficencyExecute("splitmotherships", nms)
efficencyExecute("splitresearchstations", nrs)
efficencyExecute("splitcrewstations", ncs)
efficencyExecute("splitdestroyers", nd)
efficencyExecute("splitcarriers", nc)
efficencyExecute("splitbattlecruisers", nbc)
efficencyExecute("splitshipyards", nsy)
efficencyExecute("splitcommandfortresses", ncf)
efficencyExecute("splithyperspacestations", nhs)
efficencyExecute("splitjuggernaughts", nj)
Rule_Remove("efficency")
end
function efficencyExecute(Group, Counter)
if Counter > 0 then
for i = 0,Counter-1,1 do
if SobGroup_Count(Group .. tostring(i)) == 1 then
---se paga (если вы оплачиваете)
if hapagatoList[SobGroup_OwnedBy(Group .. tostring(i))+1] >= 0 then
local effvalue = SobGroup_GetHardPointHealth(Group .. tostring(i), "efficency") + 0.0155
if effvalue >= 0 and effvalue <= 1 then
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", effvalue)
else
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", 1)
end
---se non paga
else
local effvalue = SobGroup_GetHardPointHealth(Group .. tostring(i), "efficency") - 0.03
if effvalue >= 0 and effvalue <= 1 then
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", effvalue)
else
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", 0)
end
end
---se ha danno (если ущерб)
if SobGroup_HealthPercentage(Group .. tostring(i)) <= 0.5 then
local effvalue = SobGroup_GetHardPointHealth(Group .. tostring(i), "efficency") - 0.03
if effvalue >= 0 and effvalue <= 1 then
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", effvalue)
else
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", 0)
end
end
if SobGroup_GetHardPointHealth(Group .. tostring(i), "efficency") >= 1 then
SobGroup_SetHardPointHealth(Group .. tostring(i), "efficency", 1)
end
end
end
end
end
Last edited by regul : 04-11-2010 at 06:29 PM.
|