[WIP] External Repair System (Subentity Repair System) 0.0.4

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

Moderators: another_commander, winston

User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [WIP] External Repair System (Subentity Repair System)

Post by GGShinobi »

cim wrote:
GGShinobi wrote:
What would be the best way to identify a ship for the purpose of creating a whitelist? ship.name? :?:
ship.dataKey is probably best.
Thanks, cim!! :mrgreen:
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [WIP] External Repair System (Subentity Repair System)

Post by Diziet Sma »

cim wrote:
GGShinobi wrote:
What would be the best way to identify a ship for the purpose of creating a whitelist? ship.name? :?:
ship.dataKey is probably best.
Well, except for all those older ships (the Falcon springs to mind) that don't have a ship.dataKey. :wink:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: [WIP] External Repair System (Subentity Repair System)

Post by Thargoid »

All ships do - it's the unique key in shipdata.plist that defines it.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: [WIP] External Repair System (Subentity Repair System)

Post by Tricky »

Isn't ship.dataKey v1.77+ only?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: [WIP] External Repair System (Subentity Repair System)

Post by Thargoid »

Yes - it's in the current 1.77 test release.
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

alpha version 0.0.0 now available for downloads - please tes

Post by GGShinobi »

Alpha-Version 0.0.0 is now ready and waiting for fearless testers which are willing to provide me with bug reports and info on (in)compatible OXPs. :P

You can download the alpha-version from my box: GGIndustries_ExternalRepairSystem_0.0.0_2013_02_15.oxp.zip

WARNING: Make a backup of your savegames before using this, just in case. In order to simulate the repair of a single destroyed subentity, this equipment has to first restore them all, and then destroy all but the one that is to be repaired. I don't know yet what side effects this might have.

For this oxp to function, you'll also need GGIndustries' Main Config oxp, but I bundled it into the download anyway. Just extract both oxp's into your Addons-Folder.

It is also compatible with the latest version of OXPConfig, but does work without it, too.

Please note: this is still an alpha-version, which I release now in order to get info and bug reports. The way it works now, it's a cheat which instantly repairs damage to your subentities when you want it. What I'd like you to do is:
  • check if this works with your favorite frangible ship and report back to me whether or not it did (and how)
  • report any bugs you encounter 8)
  • gimme suggestions about what you would like this equipment to do when it's finished
  • gimme feedback in general
More detailed instructions can be found in the readme-files.

Thanks in advance to everybody who is willing to test it! :)
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Bugfix 0.0.1

Post by GGShinobi »

By chance, I just noticed a small bug that prevents the ERS to function properly if one tries to make it compatible with all ships by setting this.$compatibleWithAllShips = true;.
I've uploaded a hotfix, the link is the same:

GGIndustries_ExternalRepairSystem_0.0.1_2013_02_15.oxp.zip
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: [WIP] External Repair System (Subentity Repair System)

Post by Thargoid »

One comment from a quick look at the script - neither player ships nor sub-entities have AIs. Or strictly the player ship will always have oolite-player-AI.plist, with the possible exception of when under the docking computer.

The sub-entities of a ship will work under the AI of the main entity. So basically each overall ship (as a complete entity, main body plus sub-ents) will all run under the AI of the main body entity.

That may help at least simplify the debug readouts in your script, and perhaps a bit more.

Editted to add - also if the equipment could ever come with a ship (as I think you suggest in the readme for OXP ships making it optional) then playerBoughtNewShip may need to be used to set things up like you do on startup.
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [WIP] External Repair System (Subentity Repair System)

Post by GGShinobi »

Thanks Thargoid, that's good to know. Much of what I do is still experimental - for instance, I'm just dumping all data that I thought might be helpful to distinguish a turret from other subentities to the logfile... (I haven't found a better way than to search in subentity.toString() for any occurrence of the string "(turret)" yet).

Know that I know that, I'll stop gathering info on the AI in the next release :)

Edited after reading your edit:
Thanks again, your feedback is very much appreciated!!!
Thargoid wrote:
Editted to add - also if the equipment could ever come with a ship (as I think you suggest in the readme for OXP ships making it optional) then playerBoughtNewShip may need to be used to set things up like you do on startup.
I haven't tested if it works yet, but I hoped the line

Code: Select all

this.$verifyShipERSCompatibility  =  this.playerBoughtNewShip = function(ship)
would do the trick. :wink: I'm curious if it does! :D
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

[WIP] External Repair System (Subentity Repair System) 0.0.2

Post by GGShinobi »

Version 0.0.2 is now available for download. This one is even a little bit "playable"! :)
  • Most important new feature: repairs now cost materials! :D
  • Another important change: significant code cleanup and better structuring
  • Most important feature still missing: repairs still don't cost time and don't cost energy. :?
  • Another important missing feature: when saving and reloading, the ERS forgets everything, so if you had damaged subentities, you'll have to do do another Maintenance Overhaul (again) so that ERS can repair those subentities in the future. I just noticed that by chance, had completely forgotten about that. :roll:
  • Unimportant new features: use of some sound effects 8)
