• We created a new subforum for the Civ7 reviews, please check them here!

How does technology costs work together?

cryptc

Chieftain
Joined
Oct 29, 2010
Messages
83
Been doing alot of testing on various places with changing technology speed, specifically these places:

ResearchPercent in Gamespeeds
ResearchPercent in Eras
Cost in Technologies

I decided that safest way to know what I was doing was setting ResearchPercent to 100% everywhere, so that Technologies Cost would be the only real factor changing things.

The main problem I'm having is that if the Technology Cost is too high, then it wraps around into a negative number which makes the technology researchable in one turn.

The real weird problem I'm having though, is that even with Era's ResearchPercent static, I'm getting total costs of the techs changing over time. So for instance, I can start a new game, see that every technology in the tree doesn't have a negative number, but at some point later suddenly the tech prices have changed to the point where they wrap around.

Does anyone have any clue how the final Research costs are calculated? is there another variable I've not taken into account somewhere?

Here is what I'm using right now after modding it slightly since in Renaissance a multiplier of 20 would cause it to wrap around, while in a new game it seemed fine.

UPDATE Eras SET ResearchAgreementCost = 10*ResearchAgreementCost, ResearchPercent = 100;

UPDATE Gamespeeds SET TrainPercent=67, BuildPercent=100, ConstructPercent=100, ResearchPercent=100, CulturePercent = CulturePercent * 2;

UPDATE Technologies
SET Cost = 2*Cost
WHERE Era = "ERA_ANCIENT";

UPDATE Technologies
SET Cost = 4*Cost
WHERE Era = "ERA_CLASSICAL";

UPDATE Technologies
SET Cost = 10*Cost
WHERE Era = "ERA_MEDIEVAL";

UPDATE Technologies
SET Cost = 12*Cost
WHERE Era = "ERA_RENAISSANCE";

UPDATE Technologies
SET Cost = 16*Cost
WHERE Era = "ERA_INDUSTRIAL";

UPDATE Technologies
SET Cost = 16*Cost
WHERE Era = "ERA_MODERN";

UPDATE Technologies
SET Cost = 16*Cost
WHERE Era = "ERA_FUTURE";
 
Techs get cheaper as other Civs discover them. Seems odd that this would make wrap around rather than go down though, so maybe that's not it.
 
Yeah, it seems more like the cost goes up somehow, which makes it wrap around.

I'd also like to know more about why costs go down, you mention they get cheaper as other Civs discover them, where is that in the xml/sql?
 
Ok got the answer for that, 214748

Now I've been searching the forum and looking through the sql core base for something else... does anyone know how/where to adjust the 1 beaker per 2 population figure? I am hoping to change that to some lower fraction of research to account for the fact that I can't increase costs as much as I'd like.
 
It's one beaker for one population, it's in GlobalDefines, and it's cast as an integer (so you can't change it to 0.5 or something).
 
Thanks :D .. for nothing though haha... ok...

Is there any other way to lower the beaker amounts? beaker penalties? Would I have to put in custom buildings automaticly in cities to add those? or any other ingenious method to lower beaker amount?

I already lower the bonuses on tech buildings
 
If you want to lower it to, say, 1 per 2 population, all you need to do is create a new building class. Let's call it the "Town Hall".

Set that building's FreeStartEra to be ERA_ANCIENT; this means that in any game starting in the Ancient or later (i.e., all games), a Town Hall will be placed in each city, automatically. As long as its gold maintenance cost is zero, the player won't have the option of destroying it. (Make sure to set its capture probability to 100% as well, and make it immune to nukes.)

Give that building -1 science per two population (same way the Library adds one per 2 pop), and now your cities will only generate a base value of one per 2 pop instead of one per one. The only catch is that the library will now effectively double your science instead of just adding 50%, so you'd need to change it to +1 per 4. And this 50% reduction wouldn't affect Scientist specialists, flat +science boosts from buildings like the National College or Oxford University, and so on.

This sort of solution works for any change you want to make in every city at the same time. This also allows for civ-specific alterations; if you want, say, the Iriquois to get +1 food from Forests, then simply make a UB variant of the Town Hall, give that bonus to their version, and you're done. This is generally a lot easier than trying to play with the Traits tables.

