3UC/4UC for VP: Project Coordination Thread

Status
Not open for further replies.
  • Fixed missing semicolon in database.log. Who left it there in Teurtonic Order, he? :p Check always before merge.
  • I'm cleaning up all code, check for missing stuff, reapair bugs. I'm on Brazil now. When I'm finished I can take some lua to code of course. I prefer finishing what we have first.
  • Main post updated: Austria and half-Brazil added. Some changes to existing made.
  • Updated Github.
  • @Infixo can you check if rest of stuff from Fix.sql file was put into VP? I wrote about this on Github to Gazebo. If yes there's no point in keeping that file and folder in there.
 
Last edited:
Just updated songhai SQL to switch mandekalu to knight.

reduced Mandekalu CS to 25 (same as base knight). Mandekalu gets some crazy bonuses to flanking and city attack; combined with the 4CS it will get when near a sofa, I think keeping it at the base CS is fine. It had no bonus CS when it was a horseman replacement anyhow

I was taking a look at the Wat, and I realize that even with the bonuses we have given to the Wat, it is still a serious down-grade. Wat come 2 techs earlier than a normal constabulary (at theology), so by moving the culture to the elephant camp we actually have made the bonus to forest/jungle LATER than it was before. The additional spy actions don't actually do anything for a full era, since no one has spies in medieval. I don't think that should be moved though, it is much more thematic on an elephant lumber camp than on a Wat. However, what about this for a different bonus?

Wat changes:
remove +1 culture to forest/jungle
prevents spy actions (wonder disruption and unrest)
Has 2 slots for Great works of Writing
Theming bonus: 2:c5science: 2:c5faith:

background - Wats are actually complexes of several buildings. Wats usually have 2 buildings in particular which house relics and holy texts of Buddhism: The mondop and the ho trai
In game, there are buildings you can put in every city that have theming bonuses for art/artifacts (museum) and music (radio tower). The only possible theming bonuses for writing are through wonders (great library, Oxford, etc.). This would mean Siam would be the only civ with access to a non-wonder GWW theming bonus.
 
Last edited:
@Infixo I'm just curious about changes you made to Barbican. Beside adding GameInfoTypes I forgot totally about, was there something wrong with the code? I thought it was working.
 
@Infixo I'm just curious about changes you made to Barbican. Beside adding GameInfoTypes I forgot totally about, was there something wrong with the code? I thought it was working.
Main logic was executed only when you moved into a city. So, once you get the promo, it would stay forever.
 
Good catch. I didn't check this code with unit leaving the city, that's true.
 
Re: optimizations

I see that you use many time such code:
Code:
if <conditon> then
           if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_MONGOLIA_MASSACRE) == false then
               pUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_MONGOLIA_MASSACRE, true)
           end
else
           if pUnit:IsHasPromotion(GameInfoTypes.PROMOTION_UNIT_MONGOLIA_MASSACRE) then
               pUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_MONGOLIA_MASSACRE, false)
           end
end

Those Lua checks are unnecessary. The very first thing DLL does is to check if the status has actually changed. If not - it does nothing. And it does it like much faster. Just write:
Code:
pUnit:SetHasPromotion(GameInfoTypes.PROMOTION_UNIT_MONGOLIA_MASSACRE, <condition>)
 
I didn't know that. So if I set him to take off promo and there will be no such promo it will not print any error right? I will do reowrk for that later on. Do not bother with that.
 
While doing the epic game, I came across another oddity with the K'atun Ahaw promotions - it seems like while now every unit gets them(good on that), only the first two are visible as promotions. Units do seem to get the exp bonuses and I'm reasonably sure thus the combat bonuses as well - though I haven't been to a war in the current game.

(Will post the b'ak'tun #13 turn count on epic in this post in couple more hours, I think.)

On a balance note, the ball court's science/faith on b'ak'tun seems very low given that it'll happen maybe ten times(if a game lasts that long) during a game, per city. Comparatively bigger instant yields happen at a far bigger frequency on other UB's (Ranch, Runestone and Fa'le Tele come to mind at least). Might be worth taking a look at, either changing it to something else (since the promotions themselves are rather juicy) or radically boosting the numbers.
 
@FoxOfWar Can you post screenshots? It would be clear what you catch.
What values for Pitz do you suggest?
@Infixo I reworked lua as you said. You can check that if it is not a problem.
 
Last edited:
Re: notifications

