clearMissionDescription

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Post Reply
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

clearMissionDescription

Post by Uncle Reno »

Quick question. Will this clear all, if more than one, mission descriptions? I'm guessing yes, if that's right then my second question is, do we want it to?

I want to leave a reminder on the Ship's Manifest screen for the player after part of a mission is over but if my point is right then I stand a chance of another mission clearing it. Mind you I can appreciate it's probably easier to clear the screen totally rather than selectively.

Make sense or am I talking rubbish? :? :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: 2867
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 »

Only clears the description in the script segment its related to (I think).

EG: In the Black Monks script starting with:-

Code: Select all

{ 
	"black_monks" = ( 
		{ 
			conditions = ("galaxy_number lessthan 8"); 
			do = ( 
				{ 
					conditions = ("status_string equal STATUS_DOCKED", "dockedStationName_string equal Black Monk Monastery"); 
					do = ( 
						{ 
							conditions = ("mission_monks undefined"); 
							do = ( 
								"setMissionImage: monk.PNG",
								"setMissionMusic: none", 
								setGuiToMissionScreen,
								"set: mission_monks MONK_OFFER", 
								"addMissionText: monkbrief1",
								"setMissionChoices: monk_loan_yesno" 
							); 
						},
a clear mission description would only clear it in the "black_monks" script, but woudn't clear it in the Assassins Script, as this starts with "assassins" =

Code: Select all

{ 
	"assassins" = ( 
		{ 
			conditions = ("galaxy_number lessthan 8"); 
			do = ( 
				{ 
					conditions = ("status_string equal STATUS_DOCKED", "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",

[rest of script here]
					 
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.
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 365
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

There is only one mission screen, so any modification made to that mission screen (ie calls to setMissionXxx) by any script takes effect.

This is one reason it is so hard for OXPs which use mission screens in the same system to co-exist.
Regards,
David Taylor.
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 »

The question was about the missionDescription (that line somewhere on the status screen), not the mission screen!

But anyway, the answer would be the same as dajt gave, I guess. "setMissionDescription: text" displays "text" on the status screen. If another OXP uses setMissionDescription again that text would be overwritten. And if any OXP uses clearMissionDescription the whole line should disappear from the status screen, regardless where the "text" came from.

So the bottom line is: It is not possible for two OXPs to use the missionDescription at the same time. Whoever comes first will be erased by the second.

I could be wrong on this one, but I don't think so.

Easy test: Take a loan with the BlackMonks while there is anything displayed in your missionDescription (like you're running any mission). If you have two items in your missionDescription now, they can coexist. If there is only the information on how many weeks are left to return your loan, they can't.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2867
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 »

Can have two descriptions up at once. Whilst playesting final version of Assassins I dropped in for repairs at a Black Monk base. Expesnive but it was the only Station in the System as the GalCop one had been destroyed by the Dreadnaught. Took out a loan by mistake. Had both the Assassins description and the Monk description up. Docked and repayed. Monk Description was cleared by the Assassins description stayed up. But as Dajt says, only one Mission Brief (on the Mission Screen) can be displayed at once.
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 »

Yeah, I've found this too. I hacked my own tests for this but if you clear the mission description then it seems to only apply to the description from that script. Setting a mission description, not clearing it and then trying to display a new one seems to have the effect of the two descriptions cancelling each other out, although I'm not 100% certain about that behaviour.
Thanks for all the answers, I was hoping that somebody would know this off the top of their heads, I'll have to test it before asking next time. :oops:
"Get back or I unleash my lethal spotted batoid!!"

What I do when not reading the Oolite bulletin board!
Post Reply