A downloadable asset pack

Get this asset pack and 8 more for $80.00 USD
View bundle
Buy Now
On Sale!
10% Off
$20.00 $18.00 USD or more

Item drops is a suite of tools to handle the placement of game items into the world as spawned object scenes, allow them to be picked up by characters, and add them to inventories systems when traveled over. With ItemDrops it is easy to create lootable chests, harvestable farm crops, make enemies drop what they carry when defeated, or create random loot generation tables.

Video Tutorial for Spawning Items

Here's a quick summary of what you can find inside of the demo and plugin code.

Drops

These tools allow you to place instanced scenes into the game world which can represent items from your inventory system. You can drop randomly generated from a DropsTable or current inventory items a character is holding.

  • RandomDrops - Holds a drops table to spawn scenes into the game by calling spawn_drops
  • InventoryDrops - Drops items from an inventory into the game world
  • InventoryAccessSettings - Set methods / properties from your inventory system of choice to make picking up and dropping items work.
  • DropsTable - Define odd for each scene to be dropped (instanced as a 2d object)
    into the game world
  • DropsGenerator - Uses odds to generate which items from a table should
    be created in the game world

Pickups

These nodes allow you to make a scene able to be picked up and to add them to the character inventory component of your choice

  • Pickup -  Marks a scene as being able to be picked up and contains the resource and count for a pickup action
  • PickupsCollector2D - Area trigger which adds pickups item resource to an inventory node when the pickup enters it's radius.

Scene Spawner

These handle the instancing of selected drops, into the game world to represent objects in the physical game world. Typically these scenes will have pickup components but that is optional.

  • LaunchForceSceneSpawner2D -  Adds an immediate impulse force to every RigidBody2D spawned by the spawner to cause initial movement
  • ShapeEdgeSceneSpawner2D - Spawns scenes randomly along the edge of a collision shape
  • SpawnedMoveOnSpawnComponent2D - Makes scenes spawned by a scene spawner gain a component script that moves the spawned scene for a one shot time after it is instanced into the game

Gathering 

These tools let you mark nodes as harvestable and gather items from a gatherable node which will use a SceneSpawner to place those items into the game world.

  • GatherableComponent - Gives the scene the ability to have items gathered from it until the GatherableComponent is depleted
  • AutoGathererComponent - Harvests a node after a number of real world seconds passes
  • AddAfterSecondsComponent - Calls the add(int) method on another node when a number of real world seconds passes.  This can be used for renewing additional gathers on the GatherableComponent node.

Interaction

These provide your characters the ability to interact with game objects scattered around the map so long as they are given an Interactable2D component

  • AnimationToggleInteractable2D -Toggles a property on the AnimationTree on or off at the property path. Useful for open & close animations on chests, doors, and switches
  • Interacter2D - Lets a character interact with Interactable2D components
  • InteractionIndicator2D - Shows an  icon whenever a nearby Interactable2D is available

Item Drops Signal Bus

  • Holds most signals sent by plugin scripts. Share this resource across other nodes that want to receive pickup, item dropping, and gathering signals so they can respond to the data being emitted (ex. HUD display)

License

Demo Assets

Purchase

Get this asset pack and 8 more for $80.00 USD
View bundle
Buy Now
On Sale!
10% Off
$20.00 $18.00 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $18 USD. You will get access to the following files:

item_drops-0.3.1.zip 15 kB
Item Drops 0.4 Preview Version & Demo 28 MB

Development log

Comments

Log in with itch.io to leave a comment.

(4 edits)

Not sure where is best to contact you. The code runs through with no errors, but never actually spawns anything into the game world. 

I can spawn items from my loot chest no problem with the same scene I use in your DropsComponent.

when I call the " drops_component.spawn_drops(1.0) "

nothin is spawned into the world. Any help would be great thanks.

The spawn point when the code is run shows the correct spawn location as well

drops_to_spawn in the DropsComponent also shows the correct packedscene

However, after the code is run and checking the child count in the PickupsGroupNode, it is still 0

Any help here would be spectacular thanks.

So I tracked down the issue. As the only spawner that now works appears to be the spawn_scene_at_point

That chunk was however missing the add_child(instance)
just added that and it works great.

In process of a move at the moment but if you ping me on https://discord.com/invite/vxMuaeZd I can help out if you run into any other issues next week

Appreciate that thanks. I got it all sorted with the parent call and all as well. My smooth brain sometimes needs a little longer than some to wrap my head around some one elses' code lol

spawn_parent.call_deferred("add_child", instance)

Again appreciate the response. 

Cant wait for a tutorial on this add-on. Your videos on the grid_building and world_time made them really easy to implement.

Thanks it's going to come with an update to the plugin too. Trying to get it out there after this grid builder plugin update I'm working on atm.

(+1)

Awesome, glad to hear it! Appreciate all the work you do!