Tionisla Reporter

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

Moderators: another_commander, winston

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

Tionisla Reporter

Post 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.
Last edited by Eric Walch on Sun Jul 24, 2011 12:53 pm, edited 2 times in total.
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:

Re: [WIP] Tionisla Reporter

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16057
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Tionisla Reporter

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: [WIP] Tionisla Reporter

Post 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...
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: [WIP] Tionisla Reporter

Post 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.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: [WIP] Tionisla Reporter

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16057
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Tionisla Reporter

Post by Cody »

Yeah... '... here's another film... now go back and get it right.'
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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:

Re: [WIP] Tionisla Reporter

Post 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:
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: [WIP] Tionisla Reporter

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16057
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [WIP] Tionisla Reporter

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [WIP] Tionisla Reporter

Post 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.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
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: [WIP] Tionisla Reporter

Post 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.
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: [WIP] Tionisla Reporter

Post 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.
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: [WIP] Tionisla Reporter

Post by Zireael »

I like the idea, maybe I'll download it tomorrow...
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: [WIP] Tionisla Reporter

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