Deciphering Javascipt/Legacy Script

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

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
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:

Deciphering Javascipt/Legacy Script

Post by Cholmondely »

Whilst the Wiki does have some pages on coding and writing OXPs, I find most of it incomprehensible.

For example, trying to decipher this:

Code: Select all

"use strict";

this.name = "wildships-market";
this.author = "spara";

this.$originalResearch = {
	"food" : [0, 0, 17, -2, -2, 2, 1, 1, 0],
	"textiles" : [0, 0, 18, -1, -1, 3, 3, 3, 0],
	"radioactives" : [0, 0, 85, -3, -3, 5, 7, 7, 0],
	"slaves" : [0, 0, 40, -5, -5, 0, 31, 31, 0],
	"liquor_wines" : [0, 0, 90, -5, -5, 251, 15, 15, 0],
	"luxuries" : [0, 0, 170, 8, 8, 10, 3, 3, 0],
	"narcotics" : [0, 0, 245, 29, 8, 0, 10, 120, 0],
	"computers" : [0, 0, 170, 14, 14, 60, 3, 3, 0],
	"machinery" : [0, 0, 130, 6, 6, 40, 7, 7, 0],
	"alloys" : [0, 0, 85, 1, 1, 30, 31, 31, 0],
	"firearms" : [0, 0, 85, 13, 13, 5, 7, 7, 0],
	"furs" : [0, 0, 80, -9, -9, 100, 63, 63, 0],
	"minerals" : [0, 0, 32, -1, -1, 60, 3, 3, 0],
	"gold" : [0, 0, 105, -1, -1, 66, 7, 7, 1],
	"platinum" : [0, 0, 190, -2, -2, 55, 31, 31, 1],
	"gem_stones" : [0, 0, 55, -1, -1, 250, 15, 15, 2],
	"alien_items" : [0, 0, 95, 15, 0, 0, 7, 0, 0]
}
This is the code for the market on one of the Kiota stations.

1) What does "use strict"; mean? Why is it there?

2) "food" : [0, 0, 17, -2, -2, 2, 1, 1, 0],
What do each of these numbers actually DO? There are 9 of them!

I've been unable to find explanations for these questions on the wiki, or scouring through this BB!
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?
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Re: Deciphering Javascipt/Legacy Script

Post by Cmdr James »

Unless you are planning to learn javascript, you can just accept that "well written javascript generaly has use strict at the top". It is more or less a signal to the javascript system that the javascript contained has to be valid.

The commodities info is detailed here: http://wiki.alioth.net/index.php/Commodities.plist
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Deciphering Javascipt/Legacy Script

Post by montana05 »

Cholmondely wrote: Fri Apr 02, 2021 1:50 pm
1) What does "use strict"; mean? Why is it there?
Regarding "use strict" I hope this will help you a bit:

https://www.w3schools.com/js/js_strict.asp
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Archivist
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: Deciphering Javascipt/Legacy Script

Post by Cholmondely »

Cmdr James wrote: Fri Apr 02, 2021 6:47 pm
The commodities info is detailed here: http://wiki.alioth.net/index.php/Commodities.plist
Yes, I looked at that page. That's why I started this thread. I fail to understand how it answers my second question above. If I had decades of experience in programming, I'm sure it would be obvious to me. But I don't.

And there is nothing on the page that looks like : "food" : [0, 0, 17, -2, -2, 2, 1, 1, 0],

so I don't even know if it is talking about the same thing. Is it?
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?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Deciphering Javascipt/Legacy Script

Post by hiran »

Cholmondely wrote: Sun Apr 04, 2021 8:06 pm
Cmdr James wrote: Fri Apr 02, 2021 6:47 pm
The commodities info is detailed here: http://wiki.alioth.net/index.php/Commodities.plist
Yes, I looked at that page. That's why I started this thread. I fail to understand how it answers my second question above. If I had decades of experience in programming, I'm sure it would be obvious to me. But I don't.

And there is nothing on the page that looks like : "food" : [0, 0, 17, -2, -2, 2, 1, 1, 0],

so I don't even know if it is talking about the same thing. Is it?
I found this part helpful:
Each market is an array of 17 commodities, each in itself an array of 10 items:

1) The name of the commodity
2) Units available at a market (this is calculated at each marketplace)
3) Price per unit at a market (this is calculated at each marketplace)
4) The base price per unit MARKET_BASE_PRICE
5) An adjustment to price based on the economy MARKET_ECO_ADJUST_PRICE
6) An adjustment to units availble based on the economy MARKET_ECO_ADJUST_QUANTITY
7) The base quantity available to a market MARKET_BASE_QUANTITY
8) A 'mask' which defines how the price varies MARKET_MASK_PRICE
9) A 'mask' which defines how the quantity varies MARKET_MASK_QUANTITY
10) The unit of quantity (0 == tons, 1 == kilos, 2 == grams)
That means you should be looking at the commodity 'food', and it should be an array of 10 values as listed on that page.
The fact that you only have 9 numbers might mean either that the key 'food' is already the first value, or that the last value is optional and therefore should have a default value.

Also the page does not mention all the values/their usage, such as the masks.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
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: Deciphering Javascipt/Legacy Script

Post by Cholmondely »

hiran wrote: Sun Apr 04, 2021 9:30 pm
Cholmondely wrote: Sun Apr 04, 2021 8:06 pm
Cmdr James wrote: Fri Apr 02, 2021 6:47 pm
The commodities info is detailed here: http://wiki.alioth.net/index.php/Commodities.plist
Yes, I looked at that page. That's why I started this thread. I fail to understand how it answers my second question above. If I had decades of experience in programming, I'm sure it would be obvious to me. But I don't.

And there is nothing on the page that looks like : "food" : [0, 0, 17, -2, -2, 2, 1, 1, 0],

so I don't even know if it is talking about the same thing. Is it?
I found this part helpful:
Each market is an array of 17 commodities, each in itself an array of 10 items:

1) The name of the commodity
2) Units available at a market (this is calculated at each marketplace)
3) Price per unit at a market (this is calculated at each marketplace)
4) The base price per unit MARKET_BASE_PRICE
5) An adjustment to price based on the economy MARKET_ECO_ADJUST_PRICE
6) An adjustment to units availble based on the economy MARKET_ECO_ADJUST_QUANTITY
7) The base quantity available to a market MARKET_BASE_QUANTITY
8) A 'mask' which defines how the price varies MARKET_MASK_PRICE
9) A 'mask' which defines how the quantity varies MARKET_MASK_QUANTITY
10) The unit of quantity (0 == tons, 1 == kilos, 2 == grams)
That means you should be looking at the commodity 'food', and it should be an array of 10 values as listed on that page.
The fact that you only have 9 numbers might mean either that the key 'food' is already the first value, or that the last value is optional and therefore should have a default value.

Also the page does not mention all the values/their usage, such as the masks.
Righty-ho!

So for: "food" : [0, 0, 17, -2, -2, 2, 1, 1, 0],

2) there are 0 Units available at a market (this is calculated at each marketplace)
3) Price per unit at a market (this is calculated at each marketplace) is 0cr
4) The base price per unit MARKET_BASE_PRICE is 17
5) adjustment to price based on the economy MARKET_ECO_ADJUST_PRICE is -2
6) adjustment to units available based on the economy MARKET_ECO_ADJUST_QUANTITY is -2
7) The base quantity available to a market MARKET_BASE_QUANTITY is 2
8) A 'mask' which defines how the price varies MARKET_MASK_PRICE is 1
9) A 'mask' which defines how the quantity varies MARKET_MASK_QUANTITY is 1
10) The unit of quantity (0 == tons, 1 == kilos, 2 == grams)[/quote] is tons

The only bit which makes sense to me is #10.

#2: Possibly there is no food for sale on a research Kiota station,

but:

#3: The price per unit of food is never 0cr.
#4: Neither is the basic price per unit 17cr.

And as regards the rest of it, my command of Ancient Chaldaean just isn't up to it, I'm afraid!
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?
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Deciphering Javascipt/Legacy Script

Post by Nite Owl »

Near the bottom of that commodities.plist page is a link to download the OOLITE COMMODITY CALCULATOR by Frame. It is an HTML page that allows you to input your own values for all of the numbers that are confusing you. It will then calculate the results and show them to you. Play around with it for awhile and it may become clearer how this out of date system works and what the numbers actually do. The formulas shown on the original commodities.plist page can be a bit confusing to those of us with a bit of a math deficiency, never was my best subject.

Note that as of Oolite v1.82 this method of calculating commodity prices and quantities has been depreciated in favor of an even more heavily math based system by Cim that gets put into a dockable's shipdata.plist. This old method is still usable however via a clever bit of scripting by Spara. Links to THAT SCRIPTING can also be found near the bottom of the commodities.plist page.

