RepairBots OXP

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

Moderators: winston, another_commander

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

A request to fellow OXP makers, specifically ones whose add-ons have equipment. I am just recoding up Repair Bots for 1.74, and this version will be able to fix any equipment that the player ship has (chance weighted by tech level) unless explicitly scripted not to.

I'm making an exclude list in the script, and I need to know from any of you if there are items of yours which you want/need excluded. Note this is only ship equipment that appears on the F5 screen (and in the player.ship.equipment array).

Your deadline for inclusion is when 1.74 test is released, as then I'll release this update (and all its siblings).
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Thargoid wrote:
....unless explicitly scripted not to......Your deadline for inclusion is when 1.74 test is released, as then I'll release this update (and all its siblings).
You mean exclusion, or not?
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

'Inclusion in the exclusion list', I reckon! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Kaks wrote:
'Inclusion in the exclusion list', I reckon! :)
Yup, inclusion in the list.

Basically if you don't want the 'bots to be able to fix your kit, holler now!

Hmm, but I've just found another bug unexpected feature I think...
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 »

Feature request: script_info dictionary for equipment types. :-)
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 »

My wish is my command: as of r3333, equipment types can have script info dictionaries in the same way as ship classes. Plist side:

Code: Select all

(
    3, 500, "Superthing",
    "EQ_AHRUMAN_SUPERTHING",
    "This thing is, like, very super!",
    {
        available_to_all = true;
        script_info = { ahrumanSuperosity = "very"; };
    }
)
Or, say:

Code: Select all

script_info = { thargoidRepairBotChance = 0; };
JavaScript side:

Code: Select all

var eq = EquipmentInfo.infoForKey(someKey);
var superosity = "negligible";
if (eq.scriptInfo.ahrumanSuperosity !== undefined)
{
    superosity = eq.scriptInfo.ahrumanSuperosity;
}
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

OK, tried it (now I have a trunk that works and includes it) and it works well. Will stick with the name, as it is nicely explanatory and indicative that it isn't built-in per-se.

So if any OXP maker wants to influence the chance of their items being repaired by the 'bots, just add the line (or it's XML equivalent)

Code: Select all

script_info = { thargoidRepairBotChance = <chance>; };
into the equipment.plist entry for the item, replacing <chance> with the probability you want from 0 (no chance of repair) to 1 (always repair).

If the entry is missing then the item tech-level will be used (as it also will if the entry is not a number). If they are <0 it will act as 0, and >1 will act as 1.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

OK Repair Bots 2.00 is released, and I just wanted to expand a little on the update as it's not just a code-change. There are two major items:

1) The 'bots can now repair almost anything. For OXP makers if you don't want your equipment to be repairable (or want to change the chance of repair), please use the equipment.plist script info setting as detailed in the above posts.

2) The OXP now also includes a new piece of equipment, the repair system. This is similar in operation to the Caduceus DCN, but makes use of the newly upgraded repair bots.
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Thargoid (et al),

Hate to be such a worrisome Type-A N00b,

Anyway, re: recent discussion in the ooCheat thread, and I have gone through all the posts in this thread.

I just want to confirm; in it's default configuration (no hacks to the OXP), will RepairBots 2.00 (the Self Repair system) repair ALL core/default equipment?

(and just to make sure) And will it repair: (1) Bounty Scanner (2) Ore Processor (3) Rock Hermit Locator (4) Naval Energy Unit (5) Cloaking Device?

(Most recent versions of the OXPs) (Oolite 1.74.2)

I realize (from examining the docs, and looking at the script a little) that the higher the tech level, the higher the chance that the item will NOT get repaired?

What happens if the Repair System ITSELF gets damaged (That DID happen to me tonight shortly after I started experimenting with the OXP... I blew up shortly afterwards so I was unable to wait and see if it repairs itself)?

I was able to do some interesting experiments... I simply forced witchspace jumps and let the bugs play "pin the tail on the donkey pilot" on my aft shields until one or more things got damaged.

With an Extra Energy Unit, Shield Boosters, and a Military Shield Enhancement, it was fairly easy to CONTROL the damage before I ran away (to try to observe the Self Repair System working).

I used the fuel injectors to get away from the Thargoids. I examined my manifest (F5), and damaged equipment shows up in orange, with "(N/A)" after it. (what is the N/A for?). At first I thought that the OXP wasn't working, but then I examined the script and realized that I was being impatient.

So for my last test, I managed to get my Advanced Space Compass damaged, ran away quite a distance, and waited. After a few minutes I got a notification that the Advanced Space Compass was repaired, and that was reflected in the manifest screen. "Yay!"

Anyway... I just wanted to be sure that this has a chance of repairing everything including the equipment mentioned above, or should I alter some files?

I'm considering modding the repair OXP itself to increase its inherent chance of successfully repairing, and also shortening the repair time some. me -> wimp
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

JeffBTX wrote:
Thargoid (et al),

Hate to be such a worrisome Type-A N00b,

Anyway, re: recent discussion in the ooCheat thread, and I have gone through all the posts in this thread.

I just want to confirm; in it's default configuration (no hacks to the OXP), will RepairBots 2.00 (the Self Repair system) repair ALL core/default equipment?
It has a chance of repairing things - nothing is guaranteed. The more high-tech and complicated the item, the more difficult it is to repair. And this can be configured by OXP writers (and indeed trunk code writers) for their equipment.
JeffBTX wrote:
(and just to make sure) And will it repair: (1) Bounty Scanner (2) Ore Processor (3) Rock Hermit Locator (4) Naval Energy Unit (5) Cloaking Device?

(Most recent versions of the OXPs) (Oolite 1.74.2)
Each will have a chance yes. Offhand the cloak I think is about 10 or 20%, would need to calculate the others.
JeffBTX wrote:
I realize (from examining the docs, and looking at the script a little) that the higher the tech level, the higher the chance that the item will NOT get repaired?

What happens if the Repair System ITSELF gets damaged (That DID happen to me tonight shortly after I started experimenting with the OXP... I blew up shortly afterwards so I was unable to wait and see if it repairs itself)?
Yes, it will try and repair itself. May take a little time, but after a while it should be able to do it. If the repair system is damaged then fixing itself takes priority over fixing anything else, for fairly obvious reasons.
JeffBTX wrote:
I was able to do some interesting experiments... I simply forced witchspace jumps and let the bugs play "pin the tail on the donkey pilot" on my aft shields until one or more things got damaged.

With an Extra Energy Unit, Shield Boosters, and a Military Shield Enhancement, it was fairly easy to CONTROL the damage before I ran away (to try to observe the Self Repair System working).

I used the fuel injectors to get away from the Thargoids. I examined my manifest (F5), and damaged equipment shows up in orange, with "(N/A)" after it. (what is the N/A for?). At first I thought that the OXP wasn't working, but then I examined the script and realized that I was being impatient.
N/A = not available (ie broken). If you're going to do such testing, I would recommend using TAF. Although if you do you may need to be sharp-eyed to see the messages reporting success or failure in repairing things.
JeffBTX wrote:
So for my last test, I managed to get my Advanced Space Compass damaged, ran away quite a distance, and waited. After a few minutes I got a notification that the Advanced Space Compass was repaired, and that was reflected in the manifest screen. "Yay!"

Anyway... I just wanted to be sure that this has a chance of repairing everything including the equipment mentioned above, or should I alter some files?

I'm considering modding the repair OXP itself to increase its inherent chance of successfully repairing, and also shortening the repair time some. me -> wimp
It's not too difficult to mod either, but it will then make it more powerful - indeed possibly too powerful. The Caddy DCN has a slightly different chance and speed, but the code is much the same (Wyvern mod'd my original repair bots code for ClymAngus for v1.0, and I re-wrote it myself for him when I issued RB2.0).
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

Thargoid;

Thanks much, all questions answered, oh wise and holy bug.

Had to look up TAF on the Wiki... and researched it a little... I don't think I need it, I will not be doing that much testing. And I appear to be sharp-eyed enough. (For some reason the words "sharp" and "eyes", when used together, bother me. I think I will use "quick" and "eyes").

About altering it... I see your point. No challenge if your ship "heals itself" immediately while in combat.

However, when I play games like this, I get kind of "immersive", and I like things to be logical and consistant. Thats why there are some GREAT OXPs out there that I do not use... I played with them back when I was using Oolite 1.73.x, they were fun to experience, but I ended up deleting them because they do not belong in a LOGICAL future universe.

If you buy a new car... and then install Air Bags and / or Seat Belts... you WOULDN'T expect a disclaimer stating "These Will Not Always Work".

I would expect a "repair system" to be HIGHLY successful (Edit: okay, MOSTLY sucessfull). In other games w/ repair systems (Origin's old DOS "Privateer", "Terminus", etc.), the repair systems always worked; they never "failed".

Of course the DELAY is the REAL balance factor, especially in the heat of combat.

I am thinking of decreasing the delay after I study the script some more (script makes sense, no problem), but NOT by much. The standard would be "Can this pilot STILL get creamed in battle".

also,
I Repeat: me -> wimp
:lol:
-----
EDIT:
I successfully modded the OXP. As a baseline, JUST TO OBSERVE that the modifications worked, I set the repair chances to always 100%, with DRASTICALLY SHORT repair times.

Now to tweak it for balance. Which is somewhat subjective. I will try to emulate what I remember from playing games like Terminus and Privateer. Actually, I have a second computer in the corner, a legacy P-166 with DOS 6.x installed - I STILL play old games like Daggerfall and Privateer on it. Privateer is still installed.
Sword, thy name is Cobra. And Cobra has fangs!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The link with the tech level is fairly obvious. A pushbike is quite low-tech and I can fix that most times. But my car is higher tech and for the most part if it breaks someone else has to do it...

I just took the logic across to the game in the same way, in the similar style to the in-built repair of items at the stations is done.

And in cars, airbags and seat belts do not always work. If they did there would never be a fatality in a modern car.
User avatar
JeffBTX
---- E L I T E ----
---- E L I T E ----
Posts: 366
Joined: Sun Dec 27, 2009 2:23 pm
Location: Abilene Texas

Post by JeffBTX »

(friendly debate)

Understand, but ...
Thargoid wrote:
The link with the tech level is fairly obvious. A pushbike is quite low-tech and I can fix that most times. But my car is higher tech and for the most part if it breaks someone else has to do it...
... you (Thargoid) are not a piece of equipment. At least I hope not.

I would think that in the future, something as important as a Ship Repair System would generally be classified as "Very Reliable". Enough so that users wouldn't generally be worried about failures. The makers of such equipment would have put a lot of thought into it and sold something that can be depended on.

In all other SpaceSims that I have played that featured something like this, the repair system would NEVER fail. In some games and with some equipment it would vary as to repair time, amount of damage, etc., but it ALWAYS worked.

Okay... I *CAN* understand a lesser reliability with a Naval Energy Unit or a Cloaking Device... perhaps it should be suprising if a Repair System sold at GalCop stations would even work at all on something as weird and rare as a Cloaking Device.

But it's all subjective.
Sword, thy name is Cobra. And Cobra has fangs!
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

Far as I know, Repair bots would "eventually" repair everything, assuming the player gives it time.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

Sometimes the repair fails but it tries again and keep on trying untill it's fixed.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Post Reply