Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Oolite Extended Project - Fork, no oxp

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

Moderators: winston, another_commander

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

Post by matthewfarmery »

for a centre place for scripts, might be a good idea if someone has the download with date in their sig, so that it will help everyone one where to get the download and the version / date, just a thought, if someone does that, there won't be more confusing on script versions,
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 »

matthewfarmery, multiple people working on each other's scripts (at least as far as oxps are concerned) is a fairly new development that came about indirectly via the OSE project.

I think it is already producing fruit (the debates here will clarify diverse things for diverse people, methinks, they sure have for me) and we all have to get our heads around of how to do this (develop/debug each others' scripts together) outside the veteran developers' of Oolite itself!

I think pmw57 will publish the newest scripts folder version here soon.

And I believe that Cmdr McLane's explanation about the differences between world scripts and ship scripts belongs onto the wiki. It is crystal clear, and while it didn't contain a lot of information totally new to me, it will sure help noobs and even java-script-capable coders wanting to understand the peculiarities of Oolite.

Cheers everyone :D

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

Post by matthewfarmery »

and that is a good thing, but what Im saying is, at least someone should have a link in their sig, so that everyone working on the project knows where to download the latest versions of the scripts, and would be helpful if there was a date beside the link, that is what Im saying, that way I think would help everyone to know where the latest scripts can be downloaded from, I think that would help a great deal rather then backtracking through many posts to find the latest download link
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 »

Just a question: Did anyone who updated to the recent script pack have any new crash?

For me, Oolite appears to be stable now...

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

Post by matthewfarmery »

haven't tried it yet, been too busy with beta testing for another company, will test now
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

just to say, with the revised scripts, I've not had a single crash as of yet, game seems stable, before I would get crashes on a regular basis, now not a single crash when I go between planets, so far so good, keep up the good work :) :) :) :) :)
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 »

Commander McLane wrote:
All clear now?
Very clear thanks.

So what is needed as far as the timers go, is to conceptually divide the scripts into world scripts and ships scripts.

World scripts don't need their timers to be cleaned up, but they can be done so using playerWillEnterWitchspace
Ship scripts must have their timers cleaned up using playerWillExitSystem

What is the issue with stopping and starting timers? Someone was saying that you cannot stop a timer and then immediately start the same one?
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: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Ship scripts need timers stopped when the ship they refer to cease to exist (either due to the player leaving the system or the ship being removed/killed).

If you don't then the timer ends up trying to call script functions that no longer exist, and you're on a short journey to your desktop.
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

I've updated my sig with the script download link, hope people won't mind, but I think it would help if we all knew where to go for the scripts,
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 »

Thargoid wrote:
Ship scripts need timers stopped when the ship they refer to cease to exist (either due to the player leaving the system or the ship being removed/killed).

If you don't then the timer ends up trying to call script functions that no longer exist, and you're on a short journey to your desktop.
This is the part that I'm meaning.
Commander McLane wrote:
And still there is no need to delete or remove world script timers when the player enters witchspace. Especially if these timers are to be started again when he exits witchspace (just look at the script snippet in question). You can't start a timer which you just before have deleted.
I presume that checking that a timer exists before starting it is an appropriate safety measure.
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: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Worldscript timers don't need to be removed as the (world)script that they refer to will exist after a player jumps (as it's essentially the player ship, which will tend to go with him or her ;) ).

But in the case of a ship script, when the player jumps, the remaining NPC ships in the system that the player just left get removed. Hence your ship script timer is then trying to refer to code that now no longer exists, and you get your problems and desktop moment.
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

just an update, been running Oolite now for well over an hour and not a SINGLE crash :!: 8)

so happy days are here, as this build is once more stable, at least for the time being, nice work all
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 »

Thargoid wrote:
Worldscript timers don't need to be removed as the (world)script that they refer to will exist after a player jumps (as it's essentially the player ship, which will tend to go with him or her ;) ).
Something else I will bring up as and when they are spotted, is where timers are started only on exiting the station, but not on entering from witchspace.

In most situations they are wanting to be started in both situations.

I think that I will start a new testing thread for each oxp that a script comes from. This will make it much easier for issues to be tracked and resolved, and for the authors to be more easily included in the conversation.
Thargoid wrote:
But in the case of a ship script, when the player jumps, the remaining NPC ships in the system that the player just left get removed. Hence your ship script timer is then trying to refer to code that now no longer exists, and you get your problems and desktop moment.
Those will be updated to instead use playerWillLeaveSystem to tidy up the timers.

The order in which the scripts that will be updated is:
  • ship script timers first
  • world script timers
  • remaining scripts
As for my WiP, as its origin is from Screets updates, I shall continue in the following manner:
  • Compare and migrate into WiP any differences between Screet code and Lestradae code
  • Update the timer destruction as appropriate for its environment
  • Ensure the remaining javascript code meets minimum coding standards
  • Report any issues discovered during this process into a new thread, and link from here to there
Last edited by pmw57 on Wed Oct 14, 2009 9:18 pm, edited 1 time in total.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

sounds like a good plan, any updates I will will happy test, but I can't contribute to the code, as Im not a programmer, my major weakness, but testing is what Im good at though :D
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 »

@Screet, pmw57, matthewfarmery and anyone who wants to get involved! Can I suggest the beginnings of a "proper procedure" here (?):

1) The starting point for the further script reworking is the Screet-reworked pmw57 - version of the scripts which matthewfarmery has linked in his sig - OK everyone? They seem to run without crashes on at least four systems now.

2) pmw57 & Screet continue work on these scripts, and you coordinate that so that you don't work on the same thing twice and valuable time is lost.

3) A new thread is made in the Testing Forum for each oxp the scripts originally come from. That way, the original oxp authors can get involved if they choose to do so.

4) If and when the four regular OSE testers here agree that a script has been "bettered", matthewfarmery includes it into the script assembly in his sig and drops a note about that here in the OSE thread.

We continue this until everyone is happy.

Do you all three concur, can this work like that, criticism, discussion, etc.?

:?:

L
Post Reply