PieceOfMind's Advanced Combat Odds

v2.0 has been uploaded.

Finally, all of German, French, Italian and Spanish translations are included.

Thanks to jmas for the Spanish translations!

Note to modders:
Only two files changed in this update:
-Assets\xml\text\CIV4GameTextInfos_ACO.xml (for the new translations)
-Assets\xml\GlobalDefinesAlt.xml (one or two modifications to default settings)

No changes were made to the DLL since v1.4

This will be the last update for a while.
 
v2.01 has been uploaded.

This is a very very minor update. There are no changes to the actual mod - just the commenting in the source file CvGameTxtMgr.cpp. I finally went in and tidied up the commenting so that all changes are now completely enclosed within my comment notation.

There are no longer stray braces lying around, for example.

I have made this very small update only to make it easier for SDK modders to merge the mod.

Unfortunately, winmerge has a bit of trouble finding the old code in the new source file correctly. Still, if you are very careful with where you copy and paste the code from my source file now, you should be alright.
 
Is there any reasonable reason to leave older versions of Advanced Combat Odds in the downloads database? I might remove these old versions very soon, but perhaps leave the last version up that was compatible with 3.17.
 
I've merged the latest version with BULL today (phew that took a long time!) and am finding a few quirks and have some questions.

Exactly what does "Who Owns Modifiers" do? All it seems to do is place a label or not. When it's off nothing happens, but the name kinda implies either A happens or B happens--not A or nothing.

If you have Force Original Odds turned on the line-endings are goofed a little. I added a NEWLINE after the original survival odds, moved the NEWLINE from before the retreat odds to after it (removing the conditional one that was already there), and finally removed the first NEWLINE from the "else ACO is disabled" block.

What is the XP range and why would you want to see it?

When you show the unit infos, isn't it supposed to show the promotions the unit has?

Anyway, I'm adding the options to the BUG options screen (there are a lot of 'em) now and will commit soon. If you can correct any errors in the hover text descriptions that'd be great. :goodjob:

Edit: Oh yeah, I was thinking of adding an option to let the user set the minimum percent bar length instead of pegging it at 0.5%. Any thoughts on this, for or against? It would show up as a drop-down on the options screen, probably 0%, 0.5%, 1%, 1.5%, 2%, ... , 4.5%, 5%, and 10%.
 
I've merged the latest version with BULL today (phew that took a long time!) and am finding a few quirks and have some questions.

Exactly what does "Who Owns Modifiers" do? All it seems to do is place a label or not. When it's off nothing happens, but the name kinda implies either A happens or B happens--not A or nothing.

Who owns modifiers adds a line - "Attack modifiers:" or "Defense modifiers:"

It only shows if there are more than zero modifiers in effect. The only attacker modifers that count are combat promos or first strikes. Any other type of modifier should show up under defender modifiers.

I've left this as an option and disabled by default because most players already understand that the way I've ordered the modifiers is so that attack modifiers show up first, followed by defense modifiers.


Code:
if (((!(pAttacker->immuneToFirstStrikes())) && (pDefender->maxFirstStrikes() > 0)) || (pDefender->maxCombatStr(pPlot,pAttacker)!=pDefender->baseCombatStr()*100))
                    {
                        //if attacker uninjured strength is not the same as base strength (i.e. modifiers are in effect) or first strikes exist, then
                        [B]if (GC.getDefineINT("ACO_WhoOwnsModifiers"))
                        {
                            szString.append(gDLL->getText("TXT_ACO_DefenseModifiers"));
                        }[/B]
                    }//if
                    if (iView & GC.getDefineINT("ACO_Option_ShowDefenderHelp"))
                    {
                        szString.append(NEWLINE);
                        setUnitHelp(szString, pDefender, true, true);
                    }

If you have Force Original Odds turned on the line-endings are goofed a little. I added a NEWLINE after the original survival odds, moved the NEWLINE from before the retreat odds to after it (removing the conditional one that was already there), and finally removed the first NEWLINE from the "else ACO is disabled" block.
Oops that's a mistake I probably made when updating to 2.01. I'll fix that, but it sounds like the change you made is the obvious one.
What is the XP range and why would you want to see it?
XP range is supposed to show you the values of R that will give you either 1 more xp or 1 less. For example, if R = 1.2, the critical values on either side are R=1 and R=1.33. XP range display will show you that you'll get 2xp if you send R over 1.33 and you'll get 4xp if you send R to 1.0 or less (not that the last one is possible).

I've left it disabled by default as I can't imagine too many people who'd use it.

See the above picture

