1.20 beta

I'm not sure if this is a new bug or just another manifestation of the last one I reported, but I got another series of error reports when I conquered (and razed) the barbarian city (see attached screenshots).

Also, a problem with the multi-figure Legionary animation: When I attacked the barb Archers it used a Skirmisher-like javelin/pilum animation (which might be working as intended), but as it took damage and individual figures "died" they were replaced not by the usual death animation, but rather with the normal spatha-wielding animation, which then disappeared after the battle was over.
 

Attachments

  • Screen shot 2013-05-07 at 10.13.44 AM.jpg
    Screen shot 2013-05-07 at 10.13.44 AM.jpg
    125.6 KB · Views: 47
  • Screen shot 2013-05-07 at 10.13.58 AM.jpg
    Screen shot 2013-05-07 at 10.13.58 AM.jpg
    116.1 KB · Views: 49
  • Screen shot 2013-05-07 at 10.14.01 AM.jpg
    Screen shot 2013-05-07 at 10.14.01 AM.jpg
    116 KB · Views: 70
  • Screen shot 2013-05-07 at 10.14.04 AM.jpg
    Screen shot 2013-05-07 at 10.14.04 AM.jpg
    114 KB · Views: 55
I'm not sure if this is a new bug or just another manifestation of the last one I reported, but I got another series of error reports when I conquered (and razed) the barbarian city (see attached screenshots).

Also, a problem with the multi-figure Legionary animation: When I attacked the barb Archers it used a Skirmisher-like javelin/pilum animation (which might be working as intended), but as it took damage and individual figures "died" they were replaced not by the usual death animation, but rather with the normal spatha-wielding animation, which then disappeared after the battle was over.

def onCityAcquired in CvEventManager
Code:
	### Traits - Extra City Yield
		for iTrait, YieldType, iYieldChange in HR.Trait.ExtraCityYield:
			if pNewOwner.hasTrait(iTrait):
				[COLOR="Lime"]pCity[/COLOR].changeBaseYieldRate(YieldType, iYieldChange)
 
Havent looked into the codes, but tried out corps civics to see what they are supposed to do.
And the first civic change already produced a bug.

I set up 3 cities as followed.
The happiness and health penalty applied.
Then I changed from Recipro to Centralized just to see how the no foreign corp code functions.
Immediately all the happiness and health penalty are gone from all 3 cities, so definitely not working as intended

The culprit should be this:

bForeign checks whether player has the headquarters.

Yet when it is true, it is added into iNumForeignCorps, which is supposed to store number of foreign corps...

I'm not surprised the Foreign corps code is faulty. While the code for recording the number of foreign corps was written for 1.18 it wasn't tested as I wasn't using any civic bonuses needing it back then. When I then added the rest of the functionality in 1.19 I probably assumed the existing part was working and (clearly) didn't test very thoroughly.

Edit:
And by the way, Recipro no longer grants +20% City Defense, because that was given by the fake Palace which no longer exist.

Whoops. From memory there's no way to add city defence via python is there? I guess we have to revert back to the fake palace. Pity. Worth keeping the current version if the code though, be useful for future expansion.
 
def onCityAcquired in CvEventManager
Code:
	### Traits - Extra City Yield
		for iTrait, YieldType, iYieldChange in HR.Trait.ExtraCityYield:
			if pNewOwner.hasTrait(iTrait):
				[COLOR="Lime"]pCity[/COLOR].changeBaseYieldRate(YieldType, iYieldChange)

Is that also the culprit for the errors I got when capturing a German city?
 

Attachments

  • Screen shot 2013-05-07 at 1.27.22 PM.jpg
    Screen shot 2013-05-07 at 1.27.22 PM.jpg
    136.7 KB · Views: 82
  • Screen shot 2013-05-07 at 1.27.37 PM.jpg
    Screen shot 2013-05-07 at 1.27.37 PM.jpg
    138.6 KB · Views: 52
  • Screen shot 2013-05-07 at 1.27.42 PM.jpg
    Screen shot 2013-05-07 at 1.27.42 PM.jpg
    138.7 KB · Views: 58
  • Screen shot 2013-05-07 at 1.27.51 PM.jpg
    Screen shot 2013-05-07 at 1.27.51 PM.jpg
    129.7 KB · Views: 69
  • Screen shot 2013-05-07 at 1.27.55 PM.jpg
    Screen shot 2013-05-07 at 1.27.55 PM.jpg
    128.8 KB · Views: 90
I'm not sure if this is a new bug or just another manifestation of the last one I reported, but I got another series of error reports when I conquered (and razed) the barbarian city (see attached screenshots).

Seperate bug, and Platyping has found the fix :)

