1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[MOD] Few questions without answers

Discussion in 'Civ5 - Creation & Customization' started by adan_eslavo, Feb 12, 2020.

  1. adan_eslavo

    adan_eslavo Archmage of all Pixels Supporter

    Joined:
    Apr 23, 2017
    Messages:
    2,027
    Gender:
    Male
    Location:
    Łódź, Poland
    I play with modded VP, but these are rather overall issues. I have stucked at few problems:
    1. I use following codes:
    Code:
    function OnSpawnChangeSelected(eCs)
        local bSpawnDisabled = Players[eCs]:IsMinorCivUnitSpawningDisabled(Game.GetActivePlayer())
        Network.SendMinorNoUnitSpawning(eCs, not bSpawnDisabled)
        InitCsList()
    end
    and
    Code:
    function OnPledgeProtectionSelected(eCs)
        local bPledgeProtect = Players[Game.GetActivePlayer()]:IsProtectingMinor(eCs)
        Network.SendPledgeMinorProtection(eCs, not bPledgeProtect)
        InitCsList()
    end
    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:
    Code:
    function OnSpySelected()
    Events.SerialEventGameMessagePopup({Type=ButtonPopupTypes.BUTTONPOPUP_ESPIONAGE_OVERVIEW})
        --UIManager:QueuePopup(ContextPtr, PopupPriority.eUtmost)
    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:
    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: Feb 12, 2020

Share This Page