The Oolite Extended Project - Fork, no oxp

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

Moderators: winston, another_commander

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: ...

Post by Thargoid »

Lestradae wrote:
2) It makes sense to add to the names of the scripts in OSE an "OSE-" tag. So that when bugfixing, devs, original oxp creators and myself immediately know which version we are talking about.
Having thought about this a bit more, nice though it would be for identification, it risks breaking script interdependences and identifications. So this shouldn't be done, I withdraw my previous request.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ...

Post by pmw57 »

Thargoid wrote:
Lestradae wrote:
2) It makes sense to add to the names of the scripts in OSE an "OSE-" tag. So that when bugfixing, devs, original oxp creators and myself immediately know which version we are talking about.
Having thought about this a bit more, nice though it would be for identification, it risks breaking script interdependences and identifications. So this shouldn't be done, I withdraw my previous request.
That's appreciated. If we see anything in the scripts that need to be fixed, I don't see why we can't bring it to the authors attention, and then use that updated oxp in ose.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Good - consensus reached, hopefully everyone happy - normal service may be resumed, god help us ;)
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Re: ...

Post by Lestradae »

pmw57 wrote:
Thargoid wrote:
Lestradae wrote:
2) It makes sense to add to the names of the scripts in OSE an "OSE-" tag. So that when bugfixing, devs, original oxp creators and myself immediately know which version we are talking about.
Having thought about this a bit more, nice though it would be for identification, it risks breaking script interdependences and identifications. So this shouldn't be done, I withdraw my previous request.
That's appreciated. If we see anything in the scripts that need to be fixed, I don't see why we can't bring it to the authors attention, and then use that updated oxp in ose.
And, in retrospect, that is what makes most sense anyways and also is max efficient all around. We can agree on that then.

One of the reasons why I was very sparse with renaming things was my fear of overlooking something and inadvertently removing dependencies of all sorts by that - rather difficult-to-find bugs would be created by that!

So no renaming the OSE scripts then. T, you even mentioned scripts that look for other scripts and could break if these scripts were ever renamed!

Now I have a practical question at you experts here, I have seen some "true/false" statements written in at least three different notations, namely:

Code: Select all

<key>unpiloted</key>
                <true/>

Code: Select all

<key>unpiloted</key>
                <string>yes</string>

Code: Select all

<key>unpiloted</key>
                <string>true</string>
Do they all work that way? Or are some correct, some not? I was wondering about that ...

Cheers

L

PS:
Thargoid wrote:
Good - consensus reached, hopefully everyone happy - normal service may be resumed, god help us ;)
:D :D :D

Very cool. Looking forwards to resuming usual cooperation with thargoid edible iceberg poets again :wink:
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ...

Post by pmw57 »

Lestradae wrote:
Now I have a practical question at you experts here, I have seen some "true/false" statements written in at least three different notations, namely:

Code: Select all

<key>unpiloted</key>
    <true/>
<key>unpiloted</key>
    <string>yes</string>
<key>unpiloted</key>
    <string>true</string>
Do they all work that way? Or are some correct, some not? I was wondering about that ...
Short answer: You should use <true/>

Code: Select all

<key>unpiloted</key>
    <true/>
Long answer:

The property list page on the wiki says that for booleans, it is recommended to the following forms.

When using OpenStep property lists, the most proper thing to use is "yes" and "no"

Code: Select all

unpiloted = "yes";
When using XML property lists, use <true/> and <false/>

Code: Select all

<key>unpiloted</key>
    <true/>
And to add some final information, in JavaScript coding you would use true and false

Code: Select all

unpiloted = true;
Your example code above is in XML, so you would want to use <true/> for that.

Edit: added the short-answer version
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

OSE still uses some property lists for the world scripts.

These are:
  • playerstations.plist
  • OO-HaulEscort.plist
  • BlackMonks.plist
Player Stations
By Lestradae - both the property list version and the javascript version are being loaded at the same time.

Am I right to presume that the plist version is there only until what it does can be performed from javascript?

OO-Haul Escort
By Dr. Nil, updated be Eric Walch & Ark, is in the OpenStep language. If this were converted to JavaScript it may open up more possibilities that could be explored.