Alternately, there's a "global yield modifier" table that you can use to, say, make a Wonder that adds +10% production in all cities. So give the Palace that ability for science at -50%, and you have no need to add a Town Hall. However, this method has other problems; since all percentages are additive, it would make things like the University, etc. twice as strong. So either way, you'll have a lot of rebalancing to do.

Finally, you can do some of this through policies. The policies table has the ability to subtract, say, 1 research per city OR subtract percentages. So you could add a new Policy, use Lua to award it to all civs at the start of the game, and put whatever penalties you want on that Policy. This causes quite a few other problems, not the least of which is the Cultural Victory concept; you can't put this new policy in any existing branch or it'll screw up the AI, but if you make it in its own branch then that'll count as one completed branch towards a cultural win... unless you add another policy in that branch that can't be taken, in which case it'll not only screw up the AI, it'll also break the policies UI. Normally this wouldn't be worth the headaches, but there are things that Policies can do that the other tables can't, like give certain buildings a negative Happiness value.
 
Do negative science yields work? I thought (based on something I read somewhere) that they didn't. Perhaps I'm confused and thinking about tile or improvement yields. What about negative production or culture from buildings?
 
Do negative science yields work? I thought (based on something I read somewhere) that they didn't.

You'd have to check. There are a lot of things like this, though, where a negative value doesn't work in one table but DOES work in others, so don't just assume that it's not possible. For instance, the Happiness values in the Buildings table can't be set negative (it'll display the negative number but not actually apply it), but you CAN give a policy a negative happiness (or more specifically, a negative happiness when a certain building is present in a city) and it'll work correctly. That's how my own mod was able to add four negative-happiness buildings.

Most of the cases where negative numbers don't work correctly fall into two categories:
1> Cases where it could easily result in a negative total value. For instance, Jungles are +1 Food, -1 Production, but the production will only get subtracted if the tile already produced Production (i.e., a hill or plains), because otherwise it'd be possible to have a city with negative production, and the AI in general is not capable of planning for that.
2> Cases where a -1 value means something else. If a unit or building has a cost of -1, then it means "cannot build". If the HurryCostModifier is negative, that means "cannot hurry", not that hurries are cheaper. This sort of issue one doesn't really apply to yield discussions, though.

So try it; it might work, it might not, but chances are at least ONE of the proposed methods would do what you want.
 
Another option might be I just change the beakers per pop from 1 to 0, and use only scientist slots and building bonuses for research... but I guess this would completely screw any AI that doesn't focus on science (I suppose the militant ones doesn't bother using building tech specialists)
 
Another option might be I just change the beakers per pop from 1 to 0,

Do both. Set the base value down to 0, then add the Town Hall I'd mentioned to add +1 per 2 population. That has the same effect as having a base of 1 and subtracting 1 per 2 population, but less chance of something going wrong. And the AI shouldn't have any problem with it, although you'll need to adjust the Library and Public School for balance reasons.
 
Hm, having some issues... I used this

UPDATE defines SET Value=0 WHERE Name="BASE_RESEARCH_RATE";

But ingame it still gave research based on population, as a test I changed it to 2, and still no difference, so I must be modifying in the wrong place, anyone know where the population research is set?

