According to the prototype browser, the "turret" source_type is set correctly, but I still can add the item to the character's ammo slots:
ammo_item-source_type.png (1.65 MiB) Viewed 2847 times
Is that a bug, a documentation bug, or a misunderstanding on my part?
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 9:00 am
by Bilka
It's used to give the ammo different effects depending on where it is used, not for forbidding it to be used somewhere (which is why it only applies when used with an array of ammo type). Take a look at flamethrower ammo, that's the example of it being used in vanilla (flamy flames for player, small non-flamy flames for tank).
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 9:19 am
by Pi-C
OK, so there's no way to prevent ammo from being inserted into an ammo inventory? Obviously, I couldn't add flamethrower ammo to a slot reserved by the rocket launcher because ammo_category wouldn't match. But nothing would prevent me from adding an artillery-shell to a player's ammo slot not yet associated with a weapon although there is no gun the player could use it with. Shouldn't that be fixed?
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 9:30 am
by Bilka
The same also goes for vanilla and I am not sure how you'd define "guns that you can never equip" as e.g. in editor mode you can just grab an artillery cannon and equip it as the player (and shoot arty!).
What you could do is make the ammo do nothing for the "player" source type, but I don't really see a reason for that since vanilla simply doesn't care about players equipping cannon/arty shells.
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 10:26 am
by Qon
I didn't know this property existed or what it did. The flamer ammo being different when used in the tank should have been a clue, but I haven't used flamer ammo in tank for a long time now and forgot about it. Thinking about if I should use this for Capsule Ammo now, might be able to improve balancing with it. So thanks for bringing this up
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 10:32 am
by Pi-C
Bilka wrote: Mon Jul 19, 2021 9:30 am
The same also goes for vanilla and I am not sure how you'd define "guns that you can never equip" as e.g. in editor mode you can just grab an artillery cannon and equip it as the player (and shoot arty!).
Apparently I can't do that (no mods, new game, editor mode), unless there is a special setting I haven't found yet:
editor-artillery-turret.png (2.16 MiB) Viewed 2797 times
… I don't really see a reason for that since vanilla simply doesn't care about players equipping cannon/arty shells.
Less confusion if it wasn't possible even with vanilla items. When I was playing, I knew that artillery shells are different from cannon shells (or was that cannon shells and rockets?), but still had to take special care when I was setting the recipe in assemblers, or trying to equip ammo. Stupid mistakes, I know, but they happen …
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 10:40 am
by Qon
Pi-C wrote: Mon Jul 19, 2021 10:32 am
Apparently I can't do that (no mods, new game, editor mode), unless there is a special setting I haven't found yet:
Equip the artillery GUN, not the turret that uses the gun. It's a bit hidden but I think using infinity chest allows you to spawn the actual gun (icon tank turret) the easiest way.
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 10:50 am
by Bilka
Not sure why you'd use an infinity chest when you can spawn items right in the gui:
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 10:57 am
by Pi-C
Qon wrote: Mon Jul 19, 2021 10:40 am
Equip the artillery GUN, not the turret that uses the gun.
Thanks, got it now! Actually, I've realized only yesterday that there's a difference between turrets and guns, and that you can assign trigger target masks to guns and even ammo items. Looks like I've accidentally found a solution to a problem that made my water-turrets mod almost unusable.
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 11:23 am
by Qon
I have a use for target masking as well, I found some helpful topic (yours on that water turret mod) that had info on that that I will have to find again for one of my mods.
Re: source_type of ammo items seems to be ignored
Posted: Mon Jul 19, 2021 12:26 pm
by Pi-C
Qon wrote: Mon Jul 19, 2021 11:23 am
I found some helpful topic (yours on that water turret mod) that had info on that that I will have to find again