Page 5 of 9
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Sun Jun 12, 2011 7:55 am
by Thargoid
In fact if it gets damaged it focusses all efforts to repair itself rather than working on anything else.
It's a trick that it picked up from a Caduceus ship somewhere
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Sun Jun 12, 2011 7:35 pm
by SandJ
I've got a 'fluff' question.
What do the RepairBots use for raw material? That is, if bits of something have been shot off, what do they reconstruct that something from? And what is the mass of this raw material, and where is it kept if not in the cargo hold?
That is, should you need to buy units of "Generic Elemental Repair Matériel" to allow the RepairBots to have something to call upon for their repairs, where a unit of G.E.R.M. contains one tonne of typical everyday stuff such as silicon dioxide, hexamethylenediamine, liquid wurtzite boron nitride, handwavium and Jamesonite. However, it must also contain the very rare items (needed to repair high-tech or obscure add-ons) such as Aqua, Blu-Tak, sticky-tape, parfum and string.
Because repairing items uses up the G.E.R.M.s, they must be replaced. And since the most expensive items are expensive because they are made from rate items, they use up most of the G.E.R.M.s, even though they might only use a few grammes of something obscure, such as the Reconstituted Anhydrous Dihydrogen Monoxide.
So, you need a few tonnes of G.E.R.M.s for the repairbots to work, and expensive items use up lots of them, in proportion to the cost of the item damaged.
Is that of any help?
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Mon Jun 13, 2011 1:48 am
by Wildeblood
SandJ wrote:I've got a 'fluff' question.
What do the RepairBots use for raw material? That is, if bits of something have been shot off, what do they reconstruct that something from? And what is the mass of this raw material, and where is it kept if not in the cargo hold?
That is, should you need to buy units of "Generic Elemental Repair Matériel" to allow the RepairBots to have something to call upon for their repairs, where a unit of G.E.R.M. contains one tonne of typical everyday stuff such as silicon dioxide, hexamethylenediamine, liquid wurtzite boron nitride, handwavium and Jamesonite. However, it must also contain the very rare items (needed to repair high-tech or obscure add-ons) such as Aqua, Blu-Tak, sticky-tape, parfum and string.
Because repairing items uses up the G.E.R.M.s, they must be replaced. And since the most expensive items are expensive because they are made from rate items, they use up most of the G.E.R.M.s, even though they might only use a few grammes of something obscure, such as the Reconstituted Anhydrous Dihydrogen Monoxide.
So, you need a few tonnes of G.E.R.M.s for the repairbots to work, and expensive items use up lots of them, in proportion to the cost of the item damaged.
Is that of any help?
Ice asteroids seem uncommonly common, and I've been told are rich in minerals and complex carbon molecules. They'd probably be useful to reconstitute your "Reconstituted Anhydrous Dihydrogen Monoxide", too.
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Mon Jun 13, 2011 4:58 pm
by Thargoid
Think how much rubbish, fluff, trash and waste accumulates on and around your car. Now think how much bigger your average ship is than your car, plus the fact that you live on your ship.
Now ponder no longer where the 'bots may get their raw materials for conversion from, not to mention the remains of the equipment that they are actually repairing.
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Mon Jun 13, 2011 5:06 pm
by Smivs
Yeuck! You mean I've been repairing my ship with dead skin cells, hair and other un-mentionable dross.
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Mon Jun 13, 2011 5:12 pm
by Thargoid
Just think of it as green recycling. Alien green in this case (or perhaps Soylent green).
Anyway it beats grey goo.
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Mon Jun 13, 2011 5:46 pm
by Smivs
Yeah, well I guess it fits in with the Oolite ethos that the player
is their ship.
Re: RepairBots OXP
Posted: Wed Nov 02, 2011 8:50 pm
by Thargoid
This OXP has been updated to version 2.03, to include a little speed hack optimisation courtesy of Capt. Murphy.
Download from the wiki or box.net as usual (links below).
Re: RepairBots OXP
Posted: Thu Nov 03, 2011 5:47 pm
by Thargoid
And now 2.04, for even better optimisation and speed...
Same linkage applies as above.
Re: RepairBots OXP
Posted: Mon Mar 19, 2012 4:45 pm
by Cmd. Cheyd
Bug found in v2.04:
23:28:42.548 [script.javaScript.exception.badReturnOrYield]: ***** JavaScript exception (repairBots_Repair.js.anon-script): SyntaxError: return not in function
23:28:42.548 [script.javaScript.exception.badReturnOrYield]: ../AddOns/RepairBots 2.04.oxp/Scripts/repairBots_Repair.js, line 29: return;
23:28:42.548 [script.javaScript.load.failed]: ***** Error loading JavaScript script ../AddOns/RepairBots 2.04.oxp/Scripts/repairBots_Repair.js -- compilation failed
Looking at the code, it seems everything after Line 24 (up to line 58) is actually outside the this.repairSystems function:
Code: Select all
this.repairSystems = function()
{
this.playerDamagedList = [];
var equipment = player.ship.equipment;
var listCounter = 0 ; // reset the counter
for(listCounter = 0;listCounter<equipment.length;listCounter++)
{
if(player.ship.equipmentStatus(equipment[listCounter].equipmentKey) !== "EQUIPMENT_DAMAGED")
{ continue; }
var scriptEq = EquipmentInfo.infoForKey(equipment[listCounter].equipmentKey);
if(scriptEq.scriptInfo.thargoidRepairBotChance === undefined
|| isNaN(scriptEq.scriptInfo.thargoidRepairBotChance)
|| (!isNaN(scriptEq.scriptInfo.thargoidRepairBotChance)
&& scriptEq.scriptInfo.thargoidRepairBotChance > 0)
)
{ this.playerDamagedList.push(equipment[listCounter].equipmentKey); } // if it's broke and fixable, add it to the list.
}
}
//********** From here down is outside the function and is 'stand-alone' code basically ************ - Cmd. Cheyd
if(this.playerDamagedList.length == 0)
{
player.consoleMessage("Nothing damaged that the repair bots can fix.", 5);
return;
}
else
{
var damagedEquipment = Math.floor(Math.random() * this.playerDamagedList.length); // pick a random element from the list...
this.fixedItem = this.playerDamagedList[damagedEquipment]; // ...define the item...
this.fixedName = EquipmentInfo.infoForKey(this.fixedItem).name; // define it's screen name
this.fixedTech = EquipmentInfo.infoForKey(this.fixedItem).effectiveTechLevel // tech level of the item
switch(true)
{
case (EquipmentInfo.infoForKey(this.fixedItem).scriptInfo.thargoidRepairBotChance !== undefined && !isNaN(EquipmentInfo.infoForKey(this.fixedItem).scriptInfo.thargoidRepairBotChance)):
{this.fixChance = EquipmentInfo.infoForKey(this.fixedItem).scriptInfo.thargoidRepairBotChance; break;}
case (this.fixedTech < 9): {this.fixChance = 1; break;}
case ((this.fixedTech > 8) && (this.fixedTech < 17)): {this.fixChance = 1 - ((this.fixedTech - 8)/10); break;}
case (this.fixedTech == 99): {this.fixChance = 0.1; break;}
default: {this.fixChance = 0.2; break;}
}
}
if(Math.random() < this.fixChance)
{
this.fixItem();
}
else
{
player.consoleMessage(this.fixedName + " repair attempt has failed.", 5);
}
}
Removing the closing bracket at line 24 (just above my comment) is confirmed to compile correctly, but I did not actually test the script past that.
Re: RepairBots OXP
Posted: Mon Mar 19, 2012 6:16 pm
by Thargoid
Hmm, ok. How the <beep> did that happen?
Anyway fixed version 2.05 uploaded. Thanks for the heads-up. Your edit is correct (and tested).
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Thu Apr 19, 2012 2:43 pm
by SandJ
Smivs wrote:Thargoid, I have used your repairbots for a while now, well actually the self-repair system, and wouldn't want to be without it. It's the only way I can get my (un-official) NEU and cloak fixed.
However, as I now live in an Ooniverse that resembles Armageddon it's been getting plenty of use, and despite the astronomical purchase price, it must have paid for itself several times over.
My point is, to avoid me feeling as though I'm cheating a bit, had you considered adding a feature whereby after so many repairs, a 'refill' or 'recharge' is necessary. For example after 25 repairs have been made (or better still 50 'small' fixes or ten 'big' fixes), a top-up is needed, say costing another 10 000Cr.
This would add a nice feature (I think) and would certainly salve my conscience.
I had this installed for ages and I agree with Smivs and I feel this unbalances the game hugely. I think the repair system is too cheap, much too fast and should be an ongoing drain on resources: energy, financial and material.
Potential suggestions:
- it drains energy while running, so that shields recharge more slowly (like the Ore processor);
- it starts out with 100 charges / units of obscure material and subtract the TL of a repaired item from that 100 every time a repair is attempted (and be recharged like the Auto Chaff System);
- you must have 1 tonne of minerals or alloys in the hold for it to initiate working, that 1 tonne will then disappear and the repair system will keep on going until all repairs are done. It will then need another tonne of minerals or alloys next time.
- each time it attempts a repair, the time to the next proper major service should be reduced (can that be implemented?);
- each time it attempts a repair, there is a very small chance a different random piece of equipment will be damaged (it's what happens when most people do DIY!);
- it does not function when in witchspace (too dangerous) or the docking computer is active (Health & Safety rules, innit).
- it does not function when at red alert (that would be evil, wouldn't it? But do you want 'bots stripping down the ship's panels when you're fighting for your life?)
Re: RepairBots 2.01 OXP - v1.75 compatible
Posted: Fri Apr 20, 2012 4:21 am
by Switeck
SandJ wrote:I had this installed for ages and I agree with Smivs and I feel this unbalances the game hugely. I think the repair system is too cheap, much too fast and should be an ongoing drain on resources: energy, financial and material.
Potential suggestions:
- it drains energy while running, so that shields recharge more slowly (like the Ore processor);
- it starts out with 100 charges / units of obscure material and subtract the TL of a repaired item from that 100 every time a repair is attempted (and be recharged like the Auto Chaff System);
- you must have 1 tonne of minerals or alloys in the hold for it to initiate working, that 1 tonne will then disappear and the repair system will keep on going until all repairs are done. It will then need another tonne of minerals or alloys next time.
- each time it attempts a repair, the time to the next proper major service should be reduced (can that be implemented?);
- each time it attempts a repair, there is a very small chance a different random piece of equipment will be damaged (it's what happens when most people do DIY!);
- it does not function when in witchspace (too dangerous) or the docking computer is active (Health & Safety rules, innit).
- it does not function when at red alert (that would be evil, wouldn't it? But do you want 'bots stripping down the ship's panels when you're fighting for your life?)
It's definitely too powerful without some other (hidden?) costs.
Draining energy while running makes sense. -1 energy/second minimum, maybe more for repair attempts on higher tech equipment? (0.5 + 0.1 per TL energy/second rounded up for repairs for instance...a problem with this is damaged TL 99 equipment would drain your energy dry getting repaired! So maybe cap it at 5 energy/second max.)
Having it munch down on 1 TC of minerals or alloys might work, if each TC gives it 10 "shots" at repairing other equipment. Most equipment probably needs considerably less than 1 TC worth of repairs...plus it can even "eat" the cargo canister too for no leftovers.
You could mine asteroids or hope to get an alloy off a dead ship if you needed to do more repairs.
...However this would mean that 0-cargo-capacity ships (like the Asp!) could not use the equipment.
Re: RepairBots OXP
Posted: Fri Apr 20, 2012 11:33 am
by Lone_Wolf
energy drain : i am against it, since it's activated when in battle when energy is needed for other things already
needing cargo : nano bots can use the damaged parts already, and on every ship there are small particles of waste that are used by the nanobots.
needs servicing / special charges : sounds like a good idea, but not both
every repair brings service closer : makes sense
very small chance of damage to random equipment : unsure
not function in witchspace / docking computer active : makes sense
not function when at red alert : that's when you need it most, bad idea
Re: RepairBots OXP
Posted: Fri Apr 20, 2012 1:00 pm
by Thargoid
As I guess I get the casting vote here
- energy drain : not keen, but would perhaps consider it but it doesn't work logically for me. They are self-contained repair nanobots - why would they be taking energy from the ship?
- needing cargo : No. They repair and recreate, based on what's already there (or else there would be a logical extension to ask if they can repair a docking computer from a ton of alloys, why can't they create one from scratch from one?)
- needs servicing / special charges : a limited number of attempts before a "recharge" is the most likely candidate to get into the next version.
- every repair brings service closer : not possible via scripting (I think).
- very small chance of damage to random equipment : No. Not keen on that one, especially as the system would then just go off and try and repair what just broke.
- not function in witchspace / docking computer active : can't see the logic there, especially the witchspace bit. And the docking computer bit wouldn't doesn't make much sense given in such cases you'll be docked in a short time anyway (and whilst you're docked ongoing repairs are halted anyway).
- not function when at red alert : not going to happen...
In any case I'm not going to do anything with this OXP until trunk v1.77 is out. There are some new events coming in that which I want to look at with regard to this OXP. And as I'm not going to recode the damn thing twice it can wait a bit
[/color]