Page 1 of 2

AI still ignoring Pressburg peace

Posted: Wed Dec 16, 2015 2:53 am
by TC271
Post patch - have waited 5 turns since offering and nothing - loaded Austria and its awaiting reply with over 200 EPs unused.

Posted: Wed Dec 16, 2015 3:12 am
by vicberg
EvalIsAtWarWith = FRA
EvalMorale = ;<;75
EvalMorale = ;<;FRA
SelectSubUnits = Area $Theater_Austria;$Land;Enemy;
EvalSubUnitCount = >=;75

Austrian morale < 75. France Morale > Austrian. More than 75 French Elements in Austria.

Make sure of the above. If you aren't sure, open the game as Austria and check.

Posted: Wed Dec 16, 2015 3:12 pm
by vicberg
There does seem to be an issue. Throughout the scripts, event1 sets up something that event2 checks to see if it has been set in order to fire. For some reason, event1 is setting up the value and event2 isn't finding it and not firing. This is happening in multiple places, so hopefully a fix to the engine processing the scripts will fix all of them.

Posted: Wed Dec 16, 2015 3:42 pm
by veji1
I think that there are 2 separate issues :
- whether the event sequence works.
- whether the EP spending austrian AI works or not. It seems to me that there is an idle AI problem.

Posted: Wed Dec 16, 2015 4:01 pm
by vicberg
The sequence is this

1) Show event to user
2) User clicks on event
3) Show resulting acceptance event (if there is one) to next user
4) User clicks on event
5) Fires peace event

For the AI, the problem is this
1) Show event to user
2) AI is expecting event to fire, but there's no one to fire it
3) Peace events aren't firing

Quick and Dirty Fix

- Go To c:\program files (x86)\matrix games\wars of napoleon\ngc\events
- Open FRA_Peaces.sct using notepad
- Find evt_nam_FRA_PeaceOfPressburg_AIActivate
- remove entirely from Condition: CheckOption = $gmaOptionGov;FRA_PeaceOfPressburg;=;1
- Save
- Open AUS_Peaces.sct using notepad
- Find evt_nam_AUS_PeaceOfPressburg_AIActivate
- remove entirely from Condition: CheckOption = $gmaOptionGov;AUS_PeaceOfPressburg;=;1
- Save

There was a change to give France Supply Access after peace. This change isn't working yet. If you don't want to take horrendous losses in Austria, do the following:

- Go To c:\program files (x86)\matrix games\wars of napoleon\ngc\events
- Open AUS_Peaces.sct using notepad
- Find evt_nam_AUS_PeaceOfPressburg
- Change AddDiploItem = FRA;$diGivePassageRight;CURRENT to AddDiploItem = FRA;$diForeignAccessGiven;CURRENT
- Save

As always, be careful. Take a copy of the original so you can restore or otherwise be prepared to reinstall game

Posted: Wed Dec 16, 2015 4:03 pm
by vicberg
veji1 wrote:I think that there are 2 separate issues :
- whether the event sequence works.
- whether the EP spending austrian AI works or not. It seems to me that there is an idle AI problem.


No. Problem is definitely within the scripts.

1) Turn on event (displays event to user)
2) AI is checking if event was clicked (but with AI no one is home to turn on event)
3) AIActivate Scripts need to have a check option removed

I just posted above. The AIActivate Scripts need to be modified. As far as EP Spending goes, that's an AI issue. Right now, focusing on basic game play.

Posted: Wed Dec 16, 2015 4:37 pm
by veji1
vicberg wrote:No. Problem is definitely within the scripts.

1) Turn on event (displays event to user)
2) AI is checking if event was clicked (but with AI no one is home to turn on event)
3) AIActivate Scripts need to have a check option removed

I just posted above. The AIActivate Scripts need to be modified. As far as EP Spending goes, that's an AI issue. Right now, focusing on basic game play.


