User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

East African Problems

Sun May 26, 2013 9:03 am

In my current Italy AAR I’ve encountered a problem in the Tanzania/E Africa region.

First, I spotted this:

Image

Which is odd as its still being recorded as my protectorate, but more worryingly:

Image

I noticed I had a lot of small units out of supply (I haven’t been paying much attention to this region as I’ve been rather busy elsewhere).

So I’m ordering a unit to a province I own and have dominant MC and its coming up as not being able to enter. There are 9 provinces in the wider region with the same problem.

Digging around, the reason seems to be the German Tanganiyka events, viz:

SelectFaction = $GER
SelectRegion = $Dar es Salaam
StartEvent = evt_nam_GER_Peters1885|1|2|evt_txt_GER_Peters1885|Event-img_GER_Peters1885|$Dar es Salaam|NULL

Conditions
EvalIsAtPeaceWith = OMA

SelectFaction = $CMN
EvalColStatusArea = $Colony_Tanganiyka;<;$colProtectorate
MinDate = 1885/01/01
MaxDate = 1899/12/31
Probability = 50

Actions
DescEvent = evt_desc_GER_Peters1885

SelectFaction = $GER
ChgVPCount = 100
SetColStatusArea = $Colony_Tanganiyka;$colProtectorate

SelectRegion = $Tanga
ChangeRgnOwner = OMA

SelectRegion = $Dar es Salaam
ChangeRgnOwner = OMA

SelectRegion = $Kilwa
ChangeRgnOwner = OMA

SelectRegion = $Dar es Salaam

CreateStruc
SetType = $OUTPOST
SetLevel = 1
SetName = Dar Burg
Apply

CreateStruc
SetType = $CONSULATE
SetName = Resident Palaz
Apply

CreateStruc
SetType = $TRADEPOST
SetName = Dar es Salaam Markt
Apply
SelectRegion = $Dar es Salaam
ChgColonialPen = 55
SelectRegion = $Zanzibar
ChgColonialPen = 15
SelectRegion = $Tanga
ChgColonialPen = 25

SelectRegion = $Kilwa

CreateStruc
SetType = $OUTPOST
SetLevel = 1
SetName = Tanga Fort
Apply
SelectRegion = $Arusha
ChgColonialPen = 25
SelectRegion = $Songea
ChgColonialPen = 10
SelectRegion = $Tabora
ChgColonialPen = 25
SelectRegion = $Kilwa
ChgColonialPen = 25

CreateStruc
SetType = $COALING
SetLevel = 1
SetName = Kilwa Station
Apply
SelectRegion = $Masasi
ChgColonialPen = 10
SelectRegion = $Lindi
ChgColonialPen = 25
SelectRegion = $Mwanza
ChgColonialPen = 25
SelectRegion = $Iringa
ChgColonialPen = 10
SelectRegion = $Morogoro
ChgColonialPen = 10
SelectRegion = $Ujiji
ChgColonialPen = 10

EndEvent


Now the related Zanzibar event has the code

EvalColStatusArea = $Colony_Zanzibar;<;$colProtectorate


And since it was my protectorate didn’t fire. But the main one has no check for other Colonial powers.

Its too late to go back to a turn before this happened, so I’ve tried to write a script to resolve the matter, viz:

SelectFaction = $CMN
SelectRegion = $Lazzio
StartEvent = Fixing colonial issues|1|1|NULL|NULL|$Lazzio|NULL

SelectFaction = $GER
SelectRegion = $Kilwa

RemoveStructure = ByDefUID $Coaling;ALL;GER
RemoveStructure = ByDefUID $Outpost;ALL;GER

SelectFaction = $GER
SetColStatusArea = $Colony_Tanganiyka;$colInfluenced

SelectFaction = $ITA
SetColStatusArea = $Colony_Tanganiyka;$colProtectorate

EndEvent


Now this crashes when it comes to endevent. I’m happy to have a disputed colonial region, I’m just trying to get it so that I can move troops in my own provinces.

Any ideas what I’m doing wrong?

Should add I also tried a script where I set the German CPs to 0, this made no difference to the underlying problem.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Sun May 26, 2013 3:19 pm