Also, a problem with the multi-figure Legionary animation: When I attacked the barb Archers it used a Skirmisher-like javelin/pilum animation (which might be working as intended), but as it took damage and individual figures "died" they were replaced not by the usual death animation, but rather with the normal spatha-wielding animation, which then disappeared after the battle was over.

I'll investigate this when I get my computer back. Incidentally, sounds like Apple are going to replace the entire logic board for free which is great. Just hoping it will be ready for pickup by Friday when I get back back in town. Hate to be without it for the weekend.
 
Is that also the culprit for the errors I got when capturing a German city?

Looks like the same cause (wrong variable name) , but in a different section of code. This time in the routine that renames cities when you acquire them.
 
1) Fixed pSpreadCity undefined in onCityAcquired
2) Fixed Pyramid indentation error (This was ok in my file lol)
3) Fixed Barbarian built City error
4) Fixed City Screen display error when building Settlers (Again I provided you with the file...)
5) Disabled Dynamic Renaming onCityAcquiredAndKept.
Python error and I too shag to look into it.
6) Fixed Corporations Civics changing codes.
Havent written onCityAcquired and onCityRazed codes, because scriptdata is wiped when city changed hands. Corporation codes need a revamp.
Thus, consider this a temporarily fix. At least you can switch corporation civics happily.
 
I have been checking every couple of weeks hoping to see 1.2 -- I am overjoyed that I finally get to play Civ IV again. I really haven't played it much for six months, just letting my batteries recharge.

Looking forward tonight to download and start messing around with it.

Cheers!

:)
 
The way things are shaping up you'll soon need to credit Platyping as a co-author. :)
 
Actually... the more I test, the more problems I noticed.
There are more codes which are not present and I rather spend my energy there then to figure out this messy corporation thingy lol.

Clan Warfare:
A) Wiping off Clan Warfare effects when civ destroyed.
B) Applying Clan Warfare effects when city changed hands.

3) Pillage Immunity Trait:
A) Should allow pillaging own improvements which I enabled.
B) Pollution check screwed. For instance, pillaging village removes pollution, but then due to the trait, village is added back without pollution.
C) When leader also has Faster Growth Trait, screwed again because improvement added back with default timing.

P.S.
Also, 1 thing weird is that pollution actually has 1 good effect...
It protects improvements from nukes...
I launched 100 ICBMS at a 9x9 plot full of towns, and none destroyed...
 
Actually there are many reasons why I make python wonders, projects, promotions and traits but never civics.
First is because of AI decision making. Of cos there are ways such as flavor tags or aiweight to bluff ai to build wonders for instance, even though it does not know what the wonder grants.
However, if it turns out useless, it is at most a waste of hammers but does not prevent ai from building what it intended to build.
Civics on the other hand, is replacement type. Bluffing ai to choose a python civic with high ai weight prevents ai from using the civic it really wanted.

Next, because there is no check available for civic changes, I will only design civic effects such as these:
Grants random promotion to new units built.
Heals units after combat.
Starts golden age when great people born.
Earns 1% interest rate every turn.

All these are fine, because they do not require change of civic check.
The current civic check implemented will fail when things are done on the turn civics are changed.

For instance, clan warfare.
Activate clan warfare.
Declare war on same turn.
Changewarstatus will activate and apply effects to enemy.
The next turn, then the civic check is triggered and apply effects again.
 
2) Fixed Pyramid indentation error (This was ok in my file lol)

Tabs aren't always consistent between our computers for some strange reason. I've had to adjust several, must have missed this one.

4) Fixed City Screen display error when building Settlers (Again I provided you with the file...)

Thought I'd just used your file as is there, guess not.

5) Disabled Dynamic Renaming onCityAcquiredAndKept.
Python error and I too shag to look into it.

Don't worry about it, I'll fix that one when I'm back tomorrow evening. Pretty sure I know what's going wrong.

6) Fixed Corporations Civics changing codes.
Havent written onCityAcquired and onCityRazed codes, because scriptdata is wiped when city changed hands. Corporation codes need a revamp.
Thus, consider this a temporarily fix. At least you can switch corporation civics happily.

Script data is cleared too? Ugh. I'm willing to redesign the Centralization civic so we don't have to worry about foreign corporation handling, if you think it's preferable.

Good job on the civics!

The way things are shaping up you'll soon need to credit Platyping as a co-author. :)

Yeah, at the very least he's going straight to top of the credits list in big bold letters!

Actually... the more I test, the more problems I noticed.
There are more codes which are not present and I rather spend my energy there then to figure out this messy corporation thingy lol.