I assure you there is an "EP spending AI" problem : if you go to the Austrian side, there are loads of unspent EP lying around.. this is not normal.

Posted: Wed Dec 16, 2015 5:16 pm
by vicberg
Yup, one thing at a time. Figure out the EP issue after we get events firing correctly

Posted: Wed Dec 16, 2015 6:43 pm
by veji1
vicberg wrote:Yup, one thing at a time. Figure out the EP issue after we get events firing correctly


Sure, the key is now making sure that the option arises when criteria are met and that when Austria agrees in the F4 ledger, the right consequences happen (3 turns later, etc + the supply fix!). BUT we might reach a situation where the Event chain is perfectly fine in itself BUT doesn't work because the "EP spending AI" of Austria stays idle, hoarding EPs without spending them... I don't know how the engine deals with EP spending for the AI, whether there is a check each turn for EP numbers and a priority list of actions where if such and such action (army modifier, decree, whatever) is available and the right EPs are there, there is an automatic buy ? Because than the EP spending scripts for some AI nations might be kaput.

Posted: Wed Dec 16, 2015 11:51 pm
by Montbrun
Playing as France, August, 1805 Campaign. Pressburg Event fired, but, after waiting several turns, wasn't accepted by AI Austria. I restored back several saved turns to when France received the option. The turn after, I reloaded as Austria and accepted the event. On the next turn, the Treaty implemented, but Bavaria was still occupied, and did not receive Tyrol. Also, my I Corps was in Praag (supplied), but was destroyed due to "lack of transport."

[ATTACH]36315[/ATTACH]

[ATTACH]36316[/ATTACH]

[ATTACH]36317[/ATTACH]

[ATTACH]36318[/ATTACH]

Posted: Thu Dec 17, 2015 3:31 am
by vicberg
Yep, there's two behaviors for the system

1) If no access after peace, engine displaces units out of country and can destroy them
2) If access, then units remain

SettleWhitePeace should be giving both access and supply. That's not happening yet. Pocus is fixing that.

In the mean time, let me double check the quick and dirty I put up there. I know why the AI isn't firing.

Posted: Thu Dec 17, 2015 11:30 am
by TC271
My latest playthrough involved me playing Fra/Aus/Rus manually and Pressburg did fire (becuase I both proposed and accepted it).

However as Vicberg indicated until the resulting white peace gives France supply and acces its not workable as the Grand armee starves in Austria in 1806 (instead of in Russia in 1812!)

Posted: Thu Dec 17, 2015 3:14 pm
by vicberg
Being fixed as I type this. Also, fixing all AI related events (starting with France) so they fire correctly. Will continue to Kingdom Creation Events and Major peace events for all countries.

Posted: Thu Dec 17, 2015 3:57 pm
by MarshalJean
vicberg wrote:Being fixed as I type this. Also, fixing all AI related events (starting with France) so they fire correctly. Will continue to Kingdom Creation Events and Major peace events for all countries.


Once again, you are amazing, vicberg.

Posted: Thu Dec 17, 2015 4:07 pm
by TC271
TC271 wrote:My latest playthrough involved me playing Fra/Aus/Rus manually and Pressburg did fire (becuase I both proposed and accepted it).

However as Vicberg indicated until the resulting white peace gives France supply and acces its not workable as the Grand armee starves in Austria in 1806 (instead of in Russia in 1812!)


You are a gentleman and a scholar.....

Posted: Fri Dec 18, 2015 9:22 am
by xaviersr
Post patch 1.011.
Ai still ignoring Pressburg treaty. Entering Austrian side, I accept the teatry, but still not executes. Austria has only 82 money. Perhaps is this the reason? Does not have 2000 to pay indemnity.

Posted: Fri Dec 18, 2015 11:46 am
by Pocus
Public beta patch 1.02 will include further fixes, done by Vicberg. :)