When you show the unit infos, isn't it supposed to show the promotions the unit has?

Hmm, I thought it does show the promotions. You're talking about the promotions on the defender?

Anyway, I'm adding the options to the BUG options screen (there are a lot of 'em) now and will commit soon. If you can correct any errors in the hover text descriptions that'd be great. :goodjob:

I'll do my best.

Edit: Oh yeah, I was thinking of adding an option to let the user set the minimum percent bar length instead of pegging it at 0.5%. Any thoughts on this, for or against? It would show up as a drop-down on the options screen, probably 0%, 0.5%, 1%, 1.5%, 2%, ... , 4.5%, 5%, and 10%.

I wouldn't recommend this. It's not going to look very good at many values. IMO it's a part of ACO people really ought not to be fiddling with.
 
You asked earlier if you should keep the older versions of your mod available. If you were to host your mod at SourceForge you could a) let SF keep your old versions and b) make merging easier for modders.

Whenever you do a release you tag your source code in Subversion. This creates a copy of the exact state of all the code and labels it. That way modders can easier get a diff between any two versions with a single command.
 
Who owns modifiers adds a line - "Attack modifiers:" or "Defense modifiers:"

Ah ok, I'll leave it disabled by default as well. I used all your defaults from the file.

Hmm, I thought it does show the promotions. You're talking about the promotions on the defender?

It does, as shown. I placed the promotion on the attacker by accident to do my test. :blush: My bad.

I wouldn't recommend this. It's not going to look very good at many values. IMO it's a part of ACO people really ought not to be fiddling with.

The reason I'd like it for myself is that I want to see both sets of bars in the full display, but then the top few bars go off the screen. It's only a last-ditch effort to fit as much on the screen as possible. We'll see if I ever add it; I've still got a lot on my plate. ;)
 
The reason I'd like it for myself is that I want to see both sets of bars in the full display, but then the top few bars go off the screen. It's only a last-ditch effort to fit as much on the screen as possible. We'll see if I ever add it; I've still got a lot on my plate. ;)

For the moment, what I'd recommend in that situation is turning some features off in view B or moving them to view A.
 
I've committed the ACO options to BUG. Please take a look at the XML and see if anything needs changing. Thanks!
 
Overall the help text looks really good. Just a couple of things to clarify:

"Select when to show the sum of all defense modifiers."

is not entirely accurate.
The modifier sum shown is the sum of attacker and defender modifiers (where attacker modifiers are negative).
So maybe call it..

"Select when to show the overall defense modifier."

You could use the words 'net' or 'total' instead of 'overall' if you want. I don't know which would be easier to translate.



Also, a question. Would it be difficult to have a button to reset all to default? If there're a lot of options and some of them are a bit confusing this may be a good safety net.

"When checked, allows you to change the level of detail displayed in the combat odds calculations when hovering over an attack move using PieceOfMind's ACO."

I'd change to:

"When checked, enables PieceOfMind's ACO, giving you more detailed combat odds information when hovering over a unit to attack."
 
How about

"Select when to show the total defense modifiers (includes attacker's non-combat modifiers that apply to the defender)."​

and

"When checked, PieceOfMind's ACO shows more detailed combat odds information when you hover over a unit to attack."​

I've been putting off adding a button to reset all options (on the current tab) to default values for a long time now. It theoretically shouldn't be too hard; I just keep having higher priority things that need doing. :(
 
I was going to try and integrate this into my mod, but I noticed it isn't for BUG without BULL. I don't want to use BULL but I have BUG In my mod. Is it still possible to merge it in? I don't have a custom DLL for my mod or anything (yet at least), so I'm thinking I could just use the one you use without any issues, is that right?
 
I don't want to use BULL.

Blasphemy! :trouble:

I don't have a custom DLL for my mod or anything (yet at least), so I'm thinking I could just use the one you use without any issues, is that right?

Yes, that's correct. Just drop in the DLL and the Art/XML files into your Assets folder and you'll be good to go.
 
I don't remember what they were, but I had my reasons. :lol:

Multiplayer. Your mod is specifically designed for MP games, and currently BULL breaks MP, so you can't use BULL.
 
I've heard that BUG does too.

The Random Naming and Poll Error features in BUG were fixed a while ago. Other than those, BUG has had no OOS errors. The problem lies in BULL alone.
 
I thought I would FINALLY get around to trying this mod out. Unfortunately I can't get it to work with worldbuilder/scenario saves. I'll often get a problem about a missing .xml file, and while I can get a game to run, the entire GUIs are all stripped out.

But if I just play a straight-up regular game, it works.
 
Top Bottom