Features and limitations of this alpha version (0.0.2):
  • working: does need materials for repairs
  • limitation: doesn't need any time or energy for repairs yet
  • limitation: many planned configuration options not implemented yet
  • working with limitations: emergency repair (repairs turrets first) (does this very dumb though, also trying to repair an item which already failed before due to lack of materials)
  • working: selective repair
  • TODO: store ERS-data when game is saved!
  • TODO: examine subentity to get estimations on needed time and material
  • TODO: many more which I don't remember right now
Changes from 0.0.1 to 0.0.2:
  • added sound when starting repair (still rudimentary test only)
  • repairs now cost something (exactly as much as calculated) - TODO: examination mode: if repairs cost more than estimated, stop repair and notify player
    if they cost less, notify player, too :) (TODO: only in terms of material, or time also? Hmmmm...)
  • now estimations on expected repair costs (required materials and time) can be done (although times are still unused yet)
  • improved program structure, some code cleanup
Download
you can download the alpha-version from my box: GGIndustries_ExternalRepairSystem_0.0.2_2013_02_17.oxp.zip
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [WIP] External Repair System (Subentity Repair System) 0

Post by GGShinobi »

Oh, I forgot to tell you a "trick" I recently discovered:

If you want to quickly destroy your subentities (who would not want to do this? (for tests, of course)), you can just fly into the atmosphere of a planet and hit the injectors. The ship will heat up (very) fast and the subentities will burn away :)
Just time it carefully, or your ship will burn away, too - what would let you experience how that poor asteroid must have felt that wanted to visit us a few days ago :lol:
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

new version 0.0.3 available

Post by GGShinobi »

A new version is available for download.

// //////////////////////////////////////////////////////////////////////////
// CHANGELOG:
// Changes from 0.0.2 to 0.0.3
// - save/load ERS status with/from savegame
// - made estimations for needed materials more precise in order to make them more useful
// - made time estimation dependent on real time required
//
// Changes from 0.0.1 to 0.0.2
// - added sound when starting repair (still rudimentary test only)
// - repairs now cost something (exactly as much as calculated) - TODO: examination mode: if repairs cost more than estimated, stop repair and notify player
// - if they cost less, notify player, too :) (TODO: only in terms of material, or time also? Hmmmm...)
// - now estimations on expected repair costs (required materials and time) can be done (although times are still unused yet)
// - when repair failed because of insufficent material, auto grant estimation (if enough time has been spent).
// - improved program structure, some code cleanup
//
// Changes from 0.0.0 to 0.0.1
// - resolved a bug that prevented the equipment to work properly if this.$compatibleWithAllShips was set to true
// //////////////////////////////////////////////////////////////////////////


The download link remains the same: GGIndustries_ExternalRepairSystem_0.0.3_2013_02_25.oxp.zip
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: [WIP] External Repair System (Subentity Repair System) 0

Post by GGShinobi »

:x I hoped to release a playable beta version, but certain circumstances (including, but not limited to this incident :wink: ) kept me from working on my OXPs. Since the newest version is significantly better than the version available for download I decided to publish it. It's actually playable, but still has many bugs and is also missing many features.

Download link remains the same: GGIndustries_ExternalRepairSystem_0.0.4_2013_02_27.oxp.zip

Now repairs and damage evaluations take time. Unfortunately, it's not possible yet to pause and later resume them. If for any reason they get aborted, strange unwanted buggy behaviour will occur, probably you have to start repairs again from scratch... but more likely (since the material already got reduced) the next repairs will be done instantly...

Here is the changelog:
// Changes from 0.0.3 to 0.0.4
// - energy and time usage:
// - added timers for repair and energy drain
// - renamed sounds to make them unambigous, and more sounds
// - more efficient sound handling (reuse SoundSources)

From the coomunity, I'd like to get info about ship compatibility. The only ships I've tested it so far are the Falcon S and the Comet, of which the comet proved to be incompatible because her subents weigh really a lot and this makes the repairs unaffordable (both in terms of material and time (800 (or even 8000?) tons of alloys required and it would take forever to repair it)). If more ships are affected I could introduce a cap or change the calculation for required materials and time.

So I'd really appreciate some reports :mrgreen: Also bug reports, of course!
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [WIP] External Repair System (Subentity Repair System) 0

Post by Diziet Sma »

Back already? I rather expected you to be busy Comet-ing for a few days weeks yet! :lol: :wink:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply