New version of CSD (v15) posted. See last post on CSD thread for full details.
G
G
Link is already broken
QDI
[COLOR="Green"]-- Every 6th hammer goes to the capital,
-- the others are distributed over all cities (incl. capital)
-- according to a sort of 'first come, first serve' principle.[/COLOR]
local ProductionBonus = 3 + (Players[iPlayer]:GetCurrentEra() * 3 )
if ProductionBonus >= 6 then
local pCapital = Players[iPlayer]:GetCapitalCity()
if pCapital ~= nil then
local Remainder = ProductionBonus % 6
ProductionBonus = ProductionBonus - Remainder
local CapitalExtraBonus = ProductionBonus / 6
pCapital:ChangeProduction( CapitalExtraBonus )
ProductionBonus = ProductionBonus - CapitalExtraBonus + Remainder
end
end
repeat
for pCity in Players[iPlayer]:Cities() do
if ProductionBonus > 0 then
pCity:ChangeProduction( 1 )
end
ProductionBonus = ProductionBonus - 1
end
until ProductionBonus < 1
City food per turn = (
GetPlayerRewardsFromMinorCivs(player)
* GetCityWeight(city)
/ GetPlayerTotalWeight(player)
)
<Table name="MinorCiv_TraitYields">
<Column name="TraitType" type="text" reference="MinorCivTraits(Type)"/>
<Column name="FriendLevel" type="integer" default="0"/>
<Column name="YieldType" type="text" reference="Yields(Type)"/>
<Column name="Yield" type="integer" default="0"/>
</Table>
<MinorCiv_TraitYields>
<Row>
<TraitType>MINOR_TRAIT_MARITIME</TraitType>
<FriendLevel>1</FriendLevel>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<TraitType>MINOR_TRAIT_MARITIME</TraitType>
<FriendLevel>2</FriendLevel>
<YieldType>YIELD_FOOD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<TraitType>MINOR_TRAIT_CULTURED</TraitType>
<FriendLevel>-99</FriendLevel>
<YieldType>YIELD_CULTURE</YieldType>
<Yield>5</Yield>
</Row>
<Row>
<TraitType>MINOR_TRAIT_CULTURED</TraitType>
<FriendLevel>1</FriendLevel>
<YieldType>YIELD_CULTURE</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<TraitType>MINOR_TRAIT_CULTURED</TraitType>
<FriendLevel>2</FriendLevel>
<YieldType>YIELD_CULTURE</YieldType>
<Yield>3</Yield>
</Row>
</MinorCiv_TraitYields>
local friendBonus = GameInfo.UnofficialPatch["MARITIME_FOOD_FRIEND"].Value * (1 + majorCiv:GetCurrentEra()) / 100
local allyBonus = GameInfo.UnofficialPatch["MARITIME_FOOD_ALLY"].Value * (1 + majorCiv:GetCurrentEra()) / 100
local civRewards = {[YieldTypes.YIELD_FOOD]=0, [YieldTypes.YIELD_CULTURE]=0, spawnrate=-1}
for minorCivID,minorCiv in pairs(Players) do
if IsValidPlayer(minorCiv) and minorCiv:IsMinorCiv() then
local minorFriendship = minorCiv:GetMinorCivFriendshipLevelWithMajor(majorCiv:GetID())
if (minorCiv:GetMinorCivTrait() == MinorCivTraitTypes.MINOR_CIV_TRAIT_MARITIME) then
if minorFriendship == 1 then
civRewards[YieldTypes.YIELD_FOOD] = civRewards[YieldTypes.YIELD_FOOD] + friendBonus
elseif minorFriendship == 2 then
civRewards[YieldTypes.YIELD_FOOD] = civRewards[YieldTypes.YIELD_FOOD] + allyBonus
end
end
end
end
for minorCivID,minorCiv in pairs(Players) do
if IsValidPlayer(minorCiv) and minorCiv:IsMinorCiv() then
local minorFriendship = minorCiv:GetMinorCivFriendshipLevelWithMajor(majorCiv:GetID())
local minorTrait = minorCiv:GetMinorCivTrait()
for traitInfo in GameInfo.MinorCivTrait_Yields() do
if traitInfo.TraitType == minorTrait then
civRewards[traitInfo.YieldType] = civRewards[traitInfo.YieldType] or {}
civRewards[traitInfo.YieldType][traitInfo.FriendLevel] = civRewards[traitInfo.YieldType][traitInfo.FriendLevel] or {}
if traitInfo.FriendLevel == -99 then
civRewards[traitInfo.YieldType][traitInfo.FriendLevel].Base = traitInfo.Yield
else
civRewards[traitInfo.YieldType][traitInfo.FriendLevel].Base = civRewards[traitInfo.YieldType][traitInfo.FriendLevel].Base or 0
civRewards[traitInfo.YieldType][traitInfo.FriendLevel].PerEra = traitInfo.Yield
end
end
end
end
end
A first 'complete' version of the traits is out as part of my NACSM mod. I don't know if I should maybe release it as a separate mod as well. Would be helpful for those that don't want the rest, but you can already just delete all the other folders of the mod and it should work fine.It loops through the whole table and multiplies all the weights together that apply to a city.
From what I've seen, the AI only builds cities to CSs if there's a request for it, so I wouldn't want to factor that in.
I agree that more traits will result in more diversity between games, I think it's a great idea and that's why I'm doing work to make it easy for you to do whatever traits you want. It's a mod I'd definitely use.![]()
A first 'complete' version of the traits is out as part of my NACSM mod. I don't know if I should maybe release it as a separate mod as well. Would be helpful for those that don't want the rest, but you can already just delete all the other folders of the mod and it should work fine.
I didn't yet implement your better way of weighting cities, I first wanted to lay out the ground works before making it more complicated.
Hopefully people will like it.
Would it be possible to make a city-state you're allied with always request a connection?
I don't think we should be discussing this in Thal's thread.I have been following the progress of your mod, and hope it continues. Its potential is huge. Now, some comments and questions:
1. You've created too many categories for all to work effectively in a standard game as we know it - there would theoretically be less than two CS per type for everyone to fight over. I dread to consider what a Maritime would go for in competitive bidding under those circumstances.
2. Some of the new categories seem like such minor variations on each other, that I'm not sure whether they're worth differentiating. Diplomatic is effectively a subset of Commercial, and it would need to offer a very good value to ever be chosen.
3. Categories like Productive, Progressive, and Prosperous would also need to be very cheap to be worthwhile - and if they were that cheap, would probably be on a different, unrealistic scale. I also have a hard time understanding all but Progressive intuitively.
4. Commercial and Intellectual sound really good, though!
5. Why do you differentiate between Lesser Civs and CS - for future development as quasi-vassal states? If so, why not wait until those features are developed? At the moment it's more likely to lead to confusion.
6. Why did the Basques get bumped down to CS status?