I play with modded VP, but these are rather overall issues. I have stucked at few problems:
1. I use following codes:
and
The problem is that InitCsList triggers before changes to Cs are set in the game (unit spawn option or pledge protect option). I cannot find any events related to those 2 mentioned situations. How can I trigger this function after the change? Maybe there's useful delay? I used simple while loop delay but it didn't work at all.
2. I want to show espionage window on top of current popup (Diplomacy Overview) click using following code:
but it shows underneath current window. If I close Diplo window, then I can see espionage window opened. How to make it show on top? I tried to use UI.QueuePopup, but ContextPtr is tied to main window I click the icon from. I run the same way CityState Popup and it shows correctly.
3. Can someone explain what is the difference between:
4. What does UI.incTurnTimerSemaphore() and UI.decTurnTimerSemaphore() do?
5. Does AI buy mountain tiles? f.e. when Machu Picchu has Mountain requirement does AI rush somehow for it? I used VP and in my mod many Mountain = 1 and NearbyMountainRequired = 1 cases.
6. Original wonders (Stonehenge, Artemis, Great Wall etc.) have two types of models which show on map: one unfinished during their construction, and second when it is finished. Does anyone know where they are declared /programmed/stored? I would try to add more for new wonders.
1. I use following codes:
Code:
function OnSpawnChangeSelected(eCs)
local bSpawnDisabled = Players[eCs]:IsMinorCivUnitSpawningDisabled(Game.GetActivePlayer())
Network.SendMinorNoUnitSpawning(eCs, not bSpawnDisabled)
InitCsList()
end
Code:
function OnPledgeProtectionSelected(eCs)
local bPledgeProtect = Players[Game.GetActivePlayer()]:IsProtectingMinor(eCs)
Network.SendPledgeMinorProtection(eCs, not bPledgeProtect)
InitCsList()
end
2. I want to show espionage window on top of current popup (Diplomacy Overview) click using following code:
Code:
function OnSpySelected()
Events.SerialEventGameMessagePopup({Type=ButtonPopupTypes.BUTTONPOPUP_ESPIONAGE_OVERVIEW})
--UIManager:QueuePopup(ContextPtr, PopupPriority.eUtmost)
3. Can someone explain what is the difference between:
Code:
SerialEventGameMessagePopup
SerialEventGameMessagePopupShown
SerialEventGameMessagePopupProcessed.CallImmediate
4. What does UI.incTurnTimerSemaphore() and UI.decTurnTimerSemaphore() do?
5. Does AI buy mountain tiles? f.e. when Machu Picchu has Mountain requirement does AI rush somehow for it? I used VP and in my mod many Mountain = 1 and NearbyMountainRequired = 1 cases.
6. Original wonders (Stonehenge, Artemis, Great Wall etc.) have two types of models which show on map: one unfinished during their construction, and second when it is finished. Does anyone know where they are declared /programmed/stored? I would try to add more for new wonders.
Last edited: