Save In Flight OXP v1.0.0
Moderators: winston, another_commander
Save In Flight OXP v1.0.0
Save in Flight OXP v1.0.0 is available here and on the Expansion Manager.
This OXP allows tha player to save the game wihtout the need to dock to a deterministic station.
That's done through a new primeable equipment, Save In Flight, available at TL 1 systems for 0.1 credits.
To save, the player must move away from other ships until the scanner is empty (no ships, asteroids, cargo pods, derelicts, wreckage, sparks, etc.), stop the player ship (speed must be 0), then prime and activate the Save In Flight equipment.
The player ship will be moved to the Station at End of the Universe, where the player can save the game, load another savegame, exit the game.
When the player launches from the Station at End of the Universe, the player ship is moved to the last position the Save In Flight equipment was activated.
This OXP was created based on cim's suggestions here
This OXP allows tha player to save the game wihtout the need to dock to a deterministic station.
That's done through a new primeable equipment, Save In Flight, available at TL 1 systems for 0.1 credits.
To save, the player must move away from other ships until the scanner is empty (no ships, asteroids, cargo pods, derelicts, wreckage, sparks, etc.), stop the player ship (speed must be 0), then prime and activate the Save In Flight equipment.
The player ship will be moved to the Station at End of the Universe, where the player can save the game, load another savegame, exit the game.
When the player launches from the Station at End of the Universe, the player ship is moved to the last position the Save In Flight equipment was activated.
This OXP was created based on cim's suggestions here
- Massively Locked
- Dangerous
- Posts: 84
- Joined: Tue Nov 20, 2012 12:20 pm
Re: Save In Flight OXP v1.0.0
Great job! For any new Oolite commanders reading this- put this OXZ on your short list to install right off the bat- before the pretty graphics or big-laser-pew-pew-guns. I've been making some tweaks to help preserve the illusion of being in space & not in-station. One of them is restoring the occupied cargo space of g/kg-based goods on launch (been doing lots of mining lately). Anyway- thanks for making this!
Re: Save In Flight OXP v1.0.0
Oops! Forgot about that!Massively Locked wrote: ↑Mon Sep 12, 2022 9:44 pmGreat job! For any new Oolite commanders reading this- put this OXZ on your short list to install right off the bat- before the pretty graphics or big-laser-pew-pew-guns. I've been making some tweaks to help preserve the illusion of being in space & not in-station. One of them is restoring the occupied cargo space of g/kg-based goods on launch (been doing lots of mining lately). Anyway- thanks for making this!
If you PM me you modifications to deal with that I will gladly include them in the OXP.
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Save In Flight OXP v1.0.0
This does not want to load on the AppleMac:
Latest Log:
This seems to be the relevant bit:
10:16:28.460 [plist.parse.failed] OOPropertyListFromData (OOPListParsing.m:72): Failed to parse ... Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz/manifest.plist as a property list.
Unexpected character { at line 1
10:16:28.460 [oxp.noManifest] +[ResourceManager checkPotentialPath::] (ResourceManager.m:611): OXZ ... Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz has no manifest.plist
Unexpected character { at line 1 is the standard utterly uninformative AppleMac message indicating an error somewhere in syntax
When I run plutil inside the AppleMac Terminal programme (and drop the manifest.plist onto it) I get this:
... % plutil ... Dybal.SaveInFlight/manifest.plist
2022-09-13 10:22:46.797 plutil[97789:939029] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 16. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
... Dybal.SaveInFlight/manifest.plist: Unexpected character { at line 1
This manifest.plist seems to work:
Latest Log:
Code: Select all
Opening log for Oolite development version 1.91.0-220208 (x86-64 test release) under Mac OS X Version 10.15.3 (Build 19D2064) at 2022-09-13 08:16:25 +0000.
Machine type: MacBookAir9,1, 8192 MiB memory, 2 (4 logical) x x86 (family 0x38435547) @ 1100 MHz.
Build options: OpenAL, new planets, JavaScript console support, Debug plug-in support, OXP verifier, localization tools, debug GraphViz support, JavaScript profiling.
Note that the contents of the log file can be adjusted by editing logcontrol.plist.
10:16:26.087 [dataCache.rebuild] -[OOCacheManager(Private) loadCache] (OOCacheManager.m:353): Data cache version (1.90) does not match Oolite version (1.91), rebuilding cache.
10:16:26.138 [plist.parse.failed] OOPropertyListFromData (OOPListParsing.m:72): Failed to parse /Users/accountname/Library/Application Support/Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz/manifest.plist as a property list.
Unexpected character { at line 1
10:16:26.138 [oxp.noManifest] +[ResourceManager checkPotentialPath::] (ResourceManager.m:611): OXZ /Users/accountname/Library/Application Support/Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz has no manifest.plist
10:16:28.294 [joystick.error.init] -[OOMacJoystickManager init] (OOMacJoystickManager.m:80): Cannot open HID manager; joystick support will not function.
10:16:28.295 [rendering.opengl.version] -[OOOpenGLExtensionManager reset] (OOOpenGLExtensionManager.m:221): OpenGL renderer version: 2.1.0 ("2.1 INTEL-14.4.26"). Vendor: "Intel Inc.". Renderer: "Intel(R) Iris(TM) Plus Graphics OpenGL Engine (1x6x8 (fused) LP".
10:16:28.295 [rendering.opengl.extensions] -[OOOpenGLExtensionManager reset] (OOOpenGLExtensionManager.m:222): OpenGL extensions (128):
GL_EXT_texture_compression_dxt1, GL_EXT_rescale_normal, GL_EXT_transform_feedback, GL_EXT_blend_func_separate, GL_EXT_framebuffer_sRGB, GL_ATI_texture_env_combine3, GL_ARB_draw_elements_base_vertex, GL_EXT_debug_label, GL_EXT_geometry_shader4, GL_EXT_secondary_color, GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_NV_texgen_reflection, GL_NV_blend_square, GL_ARB_texture_compression_rgtc, GL_EXT_stencil_wrap, GL_ARB_texture_env_crossbar, GL_EXT_framebuffer_blit, GL_ATI_separate_stencil, GL_APPLE_vertex_point_size, GL_EXT_texture_rectangle, GL_APPLE_specular_vector, GL_EXT_packed_depth_stencil, GL_EXT_blend_color, GL_ARB_fragment_program_shadow, GL_EXT_texture_env_add, GL_EXT_provoking_vertex, GL_EXT_texture_array, GL_ARB_texture_env_combine, GL_ARB_point_sprite, GL_ARB_multisample, GL_EXT_framebuffer_object, GL_ARB_framebuffer_sRGB, GL_EXT_texture_lod_bias, GL_APPLE_pixel_buffer, GL_ARB_vertex_program, GL_EXT_bgra, GL_APPLE_fence, GL_APPLE_ycbcr_422, GL_EXT_timer_query, GL_EXT_vertex_array_bgra, GL_ARB_depth_clamp, GL_IBM_rasterpos_clip, GL_ARB_pixel_buffer_object, GL_SGIS_generate_mipmap, GL_EXT_framebuffer_multisample_blit_scaled, GL_ARB_shader_texture_lod, GL_ARB_texture_float, GL_ARB_texture_rectangle, GL_ARB_vertex_shader, GL_NV_texture_barrier, GL_ARB_provoking_vertex, GL_ARB_texture_env_add, GL_APPLE_object_purgeable, GL_ARB_texture_env_dot3, GL_APPLE_rgb_422, GL_NV_depth_clamp, GL_ARB_texture_mirrored_repeat, GL_ARB_texture_cube_map, GL_APPLE_element_array, GL_ATI_texture_float, GL_ARB_window_pos, GL_ARB_sync, GL_ARB_vertex_buffer_object, GL_APPLE_texture_range, GL_NV_conditional_render, GL_EXT_stencil_two_side, GL_ARB_texture_compression, GL_ARB_instanced_arrays, GL_EXT_blend_minmax, GL_ARB_texture_border_clamp, GL_EXT_draw_buffers2, GL_ARB_shading_language_100, GL_EXT_blend_equation_separate, GL_ARB_vertex_blend, GL_EXT_blend_subtract, GL_EXT_packed_float, GL_APPLE_aux_depth_stencil, GL_APPLE_row_bytes, GL_NV_light_max_exponent, GL_EXT_abgr, GL_EXT_texture_filter_anisotropic, GL_ARB_vertex_array_bgra, GL_ARB_draw_buffers, GL_ARB_transpose_matrix, GL_ARB_color_buffer_float, GL_EXT_gpu_program_parameters, GL_APPLE_client_storage, GL_ARB_texture_non_power_of_two, GL_ARB_multitexture, GL_EXT_gpu_shader4, GL_APPLE_flush_render, GL_ARB_framebuffer_object, GL_APPLE_vertex_program_evaluators, GL_APPLE_transform_hint, GL_EXT_texture_compression_s3tc, GL_APPLE_flush_buffer_range, GL_EXT_texture_integer, GL_SGIS_texture_edge_clamp, GL_NV_fog_distance, GL_ARB_occlusion_query, GL_ARB_fragment_shader, GL_ARB_texture_rg, GL_ARB_fragment_program, GL_ARB_seamless_cube_map, GL_ARB_shader_objects, GL_EXT_draw_range_elements, GL_APPLE_vertex_array_object, GL_ARB_depth_texture, GL_EXT_texture_sRGB, GL_ARB_half_float_vertex, GL_APPLE_vertex_array_range, GL_ARB_shadow, GL_EXT_multi_draw_arrays, GL_ARB_half_float_pixel, GL_APPLE_packed_pixels, GL_ARB_point_parameters, GL_EXT_debug_marker, GL_EXT_texture_sRGB_decode, GL_EXT_clip_volume_hint, GL_SGIS_texture_lod, GL_EXT_fog_coord, GL_EXT_texture_shared_exponent, GL_ATI_texture_mirror_once, GL_APPLE_float_pixels, GL_EXT_framebuffer_multisample, GL_ARB_depth_buffer_float, GL_ARB_draw_instanced
10:16:28.311 [rendering.opengl.shader.support] -[OOOpenGLExtensionManager reset] (OOOpenGLExtensionManager.m:256): Shaders are supported.
10:16:28.451 [dataCache.rebuild] -[OOCacheManager(Private) loadCache] (OOCacheManager.m:353): Data cache version (1.90) does not match Oolite version (1.91), rebuilding cache.
10:16:28.460 [plist.parse.failed] OOPropertyListFromData (OOPListParsing.m:72): Failed to parse /Users/accountname/Library/Application Support/Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz/manifest.plist as a property list.
Unexpected character { at line 1
10:16:28.460 [oxp.noManifest] +[ResourceManager checkPotentialPath::] (ResourceManager.m:611): OXZ /Users/accountname/Library/Application Support/Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz has no manifest.plist
10:16:28.461 [searchPaths.dumpAll] +[ResourceManager logPaths] (ResourceManager.m:2240): Resource paths:
/var/folders/6s/ysb64pns7r3472gl73j4zsnc0000gn/T/AppTranslocation/FEF3D830-6DC6-44E0-A600-654C730AFC1E/d/Oolite 1.91.app/Contents/Resources
~/Library/Application Support/Oolite/Managed AddOns
~/Library/Application Support/Oolite/AddOns
10:16:28.480 [shipData.load.begin] +[OOShipRegistry(Singleton) allocWithZone:] (OOShipRegistry.m:1698): Loading ship data.
10:16:29.195 [startup.complete] -[GameController applicationDidFinishLaunching:] (GameController.m:269): ========== Loading complete in 1.23 seconds. ==========
10:16:28.460 [plist.parse.failed] OOPropertyListFromData (OOPListParsing.m:72): Failed to parse ... Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz/manifest.plist as a property list.
Unexpected character { at line 1
10:16:28.460 [oxp.noManifest] +[ResourceManager checkPotentialPath::] (ResourceManager.m:611): OXZ ... Oolite/Managed AddOns/SaveInFlight-1.0.0.oxz has no manifest.plist
Unexpected character { at line 1 is the standard utterly uninformative AppleMac message indicating an error somewhere in syntax
When I run plutil inside the AppleMac Terminal programme (and drop the manifest.plist onto it) I get this:
... % plutil ... Dybal.SaveInFlight/manifest.plist
2022-09-13 10:22:46.797 plutil[97789:939029] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 16. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
... Dybal.SaveInFlight/manifest.plist: Unexpected character { at line 1
This manifest.plist seems to work:
Code: Select all
{
identifier = "oolite.oxp.dybal.SaveInFlight";
required_oolite_version = "1.81";
title = "Save In Flight";
version = "1.0.0";
author = "Dybal";
category = "Miscellaneous";
description = "Allows the player to save the game while in flight (must be stopped with nothing in scanner range)";
license = "CC-BY-NC-SA 4.0";
optional_oxps = (
{
identifier = "oolite.oxp.Svengali.BGS";
description = "BackgroundSet - effects, ambient sounds and images.";
}
);
}
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- 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: Save In Flight OXP v1.0.0
Well, the cost of living has gone up recently...
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: Save In Flight OXP v1.0.0
Still pretty cheap considering that the journey to the end of the universe could take a while.
BTW do you have any opinion regarding this topic: viewtopic.php?f=3&p=287132#p287132
Scars remind us where we've been. They don't have to dictate where we're going.
Re: Save In Flight OXP v1.0.0
Since I never had a passenger berth installed, I never even saw a taxi contract... I looked at the Taxi Galactica OXP code and its contract creation only refers to the system, presumably the main station, so any contract to deliver a passenger to an specific in-system station must come from somewhere else...
Do you know who created that contract? Perhaps the code responsible looks for script_info to restrict a station from its possible destinations...
Re: Save In Flight OXP v1.0.0
Probably https://wiki.alioth.net/index.php/In-System_Taxi
Code: Select all
//fare, based on distance
this.$fare = function(distance) {
return Math.floor(5 + 0.000005 * distance); //5 cr + 0.5 cr/100 km
}
//find suitable stations
this.$listOfStations = function() {
function $isAllowed(entity) {
if (entity.scanClass == "CLASS_STATION") {
//excludes that have scanClass CLASS_STATION
if (entity.hasRole("gates_jumpGate")) return false;
if (entity.hasRole("fuelStation_satellite")) return false;
if (entity.hasRole("fuelStation_station")) return false;
if (entity.hasRole("jaguar_company_base")) return false;
return true;
}
if (entity.isStation) {
//includes that have isStation but not scanClass CLASS_STATION
if (entity.hasRole("liners_liner")) return true;
if (entity.hasRole("casinoship")) return true;
if (entity.hasRole("random_hits_any_spacebar")) return true;
}
if (entity.isPlanet && entity.displayName != null) {
//planetfall && planetary compass
if (!entity.isSun && !entity.hasOwnProperty("solarGasGiant") && !entity.hasOwnProperty("isGasGiant") && !entity.hasOwnProperty("PFNoLand") && !entity.hasOwnProperty("PFNoLandQuiet") && player.ship.equipmentStatus("EQ_PLANETFALL") == "EQUIPMENT_OK") return true;
}
return false;
}
return system.filteredEntities(this, $isAllowed);
}
//create new in-flight offers
this.$taxiOffer = function() {
if (system.isInterstellarSpace) return;//sanity check;
var listOfStations = this.$listOfStations();
var probability = 0.05 * listOfStations.length; //0.05 * number of stations => 0.10 for 2 stations ... 1 for 20 stations
if (Math.random() < probability && listOfStations.length > 1) {
var to = listOfStations.splice(Math.floor(Math.random() * listOfStations.length), 1)[0];
var from = to;
var found = false;
while (listOfStations.length > 0 && !found) {//select suitable pickup point
from = listOfStations.splice(Math.floor(Math.random() * listOfStations.length), 1)[0];
if (player.ship.position.distanceTo(from) < this.$maxDistance)
found = true;
}
if (!found) return;//no suitable pickup points
if (to.isPlanet && from.isPlanet)
var distance = from.position.distanceTo(to) - to.radius - from.radius;
else if (to.isPlanet)
var distance = from.position.distanceTo(to) - to.radius;
else if (from.isPlanet)
var distance = from.position.distanceTo(to) - from.radius;
else
var distance = from.position.distanceTo(to);
var baseTime = 0.0002 * distance + 1200; //20 secs per 100 km + 20 mins for reach, launch and incidents.
var time = clock.seconds + baseTime;
var fee = this.$fare(distance);
var name = global.randomName() +" "+ global.randomName();
this.$commsMessage("Name: "+name+"\nFrom: "+from.displayName + "\nTo: " + to.displayName + "\nTime: "+ Math.floor((time - clock.seconds)/60) +" minutes\nBase fare: " + formatCredits(fee, true, true) + "\nAccept contract in 60 seconds");
this.$removeOfferTimer();
this.$offerTimer = new Timer(this, function(){this.$currentOffer = [0];}, 60);//offer ends in 60 secs
//time contract, so it can be removed if deadline is met before picking the passenger up.
this.$removeContractTimer();
this.$contractTimer = new Timer(this, this.$endContract, time - clock.seconds);
this.$currentOffer = [1, from, to, time, fee, name, system.ID, baseTime];
}
}
Re: Save In Flight OXP v1.0.0
Is it possible to make this work in witch space?
It would be nice to be able to interrupt a long Thargoid scrap mission other than just pausing it.
It would be nice to be able to interrupt a long Thargoid scrap mission other than just pausing it.
- phkb
- 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: Save In Flight OXP v1.0.0
Probably not easily, I would think. I don’t think it’s possible to start a game in interstellar space.
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Save In Flight OXP v1.0.0
Would this be a useful tweak for the vanilla game code? I just tried saving at the Tionisla Reporter station and discovered - as you said - that I couldn't.
For my game at the moment it makes little difference. But it would enhance possibilities for future missions - and Mr Flibble has shown that others have a need.
Edited to add: Ditto at Avernus!
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- 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: Save In Flight OXP v1.0.0
Not sure I’d categorise this as a “tweak”. Even without looking at the code, my feeling is it would be a right pita to get working right, lots of places you would potentially have to adjust to cope with there not being a “system” when you start the game, to say nothing about the impact on OXPs. It’s not out of the question, just that I think there are much bigger fish to fry before talking this one!