nexusno2000 wrote: ↑Thu Feb 12, 2026 2:36 pm
Post by nexusno2000 » 12 Feb 2026 14:17
I'm replaying (and recording) the Italian Cyenaica campaign, and noticing a weird bug:
Mission 7: Toburk
I have 2 CP (this campaign reuses the code from AO commendation points to track bonus core slots)
This gives me 50+10=60 core slots
So far, so good.
I get the explosives and move them to the ship, then get the msg verifying OK, so I SHOULD get +1 CP
HOWEVER, I do not.
Mission 8: Interception at El Mechili
I start with only 2 CP, should be 3
(I've even added the CP display code to the lua to verify)
So instead of 48+12=60 slots, I only get 58.
It's not THAT big of a deal, but it'll carry forward for the rest of the campaign, so annoying. Also, my OCD-lite lol
(btw I rechecked old saves from the first time I played the campaign, and it's the same issue)
I've looked at the Tobruk lua and scenario/objectives, and it seems... fine, at least on first glance.
I get this msg when delivering the explosives:
msg = NSLOCTEXT("07_IT_Tobruk", "ship_unit_sunken", "The San Giorgio will never be caught by the British. Set it ablaze!")
But I never see this - it just tells me about the bonus hero objective.
objective_status = ObjectiveStatus.Active,
reward_notify = NSLOCTEXT("07_IT_Tobruk", "sangiorgio_reward", "Bonus Objective Completed: Destroy the supplies on the San Giorgio \n\nCore Slots gained: %d ")
###
Unrelated, I found this minor bug while looking for clues to the commendation bug:
hero.extra_traits = {UnitTrait.OnTheRoll, UnitTrait.ReducesSlots, UnitTrait.HitAndRun}
ReducedSlots is spelled wrong.
Annibale Bergonzoli should look like this:
local hero = NewHero()
hero.portrait = "/Game/Gui/Common/Heroes/it_in_annibale_bergonzoli.it_in_annibale_bergonzoli"
hero.name = NSLOCTEXT("06_IT_Bardia", "Annibale_Bergonzoli", "Annibale Bergonzoli")
hero.extra_traits = {UnitTrait.OnTheRoll, UnitTrait.ReducedSlots, UnitTrait.HitAndRun}
local action = world:MakeNewHeroAction(_id, hero)
world:Exec(action)
I did 4 changes:
1. Fix the objective status so it's actually == Success when you bring back the explosives
FROM
function SanGiorgio_Success()
return objective_status == ObjectiveStatus.Success
end
function SanGiorgio_Fail()
return objective_status == ObjectiveStatus.Fail
end
TO
function SanGiorgio_Success()
return SanGiorgio_Data and SanGiorgio_Data.objective_status == ObjectiveStatus.Success
end
function SanGiorgio_Fail()
return SanGiorgio_Data and SanGiorgio_Data.objective_status == ObjectiveStatus.Fail
end
2. Prevents ANY disband from causing the bonus objective to fail
FROM
return action.unit == SanGiorgio_Data.demolition.unit
or action.unit == SanGiorgio_Data.explosive.unit
or SanGiorgio_Data.ship.unit
TO
function Disband_Trigger(action)
return action.unit == SanGiorgio_Data.demolition.unit
or action.unit == SanGiorgio_Data.explosive.unit
or action.unit == SanGiorgio_Data.ship.unit
end
3. Display current CP
-------------------------
-- COMMENDATION POINTS --
-------------------------
-- Adds the HUD update that shows current CP
function OnMapStart()
local player = world:GetPlayer(1)
player.resource1_icon = "/Game/Gui/GameplayUI/hud_commendation_icon"
player.resource1 = campaign.comm_points
player.resource1_tooltip = NSLOCTEXT("common", "commendation_points", "Commendation Points")
end
function UpdateCommendationPoints()
local player = world:GetPlayer(1)
player.resource1 = campaign.comm_points
end
4. Update CP
FROM
function SanGiorgio_Reward_Action(action)
if campaign == nil then return end
if campaign.comm_points == nil then campaign.comm_points = 0 end
campaign.comm_points = campaign.comm_points + 1
TO
function SanGiorgio_Reward_Action(action)
if campaign == nil then return end
if campaign.comm_points == nil then campaign.comm_points = 0 end
campaign.comm_points = campaign.comm_points + 1
UpdateCommendationPoints() -- <- add this