Skip to content

Add custom loot table for missing pickup loot#53

Open
Mathys-Rituper wants to merge 1 commit intoAccieo:mainfrom
Mathys-Rituper:main
Open

Add custom loot table for missing pickup loot#53
Mathys-Rituper wants to merge 1 commit intoAccieo:mainfrom
Mathys-Rituper:main

Conversation

@Mathys-Rituper
Copy link

Pickup Treasure Loot Table

Overview

This custom loot table (cobbleworkers:pickup_treasure) provides Pokémon with the Pickup ability a themed set of items that mimics the Pickup ability from the mainline Pokémon games, since the default loot tables imported from Cobblemon are missing some items.

Loot table contents

  1. Cobblemon Items Only - Only includes items from the Cobblemon mod, no vanilla Minecraft items

  2. No Duplicates - Items in this loot table do not appear in other Cobbleworkers loot tables (dive_treasure, archeology_treasure) or Cobblemon's built-in loot tables

  3. Thematic Relevance - Items are chosen based on Pokemon Scarlet/Violet pickup table

Integration with PickUpLooter Job

The PickUpLooter job uses this loot table alongside Cobblemon's built-in loot tables:

  • **cobbleworkers:pickup_treasure** (NEW)
  • cobblemon:sets/any_ancient_held_item
  • cobblemon:sets/any_common_pokeball
  • cobblemon:sets/any_evo_stone
  • cobblemon:sets/any_exp_candy
  • cobblemon:sets/any_natural_heal_item
  • cobblemon:sets/any_type_gem
  • cobblemon:sets/any_apricorn_seed
  • cobblemon:villages/village_pokecenters

This ensures a good variety of items while avoiding duplicates.

Dev convenience

Also added a few extra logging statements to better debug Pickup in the future

@Mathys-Rituper
Copy link
Author

Btw : as of right now, I did not put a ton of time into balancing the odds for this new loot table. Since it is an opinionated decision to make, this is left to the mod's maintainer

}

val selectedId = lootTables.random()
Cobbleworkers.LOGGER.info("[PickUpLooter] Selected loot table: $selectedId at $origin")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this will pollute server logs quite a lot, especially servers with quite a few players that are using pick up farms.

if (drops.isNotEmpty()) {
lastGenerationTime[pokemonId] = now
heldItemsByPokemon[pokemonId] = drops
Cobbleworkers.LOGGER.info("[PickUpLooter] Generated ${drops.size} items: ${drops.joinToString { "${it.item}" }}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this will pollute server logs.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but ideally we should also add a chance to each one, otherwise it will be guaranteed that a single item from each pool is generated every single time, which is quite unbalanced.

It should follow the same approach as the archaeology treasure loot table.

Copy link
Owner

@Accieo Accieo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you okay with implementing the stuff mentioned in the comments? If not, I can take over, I will leave it up to you.

whatever the decision, thanks a lot for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants