Ammo goes straight into vehicle

Post all other topics which do not belong to any other category.
Post Reply
JackGruff
Fast Inserter
Fast Inserter
Posts: 114
Joined: Tue Oct 15, 2013 4:44 pm

Ammo goes straight into vehicle

Post by JackGruff » Thu Jul 12, 2018 8:50 pm

I'm not sure if this is a bug or not.

When you are in a vehicle, and have requested ammunition in your logistic slot which also happens to be what the vehicle can take, then the ammo from bots will go directly into the weapon ammo slot of the vehicle and not your character's inventory. This means you have to wait for the vehicle's ammo slot to fill before your inventory receives the item. For example, if you request explosive cannon shells and you are in the tank, then you are just going to have to wait for the tank to fill up with them before you get your requested amount.

I realise that some may see this as a convenience, but it does make specifying an arbitrary amount pointless.

So perhaps the vehicle's current loaded ammo should be considered part of inventory or the ammo should just go into your character's inventory first?

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 559
Joined: Sat Apr 09, 2016 8:39 pm

Re: Ammo goes straight into vehicle

Post by TruePikachu » Thu Jul 12, 2018 9:18 pm

I believe there's already a bit of scenario-side code that supports this, considering the entire vehicle inventory as well as the player's (it is used in one of the New Hope campaign levels, IIRC the train-intro one, where car and inventory contents are combined to determine winning)

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2023
Joined: Tue Jul 12, 2016 9:03 am

Re: Ammo goes straight into vehicle

Post by eradicator » Fri Jul 13, 2018 9:29 am

Definetly a bug. Sounds convenient if you want it though. Does it happen for fuel too?

Rseding91
Factorio Staff
Factorio Staff
Posts: 7776
Joined: Wed Jun 11, 2014 5:23 am

Re: Ammo goes straight into vehicle

Post by Rseding91 » Fri Jul 13, 2018 10:21 pm

eradicator wrote:Definetly a bug. Sounds convenient if you want it though. Does it happen for fuel too?
No, it's intended.
If you want to get ahold of me I'm almost always on IRC and Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2023
Joined: Tue Jul 12, 2016 9:03 am

Re: Ammo goes straight into vehicle

Post by eradicator » Sat Jul 14, 2018 8:00 am

Rseding91 wrote:
eradicator wrote:Definetly a bug. Sounds convenient if you want it though. Does it happen for fuel too?
No, it's intended.
Played around with it. Not conceptually convinced yet:

It only works for ammo, not fuel (fuel would be far more useful to me :p).
It only works if the player inventory has insufficient ammo and doesn't refill when only the car runs out. Why can't the car use ammo in it's trunk/the inventory automatically [checkbox]?. In a hurry transferring all ammo from player inventory to car remains faster than manually drag/dropping a single stack into the correct car ammo slot :/.

What was the original intention of this?

Rseding91
Factorio Staff
Factorio Staff
Posts: 7776
Joined: Wed Jun 11, 2014 5:23 am

Re: Ammo goes straight into vehicle

Post by Rseding91 » Sat Jul 14, 2018 10:37 am

eradicator wrote:Played around with it. Not conceptually convinced yet:

Code: Select all

void Character::transferFrom(ItemStack& stack,
                             InventoryIndex sourceInventoryIndex,
                             TransferSpecification::Type type,
                             bool includeSubInventories)
{
  if (this->getVehicle() && sourceInventoryIndex != Character::vehicleInventoryIndex)
  {
    this->vehicle->transferAmmo(stack);
    if (stack.getCount() == 0)
      return;
  }

  this->transferFromInternal(stack, sourceInventoryIndex, type, includeSubInventories);
}
The intention was to transfer ammo into the vehicle so you could pick up ammo/request ammo and have it be equipped in the vehicle.
If you want to get ahold of me I'm almost always on IRC and Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2023
Joined: Tue Jul 12, 2016 9:03 am

Re: Ammo goes straight into vehicle

Post by eradicator » Sat Jul 14, 2018 11:31 am

Rseding91 wrote: The intention was to transfer ammo into the vehicle so you could pick up ammo/request ammo and have it be equipped in the vehicle.
Well. I'm inclined to ask "would you mind adding fuel too". But the problem with that is that it always adds whatever is being delivered. And if i want nuclear fuel in my car but run out of fuel while the bots are bringing me coal for crafting that wouldn't work. Ofc that problem would also exist for magazines if there were several different equally used types (i.e. modded elemental ammo), but in vanilla all magazines are straight upgrades. From a personal gameplay-perspective it just feels "inconsistent" (and without any in-world-explanation to the player) that vehicles ammo gets a special treatment. (Yes, i know, there are other "inconsistencies" that make the gameplay better, thus the quotes.) And that it's not requested for the vehicle, but only if the player enters a vehicle while a transfer is already going on.

The best solution for all of that i can come up with would be...adding logistic request capability to the car entity itself. Which would be pretty awesome as such. By adding a checkbox [Request ammo and fuel if filtered], and adding filtering capability to the fuel slot maybe? Also i just noticed that the ammo-slot "select filter" gui shouldn't be showing non-ammo items.

TL;DR: I formally suggest adding logistic cars. Do i need to make a new thread for it to gather votes? ;)

bobucles
Smart Inserter
Smart Inserter
Posts: 1313
Joined: Wed Jun 10, 2015 10:37 pm

Re: Ammo goes straight into vehicle

Post by bobucles » Sat Jul 14, 2018 7:03 pm

There is one potential gameplay exploit with that. If vehicles can be used in the logistic system, then you have green science logistic chests. Of course the simple answer is to unlock the ability after logistic tech.

Auto loading a vehicle is a neat gimmick but ultimately it's not that important. Vehicle deployment is not a very common event to worry about, and it can't be automated using normal tech. Even when the car is used as a personal skateboard it doesn't get picked up and placed down THAT often. At that point you're probably better off having a dedicated skateboard button to auto deploy the vehicle with whatever armaments you preset.

It's probably more useful to let vehicles draw ammo and fuel directly from your inventory and cut out the middle step. The biggest issue with a vehicle is refilling them after they go empty so it'd probably solve all the issues in one go.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2023
Joined: Tue Jul 12, 2016 9:03 am

Re: Ammo goes straight into vehicle

Post by eradicator » Sat Jul 14, 2018 7:58 pm

bobucles wrote:There is one potential gameplay exploit with that. If vehicles can be used in the logistic system, then you have green science logistic chests. Of course the simple answer is to unlock the ability after logistic tech.
Inserters can only take from the "trunk" though, and i meant logistics for the ammo/fuel slots. Otherwise i agree.

Post Reply

Return to “General discussion”