More Unique Components for Vox Populi

3rd and 4th Unique Components for VP - Official thread 87

I found a problem that when I playing with Poland, its UB Barbican Castle replaced Castle and Armony, but after building it I can't build Military Academy anymore, because there is no Armony in my city and I can't build it. I think Barbican Castle doesn't "really" replace the Castle. Moreover, lack of Military Academy also made me not able to build Hall of Honor (A wonder that unlocked by Autocracy Ideology) .
 
I found a problem that when I playing with Poland, its UB Barbican Castle replaced Castle and Armony, but after building it I can't build Military Academy anymore, because there is no Armony in my city and I can't build it. I think Barbican Castle doesn't "really" replace the Castle. Moreover, lack of Military Academy also made me not able to build Hall of Honor (A wonder that unlocked by Autocracy Ideology) .
@pineappledan I think dummy Military Academy should help if that's the case, but could it be possible that we missed such bug for years ;p?
 
I don't know if someone mentioned that the Enlightment era Mod has the same building "Salon" to French UB, will there be a compatibility patch to solve that? Whatever, thank you for your marvious work:). A Civ5 player from China.
If @Padre19 is game, I would suggest EE change the Salon to a "Parlour" or "Barbershop". I could furnish an icon for the change.
Hi everyone, I have a question regarding LUA. I try to create the most stable modpack possible using 34UC (V.40) and an older VP version (12/2018). My problem is the fonction "math.random()" creates desync most of the time between players and the host. Is there a way to bypass the fonction "math.random()" using a "fake random number" shared between players like the turn number for example ?

If it is possible, how can I change "pUnit:SetHasPromotion(tAvailablePromotions[ math.random(1, #tAvailablePromotions) ], true)" from Cacadores for example ?

Spoiler :

-- Cacadores 2.0
-- Author: pineappledan
-- DateCreated:
-- 2018-02-26 updated by Infixo
-- 2018-03-04 rewritten by Infixo
-- 2018-04-20 Infixo, added IsValidPromotion instead of CanPromote
--------------------------------------------------------------
local tEligiblePromotions = {
GameInfoTypes.PROMOTION_WOODLAND_TRAILBLAZER_I,
GameInfoTypes.PROMOTION_WOODLAND_TRAILBLAZER_II,
GameInfoTypes.PROMOTION_WOODLAND_TRAILBLAZER_III,
GameInfoTypes.PROMOTION_SURVIVALISM_1,
GameInfoTypes.PROMOTION_SURVIVALISM_2,
GameInfoTypes.PROMOTION_SURVIVALISM_3,
}
-- replacement for CanPromote that will check only for prereqs, ignoring unit combat
function IsValidPromotion(pUnit, ePromo)
if pUnit:IsHasPromotion(ePromo) then return false end -- not valid if already granted
local pPromotion = GameInfo.UnitPromotions[ePromo]
if not pPromotion then return false end -- assert
-- check AND
if pPromotion.PromotionPrereq then
--print("...checking AND", pPromotion.PromotionPrereq)
if not pUnit:IsHasPromotion( GameInfoTypes[pPromotion.PromotionPrereq] ) then return false end
end
-- check ORs
local bLacksOrPrereqs = false
for i = 1, 9 do
local sField = "PromotionPrereqOr"..tostring(i)
if pPromotion[sField] then
--print("...checking OR", pPromotion[sField])
if pUnit:IsHasPromotion( GameInfoTypes[pPromotion[sField]] ) then return true end
bLacksOrPrereqs = true
end
end
return not bLacksOrPrereqs
end
function OnUnitPromotedCacadorPromotion(iPlayer, iUnit, iPromotionType)
local pPlayer = Players[iPlayer]
if not pPlayer then return end -- assert
local pUnit = pPlayer:GetUnitByID(iUnit)
-- No need to go further if unit has all eligible promotions
if not (pUnit and pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_PORTUGAL_CACADOR) and pUnit:GetLevel() < #tEligiblePromotions + 2) then return end

-- Create a list of available promotions
local tAvailablePromotions = {}
for _,promo in ipairs(tEligiblePromotions) do
if IsValidPromotion(pUnit, promo) then table.insert(tAvailablePromotions, promo) end
end
if #tAvailablePromotions == 0 then return end -- assert

-- Grant a random one
--print("valid promos are") for k,v in pairs(tAvailablePromotions) do print(k,v) end
pUnit:SetHasPromotion(tAvailablePromotions[ math.random(1, #tAvailablePromotions) ], true)
end
GameEvents.UnitPromoted.Add(OnUnitPromotedCacadorPromotion)

Thank for your help !
I would look at the Maya code for such a change. There are several examples in the ball court of functions that make changes based on turn number.
I found a problem that when I playing with Poland, its UB Barbican Castle replaced Castle and Armony, but after building it I can't build Military Academy anymore, because there is no Armony in my city and I can't build it. I think Barbican Castle doesn't "really" replace the Castle. Moreover, lack of Military Academy also made me not able to build Hall of Honor (A wonder that unlocked by Autocracy Ideology) .
It sounds like you disabled either the dummies or disabled the lua that adds the dummies. This issue has been addressed in the past; I am confident it works in the current version.
 
I noticed in the lua.log that there is this error permanently:

Code:
[610187.750] Runtime Error: E:\Documents\My Games\Sid Meier's Civilization 5\MODS\(over) More Unique Components for VP (v 77)\Greece/Klepth/Klepht.lua:16: attempt to index local 'pAttackingPlayer' (a nil value)

Perhaps add pAttackingPlayer == nil in the first return end could resolve that ?
 
It’s probably a case of too many mods. I had strategic view glitch out on me a few times and the fix was to remove mods that added more art. Didn’t matter which ones.
 
It’s probably a case of too many mods. I had strategic view glitch out on me a few times and the fix was to remove mods that added more art. Didn’t matter which ones.

I get this all the time, save and reload seems to fix.

The poor outdated Civ 5 engine doesn't like all the new textures I guess. Sadly the red's unit mod pack, though a cool mod that gives each civ their own custom looking units, causes all kinds of weirdness, and only seems to be getting worse as things like VP grow. Repeating unit sounds in one of them. Might have to cut it.
 
How exactly does the hard and fast promotion on the assyrian iron chariot work? Do you need more improved horses/iron than chartiots? Does import/export influence it? Does using those resources for other units matter?
 
I noticed someone mentioned the problem about the model of Scythed Chariot, I encountered another problem that I definitely lost the model of that (see it on pic), I just load VP、3rd/4th UC, no other mods, I wonder how to solve it.:crazyeye:
 

Attachments

  • celts.png
    celts.png
    1.9 MB · Views: 118
Was playing with More UC v. 79, and I just found a militaristic city-state that offers the Pracinha, even though it's been replaced.
 
Hello all, been playing 4UC exclusivly for quite some time. I just tryed to switched to emperor and tried games with India and Arabia since I normally do best with tall tradition play.

But it really seems impossible with the current balance, is it adjusted to new versions of VP?

Whoever my neighbor is (Russia, Denmark, Maya) they just come with a carpet of Units thats really unbeatable for me. Avoiding war seems impossible as they forward settle super hard and still want my lands.

In the one india game where I had my own Island, the AIs just outpaced me so hard I was allways unhappy with poverty despite having all buildings.

Any tipps? King is on the other hand super easy to beat.
 

Attachments

  • VP-4UC-Arabs.jpg
    VP-4UC-Arabs.jpg
    1.9 MB · Views: 144
Just noticed that VP already give the Great Galleass Bombardment 1, better to remove or alter your changes for this one.
 
Does splash have a chance? I just played Arabia and camel Archer don't splash dmg adjecent units all the time, makes it really underwhelming tbh
 
GGalleass was given Bombardment I in base VP because I made that change here, and it got submitted into base VP. For most of those minor civ only gifted UUs, their design drew from how 4UC uses them.

Camel archer is a regular base component, not a 4UC one but ok.

Splash only works on units you are in range of, so both the camel archer and the unit you are hitting need to be adjacent to each other, in a sort of triangle, for the splash to hit.
 
Any tipps?

Without being harsh, from the screenshot you provided I can already see a few problems. On turn 189, your cities should already be connected with roads, and you should have many more tiles improved. Just one tip I would give you is to have more workers early, at least one worker per city would be a minimum. You should have settled the area west of Mecca a while ago, to benefit from those lakes tiles and secure more salt tiles. You should also be the one controlling the Fountain of Youth, not the Incas. You have accumulated 716 gold. Unless you have units to upgrade, you should just spend that gold to rush buildings or buy workers or good tiles. You can't go wrong if you buy a worker on a city you just founded, and then prioritize the luxuries and sell your extra copies to AIs.

I suggest you watch a youtuber to get a general idea of what to prioritize because simply looking at what they do would teach you a lot.
 
Code:
v80:
- Reworked
    - Adds the Beer Hall as the unique building for Germany, replacing the Teutonic Order
        - Teutonic Order remains as the unique wonder for Prussia custom civ (HungryForFood)
- Tweaked/modified:
    - Fale Tele: Now renamed to Marae. Has new icon
    - Lamassu Gate:
        - Removed Writer Specialist and GWWriting slot
        - lowered CS to 3
        - Increased city strike modifier to +30%
        - Added 15% unit production converted to Faith
Lamassu Gate changed from a Writers Wall of Babylon knock-off into an early founding faith generator
Germany's UNW replaced with a UB that interacts more with the new unit gift mechanic. More info in the OP
BeerHall256.png

Note that the Teutonic Order hasn't gone away; It is now the exclusive UNW of JFD's Prussia for VP
 
Top Bottom