Progress

General discussion for players of Oolite.

Moderators: winston, another_commander

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 »

All beep, boop and click sounds now go via customsounds.plist, with quite a few different keys, allowing for more varied/specific sounds in OXPs. (The curious can view the current version here.)

Setting the player’s target from JavaScript now locks on ident or a missile, with UI feedback.

another_commander has traced one probable source of memory overconsumption (not an actual leak, just way too many ships being generated).
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 »

Oh yes, the ol’ progress thread.

In addition to the boops, beeps and clicks mentioned above, quite a lot of other sounds – most, in fact, now go through customsounds.plist. Someone should check it out. Together with the new JavaScript music stuff in 1.71 (not properly documented yet, but outlined here) it’s a good time to be updating custom sounds OXPs.

Yesterday I checked in a fix for the bug which was messing up sun sizes. However, there’s now a second, not obviously related bug causing coronas not to be drawn.

I’ve revamped the processing of shipdata.plist, shipyard.plist and demoships.plist into a unified model, although it hasn’t been adopted fully (in particular, the shipyard still uses the old code). The effects of the changes are:
  • Filtering out of broken ships. Ships with a like_ship entry referring to a non-existent ship, or cycles of like_ship references, are removed. So are shipyard entries for ships that don’t exist (which means that Lestradae’s hack will actually work properly). Log messages are generated for ships filtered out in these contexts, but the shipyard one will be hidden by default in 1.72 because of Realistic Shipyards – but see below.
  • Memory usage and performance are improved. (For the geeks: random ship selection is now O(log n) instead of O(n) (for n = number of ship types with a given role) for the common case, but degenerates to O(n²) when a conditions check fails.)
  • New plists shipdata-overrides.plist and shipyard-overrides.plist can be used to replace individual properties in shipdata and shipyard, respectively. shipdata-overrides.plist should be useful for localization OXPs to set ship names without overriding other attributes. The most obvious use for shipyard-overrides.plist is a leaner implementation of Realistic Shipyards. Override entries for ships that are not in shipdata/shipyard will be ignored.
Note to Lestradae: version 1.73 and later will log warnings for shipyard.plist entries which don’t have corresponding shipdata.plist entries. The way to avoid this is to switch to shipyard-overrides.plist when 1.72 comes out.

Example of using shipdata-overrides.plist for localization:

Code: Select all

{
    // Localize built-in ships
    "alloy" = { display_name = "Frammento di Metallo"; };
    "asteroid" = { display_name = "Asteroide"; };
    // ...etc...
    
    // Localize OXP ships. Information for ships that are not installed will
    // be discarded by Oolite at startup.
    "python-cruiser" = { display_name = "Python Classe Incrociatore"; };
    // Note: display_name is not inherited through like_ship.
    // (This is not related to shipdata-overrides.plist, but worth noting anyway.)
    "python-cruiser-player" = { display_name = "Python Classe Incrociatore"; };
    // ...etc...
}
It would also be possible to use to, say, retexture ships using shipdata-overrides.plist by adding/changing their materials dictionary. However, it is not possible to override part of the materials dictionary, or any other dictionary or array within a shipdata entry. This is a feature, not a bug; if you could do partial overrides, interactions between different overrides would become to complex.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Hi Ahruman,

good news for me! :)
Filtering out ... references, are removed ... shipyard entries for ships that don’t exist (which means that Lestradae’s hack will actually work properly).
If I understand that correctly, will that create a new opportunity for a Realistic Shipyards Strict Version (one without ships of its own in, i.e. no shipdata.plist, that only rewrites prices & TLs of whatever ship oxps are installed)?

If this becomes possible without the old problems (many stderr reports, empty shipyards), I`ll add such an alternative strict version again to the download options.
Note to Lestradae: version 1.73 and later will log warnings for shipyard.plist entries which don’t have corresponding shipdata.plist entries. The way to avoid this is to switch to shipyard-overrides.plist when 1.72 comes out.
Does this mean that all ships data from the shipyard.plist that have no correspondence in the shipdata.plist of the Realistic Shipyards V3.01 OXP itself would have to be moved to a new shipyard-overrides.plist, while for a Strict Version (no shipdata.plist at all) the shipyard.plist would simply have to be renamed to shipyard-overrides.plist?

Or is it more complicated than that?

When answering, please take into consideration my limited understanding of scripting :oops:

Cheers, all sounding good! 8)

L
User avatar
nijineko
---- E L I T E ----
---- E L I T E ----
Posts: 353
Joined: Wed Jul 04, 2007 3:37 pm
Location: two strange quarks short of a graviton....
Contact:

Post by nijineko »

congrats on some serious improvements! =D
arukibito ga michi wo erabu no ka, michi ga arukibito wo erabu no deshou ka?

Image
Play games. Win Amazon gift cards! Brag. Repeat.
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 »

In 1.72, the Entity.call() function will only be available when the debug OXP is installed.
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 »

System.setSunNova() will be deprecated in favour of Sun.goNova() and related methods and properties.
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 »

Rewrote argument validation and error handling in every single JavaScript function to be more consistent and less wrong. This took a while…
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 »

Fixed a number of bugs in the new ship registry system, in particular stuff related to like_ships handling. PAGroove_Stations 1.2.1 now works with the trunk version, but generates three error messages on first launch or when rebuilding the cache. The new is_template property can be used to indicate that a shipdata.plist entry is intended only to be used as a template for like_ships, which suppresses the error messages. (Such templates are completely removed from the ship registry after like_ship relationships are resolved.)

Also improved robustness and error messages when failing to set up a station properly.
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 »

@Ahruman

But after the generated error messages it works I assume? Great work btw developing this game 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
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

pagroove wrote:
But after the generated error messages it works I assume?
Indeed. The “problem” ships are removed from the registry, but after like_ship relationships have been “flattened”, so they’re not needed any more. Exactly the same happens with is_template, only without the error message.
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 »

Equipment restrictions are now applied when adding/awarding equipment, not just when shopping. Added new restrictions requires_free_passenger_berth, requires_full_fuel and requires_non_full_fuel, which are probably not very useful except that two of them are used for EQ_FUEL and EQ_PASSENGER_BERTH_REMOVAL. Awarding a damaged equipment item now removes any working version of the same equipment, instead of trying to remove EQ_FOO_DAMAGED_DAMAGED.
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 »

Shipyard now uses the “new” ship registry stuff. Woohoo, etc. Shouldn’t make a noticeable difference, except that shipyard-overrides.plist now works.

Note to localizers: "equipment-not-available" = " (N/A)" has been replaced with "equipment-@-not-available" = "%@ (N/A)".
User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Post by Cmdr. Maegil »

Ahruman wrote:
Shipyard now uses the “new” ship registry stuff. Woohoo, etc. Shouldn’t make a noticeable difference, except that shipyard-overrides.plist now works.
Does this mean I can make the missile variants OXP work?
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
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 »

Cmdr. Maegil wrote:
Does this mean I can make the missile variants OXP work?
Dunno. What does it do? :-)

(Oh, and by “now works” I meant “should now work”, I haven’t tested it yet.)
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Post by Lestradae »

Ahruman wrote:
shipyard-overrides.plist now works.
:D
Post Reply