Also I didn't manage to get the Town Hall working... I tried adding as xml (for first time), and used some building from another mod as a basis to work from, but it didn't appear ingame as I'd expected:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/3/2011 10:23:42 AM -->
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_TOWNHALL</Type>
			<DefaultBuilding>BUILDING_TOWNHALL</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_TOWNHALL</Description>
		</Row>
	</BuildingClasses>

	<Buildings>
		<Row>
			<Type>BUILDING_TOWNHALL</Type>
			<BuildingClass>BUILDINGCLASS_TOWNHALL</BuildingClass>
			<PrereqTech></PrereqTech>
			<FreeStartEra>ERA_ANCIENT</FreeStartEra>

			<AlwaysShowHelp>true</AlwaysShowHelp>
			<Help>TXT_KEY_BUILDING_TOWNHALL_HELP</Help>
			<Description>TXT_KEY_BUILDING_TOWNHALL</Description>
			<Strategy>TXT_KEY_BUILDING_TOWNHALL_STRATEGY</Strategy>
			<ArtDefineTag>PALACE</ArtDefineTag>

			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>0</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<NeverCapture>false</NeverCapture>
			<PortraitIndex>19</PortraitIndex>
		</Row>
	</Buildings>

	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_TOWNHALL_HELP">
			<Text>Alters how research is gained in the game.</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWNHALL">
			<Text>Town Hall</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWNHALL_STRATEGY">
			<Text>Alters how much research gotten, to bypass the problems of too high technology costs, for a slower paced game.</Text>
		</Row>
	</Language_en_US>

	<Building_YieldChangesPerPop>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<YieldType>YIELD_SCIENCE</YieldType>
			<Yield>50</Yield>
		</Row>
	</Building_YieldChangesPerPop>

	<Building_Flavors>
		<!-- Free bugfix, so build this right away! -->
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_OFFENSE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_DEFENSE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_CITY_DEFENSE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_MILITARY_TRAINING</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_RECON</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_RANGED</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_MOBILE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_NAVAL</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_NAVAL_RECON</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_NAVAL_GROWTH</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_NAVAL_TILE_IMPROVEMENT</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_AIR</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_EXPANSION</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_GROWTH</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_TILE_IMPROVEMENT</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_INFRASTRUCTURE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_PRODUCTION</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_GOLD</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_SCIENCE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_CULTURE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_HAPPINESS</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_GREAT_PEOPLE</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_WONDER</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_RELIGION</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_DIPLOMACY</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_SPACESHIP</FlavorType>
			<Flavor>100</Flavor>
		</Row>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<FlavorType>FLAVOR_WATER_CONNECTION</FlavorType>
			<Flavor>100</Flavor>
		</Row>
	</Building_Flavors>
</GameData>

Anything obvious I'm doing wrong?
 
Anything obvious I'm doing wrong?

I'll look through it in detail a bit later, but a couple things:

In your SQL, you have it tweaking "defines", but the actual table is "Defines". It might be case-sensitive, so try fixing that first. And besides, why not just change it in the XML instead of trying to mix SQL in, since you're only altering a single value?

Also,
Code:
			<PrereqTech></PrereqTech>

Doesn't generally work. If you want something to have no value, you have to explicitly set it to "nil" or "NULL" as appropriate. A blank field like you put there will sometimes kill the XML, depending on how it's arranged. Since PrereqTech already defaults to a NULL value, there's no need for this line at all. Just remove it.
Same goes for the <NeverCapture> part. Since that entry defaults to "false", there's no need to explicitly set that to false again. But you DO need to set its Capture probability to 100, which you haven't done. Also, make it nuke-immune, and set its cost to -1.

As for the rest of it, what do the logfiles say? They should tell you if any of your XML has problems...
But before that: why are you setting Flavor values at all? The AI is never SUPPOSED to want to build these; the whole point of the <FreeStartEra> declaration is that every city will automatically get one. It'll never show up on your Build list, because the city will already have it.
 
I'll look through it in detail a bit later, but a couple things:

In your SQL, you have it tweaking "defines", but the actual table is "Defines". It might be case-sensitive, so try fixing that first. And besides, why not just change it in the XML instead of trying to mix SQL in, since you're only altering a single value?

Also,
Code:
			<PrereqTech></PrereqTech>

Doesn't generally work. If you want something to have no value, you have to explicitly set it to "nil" or "NULL" as appropriate. A blank field like you put there will sometimes kill the XML, depending on how it's arranged. Since PrereqTech already defaults to a NULL value, there's no need for this line at all. Just remove it.
Same goes for the <NeverCapture> part. Since that entry defaults to "false", there's no need to explicitly set that to false again. But you DO need to set its Capture probability to 100, which you haven't done. Also, make it nuke-immune, and set its cost to -1.

As for the rest of it, what do the logfiles say? They should tell you if any of your XML has problems...
But before that: why are you setting Flavor values at all? The AI is never SUPPOSED to want to build these; the whole point of the <FreeStartEra> declaration is that every city will automatically get one. It'll never show up on your Build list, because the city will already have it.

