Building_SpecialistYieldChanges doubled

Moriboe

King
Joined
Nov 30, 2010
Messages
662
Location
Belgium
For some reason, the extra yields I define for my mod in Building_SpecialistYieldChanges all get doubled ingame. So e.g.

Code:
<Building_SpecialistYieldChanges> 
  <Row>
    <BuildingType>BUILDING_HOLLYWOOD</BuildingType>
    <SpecialistType>SPECIALIST_ARTIST</SpecialistType>
    <YieldType>YIELD_GOLD</YieldType>
    <Yield>2</Yield>
  </Row>
</Building_SpecialistYieldChanges>

Will give all artists 4 gold instead of 2. I checked I only give this bonus in one place, and the file is only added to the database once. I disabled all my lua and the problem remains.

Anyone encountered this before? Any ideas what might be causing it?
 
4 :c5happy:: same as a luxury, think of the "hit movies" resource in civ4
16 :c5culture:: to put in some goodies for the culture victory
 
No. It occurs for multiple wonders I have, even when using FireTuner to "build" it, so nothing else is researched or adopted.
 
Apparently yes! It used to work fine, so I assumed it was something I did in the mod. Guess not. I also noticed that when running CiVUP alongside the problem does not occur, so maybe this is a known issue fixed in CiVUP? That just leaves the question why it doesn't occur for the Statue of Liberty.

Thanks ;)
 
It also doesn't occur with my most recent solo wonder, Mada'in Saleh. However, this uses a seperate XML code - Mind checking to see if the following gets doubled as well?

Code:
<SpecialistExtraCulture>1</SpecialistExtraCulture>
 
It doesn't (checked), culture is handled differently.
However long ago I used the same effect and found it bugged. At a certain point in the game some cities started to show way too much culture from specialists, even in cities where no specialists were hired. Haven't looked at it since (about a year ago?). As the effect is in no official building, it may still be bugged.
 
If this is the same bug I ran into, this happened in the last patch. The yield isn't ACTUALLY being doubled, it's just a UI bug. If you were to see how much progress was actually made constructing your next building (if the yield in question is production), or how much gold you gained, and so on, you might find that the right value is still being used. If so, then here's what's happening:

In UI things like CityView, the code was doing all yields (including Culture and Happiness) as a two-step process; first it'd extract the "base" value (generated by tiles and buildings) from the Lua functions, and then it'd add the amount modified by Policies, Specialists, and so on as a separate step. But what it looks like is that in this last patch, they moved all of those Policy/Specialist/etc. modifiers into the value returned by the base Lua function for yield types (NOT Culture or Happiness), meaning it's now adding those values twice when it populates the UI. But the game engine is still counting things correctly.

In my own mod, I've already fixed this, but I'm assuming they'll get it in the next patch.

As for SpecialistExtraCulture, it used to be COMPLETELY broken, because it wouldn't reset the values. That is, if player #1 had a building with SpecialistExtraCulture=1, then it would add 1 for your first specialist, 2 for your second, 3 for your third (meaning a total of 6 instead of 3), and so on. That's bad enough, but when it'd go to the next player, it'd keep counting, so the next guy might get 20 for his first, 21 for his second, and so on.
That's long since been fixed, though. It works now.
 
That's some great info! That also means I can put the specialist culture effect on one of my wonders again. Much thanks :)
 
Back
Top Bottom