Welcome Mat OXP

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

Moderators: another_commander, winston

Which version do you prefer?

Poll ended at Sat Sep 27, 2008 8:27 pm

Software upgrade (script only)
9
53%
Hardware (equipment needing to be purchased)
8
47%
 
Total votes: 17

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

Post by Thargoid »

Eric Walch wrote:
pagroove wrote:
ATM. you get the info from the beacon automaticaly. Wouldn't it be more realistic if you have to link with the beacon by locking onto it and pressing r. The information is then downloaded. It also would cost some time. :twisted:
I agree. Now there is a script and an equipment version. But who want the equipment version when the script version does exactly the same as the equipment after purchase.

Now the script version displays the system information with a 1 second delay after entering. Make it a 10 or 15 second delay. At that moment first check if the beacon is targeted. Only than display the message. (player needs to target the buoy within 10 to 15 seconds after entering)
That will make its use a little bit more difficult, but than there is a real need for de-scission between the two versions.

Or combine the two in one oxp. With equipment you get an automated response and without the equipment you have to first target the buoy.
Gentlemen, thank you both for the excellent ideas :twisted:

== Download Welcome Mat v1.03 here ==
I have included PAGroove's idea, and a variant on Eric's. Now if people have purchased the equipment they get the system's information immediately on entry from witchspace. If not then beacon lock-on is needed, and they get the information after 30-60 seconds of connection and information download.

And as an added bonus, the player can also target the buoy outside the main station for the same information.

It still has the minor glitch for the brand new player (due to the use of missionVariables), which I'll see if I can find the root cause of just out of interest.
Last edited by Thargoid on Mon Sep 22, 2008 7:30 pm, edited 1 time in total.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

Excellent work Thargoid. I was a bit simracing tonight so I just see this message. I even thought further because this OXP could have great potential.

With the equipment the player essentially gets a powerful information download device. On this fact a whole sets of random missions could be created and this time for Corporations. For example one corporation could order you to fly to a factory. There you have to target with the comm array. Then hold the link for a minute or so. In the meanwhile this is regarded as company espionage and the factory will launch fighters at you..etc.

Just one possibility with such a device. But that's a whole different OXP.
Anyway enjoying your oxp's. BTW I made a new song for the Famous Planets OXP. But I PM you about it in the next days 8)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Thanks :oops:

As you say it's a very extendable idea, and quite simple to code. I was pondering making it available via all buoys, but that may lead to some odd occurrences as a buoy I think is classed as anything that shows up on the advanced compass.

But anything else on this as you say for another OXP. I think this one is fairly much finalised (except for the missionVariables new commander glitch), as I think 2 upgrades in as many days is a little fast even for me ;)
User avatar
Wolfwood
---- E L I T E ----
---- E L I T E ----
Posts: 735
Joined: Wed Mar 29, 2006 9:53 am
Location: Finland
Contact:

Post by Wolfwood »

The download link in the first post doesn't work. Luckily, there was another link a couple of messages above this one.

In any case, the idea sounds great and I'm going to try the OXP out soon! :)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Wolfwood wrote:
The download link in the first post doesn't work. Luckily, there was another link a couple of messages above this one.

In any case, the idea sounds great and I'm going to try the OXP out soon! :)
Thanks, now fixed and tested OK.

As an aside, the current version as of now will issue information from all buoys via the targetting method.
Jason Whitelock
Above Average
Above Average
Posts: 29
Joined: Wed Oct 31, 2007 2:21 pm
Location: Lost in Galaxy 1, now fumbling through Galaxy 2

Post by Jason Whitelock »

A very useful oxp that i have been using for a few days now - I stand in awe at the coding you guys must do.

What i would love to see:
on the thread of powerful information system >> a component that you can scan the ships in the area (and i just mean 'on compass'), to see who is out there, they are available (on screen or somewhere) as a list that you can then quickly toggle through. Once you have selected the entity (ship, whatever) your hud tracks onto the item selected.

My point is - I have a whole load of oxp's running and at times you can run into a fog of ships where there are maybe 20 or 30 items local. Rockhermits, ships, really nasty ships, hydra's etc
It would be nice to target straight to the big and nasty things first and take them out or at least engage them.

I have had scenarios where I have been pummelled before I have even managed to track who is doing the pummelling.

I think you can see where I am going with this.....

Any thoughts?
SOLO
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The spanner in the works is the "list you can toggle through". Everything else is do-able, but whilst you can form the list (that's trivial) displaying it and selecting from it whilst in-flight is not.

I could be wrong, but I don't think that element of it will be possible in an OXP script. You can do it when you're docked via a mission screen, but that's a little bit too late ;)

PS If you haven't already, update to the latest version of the OXP (uploaded this morning). With that you can download the information from any buoy in the system (anything that shows as a buoy on the compass) simply by ident-system (or target) locking on it and waiting.
Jason Whitelock
Above Average
Above Average
Posts: 29
Joined: Wed Oct 31, 2007 2:21 pm
Location: Lost in Galaxy 1, now fumbling through Galaxy 2

Post by Jason Whitelock »

Well - my own thoughts then - and although some idiot gave me a degree in software engineering - i dont suggest they make any sense.

What you can do already >>
With the + and - you can already toggle through 'available targets in memory' - assuming you have at least scanned / targeted the ship or item at least once.

If you cant create a list that you can view and toggle through (you suggest this is hard)
What could you code to automatically put every ship in range (and you suggest getting that info was easy) into the memory.

In the busy situation as I describe - toggling with +/- to find the likely culprit would be a real benefit.

After all shooting a stolen hydra2 from the sky gets you browny points, shooting a happy eyed preacher is a waste of plasma energy :-
SOLO
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

To scan around you, and add those to the target memory that you can then cycle through with +/- as you say should be possible if those entries are available to JS to be written to. That I think would be the best approximation.

It could be a little risky though, as you may end up with Offender status as you're essentially missile-locking everything around you (if you've got system vessels in the vicinity for example) although I guess they could be filtered out perhaps.

