Space Engineers

Space Engineers

Isy's Ship Refueler
523 Comments
LootGoblin Nov 22, 2024 @ 4:23pm 
@Isy i do agree to some extend, thats impossible that a script still runs when the PB is offline. Tho, what @Spoonfed mentioned i can confirm this behavior with using this script, swithing the block off. The Engines, which are set to emergency power WILL start occasionally if the OB is swithed off. So i can confirm the strange behavior spoonfed is mentioning. If i grind the PB down, the issues stop.
Katarina [WolfCraft Industries]  [author] Aug 6, 2024 @ 6:39pm 
@TheVillain same thing like @Graeme asked, this is possible with this script and timer blocks. for that read the guide, section > Timer Trigger On Event
TheVillain Aug 6, 2024 @ 4:25pm 
Feel rude for asking as this is already an excellent script...

Could it also turn off thruster groups? Be nice to not idle my engines when docked. Doing a hydrogen only play through with no mining allowed - and currently I need a whopping 3 blocks to do all these right now.

I'm also using AwwScrap. I honestly dont know why I do this to myself.
Katarina [WolfCraft Industries]  [author] Aug 4, 2024 @ 4:17pm 
yes this is possible with this script and timers. for that read the guide, section > Timer Trigger On Event
Graeme Aug 4, 2024 @ 4:31am 
Would it be possible to add a feature to switch off antennas when docked? Or a custom action to switch a group on/off when docked to allow players to add their own? Thanks
Spoonfed Jul 17, 2024 @ 12:10pm 
The battery names reset and it defaults back to auto. If I get rid of the PB that was running the script the issue stops. With script running I see it happen as well but the script just renamed them again.
Isy  [author] Jun 29, 2024 @ 10:37am 
That's impossible.. If the PB is turned off, the script can't run..
Spoonfed Jun 26, 2024 @ 7:51pm 
Im having an issue where if I turn off the Programming block and try to manage batteries manually. The batterys constantly reset to ON and Auto. Behavior duplicated on a second small grid. Stopped doing it on Grid 2 when PB was ground to non functional.
Malorn Jun 15, 2024 @ 1:08am 
You mean a timer block on the ship? This is a custom build I made less than two weeks ago. I will certainly check, but I don't think there is a single timer block on the entire thing, it's only a cargo shuttle I use to get things from planet to orbit.

Also I'm using the park command, i.e. the P key. I don't think that can trigger a timer.
Isy  [author] Jun 14, 2024 @ 10:14am 
Maybe you're docking with an old timer block that sets them to stockpile and the connector to switch lock?
Malorn Jun 5, 2024 @ 8:49pm 
I have a weird problem, the stockpile setting for ships seems to be reversed. When I dock with my base, it sets all my tanks stockpile off, but when I undock, it sets them all to stockpile which prevents me from being able to use my hydrogen thrusters. Am I missing something in configuration?
erik Feb 7, 2024 @ 4:02pm 
good evening I have a request would it be possible to create a script for the management of ice and hydrogen stocks on LCDs
FunkWolfie Jan 7, 2024 @ 4:33pm 
doesnt auto set, i have it on my ship and its running sees both battery but does nothing
Cpt.NoKills Nov 28, 2023 @ 2:01am 
I do the same with event controller and timerblock
Isy  [author] Nov 27, 2023 @ 3:39pm 
This is not an error of my script.. BuildInfo throws this error, so ask there for support..
Sir_ForeverPT Nov 26, 2023 @ 8:13am 
Whenever i use this script i get this error:

