C2C SVN Changelog

Just pushed to SVN (4737):
  • Tweak to AI tech choice to retain previously determined beeline
Mostly this is a performance thing, which means in most cases that once they have chosen a target beeline tech they won't bother recalculating tech choices again until they complete it (they will recheck if their at-war status changes however)
 
CyGame().getGameSpeedType() is positive from 0 (slowest game speed) to 7 or so (whatever our number of game speeds is at the moment minus one for the fastest game speed).
-1* that is a number from 0 to -7.
This is integer arithmentics so the result of 2^x is an integer.
2^0 is 1
2^(-1) is 1 (0.5 rounded, it might also truncate which would result in 0 then)
2^(-2) is 0 (0.25 rounded)
...
2^(-7) is 0 (0.whatever rounded)
Now you multiply that with some number but for most gamespeeds, you just multiply with 0, so the result is 0.
So y*2^(-X) and y/2^X is not the same as ordering matters for divisions in integer arithmetics.

the doco states otherwise. Game speed normal has value 0. Faster speeds have a positive integer slower speeds have a megative value so gamespeed has a value from -4 to +4 according to the doco. I have not been able to check this in code yet.

If the anarchy reduction is not visible anywhere then it is not possible to write AI for it. If the culture amount IS visible can I assume that the anarchy reduction will be proportional to it, and that ANY unit that spreads culture will always reduce anarchy (by them same amount for a given culture spread amount)? If so I can use culture spread as a proxy for anarchy reduction and do something sensible...?

Related but not proportional. As the cultural values increases the number of turns anarchy removed also increases.
 
the doco states otherwise. Game speed normal has value 0. Faster speeds have a positive integer slower speeds have a megative value so gamespeed has a value from -4 to +4 according to the doco. I have not been able to check this in code yet.
Not sure what weird documentations you are checking but that function is called getGameSpeedType for a reason. It returns the type id (like GAMESPEED_ETERNITY) and all type ids start from 0 in the order they are in the XML with -1 for NONE or NO_WHATEVER.
 
After updating to the current SVN, i get a CTD right away when i click on next turn??

Mini/savedgame in attached.

No viewports, SVN 4737

EDIT: Switch back to other dll and it worked with the older dll. . .

EDIT EDIT: See TB's post below, he fixed it last night . . .SO
 
Not sure what weird documentations you are checking but that function is called getGameSpeedType for a reason. It returns the type id (like GAMESPEED_ETERNITY) and all type ids start from 0 in the order they are in the XML with -1 for NONE or NO_WHATEVER.

OK I reread the doco I could get at and it said both:confused:. Then I remembered the Python Class doco which agrees with you. However if you are right then the formula is wrong because it was based on normal speed being zero etc as I said earlier.
 
After updating to the current SVN, i get a CTD right away when i click on next turn??

Mini/savedgame in attached.

No viewports, SVN 4737

EDIT: Switch back to other dll and it worked with the older dll. . .

Need the save game please - it's specific to what some AI in that game is currently researching, but no way to tell what or why without the save that crashes.
 
Need the save game please - it's specific to what some AI in that game is currently researching, but no way to tell what or why without the save that crashes.

Not crashing because I fixed the crash last night. Check out my changes on the last source code commit... this was all I addressed in that update. I'm not sure if there's anything necessary to really adjust or if this would've been an isolated issue that would not suffer any problems elsewhere (I actually suspect the latter) but I was able to repair the crash itself anyhow.

BTW, he included the save in his link.


Edit:
That said... where the hell did the post where I explained that go? I could've sworn I typed out a big notification on what my update was for and how you may want to take a look into it and... where is it now??? Huh?...? One of those WTH moments.
 
Edit:
That said... where the hell did the post where I explained that go? I could've sworn I typed out a big notification on what my update was for and how you may want to take a look into it and... where is it now??? Huh?...? One of those WTH moments.

same as for 4735 of the SVN?? (Twilight Zone music playing)
 
I found the comment was left in the bug thread, but not phrased very well or on its own enough to be understandable.

4735 didn't require an update post here (this is primarily for a changelog down the way right? A fix to a change that was just made seems kinda non-changelog necessary notation.) Either way it was a pretty insignificant change but necessary to the other dll modders sanity since it fixed a compile warning.
 
I found the comment was left in the bug thread, but not phrased very well or on its own enough to be understandable.

4735 didn't require an update post here (this is primarily for a changelog down the way right? A fix to a change that was just made seems kinda non-changelog necessary notation.) Either way it was a pretty insignificant change but necessary to the other dll modders sanity since it fixed a compile warning.

Nope wrong one, as far as i know, it does NOT even show up in the SVN update logs anyplace??
 
Not crashing because I fixed the crash last night. Check out my changes on the last source code commit... this was all I addressed in that update. I'm not sure if there's anything necessary to really adjust or if this would've been an isolated issue that would not suffer any problems elsewhere (I actually suspect the latter) but I was able to repair the crash itself anyhow.

BTW, he included the save in his link.


Edit:
That said... where the hell did the post where I explained that go? I could've sworn I typed out a big notification on what my update was for and how you may want to take a look into it and... where is it now??? Huh?...? One of those WTH moments.

Looked at the fix and so far so I can tell it isn't really a fix - it'll prevent the crash but leave the AIs researching nothing so far as I can see. You just removed a log in the case where the first tech to research is NO_TECH. Since that shouldn't legitimately arise it just hides the bug...

...so - I need the save game please...
 
You'll have to get it from TB IF he still has it, i deleted it and above because he said it worked??:mischief:

It stops the crash all right, but I think it leaves the AI with halted research. Without a save to be able to reproduce it I can't be sure though. I will likely push a version that would crash again if that situation arose so that we can find it, unless TB posts the save game before I push today's updates.

Edit - nvm -I found the cause - it's down to barbarians trying to choose their research before they found their first city (so when they have no research at all). I'll fix it properly in today's push.
 
It stops the crash all right, but I think it leaves the AI with halted research. Without a save to be able to reproduce it I can't be sure though. I will likely push a version that would crash again if that situation arose so that we can find it, unless TB posts the save game before I push today's updates.

If you do, do that, pls say so in the post, that way i can keep the old dll, just incase, thx.
 
Update

- Change formula for adjusting by game speed.

Note if gamespeeds are removed I will need to change the values in the formula. there was discussion on removing the two fastest game speeds. was that done or were they just hidden from use?
 
Just pushed to SVN (4742):
  • Fixed bug in explore AI that tried to tempt attacks that were not possible (animals across border)
  • Fixed bug in attack assessment where lead unit was being used incorrectly instead of group evaluation
  • Modified AI hunting routine and explore routine to better assess survival probabilities and cope better with high animal density
  • Tweaked AI tech evaluation to skip assessment for players that anyway cannot research (fixes crash in recent changes that had been sticky-taped over) as well as improves performance

This was a fairly complex and subtle change (the hunting/explore AI aspects), so while it should improve AI hunting please be on the lookout for any strange effects (likely to be either hunters suiciding or being too passive) - if you see any such effects please provide a save game illustrating it
 
Back
Top Bottom