[MOD] More Naval AI

I'm not entirely sure how (or if I even can) to debug a multiplayer game, but I'll see if I can load your saves.

Regarding OOS logging, in CivilizationIV.ini, there is the following section.

Code:
; Enable synchronization logging
SynchLog = 0

Change the 0 to a 1.

Hmm, that's already set, but the only OOSlog.txt I find is from an older game irrelevant to this particular session.
 
Do you also have general logging turned on? Its another setting in the same .ini file

From the relevant section of the .ini:
Code:
; Create a dump file if the application crashes
GenerateCrashDumps = 0

; Enable the logging system
LoggingEnabled = 1

; Enable synchronization logging
SynchLog = 1

; Overwrite old network and message logs
OverwriteLogs = 1

; Enable rand event logging
RandLog = 0

; Enable message logging
MessageLog = 0

; Break on memory allocation order #
BreakOnAlloc = -1
 
There is a problem with the Adaptive trait. If you choose to be Charismatic when you already have many leveled units, all of your units will move to use the "Charismatic" level scale, earning many free promotions. I consider this a problem, as I would expect it to not give you the full benefits of Charismatic for XP retroactively. IMO the simplest solution is to remove Charismatic from the list of Adaptive traits.
 
There is a problem with the Adaptive trait. If you choose to be Charismatic when you already have many leveled units, all of your units will move to use the "Charismatic" level scale, earning many free promotions. I consider this a problem, as I would expect it to not give you the full benefits of Charismatic for XP retroactively. IMO the simplest solution is to remove Charismatic from the list of Adaptive traits.

I think 95% of the player-base would have you lynched for that.
 
I don't see why it is a problem. When you switch to Charismatic, your units get to the same promotion level as if you were Charismatic the whole time. Similarly, if you switch to Aggressive, your units get the same combat bonus as if you were aggressive the whole time.

The downside is, when you switch out of Char, it takes that much longer to get a new level. The only "unfair" advantage to Insanity->Char is the 'instant' healing from simultaneous leveling. But, it's out of your control, so there's no real way to take advantage of it.
 
I don't see why it is a problem. When you switch to Charismatic, your units get to the same promotion level as if you were Charismatic the whole time. Similarly, if you switch to Aggressive, your units get the same combat bonus as if you were aggressive the whole time.

I'll explain why I think it is a problem. When you switch to Aggressive, your old units do not get the Combat I promotion. When you switch to Charismatic, your old units get their benefits as if you always had Charismatic. That allows you to enjoy the benefits of more peaceful traits for most of the game, and switch to Charismatic when things turn ugly. The effect is specially big when you play Grigori; my level 12 heroes got 2 free promotions as if I always was Charismatic, but I enjoyed the benefits of Financial for the rest of the game.
 
I agree with Terkhen that it feels like an exploit to get the benefit that way. I agree that taking it off the list would be a fair fix... but then, you could just avoid switching to Charismatic late in the game if you feel that it's an exploit.

Ideally, the way it would work is that the XP to reach a new level would be based on the combination of your current level, the XP where you reached that level, and whether or not you have the Charismatic trait. So, if you weren't charismatic, and you have a level 6 figure with 30 XP when you switched, then the code would say:

- What XP were you at when you last leveled? (Answer: 26)
- How many XP to get to level 7, now that you're charismatic? (Answer: 28-20 = 8)
- Therefore, you need (26 + 8 = ) 34 XP to reach level 7.

So, in that case, you would not get the immediate jump to level 7. You would, however, continue to level up from there on out at an accelerated rate, as long as you remained charismatic.

This would, I presume, require introducing a "last level XP" field into every unit, so that's a significant re-write.

Another solution would be to tag a unit as charismatic leveling upon creation, but this doesn't seem quite right, and would require an additional field as well, so it seems worse to me than the other way I suggest.
 