[0316:341 Build Info ERROR Error in status override .: block=MyObjectBuilder_OxygenTank/LargeHydrogenTankSmall: action=Stockpile: index=6; group=Hydrogen Tanks
System.Exception: negative values not supported
at
Digi.Buildlnfo.Utilities.StringBuilderExtensions.NumberCapped(StringBuilder s, Int32 value, Int32 maxLength)
at
Digi.Buildlnfo.Features.ToolbarInfo.StatusOverride.Gas Tanks.GroupStockpile(StringBuilder sb, Toolbaritem groupToolbarltem, Groupdata groupData)
at
Digi.Buildlnfo.Features.ToolbarInfo.ToolbarStatusProce,

And then, the tanks get emptied to a negative number and dont fill up only empty the tanks of the ship itself and any other place i may try to fill them at, also after all that, i cant change the tanks between stockpile On/Off. Any ideas on how to solve ?
Katarina [WolfCraft Industries]  [author] Aug 12, 2023 @ 7:49am 
this script need to be installed on the ship that you want to be refueled.
Pathoskomosis Aug 12, 2023 @ 4:19am 
Does this need to be loaded on the ship that will be refueled or on the station the will refuel the ship? which is optimal? sorry for noob question lol
Katarina [WolfCraft Industries]  [author] Aug 3, 2023 @ 5:43pm 
no this script doesnt handle items at all.
baronvonpicklez Aug 3, 2023 @ 8:02am 
does this have the possibility to work with turret ammo as well for replenishing modded/vanilla turrets?
dooby dooby dooba Aug 1, 2023 @ 3:49pm 
I'm trying to build a 'Jetpack' that enables an atmospheric ship to enter space, but for some reason when the connector that I have for it is connected, it decides to start juggling which battery is the backup and sets the others to recharge, even though there's no station connected. Is there an option that I haven't spotted that will fix this?
Kateye Jul 26, 2023 @ 11:14am 
I'm having an issue: When I dock with a trade station (So I can't make any changes to it like adding "[No Refuel]") the batteries all switch to "Recharge" (even the backups) and stay that way even when I undock. I end up immediately falling. I would expect at least one battery to remain in Auto as a Backup. Can you detect if attached to a trade post and *not* set to refuel?
Jotaro Mar 24, 2023 @ 2:15pm 
for example i have dedicated batteries on base to only recharge ships and only those will be used
because ship only script will need one more programmable block
Jotaro Mar 24, 2023 @ 2:13pm 
oh i just turned it on and it says its ship only script would be nice if there was script that do same but its works from base
Katarina [WolfCraft Industries]  [author] Mar 24, 2023 @ 2:11pm 
you can make it so that the script only manages a specific group of batteries, for that read the guide, section > Manage Batteries.
if charging is done the batteries will stay on recharge unless you undock it, reason for that is pretty simple, you want to keep them on recharge so your base cant drain them while your ship is connected to it.
Jotaro Mar 24, 2023 @ 1:26pm 
Also if charging is done it will switch back to auto ?
Jotaro Mar 24, 2023 @ 1:18pm 
Is there a way to only recharge from some batteries only while keeping others always on auto?
Katarina [WolfCraft Industries]  [author] Feb 7, 2023 @ 10:29am 
for that i can give you a little hint, read the guide, section > Used Connectors and section Special Connections.
Logoth Feb 6, 2023 @ 6:12pm 
Had something odd happen, and I'm sure it is just due to how connectors work, but I'm wondering if there's a way around it. I have a large ship with a few batteries and reactors, running this script (so that tanks, batteries, etc all recharge if I connect to a station, and manage the reactors as emergency power).

