Categories
Development Log

I learned how to drop multiple items from hostile mobs. Also, predicates!

There’s been one item on issue #10 that has been holding the whole card back.

In theory, this is a very simple thing to do…

Of course, we did take a left turn yesterday. And the unique mechanic that came out that investigation was worthy of the time spent. It’s time to get back to the real work.

19:52 CEST

Issue #10 is critical to getting the game working correctly. I know this because I’ve taken the time to assess what are the most critical features to getting the prototype done. You can use any kind of kanban board to track your work. I’m using Glo Boards by GitKraken because I like their stuff. Trello and Miro are also cool.

We have four cards needed to reach our Prototype milestone.

My first stop is Skylinerw’s guides. I need to learn a bit about rolls and weight. Alright. It’s not so bad. Each time is multiplied by its weight. I want to use Minecraft’s rarity values to create some mental correlations, so we’ll drop Ender Pearls 2.5% of the time.

Back to Misode’s generator.

We have to deal with this stuff:

From http://github.com/Moesh/Its-Mine

We have to start somewhere. I’m not sure where, but we must go forward.

Let’s always drop one piece of food. That’s one entry. I looked around the creative menu yesterday and settled on cooked salmon.

I’ll add the rest of our items now.

Figuring out weight is not my strong suit. I’ll take a look into Minecraft’s vanilla datapack for this. The zombie files should provide an answer.

Ah, quick bit. I should have added new pools instead of entries in one pool. Duh.

I’ll make one pool with cooked salmon, another pool with a torch, cooked salmon, and a 25% chance to drop one scaffolding. I’m foreseeing this being a bit of an over-abundance. I think it’s probably better to start high and see how it feels before we begin reducing.

20:22 CEST

Studying the zombie file for another few minutes has afforded me some better options. Let’s get rid of our first entry and go with only two pools. One is our common items, set to use the function “set_count”.

This function says, “give me 0 to 2 rotten flesh.”

We’ll use this in conjunction with roll to do some fun stuff. Experiment time!

We’ll also use Random Chance condition.

Random Chance seems like it might drastically reduce drops.

We’ll proceed carefully.

This…actually turned out well. I looted 25 zombies and got this spread of items. I’m a fair bit surprised it turned out so well. Instead of wondering how much better it could be from the get go, let’s leave that to when we’re playtesting a lot.

This is feels like a worthy spread of loot given the effort put in. I would expect the player not to run out of food, and probably even have excess.

This command makes it super easy to check loot tables quickly. Check it out.

We cannot forget to deal with Silverfish.

They are a special case, as they will always drop 1 to 3 torches.

Oh nice, it took about another 20 zombie lootings before I got some Ender Pearls. I think this could actually work awesome!

Easy enough.

And it works! It took about 30 silverfish to get a stack of torches. I’m thinking this may be another lever I can use to refine some gameplay loops! We’ll see how it goes.

20:49 CEST

The final bit of work I’d like to do, before I go to sleep, is to refactor the predicates light block tables from yesterday. I got a bit of advice that I could bring this repeated stuff into one table by using reference at the table type. Let’s try that.

Well, OK. It’s about 21:20 CEST now, and I’m getting a bit tired. I’ll ask in /r/MinecraftCommand’s Discord.

21:32

Well, OK. It works. It really works!

Tonight, I learned about Predicates. They don’t exist in the vanilla datapack.

See? Not there.

But why would they be?

If we instead look at the Minecraft Wiki’s page on data packs, we see that Predicates are a whole folder in its own. It takes exactly the kind of conditions I designed in the last post and makes them available globally through this usage:

Damned sweet. I’m in love with predicates.

Off to dreamland. I’ll update the rest of the ores tomorrow.