Page 1 of 2

circular escort reference in Dictators 1.3

Posted: Thu Nov 12, 2009 11:21 am
by Commander McLane
Don't know whether this has been brought up before:
[shipEntity.setupEscorts.escortShipCircularReference]: ----- WARNING: Ship <ShipEntity 0x13ce5e00>{"Junta Enforcer" ID: 390 position: (11221.7, -43889.6, 318949) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT} requested escorts, when it is an escort ship itself. Avoiding possible circular reference overflow by ignoring escort setup.
The reason is that the Junta Enforce is like_shipped from the Censor which has escorts defined. But itself it is used as an escort. Because it is like_shipped, the key that makes it demand escorts for itself cannot simply be removed. So Ramirez will have to decide which kind of solution he wants for the problem.

(One solution could be to drop the like_ship key and add all necessary keys to the ship definition, without the escort-ship key. Then Enforcers never could have escorts. Another solution would be to create another clone of the Enforcer, which exclusively would serve as an escort for the prisonship.)

Posted: Thu Nov 12, 2009 11:38 am
by Kaks
Or he could have a base ship (with a unique, never called role) which both Junta Enforcer & Censor are then like_shipped from! :)

Posted: Thu Nov 12, 2009 12:24 pm
by Eric Walch
Also the Saleza Aeronautics v2.0 of Ramirez has a similar problems with escorts. The bellatrix ship is defined having escorts, but those escorts are also defined having escorts.
But because all those errors are properly logged since 1.73, I assumed Ramirez would notice these messages himself and upload a new version soon.
That version is recently updated by Ramirez to 2.1 were this is fixed. (just downloaded)

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 5:44 pm
by Gimi
Dictators does not seem to have it's own thread, so rather than making a new one, I resurrected this one.

Got the following error in my log. Anyone know what the problem might be.

Code: Select all

19:26:29.322 [script.addShips.failed]: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAt: could not add 1 ships with role "astrofactory"
19:26:29.755 [bigShips_populator]: 0 big trader(s) added to the Isonza system.
I'm not even sure if this is Dictators related, but I'm sure someone will put me straight if it's not.

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 6:50 pm
by Thargoid
The two quoted lines are not related. The lower one (the bigShips bit) is just a normal logging report from the OXP on arrival in a system as to what it has (or in this case hasn't) added. But it's not bigShips that's trying to add the astrofactory.

The upper one alone is the error, which may be a bug in that OXP - I don't have it installed so can't comment. But according to the wiki it is Dictators OXP which contains the astrofactory entity.

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 6:58 pm
by CommonSenseOTB
Gimi, have you got version 1.4? Is your oolite version 1.74 or higher?

From the readme:

v1.4, 19 June 2010

- Updated ship population script for compatibility with Oolite v1.74

A quick check of the names for roles, models and syntax looks good for the shipdata.plist and populator so unless it's an early version with 1.74 or higher for oolite, I'm not sure what it could be. A quick run shows the astrofactory works fine using a demoships.plist to display it on startup with version 1.4 and oolite version 1.75.3 so the only thing I can think is that it is a populator problem.

I hope that helps. :)

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 7:01 pm
by Gimi
Everything should be up to date. I'm quite particular about keeping my Oolite installation fresh.
Oolite is 1.75.4 (trunk)
Dictators is 1.4

The way the error is posted in the log, it looks to me that this could be a problem of actually spawning in 1.75.4 or a problem with Dictators or a combination of both. Unfortunately, this is beyond me knowledge of scripts and coding.

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 7:11 pm
by CommonSenseOTB
It's not dictators. Here's the code in the script.

if(system.countShipsWithRole("astrofactory") == 0)
{
system.legacy_addShipsAt("astrofactory", 1, "wpu", [0, 0, 0.3])
system.legacy_addShipsAt("asteroid", 30, "wpu", [0, 0, 0.3])
system.legacy_addShipsAt("imptanker", 1, "wpu", [0, 0, 0.8])
system.legacy_addShipsAt("imptanker", 1, "wpu", [0, 0, 0.4])
system.legacy_addShipsAt("impfreighter", 1, "wpu", [0, 0, 0.3])
system.legacy_addShipsAt("impfreighter", 1, "wpu", [0, 0, 0.7])
}