I docked a small grid mining ship to a connector on this large ship, and the batteries on the large ship went into recharge mode instead of auto. (as if I'd connected to a station).
Katarina [WolfCraft Industries]  [author] Jan 21, 2023 @ 5:51am 
this is not a mod, its a script!
you have to place a Programmable Block in-game and click the Edit button in there.
if you dont have the Edit button you need to enable scripts.
How to Enable Scripts
BaggioSWE Jan 20, 2023 @ 8:58pm 
hmm script wont show up in modlist/scripts, and i cant find it in workshop ingame (F10) .
any ideas?
Katarina [WolfCraft Industries]  [author] Nov 9, 2022 @ 1:48am 
@Flow86 check the guide, section > Used Connections.
with that you can define what connectors you want the script to use in order to refuel your carrier.
Flow86 Nov 8, 2022 @ 11:54pm 
Hi, one question: If I want to refuel a carrier ship, how do I set the connectors right so that it does not refuel on its fighter ships? Do I need two scripts running (One in Station mode, one in Ship mode?) or is there a trick with only one?
Democracy Manifest Oct 22, 2022 @ 4:25am 
This script just restarted my pc at "check code" lol
Dragon Fire 813 Oct 21, 2022 @ 5:43pm 
Any ship I turn off as a whole and have this script running on will eventually turn itself back on, even if the programmable block is turned off. Any reason why?
Katarina [WolfCraft Industries]  [author] Oct 12, 2022 @ 10:27pm 
@Spartan you can do that already by using the Timer Trigger On Event feature.
read the guide, section > Timer Trigger On Event
Spartan Oct 12, 2022 @ 5:33pm 
An option to turn all thrusters on/off when undocked/docked ? :steamhappy:
Isy  [author] Oct 12, 2022 @ 3:43am 
No, because codewise, a merged grid becomes one unit whereas connecor/piston/rotor connected grids stay a separate unit.. In your case, I'd suggest to disable the script before merging..
gt23669 Oct 7, 2022 @ 12:11am 
I have an interesting scenario. I have a sg grid that does not refuel via connector but instead refuels via sg small hinge. Since each time I have to refuel, I have to merge to the parent grid and if this happens to be a static station, this script will fail. This is ofc an unordodox ship design but a really cool design! Is it possible to request this feature?
Katarina [WolfCraft Industries]  [author] Sep 12, 2022 @ 5:57pm 
sorry for the late reply @giorgiobusoni, that sounds like the issue that i once experienced, ships were connected, i had enough batteries but the ships just didnt want to charge at all.
what i did was to set "overwrite power transfer" to "on" in both connectors settings. that helped to properly recharge them.
giorgiobusoni Sep 9, 2022 @ 5:30pm 
Is there any way to get rid of the "forced auto" thing? It's very annoying, I have a base with only solar, batteries charge up in the day nly, there is no power input at night but the power input is more than enough to charge all ships. But they do not, they keep switching to force auto. I have plenty of batteries as well, it did not help.
Katarina [WolfCraft Industries]  [author] Aug 5, 2022 @ 12:22am 
@Siker_7 read the guide, section > Used Connectors
Siker_7 Aug 4, 2022 @ 9:51pm 
I was working on a carrier in creative, in atmo because I was testing the thrust earlier. I added this script (to manage hydrogen engines and lights) and it fell out of the sky. Luckily I was able to copy the ship in time.

I was not planning on ever docking this ship at a station, and thus hadn't added proper docking connections. Can we have an option to simply ignore all connectors, or is that already an option and I simply didn't notice it?
Lucid Jul 16, 2022 @ 7:10am 
It might be the world because it happens a lot of weird things/bugs, but the reason the ship was off was that i left the ship to the side to not consume anything from the base. I also had two ships with this script laying off to the side turned off, but at the same exact time both ships turned on. I had to grind down the programmable blocks for this to stop. But again, i think this might be because of the world im in. Its totally messed up.
Isy  [author] Jul 16, 2022 @ 6:03am 
you shouldn't turn it off.. That would defeat the whole purpose of the script.. Other than that, the programmable block is probably powered by the connected base, so that's the reason it activates everything again..
Lucid Jul 13, 2022 @ 5:02pm 
Hi love the script, but i have a problem. When i have my ships turned off and also have this script on, it magically turns on the ship. When jumping in the ship again the power button is red(like if the ship was turned off), but still able to fly.

Any idea what might be causing this?
Jacques May 6, 2022 @ 11:05pm 
It looks like a few more batteries did the trick, thank you again for your help, have a nice week end :)
Jacques May 6, 2022 @ 12:33pm 
Thank you for your response. I am currently building a large grid ship, it has one dock for a miner that uses your scripts too. I have a lot of railguns, based on what you are saying that might be what is causing the problem. I will add more batteries and reactors, hopefully that will fix the problem. Good advice about large grids, I will keep that in mind :)
Isy  [author] May 6, 2022 @ 3:04am 
It depends on the base, you dock to.. If the base's combined power (batteries, reactors, solar panels, etc.) is less than 10% of the ship's possible combined input, the script stops recharging to prevent the base from running dry... Best practice is to always have more power storage/producers on your base than on your ship..
Jacques May 5, 2022 @ 2:30am 
Hi, big fan of all your scripts, I always use several of them on any of my creations without any problems. They are very efficient, thank you.
I am having a problem with my latest creation with this script and I don't understand why:
I get a warning, not enough power, recharge stopped. But the reactors and hydro engines don't turn on.
I do not know what is causing the problem, I have tried adding more batteries but the problem persists, any suggestions?