3UC/4UC for VP: Project Coordination Thread

Status
Not open for further replies.
Change to Qila:
Spoiler :

UB: Qila (Castle)
Available at Chivalry
2 maintenance
2:c5culture: Culture, 1 :c5greatperson:Great Artist point
+ 125 HP
(up from 100 HP)
+15 :c5strength:CP
+1 :c5strength:Defense in City for every World Wonder built in the City
15% :c5strength:Defense in city converted to :c5culture:Culture
+3 :tourism:Tourism after Flight
-10% :c5unhappy:Crime in City

+1 :c5production:production to quarries
1:greatwork: Great Art Slot
+10 % :c5war:supply cap from :c5citizen:pop.
I think this change solves a few issues with the Qila it had before:
  • Distinguishes Qila from other flat yield converter buildings (Qadi, Hanse, Coffee House)
  • Gives a nod to the Mughal mod, which gives Qila bonuses for buildings and wonders in city
  • makes the building feel a little more interactive and dynamic
  • Removes the food from the building, which felt a bit off to me
Change to Sambadrome:
Spoiler :
UB: Sambadrome(Opera House)
unlocked at acoustics
Requires amphitheatre in city
3 maintenance
+4 :c5culture:Culture (up from +3:c5culture:)
+4 :c5goldenage:Golden Age Points
1 Musician specialist slot

+1 :c5gold:Gold to Musicians Guilds on Empire
Musicians produce +1 :c5gold:Gold and +2 :c5goldenage:GAP
+10%:c5culture: Culture in city
(up from +5)
+33% :c5greatperson:Great Musician rate in the city
+25% :c5goldenage:GAP yield in city during Golden Age
+2 :tourism:Tourism at Radio

1 Great Music Slot