There was some discussion about notifications, sorry I can't say where, too many posts. About the style? Was it resolved? I've reworked Buffalo Pound and notifications are like this:
20180121220603_1.jpg
 
That conversation was specifically about yields, not about new tiles appearing. This looks great!
 
@Infixo Yesterday I reworked all notifications and popups including flax, figs and bison spawn. They try to follow the same pattern. v25.3 and v25.4.

Code:
pPlayer:AddNotification(0, 'The City of [COLOR_POSITIVE_TEXT]'..pCity:GetName()..'[ENDCOLOR] constructed Buffalo Pound and created new source of [ICON_RES_BISON] Bison.', 'New source of Bison in '..pCity:GetName(), tPossibleSpots[iChosenPlot]:GetX(), tPossibleSpots[iChosenPlot]:GetY())

BTW @Infixo Did you incorporated small resource icons mod into VP or just using it as an additional mod?
 
Last edited:
@FoxOfWar Can you post screenshots? It would be clear what you catch.
What values for Pitz do you suggest?.
Tried to get screenshots, but for some reason they did not manifest and it's too late for me to try and troubleshoot that derp atm(given Civ's lovely lil' loading times). The K'atun Ahaw promotions that are visible on the units are the first two (Hun & Ka'a), the rest aren't. Said units do seem to be getting xp bonuses from somewhere I am not seeing though (haven't been in a war all game, currently turn 492; said units created few hundred turns earlier), so it would point to them getting xp from K'atun Ahaw anyway... If someone else could confirm that I'm not just seeing things oddly, that would be lovely.

As for Pitz, I would probably veer towards changing it to some other trigger, or even an entirely different building feature - b'ak'tun does not simply happen often enough, so it would be a real tightrope to find the correct amount that's actually noticeable but not broken, given that it scales with the amount of cities. If keeping with the current, would probably bump it up to 30/30, scaling, at least. We're talking about something that happens slightly more often than Poland's extra policies, here. Thoughts, folks?
 
@Infixo Yesterday I reworked all notifications and popups including flax, figs and bison spawn. They try to follow the same pattern. v25.3 and v25.4.
BTW @Infixo Did you incorporated small resource icons mod into VP or just using it as an additional mod?
Yes, great. If you use 0 as first argument you will get a generic notification with exclamation mark. Use that ID from Buffalo Pound and you will get a res icon. I also added a notification when the resource has not not spawn. This will save time when people will start complaining "where is my bison" not knowing that it cannot be spawn.

@All: There is a ton various notifications in VP. If you want to reuse a specific one, can find out what ID it uses. I need to know however when it triggers.

I use Small Res Icons as a separate mod. Sometimes those icons disappear, idk. But all in all I like it.

I will work a bit on Nilometer now. Why did you put in there 6 times the same code? Is it to make sure that those 2 flaxes will spawn?
 
@Infixo
  • No, they check specific conditions in a specific order. If one conditions is not fullfilled then it checks next one. First are flood plains, then river tiles and then whatever I wrote there. Owner tile before not owned tiles.
  • I missed the situation where bison cannot spawn. Rest of "spawn" notifications will have such info too (flax and figs).
  • So you will handle those notifications as I understood? I will continue checking sqls then.
  • Look into components description on 6th page (link in my post description) and find the ability from a building or unit. There should be everything described. Ask me when you are not sure.
  • Riad is specific because I didn't add any notification to not to outspam the user. So it is the only one that not follow the VP pattern. It has only floating text.
  • This title for Bison is too long, I think.
 
Last edited:
As for Pitz, I would probably veer towards changing it to some other trigger, or even an entirely different building feature - b'ak'tun does not simply happen often enough, so it would be a real tightrope to find the correct amount that's actually noticeable but not broken, given that it scales with the amount of cities. If keeping with the current, would probably bump it up to 30/30, scaling, at least. We're talking about something that happens slightly more often than Poland's extra policies, here. Thoughts, folks?
Here are the normal speed b'ak'tun timers:
  • 1: 2720 BC (Turn 33 in normal speed games)
  • 2: 2325 BC (42)
  • 3: 1931 BC (52)
  • 4: 1537 BC (62)
  • 5: 1143 BC (72)
  • 6: 748 BC (86)
  • 7: 354 BC (101)
  • 8: 41 AD (117)
  • 9: 435 AD (133)
  • 10: 830 AD (152)
  • 11: 1224 AD (183)
  • 12: 1618 AD (234)
  • 13: 2012 AD (432)
The Bak'tun counts get more and more spaced apart as the game progresses. So, if you rush ball courts and manage to get them up by 5th bak'tun (turn 72), you only need to wait another 14 turns for the next one (t86), then 15 for the one after that (t101)

The bonus is small, but both faith and science early game have higher impacts AND they are triggering more often. This building, then, drops off significantly in late game, but who cares about an instant faith boost at that stage in the game, and your per-turn science will be in the hundreds thanks to Kuna. Yes, the b'ak'tun trigger means it will drop off, but this building is designed to do precisely that.

So yeah, maybe the per city bonus is worrisome, but balance for early-game rushing is the main concern. IMO, the trigger is probably fine at 10:c5science:/10:c5faith: because it triggers so frequently in early game. If it were increased I wouldn't go past 20:c5science:/20:c5faith:

Poland's UA triggers 5 times in a game (clas/ren/mod/info/ideology). depending how fast you get to masonry, this would probably trigger 6-9 times per game. just to quantify that last statement.
 
Last edited:
@FoxOfWar:
  • modified Pitz B'ak'tun bonus (now 20 of each yield),
  • fixed Pitz unique promotions,
  • fixed Pitz and Holkan 20 turn counter on fast speed.
@Infixo:
I found mistake in buffalo code:
Code:
if #tPossibleSpots > 0 then
        pSpotsTable = tPossibleSpots
        bBisonCreated = true
    elseif #tPossibleSpotsFree > 0 then
        pSpotsTable = tPossibleSpots
        bBisonCreated = true
end
after elseif wrong table is injected into pSpotsTable.
Nice simplifying with 2 tables move. :)
Remember that nilometer has to be treated differently, same manouver will not work. Scheme is as fllows:
My flood plains --> Not mine floodplains --> My river tiles --> Not mine River tiles --> My rest of tiles --> Not mine...
So myand not mine are mixed here.
 
Last edited:
Thank you @hokath, I just finished migrating all the texts, including Japan's into the master text file and deleting the redundant text entries.

Japan is now complete except for the .lua for the yields on constructions/destruction of a yamato. Easy.
Korea is now complete except for 1Gold and 2%GPP on Chaebol for every international trade route. Also easy


Out of curiosity, I hope my notes on the 4UC spreadsheet were helpful, and my code wasn't too sloppy? Did you have any trouble?

I added a blurb about the yields on construction/destruction for the yamato, and edited the civilopedia accordingly I also quadrupled the GrAdPts from kills (4x killed unit strength):
@Blue Ghost, I'm sad to see the Slaganz has no diplomatic function anymore. Had you given any thought to my idea for a different Druhtiz Oath?

Slaganz:
Furor Teutonicus: 50% vs barbarians. Not lost on promotion.
Native Tongue promotion: 50% chance of converting barbarian on kill. Converted Barbarians have the Druhtiz Oath promotion and unit action. Lost on promotion

Druhtiz Oath promotion: +1 :c5strength:CS
Druhtiz Oath Unit action: When adjacent to City-State, consumes unit and receive 10 :c5influence:influence with City-State

So Druhtiz is a weak emissary action, but you can only do it with captured barbarians, not the Slaganz itself.
  • AI should be able to understand the Emissary action, and all that would be needed is to lift the unit action from the Civ IV diplomacy mod already in VP, and change some numbers/text
  • This gets around G's new nerf to unit gifts to CS (can't gift if CS already owns 5 units)
  • If the AI can't seem to use it well, they still get +1 :c5strength:CP on their converted units
    • the +1 CP would make brutes match slaganz for power, and bring captured horsemen back up to the strength of normal horsemen (barb horsemen only have 14CP)
No, the ability to conduct a diplomatic mission cannot be granted with a promotion. And automatically occurring when next to a city-state is too weird.

Re: Morocco: I could add the ability to cross borders back to the Corsair if we agree on it. But letting it pillage improvements without declaring war would be very difficult, if at all possible, and would be too disruptive.

I opened Github tickets for each of the civs that need Lua. If you're working on any of them, please assign the ticket to yourself.

@Infixo: Thanks for proofreading and fixing our code! Having an experienced modder on the team really helps.
 
@Infixo I saw you changed tile pointed out by notification from bison to city. Wouldn't be better to show where the bison/flax/figs spawn instead of just city?
 
Status
Not open for further replies.
Back
Top Bottom