Posted: Fri Dec 18, 2015 12:36 pm
by TC271
Pocus wrote:Public beta patch 1.02 will include further fixes, done by Vicberg. :)


Excellent work everyone...when can we get our hands on it Napoleon is a bit bored of being stuck in Vienna even if it is lovely in December.

Posted: Sat Dec 19, 2015 1:26 am
by veji1
TC271 wrote:Excellent work everyone...when can we get our hands on it Napoleon is a bit bored of being stuck in Vienna even if it is lovely in December.


same. About to spend the winter there...

Posted: Sat Dec 19, 2015 4:25 am
by TheDeadeye
Test with patch 1.02 and Pressburg Peace Event started with a new game. Event fired after having elected to enact it but the description text didn't actually have any description in it but instead only showed coding language which makes me assume that something went wrong in indicating within the script where the text for the event itself is. Another confusing part (which some might have noticed or not) is that the territorial changes as per the treaty do not take effect ONLY after an additional turn has been processed so in other words it goes like this: Player chooses to enact peace treaty > next turn the peace treaty is ratified by Austria > next turn territorial changes happen (Kingdom of Italy gets Venice region and Bavaria gets the Tyrol). So the event seems to work now, it just needs a clean up text wise and a clarification whether the actual changes in territory are WAD only after the 2 turn.

Posted: Sat Dec 19, 2015 5:35 am
by vicberg
3 turns after peace the territories are changed over. A timer is started.

Description text where? In the message? Mouse over?

Posted: Sat Dec 19, 2015 1:43 pm
by TheDeadeye
vicberg wrote:3 turns after peace the territories are changed over. A timer is started.

Description text where? In the message? Mouse over?


In the event log itself it will say something like <eventtxt pressburg peace> in red instead of Austria accepts Peace Treaty for example

Posted: Sat Dec 19, 2015 2:16 pm
by vicberg
When France fires the Pressburg Peace Event, the option displayed to Austria doesn't have text. Instead of saying "France offers Peace", it shows to Austria "str_opt_.....". Yes, that's been a problem. I didn't have time to fix it. Part of the reason why is every ounce of text you see has 3 other languages behind the scenes. You are seeing English.

If I'm wrong on this, can you post a screen shot?

Posted: Sat Dec 19, 2015 2:18 pm
by vicberg
xaviersr wrote:Post patch 1.011.
Ai still ignoring Pressburg treaty. Entering Austrian side, I accept the teatry, but still not executes. Austria has only 82 money. Perhaps is this the reason? Does not have 2000 to pay indemnity.


Upgrade to 1.2 public beta. Fixes are in that version

Posted: Sun Dec 20, 2015 1:39 pm
by TC271
Problem is now triggering this even destroys the Grand Armee - it dies in the snowy wastes of Bavaria

Posted: Mon Dec 21, 2015 11:51 am
by Pocus
Are you in the correct version, do you see 1.02 when you launch the game? We have verified again and the event should work.

Posted: Mon Dec 21, 2015 8:23 pm
by xaviersr
Tried peace of Pressburg with patch 1.02 December 19. Works well. Venezia goes to Italy and Tyrol to Bavaria. French corps can leave Austria without starving. Thanks

Posted: Tue Dec 22, 2015 10:42 am
by PhilThib
You welcome ;)

Posted: Mon Jan 11, 2016 2:35 am
by Papa Thomas
Playing 1.2 beta as France. I was offered the Pressburg event which I accepted and 3 turns later nothing has happened.

Posted: Mon Jan 11, 2016 11:03 am
by Nico165
Having trouble too with latest beta.

Playing France, Austria is beaten. I get the option to fire the treaty in october 1805. I select it. Next turn, I get the message saying France proposed the treaty. Then nothing for 3 turns. Then Austria propose peace for money only. No other notification about Pressburg. Option no longer available in F4. F6 will only let me get money or disband army/fleet.

Is it normal ?

Link to every save involved : http://we.tl/r11gFQExNY