Ammo Loader+


More than just a turret loader. Auto load everything from turrets to artillery wagons to furnaces and even the player themselves. Auto upgrade ammo and fuel without tedious manual replacement. Infinite range and compatible with Factorissimo2.

Content
16 days ago
0.14 - 1.1
21.2K
Logistics

b Helicopter mod can't refill fuel?

5 years ago

Hello there!
Helicopter mod cant be refueld from the fuel loader chest... all other cars work execept the modded helicopter ...
Is it need to you put a name of a specific car/building?

Also, could you clarify me why does this ammo loader+ vs the other ammo loader so diferent?
I have a feeling that all my bullets i had was always returning to the chest... and now they keep it on inventory ... being a pain if i relocate my turrets a lot of times or mine my car =/
Could you bring the cap of bullets in hand again? my inventory get filled of fuel and ammo =/

5 years ago

Hi! Thanks for taking the time to post your thoughts.

If the Helicopter mod isn't being fueled it means the Helicopter prototype isn't of the "car" category. All drivable objects should technically be of this type, so the fact that it isn't working means I'll have to put in a custom fix after taking a look at the mod's code. I should be able to have it fixed next update.

As for the bullets and ammo being returned to your inventory, yeah I also noticed this in my playthroughs and it bugs me to this day. The problem is that the game doesn't allow custom tags on game objects, so once the items leave the loader chest I have no way to track them. I've tried to fix the problem before but every solution made the mod too performance-heavy. I will, however, take a look at it again and see if I can come up with a solution (it annoys me as well).

Also, I renamed Ammo Loader to Ammo Loader+ when I added the Fuel Loader Chest. Since the mod can now load fuel into objects that don't use ammo at all, I thought the name no longer fully described the functionality. Other than that, there is no difference.

5 years ago

I see...
maybe add a extra modded chest to distribute bullets and fuel ?
So everythng in that box is even distributed for all other same chests ...
So if you have 2000 bullets/fuel on your inventory, just craft that box, place it and fill the box with bullets/fuel...
How about that? =P

5 years ago

Hm not a bad idea, but what I think I'll do is add in an option for Max ammo/fuel on the player, and have the mod pull any excess from the player's inventory each cycle. Or perhaps it would be better to have a hotkey to do it manually?

5 years ago

Strange, it wasn't working here neither but after changing a map settings (any settings) it started to work.

5 years ago
(updated 5 years ago)

I think you just figured out the problem ^_^ thanks for helping me out.

The mod dumps and rebuilds its internal tables any time a runtime setting is changed, which means that the helicopter mod is destroying it's entities script side after my mod has already analyzed it.

I ran into pretty much the same problem with the aai mods, but if the author uses an event hook like the aai mod author it's something I can work around. I'm shooting for a big release this weekend that has several new features, including incorporating your suggestions about the player inventory getting full. I'll post again if I manage to get a fix in on time.

5 years ago

I took a look at the other mod's code, and unfortunately there's no good workaround for me to use without an event being thrown to let me know when an entity is being replaced. I tried a few solutions, but I would have to sacrifice a lot of performance to constantly search for new Helicopter entities. Hopefully the mod author will put in an interface I can use in a future release :\

5 years ago

Hi, so I also have the same problem. I've found that the helicopter is actually several entities put together which may account for why it doesn't reload. Before the update, I could never get trains to reload on it and still can't. After the update the car and the thank no longer reload fuel. I've been running a bob's mod that seems to have changed the way vehicles work. Or am I just doing something wrong and not working the boxes correctly?

5 years ago

I don't believe there are any bob's mods that can mess up the vehicles in that way. Which mod is it?

Trains require you to check the mod option "Fill Locomotives", which is disabled by default. With the update, both cars and trains require research to load. You can disable the tech requirements in the startup options.

Let me know if you're still having trouble after checking the mod settings/research.

5 years ago

