Hey Gedemon, i have downloaded a latest versions of the mod here and it looks like scripted events aren't working now?
Poland doesn't get vilnius at the start and it doesn't fall when Warsaw is captured
on lua log it seems all normal, it call for CityCaptured serial event but i can't see the mod ever loading RedEuro1940.lua and its functions
btw i tried just for fun if it would be possible to make a trait for Finland that it's troops keeps supply lines cut when entering Finish territory... that's what they did on winter war
added this
-- check if russian unit has entered finish territory
if (player:GetName() == "TXT_KEY_LEADER_STALIN") then-- to not do that for all players units
Dprint (" - found russian unit (".. player:GetName() ..")", bDebug )
local closeCity = GetCloseCity ( playerID, unitPlot )
local plotKey = GetPlotKey ( unitPlot )
local firstOwnerID = GetPlotFirstOwner( plotKey )
local firstOwner = Players[ firstOwnerID ]
local unitPlotX = unitPlot:GetX()
local unitPlotY = unitPlot:GetY()
Dprint (" - Original owner of this tile was (".. firstOwner:GetName() ..")", bDebug )
if (firstOwner:GetName() == "Finland") then
Dprint (" - Russian unit in finnish territory!", bDebug )
if closeCity then
Dprint (" - Found own city nearby, checking distance", bDebug )
local cityPlot = closeCity
lot()
local cityPlotX = cityPlot:GetX()
local cityPlotY = cityPlot:GetY()
local distanceX = unitPlotX-cityPlotX
local distanceY = unitPlotY-cityPlotY
if ( distanceX > 1 or distanceX < -1 or distanceY > 1 or distanceY < -1) then
Dprint (" - distance x to closest city is (".. distanceX ..")", bDebug )
return false
end
end
end
end
on supply check function between where it's ignoring sea and air unit and closest city function
seems to be working, they haven't supply unless they capture a city, then they have supply again in tiles around that city
edit: tried to copy contents of RedEuro1940.lua to DefinesEuro1940.lua and after that scripts seems to work again