I'm actually a DB Admin, so much more comfortable working on SQL. I'm reasonably sure it's not case sensitive, but I'll try anyways, as for the other reason, it's not the only change I have in my mod, I just copied only that here since the others weren't relevant for the discussion.

I'll try your tips for the xml tomorrow, but the answer to most the things you're wondering it just that I copy pasted something existing, which had the flavors, so I thought "well can't hurt" hehe. Thanks for the tips.
 
Okay... I've gone through the suggestions now... changing defines to Defines didn't seem to make anything different, for completeness purposes I'm posting the whole of the SQL I run below:

Code:
UPDATE defines SET Value=1 WHERE Name="MIN_CITY_RANGE";

UPDATE Eras SET ResearchAgreementCost = 10*ResearchAgreementCost, ResearchPercent = 100;

UPDATE Defines SET Value=150 WHERE Name="OPINION_THRESHOLD_UNFORGIVABLE";
UPDATE Defines SET Value=25 WHERE Name="OPINION_THRESHOLD_COMPETITOR";
UPDATE Defines SET Value=5 WHERE Name="UNIT_MAINTENANCE_GAME_MULTIPLIER";
UPDATE Defines SET Value=0 WHERE Name="BASE_RESEARCH_RATE"; 

UPDATE Processes SET TechPrereq="TECH_MINING" WHERE Type="PROCESS_WEALTH";
UPDATE Processes SET TechPrereq="TECH_WRITING" WHERE Type="PROCESS_RESEARCH";

UPDATE Gamespeeds SET TrainPercent=67, BuildPercent=100, ConstructPercent=100, ResearchPercent=100, CulturePercent = CulturePercent * 2;

UPDATE Building_YieldModifiers SET Yield=20 WHERE YieldType="YIELD_SCIENCE";
UPDATE Building_YieldChangesPerPop SET Yield=25 WHERE YieldType="YIELD_SCIENCE";

UPDATE Technologies
SET Cost = 2*Cost
WHERE Era = "ERA_ANCIENT";

UPDATE Technologies
SET Cost = 4*Cost
WHERE Era = "ERA_CLASSICAL";

UPDATE Technologies
SET Cost = 8*Cost
WHERE Era = "ERA_MEDIEVAL";

UPDATE Technologies
SET Cost = 10*Cost
WHERE Era = "ERA_RENAISSANCE";

UPDATE Technologies
SET Cost = 12*Cost
WHERE Era = "ERA_INDUSTRIAL";

UPDATE Technologies
SET Cost = 16*Cost
WHERE Era = "ERA_MODERN";

UPDATE Technologies
SET Cost = 16*Cost
WHERE Era = "ERA_FUTURE";

UPDATE Units SET NumFreeTechs=0 WHERE Type="UNIT_SCIENTIST";

I followed your suggestions on the XML (except I still can't find that 'Capture probability' switch anywhere, and I'd rather not guess on exact spelling and such since XML is alot more unforgiving than SQL), here is the whole one I've got now, still not doing anything (it's added on OnModActivated - UpdateDatabase):

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 9/3/2011 10:23:42 AM -->
<GameData>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_TOWNHALL</Type>
			<DefaultBuilding>BUILDING_TOWNHALL</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_TOWNHALL</Description>
		</Row>
	</BuildingClasses>

	<Buildings>
		<Row>
			<Type>BUILDING_TOWNHALL</Type>
			<BuildingClass>BUILDINGCLASS_TOWNHALL</BuildingClass>
			<Cost>0</Cost>
			<GoldMaintenance>0</GoldMaintenance>
			<FreeStartEra>ERA_ANCIENT</FreeStartEra>
			<MaxStartEra>ERA_ANCIENT</MaxStartEra>
			<MinAreaSize>-1</MinAreaSize>

			<AlwaysShowHelp>true</AlwaysShowHelp>
			<Help>TXT_KEY_BUILDING_TOWNHALL_HELP</Help>
			<Description>TXT_KEY_BUILDING_TOWNHALL</Description>
			<ArtDefineTag>PALACE</ArtDefineTag>

			<MinAreaSize>-1</MinAreaSize>
			<HurryCostModifier>0</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>19</PortraitIndex>
		</Row>
	</Buildings>

	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_TOWNHALL_HELP">
			<Text>Alters how research is gained in the game.</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWNHALL">
			<Text>Town Hall</Text>
		</Row>
		<Row Tag="TXT_KEY_BUILDING_TOWNHALL_STRATEGY">
			<Text>Alters how much research gotten, to bypass the problems of too high technology costs, for a slower paced game.</Text>
		</Row>
	</Language_en_US>

	<Building_YieldChangesPerPop>
		<Row>
			<BuildingType>BUILDING_TOWNHALL</BuildingType>
			<YieldType>YIELD_SCIENCE</YieldType>
			<Yield>50</Yield>
		</Row>
	</Building_YieldChangesPerPop>
