User avatar
Citizen X
AGEod Veteran
Posts: 795
Joined: Tue Feb 02, 2010 1:34 pm

Question: Selecting units by SelectSubUnits

Thu May 14, 2020 9:16 am

As the title implies. What am I doing wrong?

I want to solve the dreadnought-before-there-time-problem with a script. Deleting and restoring with CreateGroup etc won't do, because there are only two barttleship units in the pool for Italy and both produce dreadnoughts, too.

So I thought I could alter them with AlterCuSubunit and wrote the following script.

SelectFaction = CMN
SelectRegion = $Venezia

StartEvent = The Italian Navy gets set straight|1|1|NULL|NULL|$Venezia|NULL

Conditions

Actions
SelectRegion = 85

SelectFaction = $ITA
SelectSubUnits = Region 85;FactionTags ITA;Domains $Navy;Models $mdl_ITA_BB07
AlterCuSubUnit = ApplytoList;Convert $mdl_ITA_BB03C

EndEvent


Pretty much straightforward. I am positive about the models. I tried to select ALL Italian battleship models, separated by spaces. I tried with $Venezia instead of 85, for both and for each alone. But the result is always this:

Line 3: Started processing event: The Italian Navy gets set straight
Line 3: This event is not yet referenced, base number of allowed occurences 1
Line 7: Entering triggered actions for event The Italian Navy gets set straight
Line 8: SelectRegion, at least one faction must be selected, selecting first faction
Line 8: => SelectRegion, First parameter must be a region UID (check if the alias was translated correctly): VENEZIA
Line 10: SelectFaction, selected: Sardinia-Piedmont
Line 11: SelectSubUnits finished Regions Selected: 0 SubUnits Selected: 0
Line 12: [WARNING] AlterCuSubUnit: Selection is empty (Apply To List)
Line 14: Finished processing event: The Italian Navy gets set straight


I ask the big boys, what am I missing?

jccoluz
Private
Posts: 29
Joined: Sun May 06, 2018 2:44 pm
Location: France

Re: Question: Selecting units by SelectSubUnits

Fri May 15, 2020 6:34 pm

Hi,

I can't really help you directly but I can give you some info since I had lots of problems with Japanese fleets not upgrading correctly myself !

Thing is while my fleet were made of wooden ships (elements) the games considered the units as being BB07 models as I discovered when I looked into the savegame and would replace the elements accordingly if one was destroyed.

That's why most command trying to change War1 ( wooden battleships) into War2 (screw driven battleships) never worked : the game considered that my units were dreadnought (bb07) instead of wooden battleships (war1) despite being made of such ships.

I tried to change BB07 into War2 but this failed as well because the game absolutely refused to make them screw driven battleships and transformed them into early battleships ( bb04) : wonder if this was linked to some models becoming obsolete with some techs.

Amending the savegame by changing units UID did not work either and I finally had to manually change the elements inside into the War2 models (Although the units containing those models were still labeled as early battleship and showed a modern ship when moving !).

There are definitely lots of bugs with tech upgrades but hopefuly you can solve most of it by amending the saves (it takes much more time than writing an event but at least it works somehow )

Hope this was helpful.

Bye

Return to “PON Technical Support / Aide Technique”

Who is online

Users browsing this forum: No registered users and 15 guests