BUG Military Adviser

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,134
Location
an Aussie in Boston
The BUG team have been working on the most overlooked adviser in the game ... the Military Adviser. We've taken the current screen and added another screen to it. The current screen has been renamed 'Deployment' and shows the existing information as well as allowing different list, sort and filter criteria.
  • Want to know where your Great Leader units are?
  • Want to find your city garrison units?
  • What to find the unit with the highest XP?
Then the new deployment screen is the one for you.

The other screen - the Situation Report (or Sit-Rep for short) is shown below:


The AI leaders are shown by row and the columns are:
  • a fist if the leader is in WHEOOH state
  • A Threat Index - we've fixed the 'thread' typo :D
  • two columns of strategic advantage - ours and theirs: these columns show the units that you can build but the AI cannot, and units the AI can build but you cannot - Note: the screenie shows some obsolete units but we've changed the code to remove those now.
  • Leaders that the AI will declare on
  • Leaders that the AI is currently at war with
There are also two other columns that are only included if required; Vassals - showing the leaders that the AI has vassalaged and Defensive Packs - showing leaders that the current AI has a DP with.

Threat index is calculated from:

  • relationship ... -15 to +15 is rescaled to 0 to 38
  • strength ... 50% to 150% (us / them) is rescaled to 38 to 0
  • threat is sum of above times
    • 1.3 if WHEOOH
    • 0.2 if AI player has a defensive pact with human player
  • not shown if AI player is a vassal

5 categories are delimited by ...

  • < 15 then Low
  • >= 15 and < 35 then Guarded
  • >= 35 and < 55 then Elevated
  • >= 55 and < 75 then High
  • >=75 then Extreme

We just have a few small housekeeping things to do in the code and then I will post some files. Note, there are some call-outs to other BUG files but they should be easy to identify and remove. This MA also makes use of the icongrid.py file but we've had to extended it for progressbars and other items. See the file called icongrid_BUG.py.
 
This thread is just an announcement thread to get this Adviser included in possible components. If you want to discuss the BUG MA, please post here ... http://forums.civfanatics.com/showthread.php?t=270962

I've cut the latest version of the BUG Military Adviser out of BUG and attached it here. Its only 5 or so files and can be run as a stand alone mod.
 

Attachments

  • CustomAssets-BUG-MilitaryAdviser.zip
    54.7 KB · Views: 208
Its part of BUG. We are doing a release shortly with it in it (or you could grab it from the SVN). You'll need cvBUGMilitaryAdviser.py and IconGrid_BUG.py (and the related interface / page connection file that escapes me at present.
 
You know what might be interesting? To show the ranges of all bomber units when you select them. It would give a real "war room" feel to it. :D
 
:bump: just added a stand alone version of our BUG Military Adviser to post #2 in this thread. We will keep developing the BUG version so grab that if you want to see the latest and greatest.
 
Hi, ruff_hi!

Is this the latest version of the BUG Military Adviser?

Thanks
 
The threat index is not coming up in my game. I notice in the screen shot it does not come up for all the civs. What makes it appear?

What is "WHEOOH state"?
 
The threat index needs two bits on information ... attitude (always available) and espionage (for the power ratio). The original version would not show the threat index if you didn't know the power ratio (ie not enough spy points). The latest version assumes a 75% standing for power and puts a '*' or '(est)' on the threat if you don't have enough spy points.

WHEOOH = "we have enough on our hands" - either indicating that the AI is currently at war, or is planning for war. A fist appears if the AI is in WHEOOH and not at war (ie is currently planning war).
 
It's a great mod. Where can I get the latest version?
Its part of BUG so if you can grab the latest version of that, you should be good. We will be releasing a new version of BUG over the 4th July long week end.
 
Edit: Double Post
 
added some documentation about the Military Adviser in the BUG MA thread. Please post any comments about this adviser to that thread.
 
Its part of BUG so if you can grab the latest version of that, you should be good. We will be releasing a new version of BUG over the 4th July long week end.

This looks cool:goodjob:

I'd hate to be without the BUG mod . Is the new and improved version 3.17 compatible? Where is the thread for that? I forget where I saw it, and BUG doesn't lend itself to search.
 
It is here. I'm not sure how much clearer we can be. :D
 
I've a couple of suggestions. I post them here instead of on the BUG project thread, for it's more related to the BUG Military Adviser.

--------------
1-
--------------
The adviser shows you the strategic advantages of both sides. However, it doesn't take into account if two units are the same unitclass, and it can show (for example) that you have the Swordsman advantage, while Caesar has the Praetorian advantage. In this case, I think that the only one advantage is Caesar's, because my unit is the base class while he has the Unique type! Only the Praetorian should be shown, not my Swordsman.

To do this, just modify the CvBUGMilitaryAdvisor.py, in the method isUnitUnique:
After the code
Code:
		# check if the unit is in the array of enemyunts
		if (iUnit in enemyUnits):
			return False
add the code
Code:
		# byFra, check if the unit is the base type of a unitclass, and the other civ has the unique type.
		for iUnitLoop in enemyUnits:
			if gc.getUnitInfo(iUnitLoop).getUnitClassType()==gc.getUnitInfo(iUnit).getUnitClassType():
				if iUnit==gc.getUnitClassInfo(gc.getUnitInfo(iUnit).getUnitClassType()).getDefaultUnitIndex():
					return False


--------------
2-
--------------
The panel that shows you all your units has a little bug. When you click on one unit, sometimes many units become selected and shown in the minimap.

I'm not sure, but it can depend on the unittype. If a unittype (eg, an Axeman) is in your own land, and some other units of the same type are in enemy land, then, when you click on the Axeman, ALL axemen are selected.

Besides, it can be useful to switch back to the old style, where all units are grouped by type (melee, naval, air, etc).
 
1. Different units of the same class are displayed because not every unique unit is obviously better than the stock unit. Sure, the Praetorian beats the Swordsman, but what about Monty's poor excuse for an Axeman?

Maybe we could add it as an option:

x Unique Units Always Better Than Those They Replace

You certainly don't want to consider unique units to be equal to stock units and hide them both, right?

2. The selection behavior is due to the half-finished deployment tab. The code I modified only stores the unit types selected without regard to where they are. I will finish this screen after I complete the core rewrite. This is high priority.

Besides, there's an actual functionality bug (versus a display issue) on that tab: some units simply are not shown! :eek: I know the reason and will fix this very soon.

If you read back in this thread, you will see that the design has two dropdowns for selecting the grouping/sorting. The code can currently group by location, combat type, unit type, level, and promotions. And if you edit the Python, you can change the groupings yourself (very easy, search for "loc" with the quotes.

Code:
grouping1 = self.stats.getGrouping("loc")
grouping2 = self.stats.getGrouping("type")

The other valid values are "combat", "level", and "promo" if you'd like to play around with them. They can appear in any order, but you only get two groupings so far, and I don't know what will happen if you use the same value for each. I doubt there will be very many casualties. :p
 
Top Bottom