I'm playing with Bob's Adjustable Insertrs, Enemies, FUnctions Library mod, Vehicle Equipment, Warefare, and multiple characters and classes mods. I found the option to fill the locomotives (and fill a little dumb cause I didn't know that even existed until yesterday) lol. The thing I'm finding now is some vehicles refill the ammo and some don't. And since a couple of updates ago, where it removed the fuel reloading boxes, I can't get anything to have fuel added to it. Is there something I'm doing wrong like not using the ammo box right or just not finding the correct box to use?

5 years ago

The update you're talking about added several new pieces of research, one of which unlocks fuel loading. Make sure you have that technology researched or else disable research in the mod options. Refueling vehicles is also a separate research.

As for some vehicles not refueling, any vehicles that are replaced script side (by other mods) won't work, but the mods you listed should work fine. I would suggest disabling and re-enabling the mod in the options which will force a reset of the internal tables (disable, exit the menu, then go back and re-enable).

If that doesn't work and you have all the prerequisite research, which vehicles specifically are you having trouble with?

5 years ago

I did what you suggested and disabled/re-enabled mod. I didn't boot up the game after disabling the mod, if that was what you were suggesting to do. I also have researched everything for your mod except for Ammunition Logistics Integration and Artillery Distribution because I'm not able to yet. If you need me to try it, I can click the no research requirement box and see if that does anything in the mod settings. Since I'm still not able to get them to work I can't refuel the vanilla car, tank, train, bob's tank mk2, the helicopter (which I acknowledge wasn't loading already.) The vanilla car and tank seem to do fine on the ammo reload and the turrets and any new turrets that I've researched so far seem to reload just fine so that's working great. If I remember correctly, before the update we're talking about happened the ammo reload chest and the fuel reload chest were two separate boxes with their own image on it right? As it stands, aside from the logistic chests and storage chest, the standard ammo reload chest is supposed to be a standard, does all chest correct? Should I start a new world and test to see if the mod works correctly with a fresh world?

5 years ago

Right, the ammo Loader chest now does fuel as well.

The fact that ammo on the vehicles is working properly is odd. I wonder if you could zip your save folder and send me a link to it on dropbox/Google drive? Either way, I'll intstall the mods in question myself after work and see if I can figure out what's going on. I'll let you know what I find.

5 years ago

Ok, I installed the mods in question, and could reproduce the bug if:

1.) Vehicles and fuel research were complete, and
2.) Fill burner structures option was disabled.

Having these two conditions produced the effect you were describing, and it was indeed a bug. I'm putting a fix out now in the form of 0.16.32, so hopefully this fixes your issue. Let me know if it doesn't.

5 years ago

So I downloaded the update and it appears to be fixed. Every vehicle I have built on the map I tested and they all refill their fuel, including the helicopter. Looks like you squashed the bugs. Thanks for you help silentcrim! This is a great mod!

5 years ago

A new thing I've found. I built an assembler to build the vanilla yellow rocket. The Loaderchest seems to be transporting rockets to the assembler I'm using to craft the rockets. Its a yellow assembler.

5 years ago

The assembler is inside a factorissmo building.

5 years ago

And the ammo loader outside the building

5 years ago

When I moved it so they're both inside the building the problem stopped but the ammofiller can't fill ammo from inside the building. I think it has something to do with the factorissmo building having an input and output option.

5 years ago

The chests don't work inside any building or on any surface other than nauvis. This is an intentional condition to save resources; otherwise, I would have to require that every building have a chest inside.

I may still make this change as it would be a lot more ups friendly. However, the vision I had for the mod was to be able to place a chest anywhere and have it supply entities in any building.

5 years ago

As for the chest putting rockets in the assembler, that's something I did not foresee but I think I know why that's happening. I'll put up a fix tonight or tomorrow

5 years ago

The assembler issue should be fixed in 0.16.33

5 years ago

Also, the helicopter mod still isn't fully working. It will refill the chopper if an inner table reset is triggered (e.g. changing runtime mod settings) after the chopper is created, but new choppers are still ignored until the tables are reset.

This peculiar temporary fix has given me an idea for a potential workaround, however, and I may try to implement it this weekend if I get time.

5 years ago

Thanks for the fix! And I see your vision and think its great! The helicopter has been working for me but that makes sense what you're saying. I look forward to your fixes. Thanks for your hard work!

2 years ago

What is the "Ammo-Loader: initializing global tables". Every time I research something about? Then it finishes...

2 years ago

The mod refreshes its references to factorio entities after every research, because some mods have research that silently destroys and replaces entities without raising an event to inform other mods. This will cause my mod to have bad references and eventually crash. It became enough of a problem over time that I stopped trying to find out which mods specifically did this, and instead simply had my mod refresh all references after every research.

I display the message because in megabases, the refresh can possibly take several minutes, and in some cases the game may stutter during this time. I didn't want the user thinking it was some random lag spike my mod was causing for no reason. You probably won't be able to see any noticeable slowdown though until you have well over 10,000 turrets or burners being tracked by the mod.

I'll try and include an option to disable the notification in the next update. Let me know if you have any more questions!

New response