Script Problems on 1.68

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Script Problems on 1.68

Post by LittleBear »

Sorry Long Post!

I wrote Assassins on 1.65 to 1.67 and the script worked OK. But for a reason I can't figure when running on 1.68 the script gets caught in a loop. The scripts tells Oolite to display a mission briefing if the player is docked, has the right number of kills and the stage is X. Once the brief is displayed the stage is advanced to Y. So when Oolite next scans the script the condition the condition that stage = x is not met so the brief is not displayed again. This works fine on 1.65 and 1.67, but on 1.68 the same script causes this error:-

The briefing is displayed and the player presses space. However non of the mission variables that the script was meant to set are in fact set, so 10 seconds later when Oolite scans the script again the player gets the same briefing. EG below is the script for the first briefing in Assassins:-

Now on 1.67 and below this works. The player presses space and all the variables are set. But on 1.68 it seems Oolite reads the script to display the briefing and show the image, but ignores the rest of the script that sets the variables. So Oolite gets caught in a loop. The player is still docked and the briefing is displayed again. Except it shouldn't as the undefined condition is no longer true.

Has somthing changed for scripting? I don't think its somthing with my script as such as it was fine up to 1.67. Help!

Code: Select all


conditions = ("galaxy_number equal 6"); 
					do = ( 
						{ 
							conditions = ("dockedAtMainStation_bool equal YES", "mission_assassins undefined", "score_number greaterthan 199"); 
							do = ( 
								"setMissionImage: victim1.PNG",
								setGuiToMissionScreen, 
								"addMissionText: hitbrief_1", 
								"addMissionDestination: 73",
								"setSpecificPlanetInfo: 6=73=description=Orramaor is noted for its companion world Apollodorus and is reasonably well known as the corporate headquarters of Soin Classic Shipyards Ltd. In recent years, Soin Classic Shipyards have specialised in the development of greatly improved versions of Serpent Class ships.",
								"setSpecificPlanetInfo: 6=73=techlevel=14",
								"setSpecificPlanetInfo: 6=73=government=6",
								"setSpecificPlanetInfo: 6=73=economy=0",
								"setSpecificPlanetInfo: 6=73=inhabitants=Fierce Rodent Scientists",
								"setSpecificPlanetInfo: 6=73=productivity=53489",
								"setSpecificPlanetInfo: 6=107=description=Esrire is famous for its large gas giant, Cerberus. The system is however plagued by high levels of criminal activity, even by the standards of an anarchy system. GalCop Special Branch suspects that many criminal organizations make their home in this system, but have thus far found no living witnesses to corroborate their theories.",
								"setSpecificPlanetInfo: 6=107=productivity=97252",
								"setSpecificPlanetInfo: 6=107=inhabitants=Sinister yellow frogs",
								"setSpecificPlanetInfo: 6=194=description=Tiared is well known for its large volcanic companion, Diomedes. The inhabitants have a passion for the sport of Zero-G Hockey, hosting the last five Galactic Cup competitions. The Galactic Zero-G Hockey Association have their headquarters on the northern continent of the planet.",
								"setSpecificPlanetInfo: 6=194=inhabitants=Hockey-obsessed lizards",
								"setSpecificPlanetInfo: 6=203=description=Beatle is well known for its moon, Augeas. The Augeaian Orbital Repair Facility is famous for the affordable servicing facilities provided by its industrious work crews. The Augeaian Security Force maintains a strong presence of both Mega and Interceptor Kraits in the vicinity. Customers can rest assured that their powered down craft will remain secure whilst undergoing servicing.",
								"setSpecificPlanetInfo: 6=203=inhabitants=Feline Engineers",
								"setSpecificPlanetInfo: 6=203=techlevel=14",
								"setSpecificPlanetInfo: 6=203=economy=0",
								"setSpecificPlanetInfo: 6=203=productivity=39902",
								"setSpecificPlanetInfo: 6=203=government=7",
								"setSpecificPlanetInfo: 6=39=description=The Ateslete System is reasonably noted for the ice-world, Stymphal. The well known robotics company, Griff Research Ltd, operates factories over most of the planet and maintains an orbital research station near Stymphal.",
								"setSpecificPlanetInfo: 6=39=techlevel=14",
								"setSpecificPlanetInfo: 6=39=government=7",
								"setSpecificPlanetInfo: 6=39=productivity=78824",
								"setSpecificPlanetInfo: 6=39=economy=0",
								"setSpecificPlanetInfo: 6=39=inhabitants=Humans and Robots",
								"setSpecificPlanetInfo: 6=53=description=Quandixe is well known for its tropical moon Hesperides, the climate of which is perfectly suited to the cultivation of Megaweed. Dark rumors circulate that the Quandixeian Corporation is in reality a front for a Mafia narcotics syndicate.",
								"setSpecificPlanetInfo: 6=53=inhabitants=Legitimate businessmen",
								"setSpecificPlanetInfo: 6=53=economy=5",
								"setSpecificPlanetInfo: 6=18=description=Geteve is reasonably well known for its large moon, Hercules. GalCop Special Branch maintains a well armed base in orbit around Hercules. The main offices of the Galactic Prosecution Service are based on the moon's surface.",
								"setSpecificPlanetInfo: 6=18=economy=0",
								"setSpecificPlanetInfo: 6=18=government=6",
								"setSpecificPlanetInfo: 6=18=inhabitants=Law abiding humans",
								"setSpecificPlanetInfo: 6=184=description=This planet is notable for its great tropical forests, but is famous for its inhabitants passion for the sport of Zero-G Hockey.",
								"setSpecificPlanetInfo: 6=184=inhabitants=Hockey-obsessed humans",
								"setSpecificPlanetInfo: 6=81=description=Ataneris is famous for its forest covered companion, Hippolyte, but has a sinister reputation as traditional place of bloodshed. In dark corners of disreputable space bars it is whispered that, from time to time, duels between pilots of great skill take place by the Witchspace Beacon. Two ships enter the circle. One ship leaves.",
								"setSpecificPlanetInfo: 6=100=description=Formally a GalCop penal colony, a successful rebellion by the prisoners placed the system in the hands of felons. At present the system is run by the Yankisona Triad gang. In criminal circles, it is well known that relations with the Quandixeian Mafia are less than cordial. Many fear that all out gang warfare is imminent.",
								"setSpecificPlanetInfo: 6=100=inhabitants=Criminals of many species",
								"setSpecificPlanetInfo: 6=100=productivity=29127",
								"setSpecificPlanetInfo: 6=118=description=The planet Orreedon is famous for its strange mountains, but cursed by deadly goats. In criminal circles, it is said that an illegal trade in the export of Orreedonian deadly goats flourishes on the northern continent. Once domesticated, the deadly goat can be trained as a vicious attack beast.",
								"setSpecificPlanetInfo: 6=82=description=Estiri is noted for its large ocean covered moon, Nemean, and famous as the location of the Galactic Supreme Court. The Galactic Navy operates from a well armed base orbiting the moon.",
								"setSpecificPlanetInfo: 6=82=productivity=27654",
								"setSpecificPlanetInfo: 6=82=govenment=6",
								"setSpecificPlanetInfo: 6=19=description=Sobeer is famous for the delicious nature of its native marine life, particularly the exquisite Sobeerian spotted cod. Beings of a more sensitive nature decline however to partake in this delicacy, knowing its use in certain sinister Mafia rituals.",
								"setSpecificPlanetInfo: 6=13=description=Eszausve is famous for its rocky moon and the twin gas giants Hades and Lernean, but cursed by one of the most oppressive governments in the Galaxy. Although the People's Popular Front bravely resists the oppressive regime of Governor Tarkin, thus far they have made little progress in restoring freedom to the planet.",
								"setSpecificPlanetInfo: 6=13=productivity=98764",
								"setSpecificPlanetInfo: 6=13=techlevel=14",
								"setSpecificPlanetInfo: 6=13=inhabitants=Oppressed harmless fat birds",
								"setSpecificPlanetInfo: 6=13=station=abcstat",
								"set: mission_assassins_gotscan 0",
								"set: mission_assassins_jumpcount 0",					 
								"set: mission_assassins_bugattack 0",
								"set: mission_assassins_robotescape 0",
								"set: mission_assassins_robottimer 0",
								"set: mission_assassins_killcount 0",
								"set: mission_assassins_navybots 0",
								"set: mission_assassins_war 0",
								"set: mission_assassins_unlocked 0",
								"set: mission_assassins_basedeath 0",
								"set: mission_assassins_trumble 0",
								"set: mission_assassins_card 0",
								"set: mission_assassins assassins_STAGE1",
								"setMissionDescription: assassins_header1" 
							); 
						}, 
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

As a suggestion LB, why not try moving the

Code: Select all

"set: mission_assassins assassins_STAGE1"

to immediately after the mission briefing display line? You've got a lot of changes there and perhaps Oolite is too slow to run through all of them before the 10 seconds is up.
Please note: I make this suggestion with absolutely no technical knowledge, if it seems like I'm talking out of my rear end then I'm doing so in all innocence! :wink:
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

No, your suggestion makes sense. Maybe the new optimised code is wipping through too fast! Will give that a go!

Tested: Yep that worked. BUT it means Oolite no longer reads the rest of the variable changes, which I need it to do for assassins to work. If I put the condition there then the STAGE is advanced and the player is not caught in a loop. BUT the changes to the Ooniverse are not made as Oolite not longer reads them. Hmmm! Maybe I'll have to move these changes to a status launching or somthing.
Last edited by LittleBear on Mon Apr 30, 2007 8:09 pm, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

If it is the case then you'll need to check that all the planet descriptions are being changed as you want them to be.
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Tested that by adding TEST to the Orramar description. No TEST shown on the F7 screen, so I deduce that Oolite didn't read it!

"God damit Jim I'm a lawyer not a computer programmer"

I've moved the lay-out arround and it seems 1.68 will not read more than a few lines of script commands under the same condition. The update is too fast. So I can stop the loop by (as Uncle suggested) putting in the stage advancement on the thrid line, but Oolite 1.68 will not then read the rest of the mission variable advancement commands. So fraid Asssains will work on 1.67 and below but not on 1.68.
Last edited by LittleBear on Mon Apr 30, 2007 8:33 pm, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

Why not have the planet descriptions changed even before the mission starts? So have the changes after the galaxy number check but before the mission start part of the script.
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Trouble is Uncle, Assassins is an OXP where what you do (and what NPCs do) effects the Ooniverse. I could put the first change (when loaded state) into planet info. BUT every (I'm taking over 250 commands segments like the above) changes the Oniverse in script depending on about 12 independent variables. I have to do this in script because the changes made depend on the choices the player made and the choices NPC powers made. Every time somthing happens in the Oniverse changes like this are made.

The OXP has about 20 powers and the ships appearing at these systems, the systems tech level, govenment, inhabitants etc change as mission_variables change. So I need to make these changes in script, as the changes need to be dependant on what the player and NPCs do (ie they are dependant on mission_variable changes) for the OXP to work.

Eg the "opressed harmless fat birds" become "resisting harmless fat birds" when the player recives a news broadcast stating that sombody has supplied the poor rebels with Cobra Njx ships to use against their oppessive dictator. The player might decide to follow this "plot thread" and help the poor rebel birds out, in which case they become "liberated harlmess fat birds" and the system becomes a democary. Or he might chose to ignore them and they stay "oppressed" and the system remains a dictatorship. If, instead of following this "plot thread" the player decided to do a job for System X's mafia to assassinate the Traid boss of System Y, then the info for both systems is changed, but only if the player decided to assassinate the Triad boss. This can only be done be script.

To put it in English. The first Segment sets the Universe up (as the powers exist at the start of the OXP). But how the powers end up depends on hundred of choices the player makes, whether to take on a mission and whether or not he succeeds. So EVERY Assassins command works this way so if Oolite 1.68 will not follow the commands that change the Ooniverse when a briefing is given then Assassins will not work.

Know it works on 1.67 and below as developed V.1.2 on this version, but
Fraid it looks like Assassins wont work properly with 1.68. :cry:
Last edited by LittleBear on Mon Apr 30, 2007 10:23 pm, edited 5 times in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

Hmm, yes, I can see the problem, I was just thinking in terms of the part of the code that you posted. If I sent you my email address, could you forward me a copy of the save game that you are using to test this? I'll have some time tomorrow to poke about with the code, if you don't mind, of course.
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Hi LittleBear,

sorry for your problem in 1.68. I've got (a different) one myself, which I reported here. So it seems something is wrong with 1.68.

Let's hope Ahruman can fix it again in 1.69.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Hopefully so!

Looks like the code is TOO GOOD!

@Uncle, have PMd u me e-mail adress, and will send you over a test commander. But as Assissins worked fine on 1.67 and below, my suspision is that its a code problem!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

@ LB. Got your PM and replied. You're probably right but I'd like to give it a go.
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

LittleBear, please e-mail me a sample pilot which will trigger the problem. (PYMOLCLSXGQP squiggle spammotel point com)
Last edited by JensAyton on Sat Jul 07, 2007 9:35 am, edited 1 time in total.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Have e-mailed a test commander over.

This Jameson is flying an Imperial Courier, so would need S's IC OXP installed to load it!
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

Hi LB.

Just run a quick test with that save file you sent me and I've had no problems at all. Briefing came up and, no matter if I took time to read the briefing or just cleared the screen as soon as it came up, all seems to run OK. I've checked that the first and last planet descriptions are changed as required, which they are, and I don't get the briefing screen coming back so obviously mission_assassins is also being set correctly. I have just been offered the chance to join the Guild proper, after eliminating the first target, again the mission screen displayed correctly and only once. :) :?

In case it makes a difference, I'm running on a Mac.
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Thats odd! (although pleased its running). I'm on a PC though, so maybe thats the difference. Captain H had PMed me reporting the same problem, so I don't think its just my machine. Maybe he's on a PC too.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Post Reply