Page 2 of 2

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

Posted: Tue Feb 12, 2013 11:49 am
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:

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

Posted: Tue Feb 12, 2013 9:51 pm
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:

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

Posted: Tue Feb 12, 2013 10:00 pm
by Thargoid
All ships do - it's the unique key in shipdata.plist that defines it.

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

Posted: Tue Feb 12, 2013 10:28 pm
by Tricky
Isn't ship.dataKey v1.77+ only?

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

Posted: Tue Feb 12, 2013 10:31 pm
by Thargoid
Yes - it's in the current 1.77 test release.

alpha version 0.0.0 now available for downloads - please tes

Posted: Fri Feb 15, 2013 11:43 am
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! :)

Bugfix 0.0.1

Posted: Fri Feb 15, 2013 7:22 pm
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

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

Posted: Fri Feb 15, 2013 7:53 pm
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.

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

Posted: Fri Feb 15, 2013 8:17 pm
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

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

Posted: Sun Feb 17, 2013 5:27 pm
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

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

Posted: Sun Feb 17, 2013 8:20 pm
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:

new version 0.0.3 available

Posted: Mon Feb 25, 2013 1:36 am
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

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

Posted: Mon Mar 04, 2013 1:56 am
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!

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

Posted: Mon Mar 04, 2013 10:02 am
by Diziet Sma
Back already? I rather expected you to be busy Comet-ing for a few days weeks yet! :lol: :wink: