Jarcast's Duchy of Amalfi for VP

jarcast2

Janitor Raccoon
Joined
Jan 10, 2018
Messages
595
Location
Terra Incognita
Amalfi
viEHbmU.png

DOWNLOAD

Leader - Manso I
eUElicI.png


UA - Prima Repubblica Marinara

Receive :c5culture: Culture and :c5greatperson: Great Diplomat points when expending Great Merchants and Admirals.
Coastal and Merchant Buildings and Wonders provide +1 :c5production: Production, +1 :c5culture: Culture, +2 points toward :c5greatperson: Great Merchant and Admiral.
May purchase Trade Units ignoring requirements.

UGP - Comite (Great Merchant)
hWTKxQQ.png

It cannot perform a Trade Mission but can enter the territory of other Civilizations or City-States to establish a Fondaco (only one allowed per foreign player).
Every turn the Fondaco provides the yields ( :c5gold:,:c5science:,:c5culture:) of the most profitable :trade: Trade Route in terms of :c5gold: Gold you could send to the Player owning the plot where you constructed it.
If established on the territory of a City-State, the Fondaco in addition provides also 5 :c5influence: Influence per turn toward that City-State.
Receive an additional :trade: Trade Route slot and additional Delegates to the World Congress (+1 for every 10 City-States at start) for every 2 Fondaci in the world.

Spoiler Fondaco details :
Added code for how AI should behave with Fondaco.


UI - Scaro
uYrM4o9.png

Unlocks at Guilds.
It must be built on Coastal tiles in owned lands and may not be adjacent to another Scaro.
Doesn't remove Forests and Jungles.
+1:c5food:Food, +2 :c5production: Production, +1 :c5culture: Culture, +1 ⚓ Great Admiral Point, +25% :c5strength: Defense bonus.
+1 :c5gold: Gold, +1 :c5production: Production to adjacent Fishing Boats.
+5% Range of :trade: Trade Routes to working City (max 30%).
Naval Units adjacent to a Scaro receive the Borgo Supply promotion that gives a +25% :c5strength: Defense bonus, and heal additional +10 HP every turn.
Enemy Units ending their turn in adjacent Sea tiles receive 20 HP of damage.
+1 :c5gold: Gold, +1 :c5production: Production if on a Road or Railroad connection.

+1 :c5gold: Gold at Economics.
+1 :c5culture: Culture at Architecture.
+1 ⚓ Great Admiral point at Navigation.
+2 :c5production: Production at Industrialization.
+1 :c5food: Food at Fertilizer.
+2 :tourism: Tourism at Radio.
+2 :c5culture: Culture at Electronics.
+3 :c5science: Science at Stealth.

UB - Cartiera (Windmill)
GkYahAX.png

675 :c5production: . Unlocks at Economics.
+3 :c5production: Production, +2 :c5culture: Culture, +2 :c5science: Science
+1 :c5production: Production, +1 :c5culture: Culture, +1 :c5science: Science from Scari, Lumbermills.
+1 :c5production: Production, +1 :c5culture: Culture, +1 :c5science: Science from Civil Servants, Merchant and Engineer specialists in City.
+1 Paper for every 3 Cartiere in the empire.
-1 :c5unhappy: Unhappiness from :c5food:/:c5production: Distress.


+15% :c5production: Production when constructing Buildings.
Grocer and Granary in the City produce +1 :c5food: Food.
Nearby Marshes and Lakes produce +2 :c5production: Production and :c5gold: Gold.

UU - Saettìa (Galleass)
TF3vrWV.png

158 :c5production: . Unlocks at Guilds.
13 :c5strength: (-1), 23:c5rangedstrength:1 (-1), 4 :c5moves:

Can Move after attacking
Naval Inaccuracy
Shallow Draft
Gain :c5greatperson: Great Merchant and Admiral points upon construction or purchase.
Friendly embarked Land Units starting their turn on the same tile of a Saettia receive its movement points generating +2 :c5greatperson: Great Merchant and Admiral points.
Gets stronger (+3:c5strength:, +3:c5rangedstrength:) when on or adjacent to tiles crossed by owned :trade: Trade Routes.
Cabotage Promotion (kept on upgrade): Double movement on Coast tiles.
Quick Study Promotion (kept on Upgrade)


amalfi_map.png


Credits:
  • grant: leader art
  • AsterixRage: promotion icons art
  • Jarcast: the rest
 
Last edited:
Also how does the Load Unit mechanic work for the UU2? I put both the Saettia and a land unit in the same city tile but I didn't see anything related to "loading" happening.
 