Black Monks
By LittleBear (scripting) and Griff(ships/station) - this property list involves large amounts of duplication that could easily be simplified by converting it to javascript.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

I want to announce that I am taking a break of two weeks or so from OSE-related stuff (unrelated to the belowmentioned scripts issues, mind you). I need to think about a few things, Katharsis' automated ship-expansion program has produced a first working beta and then there is the "what exactly should OSE become when V1.0 as it has repeatedly transcended its boundaries how I had conceived of them" issue.

@pmw57:

The playerstations scripts (js and legacy) do different things. The legacy script is one that I fitted to fill the hole of what your js translation can't yet achieve - 90% of the player stations stuff is now done by your js translation.

As far as I can see no duplication of functions is involved there (or should be at least), please correct me if I'm wrong.

Edit: I am wrong. In the script-swapping we did, somehow Screet's cut-down version of the "show station" script got into my Scripts folder and thereby into the current OSE test version. Meaning that it will only show one station correctly now: Screet's. That is quite the SNAFU :(

I am looking if I find an older version to replace this. We really have to go through changing scripts step-by-step in the future and coordinate efforts better, or things like that would happen back and forth amongst us and original oxps.
OO-Haul Escort ... By Dr. Nil, updated be Eric Walch & Ark, is in the OpenStep language. If this were converted to JavaScript it may open up more possibilities that could be explored.
I suggest you drop Eric a PM about that, and if he agrees/collaborates/is interested in doing that and updates / you together update his oxp, I'll update OSE accordingly, too.

As we agreed to keep as the new "proper procedure" 8)
Black Monks ... By LittleBear (scripting) and Griff(ships/station) - this property list involves large amounts of duplication that could easily be simplified by converting it to javascript.
I suggest the same as above, and actually as standard procedure in the future: Please drop LittleBear a PM, if he is game and changes something I'll follow suit.

Concerning my two-weeks-break: I might reappear here every now and then, might produce an update that repairs the mangled scripts issue, things like that, but generally I'll take a holiday here :)

Cheers & see you then

L
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

NP will see you when you return, a break every so often is a good thing :D I will be around and be ready when you are back :D
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Lestradae wrote:
In the script-swapping we did, somehow Screet's cut-down version of the "show station" script got into my Scripts folder and thereby into the current OSE test version. Meaning that it will only show one station correctly now: Screet's. That is quite the SNAFU :(
Once the plist perfoms a separate job, working on how to move the rest of that functionality into javascript would be a good next step.

I'll try some things out in the meantime.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

For the OSE testers & coders: Update to OSE WiP V0.70.21

This version has the faulty playerstation script replaced with an older version which contains exactly the lost functionality *phew*

Also a few fixes as usual etc.

Download from here:

http://www.box.net/shared/static/7b3sjr6bnl.zip

@pmw57, if you want to transfer the playerstations.plist script into a java script version, I would be very happy about that, but keep in mind that that's the one that should write any and all owned stations onto the mission screen (F5-F5), not as an "incoming message" when docking! :wink:

I would also be OK with a java script translation of the Oo-Haul and BlackMonks scripts, but I would ask you, as said, to first contact Eric and respectively LittleBear before you go about it.

I'M off for ~ two weeks, see you then (won't manage to drop in every now and then inbetween anyways) :D

L
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: ..

Post by Eric Walch »

Lestradae wrote:
OO-Haul Escort ... By Dr. Nil, updated be Eric Walch & Ark, is in the OpenStep language. If this were converted to JavaScript it may open up more possibilities that could be explored.
I suggest you drop Eric a PM about that, and if he agrees/collaborates/is interested in doing that and updates / you together update his oxp, I'll update OSE accordingly, too.
The main update work has been done by Ark, only the script.plist was my work. But I suggest to leave it this way for now. The way missions will be offered will change in 1.74 and probably break current js scripts. The current plist version should not be affected by this change and stay working. Therefor better translate mission scripts later on.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Eric Walch wrote:
The main update work has been done by Ark, only the script.plist was my work. But I suggest to leave it this way for now. The way missions will be offered will change in 1.74 and probably break current js scripts. The current plist version should not be affected by this change and stay working. Therefor better translate mission scripts later on.
Okay, I'll leave things as they are for now.

