tModLoader

tModLoader

Ammo Tool
60 条留言
QuestionMark  [作者] 5 月 16 日 上午 5:27 
Right click the item without holding ammo
Silvia 5 月 15 日 下午 3:20 
Can you unassign ammo?
QuestionMark  [作者] 4 月 26 日 下午 3:00 
Glad to hear!
Rhoenicx 4 月 26 日 下午 1:54 
With the latest version (v1.0.5) it works as intended, perfect!
QuestionMark  [作者] 4 月 25 日 上午 7:19 
I probably wasn't aware of the hook at the time of writing. Thanks for pointing that out!
Rhoenicx 4 月 24 日 下午 7:43 
Addition to my comment below: Looked through the code and I see you increase stack size by 1 inside the global RightClick hook. Is there a reason ConsumeItem hook was not used?
Rhoenicx 4 月 24 日 下午 7:37 
Fellow mod creator here. When I right click my weapons with ammo the stack size of the item is increased by 1 (which shouldn't happen because maxStack is 1). I have ConsumeItem hook return false. I expect this mod does some kind of countermeasure to not have the item consumed? For example +1 on the stack?
QuestionMark  [作者] 4 月 1 日 下午 1:56 
The mod might fail if you have any other mods affecting inventory right-click behaviour or ammo consumption mechanics. If that's the case, there's not much I can do
Mr_N 4 月 1 日 上午 4:37 
Not to be rude but the mod is not fucking working. I tried shit with vanilla guns and ammo but no it doesn't work. I looked everywhere to make this work but I guess my ranger calamity loadout idea is fucked.
Love you, Ace 2024 年 12 月 14 日 下午 7:42 
bro said fuck no in the nicest way possible : ( )
QuestionMark  [作者] 2024 年 12 月 9 日 下午 5:05 
I've considered it, but this feature goes a bit beyond my vision for the mod
jetmoonlord 2024 年 12 月 6 日 下午 6:38 
do you think you can you add a way for the selected ammo types to work while in a piggy bank or void vault?
radioactivefoxsiddy 2024 年 11 月 2 日 下午 2:35 
sure, give me a bit though, i know it was doing it on modded weapons, mainly arsenal
QuestionMark  [作者] 2024 年 11 月 2 日 上午 9:08 
That's interesting, I'm not able to replicate that. Do you mind sharing your mod list?
radioactivefoxsiddy 2024 年 11 月 2 日 上午 8:42 
alright, thats unfortunate, it appears that whenever i remove ammo from the weapon it gets rid of my rerolls as well
QuestionMark  [作者] 2024 年 10 月 24 日 下午 3:00 
That would take quite a bit of reorganization to get working, unfortunately, so don't count on it
radioactivefoxsiddy 2024 年 10 月 21 日 下午 2:44 
able to make it so the remove ammo from weapon button is able to be put on a different keybind?

my dumbass keeps hitting it by mistake lol
Empy 2024 年 7 月 3 日 上午 8:33 
This needs to be in the base game
Austinsm 2024 年 6 月 29 日 上午 3:30 
this does not work with calamity overhaul.. mainly the reloading mechanic
Vehicular Manburger Helper 2024 年 5 月 18 日 上午 9:24 
A mod so useful it's honestly surprising it isn't a feature in vanilla.
andro951 2024 年 5 月 3 日 下午 1:32 
QuestionMark, thanks for your help. The Ammo Bag was still incompatible with your mod, but I added some janky detours to force them to play nice when Ammo Tool is enabled. (Vacuum Bags 1.2.4.8) If anyone finds anything else incompatible with our mods, please let me know.
andro951 2024 年 5 月 3 日 下午 1:30 
Thanks, Spicy. We were able to get it working.
Spicy 2024 年 5 月 2 日 下午 5:32 
@andro951 love your mods! and as for the issue it happens with any ammo, I tried with musket bullets and some modded Wulfrum bullets from Calamity Ranger Expansion.
andro951 2024 年 5 月 1 日 下午 1:08 
Looks like I lied. I didn't fix the issue.
I'll leave a discussion post with the error.

I think this may be the culprit. I suggest using TryGetGlobalItem() instead of GetGlobalItem.
public static GlobalModItem MyModItem(this Item item)
{
return item.GetGlobalItem<GlobalModItem>();
}
andro951 2024 年 5 月 1 日 下午 1:00 
Hello, I'm the creator of Weapon Enchantments and Vacuum Bags. I just fixed a bug that between Vacuum Bags and Ammo Tool that causes the ammo bag to disappear (because I was passing non-ammo items to ItemLoader.CanChooseAmmo())

Spicy, I haven't heard of this issue before. I can't think of anything specific from Weapon Enchantments that could cause the issue you're describing. What specific weapon and ammo were you using when it duplicated the weapon?
Spicy 2024 年 4 月 16 日 下午 12:59 
The bug happens with the mod "Weapon Enchantments" when trying to unequip bullets from weapons, I only had Calamity and Thorium with their submods installed.
QuestionMark  [作者] 2024 年 4 月 15 日 上午 10:46 
Do you have any other mods that affect right-click behaviour for items while in the inventory?
Spicy 2024 年 4 月 15 日 上午 8:18 
I am getting the same duped weapon when removing the ammo from a weapon.
Fudgepants 2024 年 3 月 22 日 上午 2:33 
Was just going to come and request that too. Looking forward to the update :)
QuestionMark  [作者] 2024 年 3 月 14 日 下午 2:32 
Thanks for the suggestion. You can expect this for a coming version
Cirnoバカ 2024 年 3 月 11 日 上午 7:31 
Can you do a save function?,Every time you exit the game.,You need to re-set it when you enter it again.。 thank :)
Adolf Charles 2024 年 2 月 26 日 下午 11:34 
best mod ngl
QuestionMark  [作者] 2023 年 11 月 7 日 上午 11:59 
Was the gun added by a mod, or do you have any other mods that might affect right-click behaviour in the inventory?
Welch's Grape Ghost 2023 年 11 月 7 日 上午 11:39 
Attached bullets to a gun, right clicked it in my inventory and then it duplicated the gun
redandblue101 2023 年 9 月 22 日 下午 2:20 
oh shift right click w empty hand

