Manual control of Convoys?
Moderators: Slitherine Core, The Lordz
Manual control of Convoys?
Hi guys in the mod I'm working on, you can control Convoys manually, that is not the problem. The problem is I can't seem to get the pop up message to appear, telling you that you have UNMOVED CONVOYS? All the other pop up messages appear for ,UNMOVED TRANSPORTS and UNMOVED COUNTRIES.
-
- Senior Corporal - Destroyer
- Posts: 117
- Joined: Sun Jan 11, 2015 7:51 pm
- Contact:
Re: Manual control of Convoys?
I think you can get this working in main_panel.lua by changing "PreEndTurn".
danielherr.github.io
Re: Manual control of Convoys?
Hi thanks for reply, I believe you are right, only problem is I'm now trying to get the script right, as it appears something is a miss. Trial and error will solve it I think, thanks for telling me where to find the solution cheers!!
-
- Senior Corporal - Destroyer
- Posts: 117
- Joined: Sun Jan 11, 2015 7:51 pm
- Contact:
Re: Manual control of Convoys?
I inserted two lines after "if check == "research"":
Here is the corrected code:
Code: Select all
ui.convoyPanel:Show()
elseif check == "convoys" then
Code: Select all
function PreEndTurn(check)
function TransportWarning()
if settings.transportWarning == 1 then
ui.transportPanel:Show()
return true
end
PreEndTurn("transports")
end
function UnmovedFactionWarning()
if settings.nomovesWarning == 1 then
ui.factionPanel:Show()
return true
end
PreEndTurn("unmovedfaction")
end
function NoResearch()
if settings.researchWarning == 1 then
local techCategories = {"ground", "artillery", "air", "naval", "armour"}
local techId
for faction in playerAlliance.factions do
for i=1, # techCategories do
techId = faction.luaData.currentTech
if techId == -1 and faction.luaData.labs[techCategories[i]] > 0 then
function YesFunc() PreEndTurn("research") end
PopupDialog("research_warning", YesFunc)
ui.mainPanel:SwitchTab(ui.mainPanel.researchTab)
hud:GetPanel("research_panel"):Hide()
return true
end
end
end
end
PreEndTurn("research")
end
if check == "research" then
ui.convoyPanel:Show()
elseif check == "convoys" then
EndTurnProcess()
elseif check == "transports" then
NoResearch()
elseif check == "unmovedfaction" then
TransportWarning()
else
UnmovedFactionWarning()
end
end
danielherr.github.io
Re: Manual control of Convoys?
Thank you that worked a treat first time, very much appreciated. Now I can spend some more time trying to improve the AI?