Know though that my door is always open :D
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: ...

Post by Eric Walch »

Lestradae wrote:
Now I have a practical question at you experts here, I have seen some "true/false" statements written in at least three different notations, namely:

Code: Select all

<key>unpiloted</key>
                <true/>
Do they all work that way? Or are some correct, some not? I was wondering about that ...
What also will work is:

Code: Select all

<key>unpiloted</key>
                <real>0.3</real>
For plist scripts, <true/> is the best, but Oolite tries to convert other values into booleans. For this key it tries to use a fuzzy boolean. From the code:

Code: Select all

if ((isUnpiloted = [shipDict oo_fuzzyBooleanForKey:@"unpiloted"]))  [self setCrew:nil];
A fuzzy boolean is a special variable, private to oolite, that changes numbers into random booleans. 0.3 than means 30% chance of true and 70% chance of false. It can be used for most of the booleans in shipdata.plist but better check the wiki first when in doubt. Because for unpiloted it was not mentioned on the wiki until a few minutes ago.
pwm57 wrote:
Okay, I'll leave things as they are for now.

Know though that my door is always open
I have no idea if old missions will run with a deprecation warning or not at all. I only know that last week missions stopped working for me in trunk because one essential mission property was removed. It seems that missions are working again in trunk but to be at the sure side I have re-uploaded all my mission containing oxp's that are on my box account with a max_version of 1.73.99 so new downloaders are forced to update when 1.74 comes out.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Hmm. After every installation of an updated OSE package I do get crashes back, most often during combat or while scooping the cargo of the recently shot down ships. This looks a bit like another timer issue but I fail to find it.

However, the crash does happen very often - and so far I've never had it after this modification to the ose-populator.js:

Code: Select all

// Ships that are added to the system, and to interstellar space
this.setUpGlobalShips = function()
{
 //       this.addNavyPatrolShips();
 //       this.addMissionaryShips();
 //       this.addDredgerShip();
        this.addHardPirateShips();
 //       this.pimpMySystem();
}

// Ships to be added to the system
this.setUpSystemShips = function()
{
//        this.addOoBayShips();
        this.addInraPatrolShips();
 //       this.addNavyPatrolShips();
        this.addSIRFYardStation();
//        this.addFrogRickshawShip();
//        this.addMissionaryShips();
//        this.addClipperShip();
//        this.addDredgerShip();
//        this.addExecutiveFlightShips();
//        this.addSalezaShips();
//        this.addSuperCobraShips();
//        this.addIxianShips();
        this.addHardPirateShips();
        this.addFreeTradeZone();
        this.addPirateCove();
//        this.pimpMySystem();
}

// add global and system ships
this.setUpShips = function () {
       if (system.isInterstellarSpace) {
			this.setUpGlobalShips();
            return;
        }
        this.setUpSystemShips();
};
I do two things there: First I changed it so that setUpGlobalShips is used for interstellar space only as otherwise it will add the same type of ships which are also added by setUpSystemShips for normal systems and then I did comment out many ships because these will appear anyway, thus I don't need to overcrowd my universe with them.

As I've also pushed Oolite pretty much to the limit by calling addNavyPatrolShips and addHardPirateShips many times without resulting in a crash (since the timer issue has been resolved) I'm pretty sure that it should still be a problem by addition of one of these ships.

The next logical step would be to remove the out-commenting of one ship type after another until it crashes again and then to have a look at that ship type.

Is anyone else experiencing the same crash problem? If so, does the change above solve it? If you can answer both with yes, please also do try to uncomment one addition and fly around, repeat until it crashes...and then report which ship type it is.

Screet
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

not yet tested the update package, too busy with another testing project, will test tonight and report my findings,

PS I've been trying to hunt around for google wave invites, which to me, would make things easier, as its part forum, part wiki, part chat / test messager software, only problem is, its invite only at the mo, and getting an invite is pretty much finding gold on the moon, sure they are about, but trying to get invited is hard, as I think it would allow the devs to communicate a lot better, so far, no luck in getting a google wave invite, if you have no idea what wave is,

http://wave.google.com/help/wave/about.html
Post Reply