PieceOfMind's Advanced Combat Odds

I think it would look good, except for the wrap around caused by promos :dunno:
 
It looks a little cluttered, and if the names were green and red it would be very confusing. The main issue for me is that the top part of the display often is not visible due to the bars. I would even like an option to hide the bonus calculations at the bottom to solve this.
 
Before you release 1.1, I suggest stripping out the hard-coded text strings like "Press SHIFT ..." to XML <TEXT> entries so they can be translated. I can probably get Cammagno and The Doc do the Italian and German ones.
 
Before you release 1.1, I suggest stripping out the hard-coded text strings like "Press SHIFT ..." to XML <TEXT> entries so they can be translated. I can probably get Cammagno and The Doc do the Italian and German ones.

That should be easy to do. I'm waiting on RevDCM to do any work on my mod, so I can do this. Let me know if you want to take care of this PoM, and I'll step back, but if not, I'll try to set this up by this time tommarow.
 
Before you release 1.1, I suggest stripping out the hard-coded text strings like "Press SHIFT ..." to XML <TEXT> entries so they can be translated. I can probably get Cammagno and The Doc do the Italian and German ones.
I'll do that.

I think it would look good, except for the wrap around caused by promos :dunno:

Yeah I'm not sure either. Personally I don't think it's necessary to show the details about the attacker, since these should be obvious from the unit display directly below it anyway.

It looks a little cluttered, and if the names were green and red it would be very confusing. The main issue for me is that the top part of the display often is not visible due to the bars. I would even like an option to hide the bonus calculations at the bottom to solve this.
That's an idea.

What sort of option do you mean? Something like I've used already? Setting some value in xml to 0 means they won't be displayed, and setting to 1 means they will? Or do you mean something like where you'd press control to see them?

That should be easy to do. I'm waiting on RevDCM to do any work on my mod, so I can do this. Let me know if you want to take care of this PoM, and I'll step back, but if not, I'll try to set this up by this time tommarow.

I'll put in all the XMLs, and leave them all as English, then you can pass on to whoever knows the translations, I guess?
 
Personally I don't think it's necessary to show the details about the attacker, since these should be obvious from the unit display directly below it anyway.

I always attack with a single unit, but during a game last night I actually selected six Infantry and attacked with the stack. It ended up picking a CR2C1 over a CR3 somewhere along the way, and I was surprised. It didn't matter against Riflemen already pummeled by Artillery of course. You could always add it as an option. :) (see next block)

What sort of option do you mean? Something like I've used already? Setting some value in xml to 0 means they won't be displayed, and setting to 1 means they will?

Yes, this is how I've done everything in BULL so far. It allows fine-grained control even though 99.99% of the players will leave everything on. In the case of ACO, having everything on will likely cause the display to be too big, so individual options make sense and aren't that hard to do.

Or do you mean something like where you'd press control to see them?

That's also a possibility. You could have the 0/1 option in XML and have CTRL toggle it.
 
I guess I'll work under the assumption that all things will be left on according to the detail level, and then the options will be for manually disabling things. This will mainly be there for the people with smaller screens who want to disable things they never want to see.

As for displaying the attacker, I'd be tempted to leave that as an option but off by default.
 
Changes so far:

v1.1
-Fixed typo in name of header file AdvancedCombatOdds.h
-Added unit help line, for defender, and attacker if enabled
-Re-arranged some of that combat modifiers. Attacker bonuses that are subtracted from defender are now shown in with defender bonuses, but before the defender first strikes.
-Put damaged unit hitpoints in with combat_strength line - this saves some space
-Made attacker modifiers show as negative, to more accurate show they are subtracted from the defender bonuses
-Added option to remove "Press SHIFT for more detail"
-Added option to remove defender unit help
-Added option to include attacker unit help (it is off by default)
-Added option to disable Unharmed Odds from all detail settings
-Added option to disable Unrounded XP
-Added option to disable Average HP from all details
-Added option to disable display of Survival Odds (first line of display)
-Added option to disable display of conditioned average HP for each outcome

 

Attachments

  • v1.1 PNG.jpg
    v1.1 PNG.jpg
    187.7 KB · Views: 256
I had a different idea about options just now. You already have two views that you can see: whatever you pick and Everything by using SHIFT. You could remove the names for those views and just have view A and view B (or alternate view). Then each individual added element/group could have a 4-way setting: show it 0) never, 1) view A, 2) view B, 3) both views.

As for coding this, it's quite easy:

Code:
int iView = 1;
if (shift held down)
{
    iView = 2;
}

...

if (iView & GC.getDefineINT("<option>"))
{
    ...
}

Here, & does "bitwise and" and will result in a non-zero value if the option is enabled for the given view.

Code:
      View
Opt  01  10
 00  00  00  [B]off[/B]
 01  01  00  [B]1 only[/B]
 10  00  10  [B]2 only[/B]
 11  01  10  [B]1 and 2[/B]

This gives more control to the player but requires they actually choose the features to display. By setting up two default views, you may cover 99% of the players good enough.

Just throwing it out there in case you are looking for more options, no pun intended. :mischief:
 
This mod will be updated to be compatible with the new patch BtS 3.19 as soon as possible (probably before end of June). v1.0 will have to die with BtS 3.17 eventually. v1.1 and newer versions will be for BtS 3.19.

For modders who have used this code in their mods, you should be able to copy over the code as before, as I'm pretty sure Firaxis would have not messed with the code anywhere near where changes were made in this mod.

I have to admit, this is completely unexpected. Thank heavens this mod is only small changes - I'd hate to have done a lot of work on a big mod.:eek:
 
This mod will be updated to be compatible with the new patch BtS 3.19 as soon as possible (probably before end of June). v1.0 will have to die with BtS 3.17 eventually. v1.1 and newer versions will be for BtS 3.19.

.......

Great news!... Oromo warriors will be happy. :)
 
I'm attempting to compile v1.1 for 3.19 but I'm getting a few compile errors that I haven't seen before with the 3.17 files.

Spoiler :


Any ideas?

In case, one of you want to try compiling it for me and see if you don't get the errors, the 4 source files for the mod are attached to this post.
 
That line doesn't look right. Did you merge this file correctly? Here's what seems to be the same line (based on surrounding lines) in my file:

Code:
if (!CvWString(pUnit->getUnitInfo().getHelp()).empty())

Many core things were changed in the SDK, and one of those things is that isEmpty() is now a function of CvWString rather than a stand-alone function that gets passed a string. When you merged, this should have been changed.
 
Hmm. I may have lost the 3.19 unmodded copies of the two .cpp files.

EF could you post a copy of the two? (gametxtmgr and cvgameutils)

Or, is there somewhere I can get these?
 
Ok, having now merged the files properly, I'm getting a new compile error.

Any ideas what's going on here?

It now gets to the point where it says
Linking dynamic library: ..\Beyond the Sword\Assets\CvGameCoreDLL.dll
Creating library ..\Beyond the Sword\Assets\CvGameCoreDLL.lib and object ..\Beyond the Sword\Assets\CvGameCoreDLL.exp

then it spews out this:

Spoiler :


EDIT...
Oh I think I figured it out. I need to add all the new files from the patch into the project.
 
Yes, there are new .cpp files in the SDK, and the .obj files they create must be added to the LINKOBJS definitions.
 
Top Bottom