Something must have changed in oolite 1.75.4(trunk).

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 7:21 pm
by Svengali
Gimi wrote:
Got the following error in my log. Anyone know what the problem might be.

Code: Select all

19:26:29.322 [script.addShips.failed]: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAt: could not add 1 ships with role "astrofactory"
It's the combination of a script that tries to spawn it (system.economy <= 3) and conditions in shipdata ("systemEconomy_number lessthan 3"). So either change the script to <3 or the conditions to lessthan 4.

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 7:30 pm
by Okti
Gimi wrote:
Dictators does not seem to have it's own thread, so rather than making a new one, I resurrected this one.

Got the following error in my log. Anyone know what the problem might be.

Code: Select all

19:26:29.322 [script.addShips.failed]: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAt: could not add 1 ships with role "astrofactory"
19:26:29.755 [bigShips_populator]: 0 big trader(s) added to the Isonza system.
I'm not even sure if this is Dictators related, but I'm sure someone will put me straight if it's not.
Have you got commies installed, as far as I can remember astrofactory is an entry in commies. And causes my computer to CTD :(

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 7:57 pm
by Gimi
Okti wrote:
Have you got commies installed, as far as I can remember astrofactory is an entry in commies. And causes my computer to CTD :(
Yes, I have Commies installed and it works fine. No astrofactory in Commies that I can find though.

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 7:57 pm
by CommonSenseOTB
Svengali wrote:
Gimi wrote:
Got the following error in my log. Anyone know what the problem might be.

Code: Select all

19:26:29.322 [script.addShips.failed]: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAt: could not add 1 ships with role "astrofactory"
It's the combination of a script that tries to spawn it (system.economy <= 3) and conditions in shipdata ("systemEconomy_number lessthan 3"). So either change the script to <3 or the conditions to lessthan 4.
I missed the fact that the shipdata conditions was also not <=. Good call Svengali. That's the problem. Only the author knows what number he meant to compare for system .economy but I suspect it was supposed to be <=2 and that would would fit with the shipdata conditional of less than 3 and since the last revision fixed the populator script it is likely it is just a typo that was never caught. Sometimes takes a few sets of eyes, eh? :wink:

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 8:08 pm
by Gimi
Svengali wrote:
Gimi wrote:
Got the following error in my log. Anyone know what the problem might be.

Code: Select all

19:26:29.322 [script.addShips.failed]: ***** SCRIPT ERROR: in <anonymous actions>, addShipsAt: could not add 1 ships with role "astrofactory"
It's the combination of a script that tries to spawn it (system.economy <= 3) and conditions in shipdata ("systemEconomy_number lessthan 3"). So either change the script to <3 or the conditions to lessthan 4.
Thank you Svengali. Changed condition to lessthan 4, and all is fine. (I suppose this is a bug in the OXP, and thus should be fixed)

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 8:11 pm
by Eric Walch
Svengali wrote:
It's the combination of a script that tries to spawn it (system.economy <= 3) and conditions in shipdata ("systemEconomy_number lessthan 3"). So either change the script to <3 or the conditions to lessthan 4.
Better change it to <3 because that was the condition that was always used. It was new to me that a new version was released because the dictators.oxp page on the wiki still refers to 1.3 as the newest version. I also notice that the scriptname has changed. Annoying because ups tests for this script for a mission. I better include both scriptnames now.

Re: circular escort reference in Dictators 1.3

Posted: Wed Jul 20, 2011 8:14 pm
by Gimi
Eric Walch wrote:
Svengali wrote:
It's the combination of a script that tries to spawn it (system.economy <= 3) and conditions in shipdata ("systemEconomy_number lessthan 3"). So either change the script to <3 or the conditions to lessthan 4.
Better change it to <3 because that was the condition that was always used. It was new to me that a new version was released because the dictators.oxp page on the wiki still refers to 1.3 as the newest version. I also notice that the scriptname has changed. Annoying because ups tests for this script for a mission. I better include both scriptnames now.
Fine, I'll do that. But what script do I need to change to <3. (Sorry, not good with coding and scripts)

Edit: When I look through shipdata.plist all other entries have the value 4.

Code: Select all

<string>systemEconomy_number lessthan 4</string>