Military Advisor

@ruff:

I've loaded up your new Military Advisor in my recent SP game. Interestingly enough it shows worst enemies, but doesn't apply the correct attitude icons in some cases (Tokugawa is furious for example).



Imhotep
 
I know that I have an attitude issue with BUG Military adviser at present (I wish that was the only problem with it). Also, worse enemy is not 'unaltered' for version 3.13 (it will be 'n/a' in the formal BUG MA release). I put it in as a place holder because a little bird told me that this information will be in the next patch.
 
Been thinking about my threat index ... here are the colours that we could use to grade from NIL to EXTREME. I'll take a look at this tonight and see if I can put it in order. Feel free to suggest your own order. I'm thinking of having 10 colours that slowly move from ??? to RED.



Note: The colours in the game look more vibrant than those shown above.
 
Here is my suggestion. The 10 colours at the bottom in order from LOW to EXTREME risk.

 
Mixing shades of grey in with colors looks confusing to me. I think I'd go with the reverse of the chromatic spectrum. From lowest to highest.

  • Black
  • Dark Grey
  • Light Grey
  • White
  • Violet (Purple)
  • Blue
  • Green
  • Yellow
  • Orange
  • Red
This way first the brightness increases from black to white, then it gets into colors and goes from highest spectrum to lowest. Maybe swap out the grey and white for other colors, like brown or whatnot.
 
sounds good to me ...

 
sounds good to me ...



Threat Index ...

progress bar, 0 to 100

0 - 20
20-40
40-60
60-75
75-100

25 pts for ATTITUDE ... -15 to +15 = 25 to 0
25 pts for strength rating ... -50% to +50% = 25 to 0 (str = us / them - 1)
20 pts for close borders or ocean exposure (us) and them with knowledge of astronomy
30 pts if they are WHEOOH

Can anyone suggest items that we can add to the calculation of the threat index so that it is more gradual and not so lump (ie WHEOOH!)
 
Hey Ruff... don't forget to write up a doc for this.;)
Baaa - humbug! Its hard enough to produce the actual screens. I was also going to post the BUG MA as a mod component which will need some docs for it.
 
sounds good to me ...



Threat Index ...

progress bar, 0 to 100

0 - 20
20-40
40-60
60-75
75-100

25 pts for ATTITUDE ... -15 to +15 = 25 to 0
25 pts for strength rating ... -50% to +50% = 25 to 0 (str = us / them - 1)
20 pts for close borders or ocean exposure (us) and them with knowledge of astronomy
30 pts if they are WHEOOH

Can anyone suggest items that we can add to the calculation of the threat index so that it is more gradual and not so lump (ie WHEOOH!)

WHEOOH should be a multiplier, rather than an addition. If the overall threat level is low, then the odds that they're coming after you is also low.

Do AI also say WHEOOH if they're already at war? That would be low threat level as well. In fact you may want to add in already at war with someone else as a reduction to threat level anyway.

Close borders should be a bigger value than astronomy + coastal city. Unless their fleet is known to be in the ocean, approaching. :eek:
 
WHEOOH should be a multiplier, rather than an addition. If the overall threat level is low, then the odds that they're coming after you is also low.

I agree; if I don't fear their army, that they are gearing up for war doesn't increase my fear any more. If I fear their SoD, I pretty much drop whatever I'm doing and start mobilizing if I see they go WHEOOH.

Do AI also say WHEOOH if they're already at war? That would be low threat level as well. In fact you may want to add in already at war with someone else as a reduction to threat level anyway.

I believe so. I can't remember having an AI declare on me while being at war with someone else.

I know power rating captures the following, but maybe some would still be good to include separately.

First, key technological differences like access to Macemen when you only have Axemen or Riflemen when you only have Macemen. Ideally it would increase with each turn that the gap remained and dissipate once you close it.

Second, access to strategic resources.

  • Iron is slight at first
  • No metals is bigger at time of Macemen
  • Coal is slight (faster redeploy in borders)
  • Oil is huge