Issues solved with changes to Sambadrome:
  • Avoids some rather uncharitable comparisons. The only difference between Sambadrome and Pairidaeza was 1 culture vs 2 GAP on guilds, and Sambadrome only affected 1 guild, so it was significantly weaker. This also differentiates it from kabuki, which also uses the buildingclassyieldchange table for its main effect.
  • Kabuki now gives base 5% culture, and sambadrome doubles culture change to 10%. Helps differentiate the two unique opera houses, and gives Samba a much-needed buff
  • Moving GAP and gold to musician slots, rather than to the guilds themselves is a slight nerf (net gain of 6 gold per sambadrome in the guild cities, and 1 gold in every city after that, but a net loss of 4 GAP in non-guild cities. the slots also have to be worked, unlike before.
  • nerfs Kabuki, which is a bit too strong in comparison to samba.
One more thing I noticed is that Greece and Austria's UBs are very similar to each other. Also Greece already gets a flat bonus for every CS ally (bonus unitcombat), so it’s redundant:
Spoiler :
UB - Agora (Market)
+2 Gold in city for each CS Ally
+20% Production towards diplomatic units

UB: Standschützen (Arsenal)
+20% land military unit production
+2 Gold and +1 Culture for each allied CS

Proposal for new Agora:
+25%:c5production: Production towards diplomatic units
Diplomatic units built in this city receive the 'Proxenos' promotion.
Proxenos - +5 :c5influence:Influence and +2:c5gold: Gold per turn in the capital from diplomatic missions​
 
Last edited:
Portugal things - not every naval unit got Age of Discovery promotion. And it's not working anyway :(
its only supposed to be on naval melee units, I think.
 
edit - false alarm, it is working. still - not all my ships got promotion, despite description says all naval units, some triremes were left without it
 
Last edited:
the lua gives the Age of Discovery promotion to units trained in the city with university of coimbra, but only new units

I think the idea for the wonder, originally, was to have the building apply the promotion to all units of the correct class, like the Grande Canal, or Statue of Zeus.

@Hinin, what do you think should be done?
 
the lua gives the Age of Discovery promotion to units trained in the city with university of coimbra, but only new units

I think the idea for the wonder, originally, was to have the building apply the promotion to all units of the correct class, like the Grande Canal, or Statue of Zeus.

@Hinin, what do you think should be done?

I think that all Portuguese naval melee units should indeed obtain the AoD promotion (the total amount of science gain won't change, only the pace it is acquired) : your Triremes can begin exploring the far sides of your part of the world before the Nau/Carrack is unlocked (like the Portuguese did with Africa) and, even if they find themselves far away from your territory as a result when the UM1 unlocked, the Nau, thanks to its ability, can basically finance itself (so, for each Nau you build, you can buy one in the near future).
My question is : shouldn't ranged naval units also benefit from this promotion ?

Also, could you give me a list of the modders you've contacted, so that I can contact the others and update the credit table ?
 
my opinion about Portugal, before I managed to get Cacadores - science from exploration is an overkill and I was really pissed that I got bandeirantes later on as an event (which is not related to this mod really). Anyways - sending 4 Nau into different world direction, I got so much science, my supply cap plummeted drastically. Right now Portugal gets science from trade routes, ships (via uni of coimbra) and bandeirantes (civ event). At the same time, lack of ability to place feitoria anywhere (this is basic VP issue) is hurting them, as this is one UI that is all about placement. If you put it in non-optimal spots, you can get a difference of couple of :c5production::c5gold:.

To sum things up - I don't know if Portugal should be a science civ and at the moment they clearly are.
 
@Hinin, I contacted carboardmech for the proa icon, and I contacted JFD, TPangolin and Civitar re. the kampong, but I only ever heard back from cardboardmech

I wonder if we couldn't ask G to rescale the rate for yields from exploration? I like the yields on exploration thing, but I think they come too fast, because they are only balanced for bandeirantes. If the yields from exploration table could be halved (it takes 2x as many tiles revealed to get the same yield), and bandeirantes' promotion was doubled, then I think that would be much better
 
Last edited:
yup! the latifundium has to be unpillag-able and permanent or else people could remove them and rebuild for free border growth and multiple copies of figs
 
Got it! Makes sense!

Also, I posted this on the GitHub: The Fatigue from Egypt's Khopesh is not coming off of my War Elephants. I don't know if it's because they're mounted and can't "fortify" or what, but that Fatigue was permanent.
 
Need help with new Agora lua:
+2 gold in capital every time a diplomatic unit which was built in a city with an agora is expended
Code:
   function ProxenosGold(iPlayer, iUnit, iUnitType, iX, iY)
        local pPlayer = Players[iPlayer]
        local pUnit = pPlayer:GetUnitByID(iUnit)

        if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_GREECE_PROXENOS) then
            local pPlot = Map.GetPlot(pUnit:GetX(), pUnit:GetY())
            local pCiv = pPlot:GetOwner()
            local pCapital = pPlayer:GetCapitalCity()
            local pGold = GameInfoTypes.BUILDING_DUMMYGOLD
          
            if pCiv:IsMinorCiv() then
                pCapital:SetNumRealBuilding(pGold, (pCapital:GetNumRealBuilding(pGold) + 2))
            end
        end
    end

    GameEvents.UnitPrekill.Add(ProxenosGold)
There is no lua hook for if a non-GP unit is expended, so instead the lua uses a code for if any unit is removed from the game for any reason.
Code needs to check if a unit which was destroyed:
1. had the unique PROXENOS promotion from the Agora
2. if the unit was destroyed in a minor civ's territory.
If a diplo unit was destroyed in CS territory, it stands to reason that they were destroyed after having completed a diplo mission
 
Need help with new Agora lua:
+2 gold in capital every time a diplomatic unit which was built in a city with an agora is expended
Code:
   function ProxenosGold(iPlayer, iUnit, iUnitType, iX, iY)
        local pPlayer = Players[iPlayer]
        local pUnit = pPlayer:GetUnitByID(iUnit)

        if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_GREECE_PROXENOS) then
            local pPlot = Map.GetPlot(pUnit:GetX(), pUnit:GetY())
            local pCiv = pPlot:GetOwner()
            local pCapital = pPlayer:GetCapitalCity()
            local pGold = GameInfoTypes.BUILDING_DUMMYGOLD
         
            if pCiv:IsMinorCiv() then
                pCapital:SetNumRealBuilding(pGold, (pCapital:GetNumRealBuilding(pGold) + 2))
            end
        end
    end

    GameEvents.UnitPrekill.Add(ProxenosGold)