This old method makes sense to me after playing around with the Commodity Calculator. The new method uses some numbers whose origins remain unclear. See THIS POST for unanswered examples of what remains unclear. Good Luck.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Deciphering Javascipt/Legacy Script

Post by hiran »

Douglas Adams in The Hitchhiker's Guide To The Galaxy wrote:
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
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: Deciphering Javascipt/Legacy Script

Post by Cholmondely »

Quick Query:

The Mincepie's stated Tech Level of 99 (available on 100+) means What in game terms?

I guessed it as TL1 (it's a mince pie, after all...) - but what does the bizarre jargon connote?
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?
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: Deciphering Javascipt/Legacy Script

Post by phkb »

Cholmondely wrote: Fri Jun 18, 2021 9:16 am
The Mincepie's stated Tech Level of 99 (available on 100+) means What in game terms?
It means it won't ever be offered for sale, and usually means the OXP author has some other method of gifting it to the player.
User avatar
Cholmondely
Archivist
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: Deciphering Javascipt/Legacy Script

Post by Cholmondely »

phkb wrote: Fri Jun 18, 2021 9:32 am
Cholmondely wrote: Fri Jun 18, 2021 9:16 am
The Mincepie's stated Tech Level of 99 (available on 100+) means What in game terms?
It means it won't ever be offered for sale, and usually means the OXP author has some other method of gifting it to the player.
Ummm...

Mince pies work like mines so you need space in your missile rack to buy one (using the F3 page for equipment purchases). Like Santa, mince pies are seasonal ("time of year" limited).

... Ooops!

Araser wrote the oxp & this blurb back in 2009... did things work differently back then?
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?
User avatar
Cholmondely
Archivist
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: Deciphering Javascipt/Legacy Script

Post by Cholmondely »

It seems that the old commodities.plist still works (when it has actually been included in an .oxp!).

When I "fixed" the Galactic Navy OXP, I found that I was able to sell stuff to Isinor's SecCom station - and that their prices made sense (although they had absolutely nothing for sale, not even a bean!).

But when I visited a local Sothis (not Spara's TC, but Dizzy's 2017 market-fixed variant) the 5 TC of food I'd just sold to the Navy were sitting in the market there at the Sothis, staring right back at me. And there was nothing else for sale on the market (identical to the SecCom market when I left it).

Does anybody understand what is going on?
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?
User avatar
Cholmondely
Archivist
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: Deciphering Javascipt/Legacy Script

Post by Cholmondely »

I've just put together a new meta-oxp and loaded it into the Expansions Manager: Addons for Beginners (Vital Statistics)

Needless to say, it does not work on my Mac!

When I tried to download it from the Expansions Manger, this appeared in my latest.log:

Code: Select all

Opening log for Oolite version 1.90 (x86-64) under Mac OS X Version 10.15.3 (Build 19D2064) at 2021-08-26 02:45:06 +0000.
Machine type: MacBookAir9,1, 8192 MiB memory, 2 (4 logical) x x86 (family 0x38435547) @ 1100 MHz.
Build options: OpenAL, new planets.

Note that the contents of the log file can be adjusted by editing logcontrol.plist.

03:45:06.510 [dataCache.rebuild.datesChanged]: Cache is stale (modification dates have changed). Rebuilding from scratch.
03:45:06.855 [joystick.error.init]: Cannot open HID manager; joystick support will not function.
03:45:06.856 [rendering.opengl.version]: 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".
03:45:06.856 [rendering.opengl.extensions]: 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
03:45:06.861 [rendering.opengl.shader.support]: Shaders are supported.
03:45:06.873 [dataCache.rebuild.datesChanged]: Cache is stale (modification dates have changed). Rebuilding from scratch.
03:45:06.873 [searchPaths.dumpAll]: Resource paths: 
    ~/Desktop/Oolite/  Oolite 1.90.app/Contents/Resources
    ~/Library/Application Support/Oolite/Managed AddOns
    ~/Library/Application Support/Oolite/AddOns
03:45:06.883 [shipData.load.begin]: Loading ship data.
03:45:07.369 [startup.complete]: ========== Loading complete in 0.79 seconds. ==========
03:45:35.047 [oxz.manager.error]: Downloaded OXZ does not contain a manifest.plist, has been left in /Users/accountname/Library/Caches/org.aegidian.oolite/Oolite-download.oxz
03:46:02.742 [oxz.manager.error]: Downloaded OXZ does not contain a manifest.plist, has been left in /Users/accountname/Library/Caches/org.aegidian.oolite/Oolite-download.oxz
03:46:12.550 [exit.context]: Exiting: Exit Game selected on start screen.

Closing log at 2021-08-26 02:46:12 +0000.
When I started up Oolite with just this .oxp in it, I got this:

Code: Select all

Opening log for Oolite version 1.90 (x86-64) under Mac OS X Version 10.15.3 (Build 19D2064) at 2021-08-26 00:42:30 +0000.
Machine type: MacBookAir9,1, 8192 MiB memory, 2 (4 logical) x x86 (family 0x38435547) @ 1100 MHz.
Build options: OpenAL, new planets.

Note that the contents of the log file can be adjusted by editing logcontrol.plist.

01:42:30.982 [oxp.requirementMissing]: OXP oolite.oxp.Cholmondeley.Addons_for_Beginners_(Vital_Statistics).oxz had unmet requirements and was removed from the loading list
01:42:31.001 [dataCache.rebuild.pathsChanged]: Cache is stale (search paths have changed). Rebuilding from scratch.
01:42:31.382 [joystick.error.init]: Cannot open HID manager; joystick support will not function.
01:42:31.382 [rendering.opengl.version]: 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".
01:42:31.382 [rendering.opengl.extensions]: 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
01:42:31.392 [rendering.opengl.shader.support]: Shaders are supported.
01:42:31.512 [oxp.requirementMissing]: OXP oolite.oxp.Cholmondeley.Addons_for_Beginners_(Vital_Statistics).oxz had unmet requirements and was removed from the loading list
01:42:31.512 [dataCache.rebuild.pathsChanged]: Cache is stale (search paths have changed). Rebuilding from scratch.
01:42:31.513 [searchPaths.dumpAll]: Resource paths: 
    ~/Desktop/Oolite/  Oolite 1.90.app/Contents/Resources
    ~/Library/Application Support/Oolite/Managed AddOns
    ~/Library/Application Support/Oolite/AddOns
01:42:31.523 [shipData.load.begin]: Loading ship data.
01:42:32.123 [startup.complete]: ========== Loading complete in 1.00 seconds. ==========
01:42:41.916 [exit.context]: Exiting: Exit Game selected on start screen.

Closing log at 2021-08-26 00:42:41 +0000.
In essence it is a cut-and paste job from Norby's AddOns. And it does have a manifest.plist, honest!

Help!
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?
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: Deciphering Javascipt/Legacy Script

Post by phkb »

It appears the link you've put into the download manager is to the wiki file page, not to the actual download.

You currently have:

Code: Select all

http://wiki.alioth.net/index.php/File:Oolite.oxp.Cholmondeley.Addons_for_Beginners_(Vital_Statistics).oxz
You should actually have:

Code: Select all

http://wiki.alioth.net/img_auth.php/9/99/Oolite.oxp.Cholmondeley.Addons_for_Beginners_(Vital_Statistics).oxz
(Which I found by following the first link, and then hovering over the file and copying that link)
cag
Deadly
Deadly
Posts: 202
Joined: Fri Mar 17, 2017 1:49 am

Re: Deciphering Javascipt/Legacy Script

Post by cag »

When I tried to download it from the Expansions Manger on Windows 10, I got the same error:

Code: Select all

23:17:12.897 [oxz.manager.error]: Downloaded OXZ does not contain a manifest.plist, has been left in D:\Oolite/oolite.app/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.oxz
On http://www.oolite.org/oxps/, both links are broken. The one under 'Title' gets

Code: Select all

Error 404: Page not found
while the one for download goes to the wiki's 'File:' page for your oxp where I could download it.

However, the "download_url" line in your manifest contains url to download Norby's Addons_for_Beginners.oxz

Code: Select all

	"download_url" = "http://wiki.alioth.net/img_auth.php/f/f7/Addons_for_Beginners.oxz";
not yours

Code: Select all

	"download_url" = "http://wiki.alioth.net/img_auth.php/9/99/Oolite.oxp.Cholmondeley.Addons_for_Beginners_%28Vital_Statistics%29.oxz";
Once the change was made, I got

Code: Select all

23:42:39.775 [oxp.requirementMissing]: OXP Oolite.oxp.Cholmondeley.Addons_for_Beginners_(Vital_Statistics).oxz had unmet requirements and was removed from the loading list
ie. it's complaining I don't have "Ship's library with ship's manual" installed. I imagine the Expansions Manger will take care of that, but of course, I cannot test that. So fix the links and that one line in the manifest and try again.
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
Post Reply