</GameData>

The logfiles had a lot of things, so I thought I was on to something, until I realized it wasn't my stuff that was failing, and running vanilla game gave same error logs, I'll post a couple of them here though incase it helps any:

database:
Code:
[2690.299] constraint failed
[2690.299] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[2691.734] Validating Foreign Key Constraints...
[2691.734] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[2691.734] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[2691.734] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_PRIVATEER" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_GALLEON" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_TREASURE CART" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_DANISH_LONGBOAT" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SAXON_HUSCARL" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_POLYNESIAN_WAR_CANOE" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_HITTITE_WARCHARIOT" does not exist in Units
[2692.483] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SUMERIAN_PHALANX" does not exist in Units
[2692.483] Failed Validation.
[2692.748] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		287672		2405056
PageCache:	3518		3733
LookAside:	45		1878
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	0		0
Scratch:	0		0

Largest Allocations:
Malloc:		65280
PageCache:	1160
Scratch:	5128

Prepared Statements:
Current:		5
------------------------------

xml:
Code:
[2691.734] **** Validating Game Database *****
[2692.483] Performing Localization Checks
[2692.483] Checking Tag Format...
[2692.483] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[2692.499] Validating UnitGameplay
[2692.499] Number of selection sounds doesn't match number of units.
[2692.499] Validating Notifications
[2692.499] **** VALIDATION FAILED *****
[2692.499] Validation Took 0.761277 seconds
[2692.748] **** Validating Prefetch Process *****
[2692.748] **** Validation Success *****
[2692.748] SetGlobalActionInfo
[2692.748] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		287672		2405056
PageCache:	3518		3733
LookAside:	45		1878
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	0		0
Scratch:	0		0

Largest Allocations:
Malloc:		65280
PageCache:	1160
Scratch:	5128

Prepared Statements:
Current:		5
------------------------------
 
except I still can't find that 'Capture probability' switch anywhere

It's the <ConquestProb> flag. You can find it pretty easily, since in the vanilla game nearly every single non-Wonder building has it at either 66 or 75 (financial buildings are 75, others 66). World Wonders set it to 100, National Wonders, cultural buildings and defensive buildings set it to 0 and add the <NeverCapture> flag.

As for the rest of your code, a few things:

> Do not set MaxStartEra. This variable says "in any game starting after era X, don't allow this building", so someone deciding to start the game in the Renaissance wouldn't get your Town Hall. That's bad; we need it to apply in every game.

> You have
<AlwaysShowHelp>true</AlwaysShowHelp>

This variable doesn't exist in the Buildings table.

> Are you sure the rest of your SQL file is even loading? If you have an error in something else, it'd explain why the research rate change isn't happening. Are any of your other SQL changes happening?

> A couple of your SQL changes confuse me. For instance,
Code:
UPDATE Gamespeeds SET TrainPercent=67, BuildPercent=100, ConstructPercent=100, ResearchPercent=100, CulturePercent = CulturePercent * 2;

There's no Where in that, so either that'd set the percents for all game speeds to the same amount, basically destroying the Quick, Epic, and Marathon speeds, or it'd break altogether. I'm not sure which.

Likewise, your updates to Building_YieldModifiers and Building_YieldChangesPerPop are disturbingly open-ended. In the vanilla game there might only be a few buildings with these effects and they all use the same value, but mods (like mine) add a lot more of these at various levels... and you just added one in this category, the Town Hall, at 50. So depending on whether the SQL or the XML executes first, you can have a problem.
 
Top Bottom