OXPs can't add or redefine keys, so new functionality that way is out (except if someone seriously sweet-talks the trunk script coders, although I guess then it's no longer OXP). You can make the scan list as an array quite easily, so perhaps an option would be to do that and squirt that into the target memory from closest to furthest ship would be most viable.

Triggering it would probably need to use the pylon mine trick or something equally clever, and it would of course require the player having the suitable other equipment installed.

Certainly one for some thought, although here I state that I'm perfectly happy if someone else wants to try coding this up, given I've already got 4 OXPs in various stages of development :roll: ;)
User avatar
tinker
Deadly
Deadly
Posts: 166
Joined: Tue Jul 22, 2008 7:45 am
Location: Sachsen

Post by tinker »

Since the upgrade to v1.03 I get this in stderr

Code: Select all

2008-09-22 10:53:08.123 oolite[9231] [script.javaScript.warning.162]: ----- JavaScript warning: reference to undefined property this.logging
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]:       /home/rhian/.Oolite/AddOns/Welcome Mat 1.03.oxp/Config/script.js, line 21.
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]: ----- JavaScript warning: reference to undefined property this.audio
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]:       /home/rhian/.Oolite/AddOns/Welcome Mat 1.03.oxp/Config/script.js, line 29.
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]: ----- JavaScript warning: reference to undefined property this.extraA
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]:       /home/rhian/.Oolite/AddOns/Welcome Mat 1.03.oxp/Config/script.js, line 37.
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]: ----- JavaScript warning: reference to undefined property this.extraB
2008-09-22 10:53:08.124 oolite[9231] [script.javaScript.warning.162]:       
/home/rhian/.Oolite/AddOns/Welcome Mat 1.03.oxp/Config/script.js, line 45.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Does it work at all? Are you getting those errors in-flight, or at start-up? Have you got OXPConfig installed or not? A little more information please ;)

I think I'm going to pull the missionVariables sticky coding of the parameters, it's becoming more trouble than it's worth... :roll:
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

The easy fix for this is to add the following at the top of the script, outside of any function:

Code: Select all

this.logging = false;
this.audio = false;
this.extraA = false;
this.extraB = false;
Changing the line “this.reset = function()” to “this.startUp = this.reset = function()” might work too.

Details:
If a property has never been assigned to, its value is undefined (which is distinct from null, one of Javascript’s weirder idiosyncrasies). Oolite runs the JS engine in “strict mode”, generating extra warnings for various things that may be mistakes, so you need to initialize all properties before trying to read them.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

A nice simple idea :)

I was shying away from using this.startUp as that will trigger before OXPConfig has run (and before the player is loaded, so missionVariables aren't defined), which may change the settings itself. Hence I was using this.reset to ensure that the code ran after any such modifications, enabling it to update the scripts settings.

I did in previous testing try to check for undefined as well as null, but that didn't seem to help (with the known glitch with new Jamesons without save game files).

One for tonight methinks...
User avatar
tinker
Deadly
Deadly
Posts: 166
Joined: Tue Jul 22, 2008 7:45 am
Location: Sachsen

Post by tinker »

Thargoid wrote:
Does it work at all? Are you getting those errors in-flight, or at start-up? Have you got OXPConfig installed or not? A little more information please ;)

I think I'm going to pull the missionVariables sticky coding of the parameters, it's becoming more trouble than it's worth... :roll:
Start up load an existing game then exit. Errors listed in stderr as previously noted.
Startup load existing and check equipment list, planetary info system is listed as available to purchase. I did not purchase but flew to several other systems, got the message to lock onto the beacon for info, in every system, checked so far there was no witchspace beacon. In one there was a fuel container floating where the beacon should be and it showed as green on the scanner. Errors listed in stderr as previously noted.
Restarted but bought the equipment this time flew to another system got the correct message but still no witchspace beacon, one time got the infamous space bar element as beacon on the scanner, Errors listed in stderr as previously noted.

I do have oxpconfig loaded.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The OXP doesn't spawn, amend or in any way affect the witchspace buoys themselves, so it sounds like you've got something else wrong in your set-up somewhere. All it does is read the players target information, and if that shows you're targetting a navigation or witchspace buoy (or in the next version any buoy) then you get the message pop-up after a delay (the timer only fires every 30s). As there's something messing up the spawning of buoys on your system then you can't lock on and so won't see the messaging. The equipment by-passes the need for the lock-on, hence your saw the messaging.


I think the original errors in the log are due to the missionVariables not being in existence in your saved game (basically the new Jameson glitch I mentioned before) and somehow that's getting past the checking, hence the this.logging etc are being set to undefined (or null, as the js console on Windows seems to think) as the variables are so set. Ahruman's fix should solve that, which I'll try tonight and if (when ;) ) it works I'll issue the updated version.
Post Reply