[Extension] Few More Buildings for VP

All Mulled_Wine_x.dds still in \art !?

I voluntarily left the material and the code of the previous version as a comment for some people who would prefer it. I can clean up if you prefer.


And why not -1 unhapiness caused by specialists ?
(NoUnhappfromXSpecialists = '1')
It would make the building really valuable

Good idea. At first glance, I said to myself OK, but how can I justify it (the +1 :c5happy: Happiness is for fun in ski resort) but in the end, it is mostly wealthy people (specialists) who go skiing so it seems not bad. I change that.
 
upload_2021-1-3_22-53-24.png
 

Attachments

you guys should feel free to vulture my tidal plant from my old building tweaks mod, if you wanted
upload_2019-8-6_12-16-41-png.531474
 
Just notice that cemetery counts upgrading unit as dying (gives faith)
Yeah I notice this cemetry gives faith very (too?) often.
Yes, I use PreKill fonction and an upgrade considers that the unit is killed to move on to the next one.
I don't know how to avoid this but I didn't look around much because I consider it to make sense. It is not necessarily lancers who become tank drivers, they pass to posterity when they die and their regiment retains their combat skills.
 
Yes, I use PreKill fonction and an upgrade considers that the unit is killed to move on to the next one.
I don't know how to avoid this but I didn't look around much because I consider it to make sense. It is not necessarily lancers who become tank drivers, they pass to posterity when they die and their regiment retains their combat skills.
Maybe this code we used in MUCfVP will help you:
Code:
local ePromotionCaptives = GameInfoTypes.PROMOTION_UNIT_AZTEC_CAPTIVES_OF_WAR

-- 50% chance to spawn worker unit on kill by an Eagle
function OnCombatEndSpawnWorker(iAttackingPlayer, iAttackingUnit, iAttackerDamage, iAttackerFinalDamage, iAttackerMaxHP, iDefendingPlayer, iDefendingUnit, iDefenderDamage, iDefenderFinalDamage, iDefenderMaxHP, iInterceptingPlayer, iInterceptingUnit, iInterceptorDamage, iPlotX, iPlotY)
    local pAttackingPlayer = Players[iAttackingPlayer]
   
    if not (pAttackingPlayer and (iDefenderFinalDamage >= iDefenderMaxHP)) then return end
   
    local pAttackingUnit = pAttackingPlayer:GetUnitByID(iAttackingUnit)

    if pAttackingUnit ~= nil and pAttackingUnit:IsHasPromotion(ePromotionCaptives) then
        if Game.Rand(4, "Eagle capture roll") == 1 then
            local pNewWorker = pAttackingPlayer:InitUnit(GameInfoTypes.UNIT_WORKER, iPlotX, iPlotY)
            pNewWorker:SetHasPromotion(GameInfoTypes.PROMOTION_PRISONER_WAR, true)
            pNewWorker:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_TLACOTIN, true)
        end
    end
    if pAttackingUnit ~= nil and (pAttackingUnit:GetUnitType() == GameInfoTypes.UNIT_AZTEC_JAGUAR) then

        if pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_10) then
            local eNewEagle = pAttackingPlayer:InitUnit(GameInfoTypes.UNIT_AZTEC_EAGLE, iPlotX, iPlotY, -1, DirectionTypes.NO_DIRECTION, false)
            eNewEagle:Convert(pAttackingUnit, false, false)
            eNewEagle:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_10, false)
            eNewEagle:SetHasPromotion(GameInfoTypes.PROMOTION_BARBARIAN_BONUS, false)
       
        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_9) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_10, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_9, false)

        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_8) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_9, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_8, false)

        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_7) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_8, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_7, false)

        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_6) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_7, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_6, false)
       
        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_5) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_6, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_5, false)
       
        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_4) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_5, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_4, false)
       
        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_3) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_4, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_3, false)
       
        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_2) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_3, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_2, false)
       
        elseif pAttackingUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_1) then
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_2, true)
            pAttackingUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_AZTEC_CUAUHOCELOTL_1, false)
        end
    end
end

GameEvents.CombatEnded.Add(OnCombatEndSpawnWorker)
It was initially different promotion, but mechanics used checks if defender is killed. In your case it should be the attacker who is checked. And afair this code is needed too:
Code:
--Koa's bleeding and others
UPDATE CustomModOptions    SET Value = 1 WHERE Name = 'EVENTS_RED_COMBAT';
UPDATE CustomModOptions    SET Value = 1 WHERE Name = 'EVENTS_RED_COMBAT_RESULT';
UPDATE CustomModOptions    SET Value = 1 WHERE Name = 'EVENTS_RED_COMBAT_ENDED';
 
While my cities build Clock Towers, there's no picture on their City Banner, just blackness. Does that happen for anyone else?
 
Really like the new buildings, especially the ski resort which I think could be integrated into VP. I noticed something while going over the database though, ski resort has "20" as HurryCostModifier, all other buildings have "-20". I haven't tested it but I suspect that's a typo.
 
especially the ski resort which I think could be integrated into VP.
Thank you, a collaboration of @Asterix Rage and me.

I noticed something while going over the database though, ski resort has "20" as HurryCostModifier, all other buildings have "-20". I haven't tested it but I suspect that's a typo.
Yes, thank you very much for the remark, I will correct that.
 
You have to actually work the mountain for the ski resort, rather than it giving yields for each nearby mountain? That sounds a lot weaker than I thought.

I do think it might be a good idea to add a ski resort as an atomic building, though it’s strength and abilities could be debated. There is a lot of empty space in that era.
 
Back
Top Bottom