Progress

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2172
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Progress

Post by ffutures »

One thing that might be worth considering re the route planning functions: currently the choices (in 1.80) are "best time" or "lowest number of jumps," but sometimes the best time routes only shave off a small amount of time for a large number of jumps, and make extra fuel stops essential. I think there needs to be some sort of optimisation which takes the extra fuel stops into account, a "best of both worlds" route which falls somewhere between the extremes.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Progress

Post by phkb »

Note that as a consequence the player.ship.targetSystem property may be pointing to an out-of-range system during witchspace entry and countdown events, which it previously couldn't. This may require minor adjustments to a few OXPs
If player.ship.targetSystem now points to an out of range system, what property returns the next jump?

Also, would it make more sense to retain the original purpose of player.ship.targetSystem, and add a new property like player.ship.longRangeTargetSystem, so existing OXP's don't get broken, or are there behind the scenes reasons for the change?
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Progress

Post by Wildeblood »

phkb wrote:
Note that as a consequence the player.ship.targetSystem property may be pointing to an out-of-range system during witchspace entry and countdown events, which it previously couldn't. This may require minor adjustments to a few OXPs
If player.ship.targetSystem now points to an out of range system, what property returns the next jump?
Try player.ship.destinationSystem I dunno whether destinationSystem works for the player ship (it should), and if so, when. It might work always, in playerStartedJumpCountdown, only in shipWillEnterWitchspace or never.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Progress

Post by phkb »

For my purposes, player.ship.destinationSystem is not set when I need it to be, which is as soon as the player chooses a destination system on the F6 screen.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

destinationSystem (and its counterpart homeSystem) only really make sense for NPCs who aren't going to change their mind on this.
phkb wrote:
If player.ship.targetSystem now points to an out of range system, what property returns the next jump?
No property at the moment, but as mentioned recently, in 1.81 there's a second parameter given to shipWillEnterWitchspace specifying where the jump is going. I'll add a property for it as well.
phkb wrote:
Also, would it make more sense to retain the original purpose of player.ship.targetSystem
One purpose - that there is code both OXP and core already using - is to determine which system the player has selected on F6. That purpose is being retained under the original name. It's going to cause problems in some cases either way.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Progress

Post by Wildeblood »

cim wrote:
destinationSystem (and its counterpart homeSystem) only really make sense for NPCs who aren't going to change their mind on this.
That's a bit vague, cim. I know it was only intended for NPCs but you haven't unequivocally said whether it is actually set on the player ship or is always null? It also presupposes no-one writes an AI for NPCs that has them changing their "minds".
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Progress

Post by phkb »

In my tests it doesn't get set for the player ship. But I haven't tested all scenarios, just up to the point where the player has selected a destination on the F6 screen. It might get set when the player enters a wormhole, but even if it did it's tool late for my purposes.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

Wildeblood wrote:
That's a bit vague, cim. I know it was only intended for NPCs but you haven't unequivocally said whether it is actually set on the player ship or is always null?
Nothing in the core game sets it on the player ship. The JS property isn't marked player-read-only, so you could set it from an OXP - maybe some sort of "file your flight plan in advance" scenario?
Wildeblood wrote:
It also presupposes no-one writes an AI for NPCs that has them changing their "minds".
That's a controlled case, though.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

You should now get a warning on your console if you try to dock with a station without clearance and clearance is needed - hopefully soon enough that you can do something about it.

Let me know if you notice anything not quite right with it, or with other parts of the docking process.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

New HUD dial to go with the other four data_source dials from earlier - drawCustomImage:. It basically works like an image legend, except it's drawn during the dial rendering stage and you can change the image it points to with the data_source property.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Progress

Post by Wildeblood »

cim wrote:
New HUD dial to go with the other four data_source dials from earlier - drawCustomImage:. It basically works like an image legend, except it's drawn during the dial rendering stage and you can change the image it points to with the data_source property.
Good on you, sir.

Something I've been meaning to raise: when I tried out the custom text dials, once I had defined a data source I couldn't remove it again by setting it to null as I expected to be able to. So an unwanted text had to be set to "". If HUDs are being switched, and each sets its own custom dials & data sources, but those data sources cannot be removed again when the HUD switches, the player ship could build up a very long list of them.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

HUD message_gui can now have permanent = yes; set. You'll probably need a HUD setup quite a way from the default one for this to be a good idea, though.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Progress

Post by phkb »

With regard to playerCompletedContract, what situations create the different result types?

For cargo in particular, success is, obviously, when you complete the contract in time. short is when you arrive in time but with less than the agreed amount of cargo. But what is the difference between late and failed? I can trigger the late type by turning up after the agreed time, but I'm not sure how to trigger the failed event.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Progress

Post by phkb »

Ah, got it. late is when you dock in the target system after the deadline, failed is you dock in a non-target system after the deadline.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Progress

Post by cim »

Some additions to the OXP Verifier:
- Javascript syntax of Scripts/*.js files will be checked
- Syntax of all (fixed-name) plist files will be checked

It's now a lot more worthwhile to run it before bothering to load Oolite in full.
Post Reply