figured it out. amazing mod btw
redandblue101 2023 年 9 月 22 日 下午 2:20 
how do I disable the ammo chosen and reset it back to no ammo selected?
QuestionMark  [作者] 2023 年 9 月 11 日 下午 8:05 
The mod has already been ported, just keep an eye on the change notes if you're unsure
Nimbus 2023 年 9 月 11 日 下午 6:35 
See below comment:
Chaos 2023 年 7 月 12 日 下午 6:11 
May you port it to 1.4.4?
I would appreciate that :)
QuestionMark  [作者] 2023 年 6 月 17 日 下午 4:09 
Unfortunately how Calamity weapons treat ammo use is beyond my control
Sir Cweepysburgh 2023 年 6 月 17 日 下午 1:16 
This mod seems to act strangely with the Calamity mod's "Bullet-filled Shotgun". The weapon still prioritises the ammo in the first slot even with ammo locked to it. Tested on the "Aquashard Shotgun" from Calamity and the vanilla "Flintlock Pistol" to confirm. Both work properly.
QuestionMark  [作者] 2023 年 6 月 13 日 上午 9:55 
That's how the mod was designed to work, since ammo is still chosen by the weapon based on vanilla's default ammo consumption order, albeit restricted to the types inside of the attached ammo list. If the list weren't cycled with the other ammo types in the inventory, it would be unchanged.

I want to keep this mod as simple and widely compatible as possible, but I understand that I might be undermining it, so if this feature is added in the future it will likely be configurable
Muniategui 2023 年 6 月 13 日 上午 6:09 
I do have a doubt, you can attach multiple ammos to same weapon, once the first ammo is finished it will use the next one. However as i understood the cycle would swap those 2 selected ammos to use the other one i attached. However this is incorrect, it will change the attached ammo to the weapon which does not really make sense?

I mean i attached 2 ammos i would like to cycle between those 2 not the other ones i have in the inventory.

Did i get it correct? Am i missing something?
Adolf Charles 2023 年 4 月 27 日 上午 9:51 
something I needed so desperately
Matt0407 2023 年 4 月 27 日 上午 2:07 
can you make this client side?
QuestionMark  [作者] 2023 年 1 月 1 日 上午 10:31 
I'll look into that, thanks
Haite 2023 年 1 月 1 日 上午 12:01 
Not sure what happened, I've tried with Thorium, "equipping" ammo and firing does work, but it doesn't cycle through the ammos. Other than that, amazing mod for a common issue! Thanks a ton
QuestionMark  [作者] 2022 年 11 月 9 日 下午 4:46 
I try my best to answer any questions about the mod as soon as possible! I'm happy to hear the update works for you
garn is high 2022 年 11 月 9 日 上午 12:11 
I didn't realize that you responded to my question about what hooks you're using (on the same day I posted it too)...

Anyways, thanks for removing the single ammunition limit. Your mod actually works *perfectly* in tandem with mine (AlternatingAmmo) now that you're able to choose multiple ammo types. This will make calamity runs so much fun being able to specify ammo types with your mod and alternate through them with mine.

Next time I post a mod update I'll be sure to mention your mod is a good mod to use with mine. This mod is awesome great work btw.
QuestionMark  [作者] 2022 年 10 月 27 日 上午 7:34 
It does work for modded ammo!