There is no lua hook for if a non-GP unit is expended, so instead the lua uses a code for if any unit is removed from the game for any reason.
Code needs to check if a unit which was destroyed:
1. had the unique PROXENOS promotion from the Agora
2. if the unit was destroyed in a minor civ's territory.
If a diplo unit was destroyed in CS territory, it stands to reason that they were destroyed after having completed a diplo mission


So if the unit gets killed in minor civ territory, it will also trigger.
Might not be often, but there might not be a better way to check it.
Perhaps the hook used for the Goedendag promotion removable can be used.. cant remember the exact call, but I think that it was when the unit was destroyed, and I think that it sent along the unit which destroyed it, which in the case of diplo units would be null.

Regarding the actual code, I have some suggestions.

Since the check isMinorCiv only needs to check the civ, you can put the pCapital and pGold variable instead the if statement to avoid useless checks, when isMinorCiv is false
 
So something like this?
It still doesn't work though :(
Code:
   function ProxenosGold(iPlayer, iUnit, iUnitType, iX, iY, iDelay, iKiller)
        local pPlayer = Players[iPlayer]
        local pUnit = pPlayer:GetUnitByID(iUnit)

        if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_GREECE_PROXENOS) then
            local pPlot = Map.GetPlot(pUnit:GetX(), pUnit:GetY())
            local pCiv = pPlot:GetOwner()
       
            if pCiv:IsMinorCiv() and iKiller==null then
                local pCapital = pPlayer:GetCapitalCity()
                local pGold = GameInfoTypes.BUILDING_DUMMYGOLD

                pCapital:SetNumRealBuilding(pGold, (pCapital:GetNumRealBuilding(pGold) + 2))
            end
        end
    end

    GameEvents.UnitPrekill.Add(ProxenosGold)
 
So something like this?
It still doesn't work though :(
Code:
   function ProxenosGold(iPlayer, iUnit, iUnitType, iX, iY, iDelay, iKiller)
        local pPlayer = Players[iPlayer]
        local pUnit = pPlayer:GetUnitByID(iUnit)

        if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_GREECE_PROXENOS) then
            local pPlot = Map.GetPlot(pUnit:GetX(), pUnit:GetY())
            local pCiv = pPlot:GetOwner()
     
            if pCiv:IsMinorCiv() and iKiller==null then
                local pCapital = pPlayer:GetCapitalCity()
                local pGold = GameInfoTypes.BUILDING_DUMMYGOLD

                pCapital:SetNumRealBuilding(pGold, (pCapital:GetNumRealBuilding(pGold) + 2))
            end
        end
    end

    GameEvents.UnitPrekill.Add(ProxenosGold)

GameEvents.CombatEnded.Add() could also be the place to check it.
Method signature is (iAttackingPlayer, iAttackingUnit, attackerDamage, attackerFinalDamage, attackerMaxHP, iDefendingPlayer, iDefendingUnit, defenderDamage, defenderFinalDamage, defenderMaxHP) but I would probably check first if the event fired in the first place by putting in a console command.

Have you check that your current function is triggered at all, or if it fails during execution in some way ?

Also it seems like your method signature is a little wrong. I found this (iPlayer, iUnit, iUnitType, iX, iY, bDelay, iByPlayer)
 
Have you check that your current function is triggered at all, or if it fails during execution in some way ?
I actually have no idea how to check that. I placed it in its own file, added it to the .modinfo, then simplified it so that it only checked if the unit had the proxenos promotion (no other checks, the unit simply has to cease to exist and the lua should trigger). Then I built and deleted the unit and nothing happened.

I've seen other mods use this hook, and work. the GameEvents.UnitPrekill() hook isn't exactly a secret (it's been around since 2014). I don't know where to begin on how to debug this, but I've never professed to know jack about lua coding

In other news, I replaced the icons for the Cacador. Old icon on left, new icon on right:
upload_2018-3-30_14-33-47.png
 
Sounds like an issue for @adan_eslavo.

I tried building a solution just now and got an error. Said zip7 crashed. Is anyone else getting a similar error?
 
Status
Not open for further replies.
Back
Top Bottom