Oolite Bulletins

For information and discussion about Oolite.
It is currently Tue Dec 11, 2018 9:33 am

All times are UTC




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Mar 30, 2006 2:56 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Wed Jun 23, 2004 4:07 am
Posts: 78
Location: London, England
So I had a thought about scripting many months ago that I never bothered to write down. Several recent posts reminded me of it, so here it is.

The problem:
Some mission OXPs have script variable names that conflict with other OXPs. This can result in mission scripts incorrectly thinking that aspects of missions have been completed, and confusing messages being displayed.

The cause:
Many mission OXP scripts are copied from other OXPs and then the details edited and additions made.

The already suggested solution:
Make sure you name all your script variables uniquely.

The slight problem with the already suggested solution:
There's no convention, so there can still be conflicts, plus new OXP writers have to be aware that they need to follow this convention.

An improved solution:
Separate OXP script variables into different namespaces. This then avoids the problem of conflicts entirely. This merely requires each OXP to have its own unique name.
Provide a mechanism to get variables from other OXP namespaces. This will for example allow for linked OXPs that require you complete the missions from another OXP before you begin the new one.
Ensure that scripts have a "scripting version" identifier, since this behaviour is quite different from the old regime and some older scripts will require variables to work in the old manner.

I'm not familiar with the current script processing engine, but I'd have thought this should be possible, and shouldn't be too tough to implement, even including backward compatibility. It should also make it easier to edit player data files to remove all variables relating to an OXP.

Just a thought. Probably not quite as coherently expressed as it could be - coughing a bit too much at the moment to think very clearly.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited