Aleph symbol

THE INFINITE ARCHIVE

formless and empty

I saw all the mirrors on the Earth, and none of them reflected me.

Fingerprint: c9ae8b3 — Drift: 1d · 1.10h · +0.1h · 477 wc

Touch Grass

A useless Project Zomboid mod and some frustrations.

Created: 2026-01-07
Domain: Development
Division: Writing
Modified: 2026-01-28
RSS: RSS

A deliberately useless mod.

Touch Grass is a small mod I made for Project Zomboid that does exactly one thing.

It lets you go outside, right click a tile of grass, and choose an action called "Touch Grass."

That's it.

There are no stats. No buffs. No debuffs. No hidden effects. It does not reduce stress, boredom, or anything else. The game does not acknowledge the action in any meaningful way. It is completely useless by design.

Well, that's not true. It makes your character acknowledge the grass vocally which attracts Zombies. Anyway, I thought this would make a great April Fools joke.

Now for the part that sucked.

Modding for Project Zomboid was a nightmare.

At the time, there was almost no usable documentation. The official wiki was years out of date. Most guides were dead links or half broken forum posts. Anything that used to be useful had rotted away.

Every forum post or conversation ended the same way. Just use the official Discord.

That was a problem. The information might have existed, but only in chat scroll back. If you weren't there when someone answered, it might as well not have existed at all.

I spent about a week trying to figure out how to add a single action to Zomboid's context menu. Not a system. Not a mechanic. One menu option. I didn't learn it from docs. I learned it by opening dozens of other mods until I found one that called the right context menu method and went from there.

One thing I did actually learn is that you're not working with Lua tables most of the time. Functions like getPlayer() return Java objects. You're calling Java and getting Java back. Lua is only the calling syntax.

Because of that, none of Lua's usual strengths apply. You can't inspect objects, iterate fields, or dump state to see what's inside. You can't poke values to see what changes. You only get whatever surface the engine chose to expose, usually as methods.

A example looks like this.

local player = getPlayer()

player is not a table. It's a Java IsoPlayer object.

You can still call methods on it:

local x = player:getX()
local y = player:getY()
local z = player:getZ()

Those are Java methods being called through Lua syntax.

Same thing when you go deeper:

local inv = player:getInventory()
local items = inv:getItems()

getInventory() returns a Java ItemContainer.

getItems() returns a Java collection.

At no point are you dealing with Lua tables, even though the syntax looks Lua-ish.

What you can't do is this:

print(player.health)
print(inv.capacity)

Those fields may exist in Java, but unless there's an exposed getter like getHealth() or getCapacity(), Lua can't see them.

This isn't unusual for Lua bindings. Calling into engine objects and only having access to a limited set of methods is normal. What made Project Zomboid painful was how little of that surface was documented or discoverable. There was no reliable way to tell what was exposed, what wasn't, or why something didn't work without digging through other mods or the source.

56bd06aa518347938af45da83f8efeb0

Revisions

MODIFIED c9ae8b3 2026-01-26 03:56:57
Spell check
MODIFIED 44429ef 2026-01-10 06:01:41
switched hashes to SHA256
MODIFIED a591b02 2026-01-09 01:17:01
added article image