Use To Pickup
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Use To Pickup
Like the name suggests, this mod changes how players pick up items. Instead of picking them up by touching them, one must aim at the item and press the Use button to pick it up. Now you won't accidentally pick up that blue armor when yours is only down to 198%!
Also, this mod shows neat-looking brackets around the item, and its name.
Check it out on GitHub and download the latest pk3. (GitHub zips are directly loadable by GZDoom.)
Also, this mod shows neat-looking brackets around the item, and its name.
Check it out on GitHub and download the latest pk3. (GitHub zips are directly loadable by GZDoom.)
-
- Posts: 866
- Joined: Wed Nov 08, 2017 4:23 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Use To Pickup
Just a minor cosmetic bug: dropping a weapon and looking at it will not fully display the "Pick Up" prompt, only "Pick" or "Pick U".
Instantly put this in my autoload and bound a key to "toggle usetopickup_enabled"
I'd like to suggest the option to mark/flag the item you're currently looking at for picking it up always or not, basically a selective usetopickup, for example in Golden Souls if you don't wanna waste ammo but also don't want to pick up all the coins one at a time
Edit: Also the option to "remove/activate" the thing you're looking at, for example in maps where a script is tied to an item, but you can't pick it up because you already have the maximum amount or you're not the corresponding class.
And an option to display how much health/armor/ammo this item grants or if like in the above examples any scripts or specials are tied to it.
Instantly put this in my autoload and bound a key to "toggle usetopickup_enabled"
I'd like to suggest the option to mark/flag the item you're currently looking at for picking it up always or not, basically a selective usetopickup, for example in Golden Souls if you don't wanna waste ammo but also don't want to pick up all the coins one at a time
Edit: Also the option to "remove/activate" the thing you're looking at, for example in maps where a script is tied to an item, but you can't pick it up because you already have the maximum amount or you're not the corresponding class.
And an option to display how much health/armor/ammo this item grants or if like in the above examples any scripts or specials are tied to it.
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Re: Use To Pickup
Fixed.DabbingSquidward wrote:Just a minor cosmetic bug: dropping a weapon and looking at it will not fully display the "Pick Up" prompt, only "Pick" or "Pick U".
Added that to the menus.Instantly put this in my autoload and bound a key to "toggle usetopickup_enabled"
Done. You can now place that information into a file “UseToPickup.ini”, load it into the engine (by loading the folder it's in, or wrapping it in a pk3), and U2P will use it. See documentation.I'd like to suggest the option to mark/flag the item you're currently looking at for picking it up always or not, basically a selective usetopickup, for example in Golden Souls if you don't wanna waste ammo but also don't want to pick up all the coins one at a time
Fixing bugs in other people's maps is kind of out of scope for this mod.Edit: Also the option to "remove/activate" the thing you're looking at, for example in maps where a script is tied to an item, but you can't pick it up because you already have the maximum amount or you're not the corresponding class.
Hmm… That can be done for simple cases, but it'll be wrong if the item has any sort of special behavior, such as health items that give you full health no matter what your max health is, or ammo items that only give you as much ammo as you can carry and leave the rest on the floor.And an option to display how much health/armor/ammo this item grants
I guess I could have it show that there is a map special attached, but there's no way to tell if any event listeners will react to picking it up, what exactly will happen, etc.or if like in the above examples any scripts or specials are tied to it.
-
- Posts: 866
- Joined: Wed Nov 08, 2017 4:23 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Use To Pickup
Just tried the latest version with AlwaysTouchPickup, had to rename Coin to Coin_Pickup though. While it does work, the pick up distance is shorter than with the mod disabled, e.g. less distance between you and the item in question is required to grab it. In fact, if I run fast enough, I can move over it without getting it.
Edit: Don't know if it's because I played on an older savegame which had the previous version, but some ammo pickups now give double the amounts
Edit: Don't know if it's because I played on an older savegame which had the previous version, but some ammo pickups now give double the amounts
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Re: Use To Pickup
You don't have to change the original INI! Make a new folder, put a file in it named “UseToPickup.ini”, and write this into it:
Then load that folder into GZDoom, along with the rest of the mods.
If you want that to not apply to subclasses of Coin_Pickup, write this instead:
Notice no + after the class name. You can also put a - after the class name to make settings apply to all superclasses.
Code: Select all
[Coin_Pickup+]
AlwaysTouchPickup=yes
If you want that to not apply to subclasses of Coin_Pickup, write this instead:
Code: Select all
[Coin_Pickup]
AlwaysTouchPickup=yes
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Re: Use To Pickup
I don't touch the items' amounts. I just activate their on-touch behavior when you pick them up. Not my fault!
-
- Posts: 185
- Joined: Sun May 19, 2013 12:22 pm
- Location: Philadelphia
Re: Use To Pickup
This is amazing! May I include this in my mod? Credits and special thanks would be given to you 100%
-
- Posts: 866
- Joined: Wed Nov 08, 2017 4:23 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Use To Pickup
I haven't found a way to reliably trigger it, seems to happen at random, but as mentioned earlier sometimes pickups are worth double. Probably the item in question isn't always removed after getting its contents so they are given again.
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Re: Use To Pickup
Well, one possibility came to mind: the on-touch behavior isn't supposed to trigger if the item is not marked as being pick-up-able (the SPECIAL flag), and my code wasn't always checking that before calling the touch routine again.
I just pushed out a change such that the code will check that flag first. This may or may not fix the double ammo issue. Give it a try, and let me know if it happens again.
In other news: you can now customize the color and opacity of the brackets and labels.
I just pushed out a change such that the code will check that flag first. This may or may not fix the double ammo issue. Give it a try, and let me know if it happens again.
In other news: you can now customize the color and opacity of the brackets and labels.
-
- Posts: 866
- Joined: Wed Nov 08, 2017 4:23 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Use To Pickup
When traveling between levels in a hub I get the error "multiple u2p_playerstate instances for player number 0! Deleting one of them."
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Re: Use To Pickup
Fixed!DabbingSquidward wrote:When traveling between levels in a hub I get the error "multiple u2p_playerstate instances for player number 0! Deleting one of them."
-
- Posts: 1562
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Use To Pickup
Hi, it still ignores one-sided lindefs. I can still pick up items through wall.
-
- Posts: 866
- Joined: Wed Nov 08, 2017 4:23 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Use To Pickup
Could you remove the "on-touch pickup" delay for items with AlwaysTouchPickup?
-
- Posts: 184
- Joined: Tue Aug 30, 2016 4:47 pm
Re: Use To Pickup
I forgot to check if a line in the way is one-sided! Whoops. Pushed out a fix.ramon.dexter wrote:Hi, it still ignores one-sided lindefs. I can still pick up items through wall.
The pickup delay doesn't apply to AlwaysTouchPickup items. The delay, rather, was the result of the mod only scanning for items to pick up (by touch or otherwise) once every 4 tics.DabbingSquidward wrote:Could you remove the "on-touch pickup" delay for items with AlwaysTouchPickup?
I've changed this to be configurable. By default, it now scans (and picks up AlwaysTouchPickup items) on every tic, rather than every 4 tics. This imposes a performance hit, though, especially in multiplayer, so there is now an option in the menu to change that.