this is only because charismatic is written as "25% less xp to upgrade" (I don't care about the exact number) (and as a side note, it is badly written) instead of a "you get 25%more xp on combat" promotion. +(free xp is boosted by 25%; otherwise it would be borked.)

however that trait is designed to take into account the fact that xp is made only of integers..

you can propose a redesign of the trait if you want.
 
Heh... yes, just making XP a floating point variable would be another way to do it. I haven't looked at the code, but if adding 1 XP is done with something like "unit.XPadd(1)", then it's just making the unit-internal variable a float and re-writing the XPadd method. That would be pretty easy.

But if it's generally written like "unit.XP = unit.XP + 1", then you would have to re-write the code at every point that adds XP (unit creation, dungeon exploration, combat, certain wonders/events. goody huts, etc). In that case it's pretty annoying and potentially bug-prone. Hey, look, it's a real-world argument for encapsulating your variables! :D
 
this is only because charismatic is written as "25% less xp to upgrade" (I don't care about the exact number) (and as a side note, it is badly written) instead of a "you get 25%more xp on combat" promotion. +(free xp is boosted by 25%; otherwise it would be borked.)

AND the Hero promotion would have to gice XP up to 125... But I like that idea most.

Heh... yes, just making XP a floating point variable would be another way to do it. I haven't looked at the code, but if adding 1 XP is done with something like "unit.XPadd(1)", then it's just making the unit-internal variable a float and re-writing the XPadd method. That would be pretty easy.

I'm sure it works that way.
 
My friends and I have noticed that Paramanders now obsolete soldiers of kilmorph. We were wondering if this is an intentional change, since it negates hurrying strategies using the soldiers unless you do not build a temple of kilmorph in a citiy so you can keep building soldiers.

Also we have noticed like the previous poster, that the AI is indeed fearless when it comes to popping dungeons. Popping the pyre, broken sepheculture, or the well before turn 10 seems like the AI has a death wish. It is common for our games now to have at least one computer player wiped out by dungeon spawns.
 
Spoiler :
this is only because charismatic is written as "25% less xp to upgrade" (I don't care about the exact number) (and as a side note, it is badly written) instead of a "you get 25%more xp on combat" promotion. +(free xp is boosted by 25%; otherwise it would be borked.)
/me quote himself :D hahaha.
well what I meant by "badly written" is that it says "-25%xp needed for upgrade" while it feels as a "I have only an advantage of 15% in xp".
Indeed, one understands that a unit with charismatic would upgrade to a level when it has accumulated 25%less xp than without charismatic : thus the unit will level up at 1,75xp (2), 3,75 (4 instead of 5), 7.5 (8 instead of 10), 12.75 (13, instead of 17), 19.5(20instead of 26), 27.75(28, instead of 37) ...Etc

whereas, If I remember correctly, the charismatic trait work in fact like this : you need 25% less (rounded up) to upgrade to next level; and the rounding up accumulates : thus each further level require the unit to gain/spend ; +2xp, +2.25(3), +3.75 (+4), +5.25(6), +6.75 (7), +8.25(9), +9.75 (10). Thus the unit change levels at : 2xp, 5xp, 9, 15(instead of 17), 22(instead of 26), 31 (instead of 37).

And thus, while it is written "-25%xp needed for upgrade", it feels only like a "-15% xp needed". (15 is 12% of 17, 22 is 85% of 26, 31 is 83% of 37).

That could have been corrected error by using rounding to closest instead of rounding up. Rounding to closest would change the xp needed to upgrades to next level to : +2 (1.5), +2(2.25),+4(3.75), +5(5.25), +7(6.75), +8(8.25), +10 (9.75)... This would lead to level changes at : 2, 4, 8, 13, 20, 28, 38. those are the same values for change of level as if I each level (not xpneeded for next upgrade) needed 25%less xp.
such minor correction in the "rounding" could have given back the feeling of "-25% xp needed".

(as RifE's xp has two decimals, I think this rounding up effect disappeared)
well I was wrong. see snarko's post thereafter.
 
Calavente it works exactly like you say one understands it should work. You need 25% less XP, rounded up, to reach level X.

XP needed to reach next level

current level * current level + 1 = XP needed

If the players modifier is not zero also do:

new XP needed = XP needed + (XP needed * modifier + 99) / 100


Non-charismatic, to reach level 11:
10*10+1 = 101 XP

Charismatic, same:
101 + (101 * -25 + 99 / 100) = 76 XP (it's 76.74 but integers always round down)
(101-76)/101 = 24.75% less XP needed. This is as close as we can get without using decimals.
 
My friends and I have noticed that Paramanders now obsolete soldiers of kilmorph. We were wondering if this is an intentional change, since it negates hurrying strategies using the soldiers unless you do not build a temple of kilmorph in a citiy so you can keep building soldiers.

It's like that in Vanilla. And yes, pretty much everyone hates Paramanders because of that.

And in regards to the whole "charismatic" debate. Don't fix what isn't broken. Or if you really want to, just mod the trait off of the adaptive list yourself.
 
Calavente it works exactly like you say one understands it should work. You need 25% less XP, rounded up, to reach level X.

XP needed to reach next level

current level * current level + 1 = XP needed

If the players modifier is not zero also do:

new XP needed = XP needed + (XP needed * modifier + 99) / 100


Non-charismatic, to reach level 11:
10*10+1 = 101 XP

Charismatic, same:
101 + (101 * -25 + 99 / 100) = 76 XP (it's 76.74 but integers always round down)
(101-76)/101 = 24.75% less XP needed. This is as close as we can get without using decimals.
ok. I appologize.
I'll hide my comments then...
 
And in regards to the whole "charismatic" debate. Don't fix what isn't broken.
Well, beyond causing CtD, what is broken and what isn't is a matter of opinion.

I look at it this way. Many attributes offer benefits that extend forward into the future - i.e. I can build certain buildings faster, or get bonuses on unit creation, or whatever, and benefit from that when the attribute changes. However, Charismatic is the only attribute where you get the benefit applied to past actions (i.e. past XP gain). It doesn't seem quite right to me.

Or if you really want to, just mod the trait off of the adaptive list yourself.
The popular proposal on the table at the moment is to have Charismatic increase the amount of XP you get for actions by 33%, rather than reduce the amount of XP needed to level up by 25%. That's much less radical than cutting it out of the list.
 
Back
Top Bottom