Also how does the Load Unit mechanic work for the UU2? I put both the Saettia and a land unit in the same city tile but I didn't see anything related to "loading" happening.
I managed to board it by having the Saettia on a pontoon bridge improvement then moving a land unit on that tile.
But it seems the feature doesn't work as intended although I coded it correctly (link).

I changed the Saettia ability so that now at the start of a turn it gives for 1 turn its movement points and the promo double movement along coast to stacked embarked units.
Update is online.
 
Saettia looked a bit bland so I gave it a quirk.
Update online.

Changelog:
- Saettia: -1 :c5rangedstrength: RCS but now gains additional +3 :c5strength:, +3:c5rangedstrength: when on or adjacent to tiles crossed by owned trade routes.
- Light code cleaning.
 
A strange thing when you build a Scaro, it removes marsh and jungle but not forest. I don't know if it's intended but I couldn't find anything in the description that says so.
Otherwise, Receive a free Social Policy for every 4 Trade Route slots seems a little powerful, it gives me a big lead in my game (renaissance era for the moment). I play with MWfVP of which several wonders add trade route slots but have not yet benefited from it otherwise I would be even further ahead. I think a 1/5 would be enough.
EDIT : I just went from 11 to 13 Slots for the TRs, I didn't get a free Policy.
 
Last edited:
A strange thing when you build a Scaro, it removes marsh and jungle but not forest. I don't know if it's intended but I couldn't find anything in the description that says so.
Otherwise, Receive a free Social Policy for every 4 Trade Route slots seems a little powerful, it gives me a big lead in my game (renaissance era for the moment). I play with MWfVP of which several wonders add trade route slots but have not yet benefited from it otherwise I would be even further ahead. I think a 1/5 would be enough.
EDIT : I just went from 11 to 13 Slots for the TRs, I didn't get a free Policy.
Unlocks at Guilds.
It must be built on Coastal tiles in owned lands and may not be adjacent to another Scaro.
Doesn't remove Forests.

The not removing forest part is in description in Jarcast's OP. Have not tried running the civ in game, so don't know if it's not included in game description maybe.
 
A strange thing when you build a Scaro, it removes marsh and jungle but not forest. I don't know if it's intended but I couldn't find anything in the description that says so.
Scaro doesn't remove forest, it's written in the first post description and in game in the build recommendation text but I will add it also in the build help text. It's a feature.

Otherwise, Receive a free Social Policy for every 4 Trade Route slots seems a little powerful, it gives me a big lead in my game (renaissance era for the moment). I play with MWfVP of which several wonders add trade route slots but have not yet benefited from it otherwise I would be even further ahead. I think a 1/5 would be enough.
Originally in the old version it was 1/3 and changed to 1/4 but if it's still too much then I will nerf to 1/5.

EDIT : I just went from 11 to 13 Slots for the TRs, I didn't get a free Policy.
The check is coded to update every turn so you have to wait the next turn to get the free policy.

EDIT: Update is online.
 
Last edited:
The not removing forest part is in description in Jarcast's OP. Have not tried running the civ in game, so don't know if it's not included in game description maybe.
Scaro doesn't remove forest, it's written in the first post description and in game in the build recommendation text but I will add it also in the build help text.
Yes, sorry, I had not seen. Rather the habit of completing the GameInfo of the Improvement, finally the place, in my opinion, the easiest to consult.
Very beautiful place :love:.
The check is coded to update every turn so you have to wait the next turn to get the free policy.
Yes, I had seen but nothing at the 12th, 13th or 14th slot. And I'm sorry, I could have put some prints in the lua to see what was going on but I was a little too much in the game, didn't want to start looking :blush:.
 
Yes, I had seen but nothing at the 12th, 13th or 14th slot. And I'm sorry, I could have put some prints in the lua to see what was going on but I was a little too much in the game, didn't want to start looking :blush:.
I think I understood why. Your formula is:
Code:
            if IsInteger( numpolicy) and numpolicy > TRPolicyCheck then
                capitalcity:SetNumRealBuilding(DummyFreePolicy, 1)
                save( pPlayer, "TRPolicyCheck", TRPolicyCheck+1)
            end
So if I'm not mistaken, the trigger is when numpolicy is an integer. Outside, I won two TR slots at once from 11 to 13 and so at the start of the turn I never had 12 TR slots. But maybe I'm on the wrong track.
 
