C2C SVN Changelog

Disabled how? Can you clarify exactly what you mean please.

There is something wrong with Barbarian civ (even though I haven't changed the spot that's throwing the syntax error, go figure), and then something else wrong with bonus enumeration in the python.
 
There is something wrong with Barbarian civ (even though I haven't changed the spot that's throwing the syntax error, go figure), and then something else wrong with bonus enumeration in the python.

Then for the sake of the SVN players, can you put back the older Barbarian Civ.py till you find out what is causing your errors, thx.
 
Updates:
-Added a Free Building for Civic: Burn Trash
 
There is something wrong with Barbarian civ (even though I haven't changed the spot that's throwing the syntax error, go figure), and then something else wrong with bonus enumeration in the python.

It looks like the indentation is not right. In Python leading white space is code. A Python editor will show you when the indentation is off. @ls612Do you want me to straighten it out? Or will you. ;)

Edit The original code is indented using spaces you indented using tabs. These are not the same thing in Python.
 
It looks like the indentation is not right. In Python leading white space is code. A Python editor will show you when the indentation is off. @ls612Do you want me to straighten it out? Or will you. ;)

I'm not exactly sure what you are trying to say. That line is indented exactly as much as the lines above it, which are not throwing a syntax error.
 
I'm not exactly sure what you are trying to say. That line is indented exactly as much as the lines above it, which are not throwing a syntax error.

They are only indented the same as the lines above on machines where the tab is the same as the number of spaces which is 3 I think. On my machine a tab is worth 5 spaces so that code does not compile. This is why it is important in maintaining Python to use whatever the person was using in the existing code in this case spaces rater than tabs.
 
They are only indented the same as the lines above on machines where the tab is the same as the number of spaces which is 3 I think. On my machine a tab is worth 5 spaces so that code does not compile. This is why it is important in maintaining Python to use whatever the person was using in the existing code in this case spaces rater than tabs.

A tab is 4 spaces on my machine. Could you please change the code so that it works?
 
They are only indented the same as the lines above on machines where the tab is the same as the number of spaces which is 3 I think. On my machine a tab is worth 5 spaces so that code does not compile. This is why it is important in maintaining Python to use whatever the person was using in the existing code in this case spaces rater than tabs.

Reasons to hate Python, number 5 - semantically significant whitespace!
 
@TB - a couple of things about the changes you merged in from theLadiesOgre:

1) You duplicated some AI that was in a slightly different place in our code in AI_attackMove() (I have corrected this, which will be in my next push)

2) You probably need to add code to CvUnitAI::AI_genericUnitValueTimes100() for the new promotion tags added. This is code that doesn't exist in BTS so it wouldn't have been in the code you merged from, but it's needed in C2C for the AI to evaluate unit value correctly when deciding if an attack is justified.
 
Ok... I mentioned you should review the AI on that for a reason then ;)

AI_genericUnitValueTimes100()... you've included that since the Combat Mod development then right? I did not know about that.

Question... what does |= mean?

Honestly, I'm looking through that section now and I'm wondering how to rate things in a way that blends in there. There's also a generic catchall (and I have a feeling it currently has to catch a LOT!) So it'll take a bit to think it out. Thanks for the headsup.
 
Question... what does |= mean?
Looks like one of the "not equal" symbols to me. Since I have been around a long time in computing I always use the word not but only because I am never sure which one goes with the language. I even remember one time when we had to change all |= to != (or the other way around) because the keyboards changed.:lol:
 
Ok... I mentioned you should review the AI on that for a reason then ;)

AI_genericUnitValueTimes100()... you've included that since the Combat Mod development then right? I did not know about that.

Question... what does |= mean?

Honestly, I'm looking through that section now and I'm wondering how to rate things in a way that blends in there. There's also a generic catchall (and I have a feeling it currently has to catch a LOT!) So it'll take a bit to think it out. Thanks for the headsup.

It's used to assess the actual value of a unit in the full context of its promotion and (in principal at least) the environment (like how much desert we are encountering and so on, though it needs more work in that area). The AI uses that to determine if the results of a possible battle would actually be a real gain (e.g. - losing a very highly promoted at atl to kill an unpromoted archer may be a net loss even though the archer has higher strength, or losing an entire stack without killing the enemy stack might still b a net gain if we kill units of sufficient value).

'|=' means 'OR equal'. It's a bitwise OR operator, so

Code:
x |= y;

is the same as

Code:
x = x | y;

analogous to += -= *=, and so on.
 
Back
Top Bottom