Home » MODDING HQ 1.13 » v1.13 Bug Reports » Exploit: Aggressive AI will not re-take 90% Captured Towns (Minor code fix/request)
Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340240] Fri, 27 March 2015 08:12 Go to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001
My apologies if this should be posted in another section, but this fits more into an exploit category than a direct bug; however, I'm sure a minor code alteration/XML'd option might bypass this.


Essentially, if a player captures a town but does not take the last town sector (or sectors) this enables them to occupy the most strategically important locations of that town (airport, mine, hospital, etc.) without the game evaluating an aggressive action to retake that sector or town sectors.


I recommend an XML'd option (AGGRESSIVE_AI_RETAKE_PARTIAL) which would bypass any conditions that require a town to be occupied fully/requirement to have the Deidrianna cutscene event triggered before it evaluates and assigns a counter attack (using the full aggressive AI counterattack options if enabled).



Sectors outside of town sectors (such as SAM sites or Tixa) are how every sector should function with this flag enabled.




http://i.imgur.com/jZS0x0W.jpg


[Updated on: Fri, 27 March 2015 08:16]

Report message to a moderator

Corporal 1st Class
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340245 is a reply to message #340240] Fri, 27 March 2015 13:06 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
While easily possible, this leads to two problems:
  • Narratively, the cutscenes directly refer to the rebels taking an entire town. Would be odd if Elliot risks getting slapped in the face if the town isn't fully lost yet.
  • It wouldn't be clear when and when not to start the cutscene and when to start a counterattack. In the case of Drassen, do that if the airport is lost... or the mine... or both?

Technically the cutscenes only affect the counterattacks, the AI will still try to retake the sectors lost after enough time has passed (unless there is a bug here I'm unaware of).



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340249 is a reply to message #340245] Fri, 27 March 2015 13:39 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
In one playthrough I did I was able to take and hold parts of Drassen, Cambria, Chitzena and Grumm before the AI got around to trying to take one back. The AI might be a little slow about getting around to it -- Elliott would be in for a spanking if he had to report 4 towns taken over in one night. I understand the problem with the cutscenes, but the AI could be a bit more aggressive. Perhaps the solution is already implemented and it is Ai Alert Levels in JA2_Options.INI

Toggle Spoiler


The Spoiler has the default numbers. I play Experienced and I bump the Starting Alert level up to 25, but that isn't enough for this situation if I can take most of 4 towns without reprisal. Perhaps if I set it higher? Will that alleviate this problem of taking partial towns and not being slapped for it?

Report message to a moderator

Sergeant Major
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340255 is a reply to message #340249] Fri, 27 March 2015 14:58 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001
This flag would bypass/ignore the cutscenes. This is to prevent exactly what you just described. I.E. replace this equivalent condition line:

if( (townControlPercent >= 100) && (!(drassenCutscene)) )
{
      // do cutscene
      // execute counterattack code
}



With:

if( (townControlPercent >= 1) && (!(townControlPercent >= 100)) )
{
      // execute counterattack code
}
if( (townControlPercent >= 100) && (!(drassenCutscene)) )
{
      // do cutscene
      // execute counterattack code
}



Do you get my idea in coder terms, Flug?

Report message to a moderator

Corporal 1st Class
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340256 is a reply to message #340255] Fri, 27 March 2015 15:04 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001
@edmortimer:

Generally an immediate reprisal comes in the form of 'pending reinforcements', which makes it seem like the sector is being immediately counter-attacked. Aside from that, patrols near the city borders may somehow be drawn to attack or reinforcements going to another town sector which need to pass through the town sector you currently occupy. I'm more interested in getting the new Aggressive AI code to run on single town sectors, rather than once the entire town is taken.


You can achieve the effect (quasi/psuedo anyway) by making sure 'pending reinforcements' is set correctly, increasing the Queen's Pool of Troops, increasing the town sector priority in ArmyComposition.xml, and making the Queen's decision making timelapse shorter in JA2Options.ini ; you can also enable 'investigate nearby sectors' and make sure enemies can reinforce attacked sectors from non-town sectors (this would pull patrols in from outside the city.)


Also, I interpret that bit of code as just being an adjacent sector check for designated patrols outside towns and such, just so that patrols chase your mercs and engage them outside of town sectors. I don't think that has any bearing on anything else.

[Updated on: Fri, 27 March 2015 15:46]

Report message to a moderator

Corporal 1st Class
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340257 is a reply to message #340256] Fri, 27 March 2015 15:08 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
@RunAwayScientist

I have most of what you suggest already implemented -- but not the increasing town sector priority part. I'll try that, definitely! Thank you.

Report message to a moderator

Sergeant Major
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340258 is a reply to message #340257] Fri, 27 March 2015 15:15 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001
http://i.imgur.com/x1McwPo.png

Report message to a moderator

Corporal 1st Class
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340261 is a reply to message #340258] Fri, 27 March 2015 15:35 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
@RunAwayScientist

Actually, just for informational purposes for others looking at this thread -- it isn't SectorNames.XML but ArmyComposition.XML that has the priorities for reinforcements. Or am i off-track?

Report message to a moderator

Sergeant Major
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340262 is a reply to message #340261] Fri, 27 March 2015 15:46 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001
Woops, you are correct. Tabledata\Army\ArmyComposition.xml


I'll amend my post.

Report message to a moderator

Corporal 1st Class
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340263 is a reply to message #340262] Fri, 27 March 2015 16:18 Go to previous messageGo to next message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Another question, this time regarding the QUEENS_INITIAL_POOL_OF_TROOPS in JA2_Options.INI -- is this number in addition to the StartPopulation defined in ArmyComposition.XML? Or is this the total number of troops she has on map at the beginning of the game? I would think it is in addition to, but I want to make sure.

Report message to a moderator

Sergeant Major
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340264 is a reply to message #340263] Fri, 27 March 2015 16:38 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001

It's the pool of troops that get generated in a squad which leaves from the palace. These troop formations are used to either reinforce a sector, replace a patrol, or used in a Vanilla style regular attack (Aggressive AI doesn't decrement pool of troops, I believe).


According to the description, it's also supposed to increase the pool of troops by a certain amount that you set, which is increased or multiplied depending on the difficulty level (?) I never looked at the code for that increment, but supposedly the pool does get replenished by that amount as soon as it hits < 0.


You can play with it to see how it affects things. Higher numbers translate into more attacking troops, lower numbers to less attacking troops; higher numbers also mean bigger/quicker garrison buildups in high priority sectors. An insufficient pool means the Queen takes longer to reinforce Meduna, Grumm mine, etc. as the game goes on.

Report message to a moderator

Corporal 1st Class
Re: Exploit: Aggressive AI will not re-take 90% Captured Towns[message #340270 is a reply to message #340264] Fri, 27 March 2015 18:13 Go to previous message
edmortimer is currently offline edmortimer

 
Messages:1533
Registered:January 2015
Location: Home Free
Thanks. That's what I thought. I run the game on Xubuntu and a 10yr old computer -- which won't run the editors except the Map Editor (luckily) so I don't know if the descriptions in the editor is different than in files themselves. I prefer editing in a text editor myself, being old school, so I don't have a hankering to get the editors started by installing Windows (which would mean replacing this OS as I have a tiny hard drive).

Report message to a moderator

Sergeant Major
Previous Topic: Shadow camouflage trait no longer working with Vanilla settings
Next Topic: Mouse bug with Nvidia drivers 347.25
Goto Forum:
  


Current Time: Tue Feb 18 23:01:26 GMT+2 2025

Total time taken to generate the page: 0.01010 seconds