Companion Drones for 2.0


UPDATE 3.1 Tired of the lonely factory life? This drone(s) will follow, assist, and protect you, handling construction, repairs, combat, and manage its inventory all by itself. Toggle between building and combat roles on the fly with hotkeys or the shortcut bar, fine-tune its behavior with customizeable options, and toggle between Modes to enable progression over time or to make the mod more suitable for large modpacks like Angels or Bob's. Maintained by Maoman

Content
8 days ago
2.0
4.55K
Logistics Combat

g [Closed] May I?

2 months ago
(updated 2 months ago)

Hey there. So I've modified my own install significantly to turn it into a sort of "hard mode" of this mod, and I would like to upload it as its own separate thing. Just wanted to check with you first, see if you minded.

Note that if I do, I'll be writing my own thorough description, which will make yours look a little wimpy. You're free to copy mine as much as you like though.

2 months ago
(updated 2 months ago)

Also, I strongly recommend you go into scripts\companion.lua and add these lines to function Companion:update()

if not self:is_busy() and not self.out_of_energy then
self:search_for_nearby_work()
end

Just before the line if self.is_getting_full or self.is_on_low_health or not self:is_busy() then
This will make the bot stop doing that weird 5 second or so pause while it waits to update new jobs, even though jobs are sitting right there. In other words, it makes the companion a LOT more responsive, and as far as I can tell, has no downside. You should absolutely add these lines to your own version of the mod.

2 months ago

And just throwing this out there, but if you don't really feel like maintaining this long term, you can add me as a collaborator here and I can take over this mod for you. No pressure though--it's entirely up to you. I don't mind one way or the other.

2 months ago

sounds good, how do I add you as a collaborator? would be nice because I don't always have time to fix stuff xD

2 months ago

also, sure, fork it or whatever for a hardcore version, sounds like a nice idea :)

2 months ago

In the tabs at the top, under permissions, invite my username.

Do you want my hard mode to be a specific separate mod, or, if I'm going to be a collaborator here, would you rather I just incorporate it here as a togglable option in the mod settings?

2 months ago

Actually, I'll just make it a separate mod, nevermind. Easier to keep track of metrics that way.

2 months ago

I see, fine by me as well I guess

2 months ago
(updated 2 months ago)

I mean I can still help keep this one up to date and all, I just meant the "hard mode" version I was working on will stay separate. But I haven't even really decided on that to be honest, I'm still mulling it over.

2 months ago
(updated 2 months ago)

Are you still planning to make me a collaborator? Since I made the hard mode into a toggleable setting instead of hard coding the values, there's no reason to make it its own separate mod anymore, so I haven't uploaded anything yet.

I've fixed a few things and added the following features, both toggleable in the settings:

Hard Mode:
The bot starts out slower and kinda crappy but slowly improves as you research technologies, maxing out when you research the rocket-silo. It no longer gets a laser bank by default, only a generator, roboport, and shield. Also all crafting recipes are adjusted to be mid-late game now, so the one bot (instead of two) you start out with is now extremely valuable as it cannot be replaced for many hours in game. Don't worry too much though, the shield is still pretty good.

Misc Chatter:
The bot now has a bunch of (completely optional!) lines of dialogue that can pop up at various times. It has some lines for when it finishes working, some lines for when it successfully kills an enemy (rare), and almost 200 lines of idle dialogue to try and keep things interesting. There's a setting for how frequently the idle chatter pops up, or you can disable it entirely so it never speaks.

As for fixes there's the one I mentioned earlier, but I also made it so that touching the construction robots with the big "DO NOT TOUCH" tooltip no longer breaks the bot, along with some minor inefficiencies and I think there was a weird edge case that caused a crash if I remember right.

Edit: oh yeah, and it actually consumes noticeable amounts of energy now to do stuff, and I added an option to have the companion pick the lowest quality fuel in your inventory instead of the highest, since the companion doesn't care about the speed bonuses from better fuels.

2 months ago
(updated 2 months ago)

More changes:

-Fixed a bug where toggling the construction shortcut in the GUI would not stop the bot from constructing
-Added a custom debug console command to help with diagnosing issues
-Improved detection of stale/old construction robots lingering in tables, impacting spawn limits
-Further improved that "DO NOT TOUCH" slot to be even safer--we could probably just remove the warning entirely now
-Bot now starts out with inferior performance then improves over time, based on your research level, reaching max strength upon unlocking space science

a month ago

sounds cool, I'll make you a collaborator then <sunglasses emoji>

New response