Yep, it is that one. I fixed it.
Spoiler lua :
Code:
function Jar_AmalfiUABonusEveryXTRSlot(iPlayer)
    local pPlayer = Players[iPlayer]
    if (HasTrait(pPlayer, traitAmalfiID) and pPlayer:IsAlive()) then
        --if not pPlayer:GetCapitalCity() then return end
        local capitalcity = pPlayer:GetCapitalCity()
        capitalcity:SetNumRealBuilding(DummyFreePolicy, 0)
        local numTRslots = pPlayer:GetNumInternationalTradeRoutesAvailable()
        local numpolicy = math.floor(numTRslots *UAfactor)
        if numTRslots > 0 then
            TRPolicyCheck = load( pPlayer, "TRPolicyCheck" );
            if TRPolicyCheck == nil then TRPolicyCheck = 0 end
            if numpolicy > TRPolicyCheck then
                capitalcity:SetNumRealBuilding(DummyFreePolicy, 1)
                save( pPlayer, "TRPolicyCheck", TRPolicyCheck+1)
            end
            for pCity in pPlayer:Cities() do
                local NavalProdBonus = math.floor(NavalUnitProdBoost *numTRslots *UAfactor)
                local bnum = math.min( NavalProdBonus, NavalUnitProdBoostMax)
                Jar_AddShipProdDummy(pCity, bnum)
            end
        end
    end
end
if g_IsTraitActive then GameEvents.PlayerDoTurn.Add(Jar_AmalfiUABonusEveryXTRSlot) end;
Update online.
 
The Music Bug that was reported for Nan Madol also happens with this mod. In this case, the main menu music just keeps playing when a game is started
 
I really like this rework, it feels a lot more in line with VP's design philosophy and general power level. Worth keeping an eye on the UA, because free policies are superbly good (1:5 could be wise, especially as someone who plays with MW), but with 1:4 it usually won't kick in until around the Medieval Era (barring the coup of grabbing both Petra and Colossus, which is easier said than done), so I think it might be balanced enough to work. Would it be possible to code it so that it remains at 1:4 for vanilla and bump it to 1:5 if MW's in use? Actually, gimme a bit to see just how many TRs you can reasonably get from MW wonders ("reasonably" meaning not including Great Zimbabwe from completing Authority because ew, no warmongering in my peaceful trade game). I can think of four off the top of my head, and I'm sure there are more available.
 
Last edited:
A policy for every 4 trade routes should be fine. Compare it to Poland's free policies, it's not that much greater a rate.
Other mods should be a non-factor. Balance your mod for vanilla VP, not modded. If a player thinks a combination of two mods makes the game unacceptably imbalanced then they can just not use them together, and trying to consider every mod a player may or may not be using when balancing your own mod is just a fools errand. That's never going to end.
 
A policy for every 4 trade routes should be fine. Compare it to Poland's free policies, it's not that much greater a rate.
Other mods should be a non-factor. Balance your mod for vanilla VP, not modded. If a player thinks a combination of two mods makes the game unacceptably imbalanced then they can just not use them together, and trying to consider every mod a player may or may not be using when balancing your own mod is just a fools errand. That's never going to end.
True, Poland makes for a good point of reference.
I agree that vanilla balance should come first, but I don't think that compatibility should be completely ignored, at least not when it comes to a fairly popular overhaul like More Wonders. Though with that said, I'm making a suggestion rather than a demand, so it's totally up to Jarcast if they think it's a sufficiently important edge case. Nothing stopping me from going in and tweaking the numbers myself instead, after all!
 
I quoted MW but even without that the surge in the number of policies is faster than your calculation, @Urzamax . You forgot that part of the UU - Comite : "Receive an additional Trade Route slot for every 2 Fondaci in the world." I can assure you that even at 1:5 you will have your first free policy long before the medieval era.
 
Update online.

Changelog:
- fixed music bug
- UA balance: free policy back to 1/4 of Trade routes (was 1/5) but added a cap, that is maximum 4 free policies: after reaching 16 trade routes slots receive no more free policies regardless of how many more you hoard through Fondaci and other exotic sources.

Now I think it solves all the issues at hand.
But if someone is still unsatisfied by those specifications you can go to the lua folder of the mod, open Jar_Amalfi_Functions.lua with a notepad and change those values:
Code:
local UAfactor = 1/4
local UAFreePolicyCap = 4

Btw, thank you all for the feedback <3
 
Last edited:
Looks very interesting!

I don't think the +1 paper for cartiera (windmills) is necessary. They already provide 1 per 3, I think that's more than enough already.
 
Back
Top Bottom