Page 1 of 13

Tionisla Reporter

Posted: Tue Jul 05, 2011 12:47 pm
by Eric Walch
Here is a new oxp that is mend as a mission for a starting Jameson: Tionisla Reporter

I release it here as a Work In Progress but if no bugs get found, this will also be the same as the later release version. I did not yet include a readMe as most people don't read it anyway and I want to know if it explains itself enough.

The first briefing is at "Tionisla" (Who hadn't guessed this). For testing convenience, the oxp already includes a saved file that starts here.

It is based on some code I had written years ago, but only works correctly since Oolite 1.75, so now it was time for a release. El_Viejo helped me to create some decent mission text. I won't say anymore, just that is a simple starters mission without adding any additional pirates or so. I even think you can do all traveling without visiting anarchies or feudal states.

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 1:49 pm
by Commander McLane
Nice little OXP, but the camera is defeating me. I always get "Useless photo, too far away!", even if I've already entered the planet's atmosphere. And right after launching from the station, when I had the planet dead-centre in my view, I got "Useless photo, off-centre!".

So what do I have to do in order to have my photos non-useless?

EDIT: And when I came back to Tionisla with my 10 useless photos, nothing happened at all.

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 2:53 pm
by Cody
Did you remove the lens cap, McLane? Only joking... you gotta get exactly the right angle for the pics.
I've just returned my pics to Tionisla and received my reward... it's a sweet little OXP Eric.

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 3:00 pm
by Svengali
Have waisted two shots on the planet too. Then moved on to the station... to far/out of range. Coming closer changed the whole situation .-)

He, if we would have a way to display the shots on a missionscreen... dreaming...

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 3:00 pm
by Eric Walch
Commander McLane wrote:
So what do I have to do in order to have my photos non-useless?

EDIT: And when I came back to Tionisla with my 10 useless photos, nothing happened at all.
I now see were I need to enhance things. It was the station you were supposed to make a picture of. And that works even when doing it in back or side views.

And somehow I forgot to add the failure message I originally intended. Should it be a failure that ends the mission or one that gives you a new chance with 10 new pictures?

EDIT:
I probably add the info about the station picture that is needed in the failure message and give a second chance.

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 3:08 pm
by Svengali
Eric Walch wrote:
And somehow I forgot to add the failure message I originally intended. Should it be a failure that ends the mission or one that gives you a new chance with 10 new pictures?
If I get this right it is there to make the player familiar with ...jumps + snapshots, so a second chance is maybe a good choice.

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 3:16 pm
by Cody
Yeah... '... here's another film... now go back and get it right.'

Re: [WIP] Tionisla Reporter

Posted: Tue Jul 05, 2011 3:32 pm
by Commander McLane
But I had taken beautyfully framed photos of planet and station:
Image

Image

Image
Obviously the Tionisla Chronicle has no eye for photographic art. :wink:

Re: [WIP] Tionisla Reporter