No worries, I'll try tackle them when I'm back. Starting to think I should just scrap Clan Warfare's effect and try something else. Seems to be causing more problems than its worth.

P.S.
Also, 1 thing weird is that pollution actually has 1 good effect...
It protects improvements from nukes...
I launched 100 ICBMS at a 9x9 plot full of towns, and none destroyed...

Lol! Any idea where that is handled? Guessing in the DLL...

Actually there are many reasons why I make python wonders, projects, promotions and traits but never civics.
First is because of AI decision making. Of cos there are ways such as flavor tags or aiweight to bluff ai to build wonders for instance, even though it does not know what the wonder grants.
However, if it turns out useless, it is at most a waste of hammers but does not prevent ai from building what it intended to build.
Civics on the other hand, is replacement type. Bluffing ai to choose a python civic with high ai weight prevents ai from using the civic it really wanted.

I deliberately keep AI weights low so they're more of a nudge than an outright incentive. What I've tried to do with most of my civics is pair custom Python effects with strong XML effects that the AI does understand well. Clan Warfare is a notable exception because its a niche civic - I don't mind if only the AI with it as their favourite civic ever choose it.

Next, because there is no check available for civic changes, I will only design civic effects such as these:
Grants random promotion to new units built.
Heals units after combat.
Starts golden age when great people born.
Earns 1% interest rate every turn.

All these are fine, because they do not require change of civic check.
The current civic check implemented will fail when things are done on the turn civics are changed.

For instance, clan warfare.
Activate clan warfare.
Declare war on same turn.
Changewarstatus will activate and apply effects to enemy.
The next turn, then the civic check is triggered and apply effects again.

Yeah that is a problem. Ideally any of these custom civics would have code in onCivicChanged or in the standard Python events - but not both. I may just have to redesign some of them.
 
I believe the reason behind the nuke is that it is not the nukes that destroy the improvements.
It is the spawning of fallout that destroy them.
But fallout cannot spawn on tiles that already have features on them, for instance nukes will never create fallout on forests.
You may have to add additional codes when nuked exploded to check the surrounding for polluted tiles and add fallout randomly
 
I suggest that humane plusing golden age length reduce from 100% to 50%, for there are too many many ways to start a golden age, both great general and great person
 
I believe the reason behind the nuke is that it is not the nukes that destroy the improvements.
It is the spawning of fallout that destroy them.
But fallout cannot spawn on tiles that already have features on them, for instance nukes will never create fallout on forests.
You may have to add additional codes when nuked exploded to check the surrounding for polluted tiles and add fallout randomly

Ah yeah, that makes sense.

I suggest that humane plusing golden age length reduce from 100% to 50%, for there are too many many ways to start a golden age, both great general and great person

I'd prefer to reduce the length of the Golden Ages triggered by Equal Rights and/or Warrior Code. Currently they're half length, quarter length is probably more appropriate.
 
I believe the reason behind the nuke is that it is not the nukes that destroy the improvements.
It is the spawning of fallout that destroy them.
But fallout cannot spawn on tiles that already have features on them, for instance nukes will never create fallout on forests.
You may have to add additional codes when nuked exploded to check the surrounding for polluted tiles and add fallout randomly

Actually, there is a bNukeImmune tag in the CIV4FeatureInfos.xml which is set to 1 for every kind of pollution:D
And Xyth, you have not added the earth map I uploaded months ago, have you?;)
 
Ah indeed, forgot that tag lol
Pollution clouds the vision of the nuker, so he cannot aim properly? :lol:
 
Actually, there is a bNukeImmune tag in the CIV4FeatureInfos.xml which is set to 1 for every kind of pollution:D)

So there is! Well that's a nice easy fix then :)

And Xyth, you have not added the earth map I uploaded months ago, have you?;)

I haven't forgotten it, just ran out of time before I went away. It will be there in the full version of 1.20.
 
Ah yeah, that makes sense.



I'd prefer to reduce the length of the Golden Ages triggered by Equal Rights and/or Warrior Code. Currently they're half length, quarter length is probably more appropriate.

I agree, the wonder that one can enter a golden age when player with the same religion enter should also be modified then.
 
I deliberately keep AI weights low so they're more of a nudge than an outright incentive. What I've tried to do with most of my civics is pair custom Python effects with strong XML effects that the AI does understand well. Clan Warfare is a notable exception because its a niche civic - I don't mind if only the AI with it as their favourite civic ever choose it.

That's not how it usually works out as of 1.19, though. I've found that nearly all the non-Tactical AIs in my games switch to Clan Warfare as soon as they hit Riding (which they usually beeline), and then stick with it until they get Warrior Code with Chivalry.
 
Back
Top Bottom