I think the major thing that is missing from all this is some sort of insanity level of the particular AI. Monty, Issy and Shaka should get an automatic bump up to the next higher threat level.

Finally, is there an event for when the AI extorts money or a tech. Perhaps this is a sign they think they might like to attack. I know I've started giving in to those demands more often after reading Sisiutil's ALCs.
 
I like the WHEOOH as a multiplier. Building in complicated tech differentials is possible but I'm not sure I want to hard code those. Maybe I include key military techs (Copper, Iron, CS+Mach, Rifling, Industrialisation, Tank tech) in a similar way that I am including strategic resources. I am not putting in modifications for known nut-cases (Monty, Boudica, etc) as the player has to think about this themselves. Actually, we could make this a configuration (list of leaders with level adjuster ... -1, 0, +1) and include that in the ini file (not the option screen).

I think that they have a different reason for not trading war declarations if they are already in a war.
 
Actually, we could make this a configuration (list of leaders with level adjuster ... -1, 0, +1) and include that in the ini file (not the option screen).

GMTA. I thought exactly this as I read your post. This would work great.

I think that they have a different reason for not trading war declarations if they are already in a war.

Sure, and the point is that you need to take that into consideration. If they are WHEOOH, it's only a multiplier if they are not at war. Maybe being at war just makes it less of a multiplier, but I almost think being at war itself should be a multiplier (e.g. 50% or 66%). Actually, sometimes they will be at war but not be WHEOOH, right?
 
I'm pretty sure in my current game one of my friends was at war and said WHEOOH when I checked if they'd join in my war against a different AI. I'll check some of my back saves.

Edit: Yes indeed. Brennus declared war on Elizabeth (who was at war with Monty). This is the only war at this time. Brennus is WHEOOH for declaring on all other AIs. I don't know if it makes a difference, but he wants peace with Elizabeth as he's lost all his troops in her land and cannot advance (didn't advance actually).

Perhaps that's the difference. If the AI is willing to end the war, it cannot start another one yet?
 
I'm stuck! I'm trying to write a short python function that will return the following (input parameter is the leader the active player is trying to trade with):

1) Yes / No / Mixed based on if it will declare war on all known players, no known players or a mixture of yes and no
2) The reason for not declaring war (first No answer)
3) boolean if any reason is WHEOOHs

I've looked at the code for trading tech and resouces but, to me, a war declaration is different as I need to loop over the other players to see if the input player will trade war to the active player.

This is what I have so far ...
PHP:
	def getDeclareWar(self, iLeader):
		sReturn = ["", "", False]		
		tradeData = TradeData()
		tradeData.ItemType = TradeableItems.TRADE_WAR

		for iLoopLeader in range(gc.getMAX_PLAYERS()):
			gcLoopLeader = gc.getPlayer(iLoopLeader)
			if (gcLoopLeader.isAlive()
			and (gc.getTeam(gcLoopLeader.getTeam()).isHasMet(gc.getPlayer(self.iActiveLeader).getTeam())
			or gc.getGame().isDebugMode())
			and not iLoopLeader == self.iActiveLeader
			and not gcLoopLeader.isBarbarian()
			and not gcLoopLeader.isMinorCiv()):

# code here to check if iLeader will trade war with iLoopLeader to iActiveLeader

		return sReturn

Other functions I will have to use ...
loopPlayer.canTradeItem(iActivePlayerID, tradeData, False))
loopPlayer.getTradeDenial(iActivePlayerID, tradeData) == DenialTypes.NO_DENIAL and other denial types ... in particular 'DENIAL_TOO_MUCH'
 
I've committed what I have to the SVN. It is still very much (!!) a work in progress - the code is a bit of a mess but it works. Be sure to grab IconGrid_BUG.py as I had to add some functionality to IconGrid.py for the military adviser (namely, the ability to hide the grid items and for a cell to hold a progress bar).
 
Top Bottom