Skip to content

Conversation

@Themostrandom
Copy link
Contributor

Loot Block Spawner (Minetest Mod)

This script defines a special unbreakable block (ctf_map:loot_block) that periodically spawns random loot when players are nearby.


📦 Features

  • Unbreakable Loot Block

    • Cannot be dug, destroyed, or obtained in creative inventory.
    • Always remains in place as a loot source.
    • Uses a yellow-tinted chest texture for visibility.
  • Automatic Loot Spawning

    • Every 15 seconds, if a player is within 5 nodes radius, the block may drop an item.
    • Items are spawned just above the block.
    • Loot is limited: a maximum of 10 dropped items can exist near the block at the same time.
  • Configurable Loot Table
    The loot table contains weapons, resources, and traps with different chances of appearing:

    • Steel, mese, or diamond swords (rare)
    • Diamonds, mese crystals, cobblestone
    • Blueberries (healing items)
    • Special blocks (spike, landmine, damage cobble)
    • Wind charges
  • Game Mode Filters
    Loot depends on the current game mode:

    • classes mode → No weapons will spawn.
    • nade_fight mode → Only steel and mese swords are allowed (diamond swords excluded).

@Nanowolf4 Nanowolf4 marked this pull request as draft August 24, 2025 15:32
@Nanowolf4 Nanowolf4 self-requested a review August 24, 2025 15:34
@Nanowolf4
Copy link
Member

I was looking for ctf_map:loot_block on your map, but couldn't find it... Where did you place them?

@Nanowolf4
Copy link
Member

There's another issue: A lot of the void. What if we placed a small central island with a few ctf_map:loot_blocks? Players could fiercely fight for control of this key point to secure loot - turning it into a strategic hotspot.
You could apply the same idea to the two empty copy-cat structures. Fill them with loot a bit.

@Nanowolf4
Copy link
Member

I’d say overall the map is quite simple; it lacks architectural variety and strategic depth

@Themostrandom
Copy link
Contributor Author

I was looking for ctf_map:loot_block on your map, but couldn't find it... Where did you place them?

image

@Themostrandom
Copy link
Contributor Author

I added islands between teams and an island in the center, I increased the chests from 60 to 70 in the bases, +10 per island between teams and 20 on the center island. I fixed the stairs in the bases, I added fire on the braziers. I added trees in the center as well as a loot block generator. I fixed the loot block mod to prevent items from spawning in the wrong mods (diamond sword in nades) and swords in classes.

screenshot

@Themostrandom Themostrandom marked this pull request as ready for review August 27, 2025 12:01
@mpixelate
Copy link
Contributor

Overall, I like the idea of having loot spawners.
But I dislike how the floor is just kill nodes.
My suggestions:
Connect team islands to the central island with diagonal bridges, so it becomes a hot spot where enemies meet. Otherwise, whoever conquers this island first makes it unreachable for others. Secondly, snipers won't let others build bridges if there isn't a single bridge. (experience from sniper arena)
And instead of kill nodes, make a big ocean. But the only escape from the ocean is the central island. Make it so players can't build towers under their base.

return false
end

minetest.register_abm({
Copy link
Member

Choose a reason for hiding this comment

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

I think that instead of ABM, you could use node timer for periodic item spawning with a chance.

Skywars/init.lua Outdated
local cumulative = 0

for _, entry in ipairs(loot_table) do
if current_mode == "classes" then
Copy link
Member

Choose a reason for hiding this comment

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

Undefined current_mode

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.

3 participants