Try to remove the structures differently, using:

RemoveStructure = ByKind $stuHarbor;ALL;GER for the coaling station
RemoveStructure = ByKind $stuVarious;ALL;GER for the outpost

I have done this many times before and it works. Try to run your screen in full debug mode and check the Script Report if it tells you there is an error
Image

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Sun May 26, 2013 7:21 pm

thanks for that advice but I'm afraid the revised script hasn't worked.

I had the following error message:

19:03:15 [Critical ] TScriptEngine.Parse Exception caught: Violation d'accès à l'adresse 005E042D dans le module 'PON.exe'. Lecture de l'adresse 0000000C while parsing line 14435 : EndEvent


which links to:

014419 SelectFaction = $CMN
014420 SelectRegion = $Lazzio
014421 StartEvent = Fixing colonial issues|1|1|NULL|NULL|$Lazzio|NULL
014422
014423 SelectFaction = $GER
014424 SelectRegion = $Kilwa
014425
014426 RemoveStructure = ByKind $stuHarbor;ALL;GER
014427 RemoveStructure = ByKind $stuVarious;ALL;GER
014428
014429 SelectFaction = $GER
014430 SetColStatusArea = $Colony_Tanganiyka;$colInfluenced
014431
014432 SelectFaction = $ITA
014433 SetColStatusArea = $Colony_Tanganiyka;$colProtectorate
014434
014435 EndEvent


Their outpost and coaling station are still in Kilwa

Overall the situation is now worse (this may just be having run another turn) as now Germany has taken all the provinces in the region with the exception of the relevant colonial capitals (that I still control). I know I'm playing with the SoI limit and am out of region but if the Tanganyka event had had the control as the Zanzibar one this wouldn't have kicked in. Also I'm only keeping 3 turns of back ups so can't go back to the end of 1884 and rework the German script.

None of these problems occur elswhere (such as in Qatar) where I have contested CPs, I can still move my units around etc

help ...
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Mon May 27, 2013 7:16 am

I can't help much more here. May be send the save and the script report (+ log) to Pocus for checking out.
Image

User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Mon May 27, 2013 9:31 am

Usually, there is always a solution. Let's try to find it and author it together here. :)
Given that you cannot turn back time, loki100, we could at least try to reverse the effects. I would start from adapting the Zanzibar script of the Germans to an Italian one. What do you want to abstract exactly? If it is only the return of the protectorate it should not be that hard.
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Mon May 27, 2013 11:41 am

Kensai wrote:Usually, there is always a solution. Let's try to find it and author it together here. :)
Given that you cannot turn back time, loki100, we could at least try to reverse the effects. I would start from adapting the Zanzibar script of the Germans to an Italian one. What do you want to abstract exactly? If it is only the return of the protectorate it should not be that hard.


Hi Kensai

Its something deeper than that, I managed to restore the region to Italian protectorate (& set the Prussians as influnced), and managed to get rid of the Prussian buildings (simply took them out of the save game file - not elegant but effective).

I have 3 areas with competing CPs. In Dubai, the British have a higher CP than me, in Fashoda I have a higher CP than the Egyptians but in both I can move my troops etc.

The problem in E Africa, in the provinces that are keyed to the Tanganyka event, is despite having the dominant CP status and MC (around 75%) I physically can't move my troops into those provinces - the problem in the second screen shot in the first post.

I'll try your idea of inverting the Tanganyka event (I'll then delete the structures) and see if that cures it.

Warning to your MP game as you'll come up to this time frame soon. The Zanzibar event has a line that checks for other colonial ownership and it doesn't fire if it is already a protectorate. I'd say that ideally the Tangynyka event needs a similar control?
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Mon May 27, 2013 12:00 pm

I believe the reason you can't enter the Tanganyka regions is that the event gives "ownership" of the regions to Germany...so in essence they are no longer colonial regions where everyone can enter but German territory...and this normal rules, you can't enter without a passage agreement.
The way to solve/revert the matter would be to restore ownership of the regions to ITA (or, more right, OMA as it was before), with a ChgRgnOwner command
Image

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Mon May 27, 2013 12:52 pm

Sorry to keep on going on about this but the provinces are Italian protectorates (lucky them), I have CPs in the 40s-50s, MC at 100. But what I have found working in the save game files is some duplicate province entries. So for eg the 'real' Dar es Salaam has this text (I've cut out some for brevity):

{Region}
685
100
466
0
40
75
1
0
0
0
0
PH1
PH2
PH3
{StrucList}
685
{Structure}
1000647
19
1
0
1000008
0
1
1
2
99
0
0
Dar es Salaam

{/Structure}
{Structure}
1296713
17
2
0
1000008
0
1
1
0
99
0
0
Depot

{/Structure}
{Structure}
1300667
2
1
0
1000008
0
1
1
2
99
0
0
Coaling Station

{/Structure}
{Structure}
1300668
9
1
0
1000008
0
1
1
0
99
0
0
Fort (Pre Industrial)

{/Structure}
{Structure}
(deleted lines)
Exploitation & Collection Center

{/Structure}
{Structure}
(deleted lines)
Military Outpost

{/Structure}
{Structure}
(deleted lines)
Consulate

{/Structure}
{Structure}
(deleted lines)
Mission

{/Structure}
{Structure}
(deleted lines)
School

{/Structure}
{Structure}
(deleted lines)
Dispensary

{/Structure}
{/StrucList}
{/Region}


Now that looks like the things I built, but there is another Dar es Salaam in the save file with:

{Region}
685
0
466
0
18
89
1
0
0
0
0
PH1
PH2
PH3
{StrucList}
685
{Structure}
(again deleted lines)
Dar Burg

{/Structure}
{Structure}
(again deleted lines)
Resident Palaz

{/Structure}
{Structure}
(again deleted lines)
Dar es Salaam Markt

{/Structure}


Those 3 buildings look like the ones created by the Tangynka event.

I'll try and see if I can find and delete the duplicates from the save and see if that sorts things out.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Mon May 27, 2013 1:08 pm

I have no clue whatsoever on what there is inside saved games and I don't know how to read or tweak them...you'll need to pursue this discussion with Pocus and/or send him a save...if there is indeed a duplication of province data, it's a major (and surprising) engine bug... :bonk:
Image

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Mon May 27, 2013 2:02 pm

Indeed, this should not happens, but it has, according to your save. I'm rather sure I won't be able to find the cause a posteriori (in retrospect), so is the problem a long standing one or you have backups.
I'm reluctant to invest hours on something that seems super rare though, if you can find a backup game and resume from that, that would be better.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
loki100
AGEod Guard of Honor
Posts: 2401
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Mon May 27, 2013 2:14 pm

Pocus wrote:Indeed, this should not happens, but it has, according to your save. I'm rather sure I won't be able to find the cause a posteriori (in retrospect), so is the problem a long standing one or you have backups.
I'm reluctant to invest hours on something that seems super rare though, if you can find a backup game and resume from that, that would be better.


I'm afraid I don't, I've just done a tech report with the save file but unfortunately I'm only keeping 3 turn back ups (I've forgotten how to reset that to a larger number but I really should). The problem is fairly recent but I don't know when. This region has been peaceful for a while so I wasn't paying much attention, just replenishing colonial cards when they were available. So while I suspect the Tangynyka event I'm not even sure.

But thanks for the time and comments. I've managed to delete one of the duplicates with no adverse effect so what I'll do is to carry on taking them out one by one, check the game still opens etc, till I'm sure there are none left. I'll then test to see if the movement problem is resolved.

This might have happened in other games but I've only noticed it as I've created an out of SOI Empire in that particular region. Otherwise it wouldn't have registered.

edit - just to add, I've physically deleted all the instances where these provinces were both under the German and under the Italian lists (taken out the German ones) there is no trace of the German presense either as building, CP or MC on the map but I still can't enter the affected provinces. I can however, order a unit into the Portuguese influenced territory to the south.

edit #2 - just as an experiment (& to see if that would clean up the problem) I ran another turn, all the German influenced areas are back on the map, so even though its showing as Itailan Protectorates it seems as if the Tangynyka event is still firing
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

Return to “Pride of Nations”

Who is online

Users browsing this forum: No registered users and 17 guests