Posted: Wed Jul 06, 2011 11:15 am
by Eric Walch
Nice pictures. A shame they were rejected by the editor of the Tionisla chronicle :(

I see that I put the players on the wrong leg by the phrase:
we are looking for an adventurous pilot to try and find it and take some pictures of the planet and the station that apparently orbits it
I now rephrased it without the 'planet' in it. This somehow slipped my checks. Changing the oxp to make pictures of both, makes the code unnecessary complicated because you can't target a planet to tell the code were you are aiming at (station or planet).
wip version 0.3 is on line. Only a textual change (without the planet) and a failure message added.

Re: [WIP] Tionisla Reporter

Posted: Wed Jul 06, 2011 11:24 am
by Cody
Eric Walch wrote:
I see that I put the players on the wrong leg by the phrase:
we are looking for an adventurous pilot to try and find it and take some pictures of the planet and the station that apparently orbits it
I now rephrased it without the 'planet' in it. This somehow slipped my checks. Changing the oxp to make pictures of both, makes the code unnecessary complicated because you can't target a planet to tell the code were you are aiming at (station or planet).
wip version 0.3 is on line. Only a textual change (without the planet) and a failure message added.
That was my mistake Eric... sorry.

Re: [WIP] Tionisla Reporter

Posted: Mon Jul 11, 2011 6:30 am
by Capt. Murphy
Hi Eric,

Whilst looking for a problem in my OXP I came across this in the log - only on one occasion out of all the photos.
06:35:23.515 [script.javaScript.timeLimit]: ***** ERROR: Script "erehwonCamera" ran for 1.6117 seconds and has been terminated.
06:35:23.531 [script.javaScript.stackTrace]: 0 (erehwonCamera.js:54) <anonymous function>
06:35:23.531 [script.javaScript.stackTrace]: this: [Script "erehwonCamera" version 0.02]
06:35:23.531 [script.javaScript.stackTrace]: centered: true
06:35:23.531 [script.javaScript.stackTrace]: deviation: 25.547333038686904
06:35:23.531 [script.javaScript.stackTrace]: inRange: true
06:35:23.531 [script.javaScript.stackTrace]: maxDistance: 5049.752502441406
06:35:23.531 [script.javaScript.stackTrace]: minDistance: 1514.9257507324219
06:35:23.531 [script.javaScript.stackTrace]: range: 2110.629126443809
06:35:23.531 [script.javaScript.stackTrace]: station: [[Station "Erehwon Station" "Erehwon Station" position: (-50000, 4000, 413000) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT]]
06:35:23.531 [script.javaScript.stackTrace]: photoName: "Erehwon_station"
06:35:23.531 [script.javaScript.stackTrace]: target: [Station "Erehwon Station" "Erehwon Station" position: (-50000, 4000, 413000) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT]
06:35:23.531 [script.javaScript.stackTrace]: self: [PlayerShip "Boa Class Cruiser" position: (-49431.5, 4109.65, 410449) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]
Also
06:53:00.484 [script.javaScript.exception.notFunction]: ***** JavaScript exception (ErehwonStation 1.00): TypeError: ship.switchAITo is not a function
and finally does the station need a Commodities.plist to sell the enterprising reporter some cheap stuff?? :wink: There was no stock and zero prices when I visited.

Re: [WIP] Tionisla Reporter

Posted: Mon Jul 11, 2011 7:56 am
by Eric Walch
Capt. Murphy, thanks for the report.

- The first one is the most problematic. It just means that the code ran to long. I don't see a direct reason for it. It could be that the 'takeSnapShot()' command is the culprit. When I look in the Oolite code I think that the time it takes to save the picture is included in the time a JS function is allowed to run.

- The second one is a plain bug. I just used the syntax used in AI but JS uses a different syntax: 'switchAI()' / 'switchAITo'. This difference is to 'please' us oxp-ers.

- The third one I knew and was on my to-do list. Now I gave it a none market. Originally that seemed okay for a remote station. But later on I added launching traders, the mission description talks about trade etc. So, yes, it should get a specific market file.

Re: [WIP] Tionisla Reporter

Posted: Mon Jul 11, 2011 3:38 pm
by CommonSenseOTB
Eric Walch wrote:
- The first one is the most problematic. It just means that the code ran to long. I don't see a direct reason for it. It could be that the 'takeSnapShot()' command is the culprit. When I look in the Oolite code I think that the time it takes to save the picture is included in the time a JS function is allowed to run.
Interesting, perhaps it works the same for ALL commands within one function, it's just that 'takeSnapShot()' uses a lot of time and is at the end of a long function. Perhaps if you put it in a function of it's own the error will disappear as the time for the previous stuff won't be added to it.

I have the same problem in my numeric hud script using frame callbacks with lots of remove and award equipment commands. It's very rare considering the number of times it goes through a digit function but you can expect sometimes a dozen errors or so for script ran too long in a couple of trips between systems and all the combat that changes gauges heavily. It's very very rare as there are up to 23 digits to draw every second frame 60 times per second. In over 20000 digit function passes only 12 errors. I made it as efficient as I could without rewriting the digit functions completely to break the numbers further into functions for individual value checks while drawing 1 digit. That might actually result in the whole oxp scipt taking more time causing the fps to drop slightly just so that an individual script function doesn't run too long.

Perhaps the time allowed for script functions should go up a little. Or maybe there is something internal/hardcoded that can very temporarily increase the time it takes for script functions to run. The reason I think this is that I would expect if I'm getting errors of this nature that they would be more consistent and most of the time instead of intermittent.

If putting the 'takeSnapShot()' in its own function doesn't fix the problem then the script time needs to be increased or there is an internal problem, maybe one that affects the time of all script functions intermittently. Just a thought.

Re: [WIP] Tionisla Reporter

Posted: Sat Jul 16, 2011 5:44 pm
by Zireael
I like the idea, maybe I'll download it tomorrow...

Re: [WIP] Tionisla Reporter

Posted: Thu Jul 21, 2011 4:20 pm
by Eric Walch
Capt. Murphy wrote:
....and finally does the station need a Commodities.plist to sell the enterprising reporter some cheap stuff?? :wink: There was no stock and zero prices when I visited.
I think that I intentionally set it to no-market because there can't be a market in interstellar space. I just noticed it again in trying to to add such a custom market. So, I think the last glitches are removed and I make it a proper release next weekend.