Two browser tools for game data: nested world maps and node-graph skills.
Both are editors for content that other code reads. One draws the world maps of a real-time online RPG, where every object is a structure that can be generated and still edited by hand. The other opens the skills and buffs of a data-driven battle system as a graph of cards and sends the result into a live fight with one click.
Neither uses a UI framework. Claude Code wrote the code; I chose what the data looks like, which rules keep the editor usable, and what each screen has to make easy. The screenshots on this page are real, taken from the running editors.
World editor
For the maps of WebMmorpg. Plain JavaScript in the browser, a vendored polygon-clipping library, unit tests.
Skill editor
For the skills and buffs of a JavaScript battle engine used by several small games. TypeScript on Vite, no runtime dependencies.
My part
The data shapes, the nesting and generation rules, the screens and the checks. The agent does the typing, I decide what it types.
2editors, both plain browser apps without a UI framework
6levels of nesting in the world editor, each one generated and editable
72 + 21skills and buffs in the skill editor's database, each one opens as a graph
9 + 5effect types and modifier types in the skill editor, nested as deep as needed
Editor 1 / World maps
A map editor where every object is a generated, editable structure
A browser editor for the world maps of WebMmorpg. You click an object, change its properties in an inspector, and objects are nested structures. Each level can be generated from the level above it, and holds more objects inside.
About the pictures. They are real. I ran the editor, generated a city and a glade through its own forms in an empty test map and captured the screen. The interface is partly in Russian.
6.5klines of plain JavaScript in 39 files, no framework, plus a vendored polygon-clipping library
21test files, about 6,000 lines of unit tests next to the code
5cell types: city, glade, farmland, pasture and plain
8drawing tools: Rect, Polygon, Zone, Point, Grid, Walls, Color Zone and Road
World tab
A world made of cells
The world is a field of Voronoi cells. Their sites sit on a hex lattice with a little seeded jitter: one in the centre, then rings of 6, 12 and 18, so the same seed always gives the same world and Reroll gives another. There is no map-wide width and height. The walkable area is the union of the cells that have been assigned to something.
Click a cell to select it, shift or ctrl to add more, then make a location from the selection. Each cell gets a type and a biome tag from the inspector, and its own territory tint. Roads between cities and the line from a farmland or pasture cell to the city that owns it are derived from the field on demand, never stored.
The World tab. Three cells belong to one location: the city (red) in the middle, a glade (grey) and a farmland cell (orange) linked to its owner city by the line. The list of locations is on the left.
Hands on the objects
Select, move, edit, undo
Before any generation, it is an ordinary editor for shapes. These are the parts that make it pleasant to use.
Selecting
A click picks the top shape, and clicking the same spot again cycles through the shapes stacked there. The pick is decided on release, so a drag moves the shape that is already selected, not whatever sits under the cursor. Rects have a rotate handle, polygons have vertex handles.
An inspector per kind
A rect has position, size, rotation, a kind and an NPC. A grid has a size, a cell size, a colour and a wall count. Zones and points have a kind, colour zones and roads a colour and a width. Everything can be named, and every coordinate is a whole number.
Scrub, do not type
Click-hold the label of a number and drag left or right to change it, the way Unity's inspector does. The panel can be resized by dragging its edge. A typed edit and the end of a scrub commit in the same way.
Eight tools
A grid is a rotatable rectangle of square cells and Walls paints or erases cells by click or drag. Painted walls go through the same union as every other obstacle, so a drawn house is a real collision shape. Colour Zone and Road paint the ground.
A tree, not a flat list
The left panel lists everything by cell and then by generated group. Rows drag to reorder inside their kind. One generic tree component serves both tabs, and each tab feeds it its own node data.
Undo and one button
Ctrl+Z covers move, rotate, vertex edit and delete of every shape kind, a deleted generated group and a city regeneration. Save and Bake bakes the navmesh and the merged obstacles, then writes the raw map, the server GeoJSON and the client map.
Objects inside objects
Six levels, and each one can be generated
This is the part I care about most. Nothing is a loose shape: every object lives inside another one, and most levels can be built by a generator from the level above and then edited by hand.
Level 0
World
A seeded field of Voronoi cells over a hex lattice of sites. It belongs to the world layer, not to any one map.
seed
Reroll
cell size
Level 1
Location
A named set of cells. The Location tab edits one location at a time, and only inside its cells.
create from selection
shift and ctrl select
Level 2
Cell
A type (city, glade, farmland, pasture or plain), a biome tag and a territory tint. Everything drawn inside a cell is stamped with the cell's index, so the tree files it under that cell. Shapes that fit nowhere land in an Unassigned bucket.
bulk type edit
territory tint
owner link
Level 3
Generated group
A city cell gets a group of 49 objects in the example below: ground, wall segments with real gate gaps, towers, an outskirts bubble per wall segment, a plaza with a pavement square, house floors and the houses. A glade, farmland, pasture or plain cell gets a group built from a list of places of interest instead.
generated from a form
regenerate
delete whole group
Level 4
House spot
A grid shape with its own narrow form: size, distance offset, angle offset, rotation offset. Its wall pattern is a hollow ring of 25 px cells with a two-cell doorway cut into the front row, so the door is a real gap in the collision, not a marker.
generated
live edit
survives regeneration
Level 5
Points inside
Each house carries two points: HouseInterior at its centre and HouseEntrance just outside the doorway. Each gated wall edge gets a Gate point and two GateGuard points. They are plain named points, there for a person to hand-match to game content.
HouseInterior
HouseEntrance
Gate
GateGuard x2
built by a generatoredited by hand and kept
Level 3: a city into a cell
One form, forty-nine objects
Pick a city cell and generate. The city comes from a form: a wall distance for each vertex of the cell, wall thickness and colour, towers on the corners, which edges get a gate and how wide the gap is, how many houses stand in a ring and how far out, how big they are, and the colours of the plaza, its pavement and the outskirts.
Every field commits when it changes, so dragging a number rebuilds the city while you watch. In the picture: six corner towers, one gate with its Gate point and two GateGuard points, a plaza with an inset pavement square, six houses on a ring, and a rounded outskirts bubble outside each wall segment.
A city generated in an empty test map. The tree is on the left, the canvas in the middle, the city form on the right. Labels on the canvas are the generated shapes' own names.
Level 4: a house in the city
Tune a house, regenerate the city, keep the tuning
Each house is its own grid shape, nested in the tree under the city, with its two points under it. Its form has four numbers. An edit moves the house on the ring with the same formula the generator uses, so nothing else is rebuilt.
Here the house at the bottom left was nudged by hand, and then the whole city was regenerated from its form. The new shapes got new ids, but the house came back with its size and offsets, because spot settings are matched by ring position. The 8 by 8 cells with 26 walls are the hollow ring of 28 minus the two doorway cells.
A hand-tuned house (angle offset 14, distance offset minus 20) after a regeneration. The selected house is drawn white. The tree shows every house with its Interior and Entrance points.
Level 3 again: the other cell types
Glade, farmland, pasture, plain: a list of places
These cells carry a list instead of a city. A row is a type, a template name, a position and a size. Size zero makes a point, anything else a square zone. Rows can be added, edited and removed, and every change rebuilds the group, the same way as for a city.
The inspector is a resizable panel: drag its edge and the form gets room for long rows. The tree nests the generated shapes under the group, the group under its cell and the cell under its location.
A glade with four places of interest, a camp, a spawn, a gathering spot and a quest point. The inspector is widened by dragging its edge.
Rules that make it work
What keeps nested generation usable
Generating things is easy. Generating them in a way that still lets a person edit is the design work.
First generation and regeneration are the same call
Whether a cell has a city yet or not, the form sends its full state to one function. The Generate button and every field edit do the same thing. There is no staged apply step, so what is on the canvas is always what the form says.
Source: the city and glade forms
Rebuild the generated, keep the hand-tuned
Regeneration deletes the generated shapes and builds new ones, but it keeps the group and its name, and each house spot's own size and offsets, matched by ring position. A spot fixed by hand survives a change of the house count.
Checked in the editor: offsets 14 and minus 20 survived
Edit a child, never rebuild the parent
A house's form writes straight onto its shape and recomputes the position with the generator's own formula. Editing a child never triggers a regeneration of the city. That is what makes hand-tuning cheap, and it keeps the two code paths from drifting apart.
Source: the house form and the city generator
Flat in the data, nested on screen
Nothing is nested in the file. Shapes stay in flat lists and carry a cell index, a group id and a house index, and the tree builds the nesting from those tags. So the navmesh bake, the collision union and the file formats never had to learn about cities.
Source: the map model
One tree component, many adapters
The tree never asks what a shape or a cell is. A small adapter per tab builds plain node data: label, children, drag group, actions. A new tab means a new adapter, not a change to the renderer.
Source: the tree component's header
Destructive actions say what they take
Deleting a generated group asks first and names what goes with it: the whole city with all its objects. It is also one undo step, so a wrong click costs nothing.
Source: the delete confirmation and the group snapshots
How it was built
From a rectangle tool to nested generators in four weeks
Dates are commit dates in the working repository.
The editor starts
Plain JavaScript in the browser: rects, polygons and zones, a navmesh baked with a polygon-clipping library, and a compile step to the GeoJSON the server reads for collision and line of sight.
Ground colours
A Visual view for ground colour polygons. Maps move into shared folders that the editor, the server and the client all read.
Grid objects
Rotatable grids of cells with painted walls, for houses. Five grid houses around a plaza replace hand-made rectangles.
Editing comfort
Undo, a layers panel with drag reorder, a name field, drag-to-scrub numbers, click-cycling through stacked shapes, whole-number coordinates.
Locations
A Voronoi field you paint into named regions.
Nesting arrives
Cells get types, city and glade generators appear, generated shapes become groups, roads between cities are derived, and one tree with cells as roots replaces the two layer lists.
The world becomes cells
No map-wide width and height any more. Sites are placed on a hex lattice, and one Save and Bake button replaces several.
Houses become objects
A form per house, a real doorway, gate guard points, interior and entrance points. 439 tests pass.
Colours and a resizable inspector
City ground and house floor colours, and an inspector panel you can widen by dragging its edge.
Editor 2 / Skills and buffs
A node graph for the JSON that drives combat
The skill editor opens the same JSON file the battle engine loads and shows one skill or buff at a time as a left-to-right graph of cards. You change a field, swap a type, add or delete a node, and the Test Skill button sends the result to a live battle.
About the pictures. They are real. I ran the editor on its own data, 72 skills and 21 buffs, and captured the screen. Nothing was saved to the data files: the editor keeps edits in memory until you download them.
1.4klines of TypeScript in three files for the whole editor, plus about 500 lines of CSS
0runtime dependencies: Vite and TypeScript are dev tools only
15stats a buff can change, each with a short label (AD, Armor, MR, Crit and more)
7damage tags: Physical, Magical, Fire, Cold, Lightning, Poison and Bleeding
A skill as a graph
Ambush: a cast, a hit, a chance of bleeding
Every card is a typed node. The skill root holds the id, emoji, colour and description. Its triggers say when things happen: on cast, or when the skill hits. Effects hang under a trigger, and a condition effect keeps what it guards in its own sub-effects. In Ambush the cast gives the caster a Combo Point, and the hit deals Physical damage and, with a 35% chance, applies Bleeding to the target.
Lines are coloured by what they connect and labelled where it helps. Each column is one level deeper and a parent sits at the middle of its children. You pan by dragging the empty background. Damage is a formula string such as 100 + 50 AD: a base plus a share of the caster's stats.
The skill Ambush. Two triggers in the second column, a Buff, a Damage and a ChanceCondition in the third, and Bleeding nested inside the condition in the fourth. The list of all 72 skills is on the left, with each skill's emoji and colour.
What a skill is made of
Five kinds of node, nested as deep as needed
A skill is a tree. The editor builds that tree from the JSON, so what you see is exactly what is in the file.
Root
Skill
An id, an emoji, a colour and a description, plus any extra text or number field the file carries. Three buttons add a trigger, a subject or a required buff.
+ Trigger
+ Subject
+ Required Buff
Branch
Trigger
When effects fire. A skill has OnCast and OnTargetHit, a buff has OnApply and OnTick. A trigger holds a list of effects.
OnCast
OnTargetHit
OnApply
OnTick
Leaf or branch
Effect
Nine types, each with only its own fields: a damage or heal formula, a buff id with stacks, duration and power, a chance, a health threshold. Every effect also has a category (Primary, Secondary or BuffPrimary), a target (Self or Other) and tags.
Damage
Heal
DamagePerBuffStack
Buff
Debuff
ChanceCondition
BuffCondition
HealthCondition
RemoveBuff
Recursive
Sub-effect
Any effect again, under any effect, as deep as the design needs. A condition effect keeps what it guards here.
Branch
Subject
A passive rule that rewrites other effects instead of acting on its own: OnThisHit, OnGlobalTargetHit or OnGlobalSelfHit. Its filter is a target category, a set of effect types and a set of effect tags. A subject holds modifiers.
OnThisHit
OnGlobalTargetHit
OnGlobalSelfHit
Leaf or branch
Modifier
Five types. Four change a number: damage, chance, buff duration, buff power. AddSubEffect attaches a whole new effect to whatever the filter matched.
ChangeDamage
ChangeChance
ChangeBuffDuration
ChangeBuffPower
AddSubEffect
Recursive
Sub-effect from AddSubEffect
The same effect card as everywhere else, with its own sub-effects below it.
Root again
Required buff
A complete buff embedded in the skill, with its own triggers, subjects and stats. It is edited right there in the same graph.
Buffs tab
A buff is the same shape plus numbers
Switch the side list to Buffs and the root becomes a buff card: id, emoji, colour, description, is_unique, stacks_max and two stat editors, one for the base values and one for what each stack adds. Stats are labelled with short names and added from a small dropdown. Burning Dot holds up to three stacks. It lowers its owner's attack damage by 5 and armor and magic resist by 10 each, and every stack lowers armor and magic resist by 5 more.
Damage over time is nothing special. It is an OnTick trigger holding a Damage effect: here 15 plus 5 AD of Fire damage on every tick, in the BuffPrimary category and aimed at the buff's owner.
The buff Burning Dot. The list on the left is the whole buff database, 21 entries.
Subjects
A passive skill has no triggers, only a rule
Bloodthirst never casts anything. Its subject listens to every Primary Damage effect tagged Physical, from any skill, and attaches a sub-effect to it: a 25% chance to apply Bleeding for four ticks. The chain of cards is Skill, Subject, AddSubEffect, ChanceCondition, Buff: five levels, as deep as any skill in the database goes.
The filter is three fields, a target category and two sets of checkboxes for effect types and effect tags. That is how one small card changes every physical attack without editing any of them.
The passive Bloodthirst, left to right: the skill, its subject with the filter, the AddSubEffect modifier, the chance and the Bleeding buff.
Buff picker
Pick a buff, do not type its id
Every buff id field is a combobox. Focus it and the list opens with each buff's colour dot and emoji, and typing filters it. Buffs embedded in the skill come first, then the whole database, so a skill under construction can point at its own required buffs.
The menu is attached to the page body with a fixed position, so the scrolling canvas that holds the cards never clips it. The same pattern backs every card that names a buff: Buff, Debuff, DamagePerBuffStack, BuffCondition and RemoveBuff.
The dropdown on a Buff card, open on combo_point.
The other half
Edit a number, press Test, watch the fight
Test Skill packs the skill you are editing into the address of the Battle Tester and opens it in the second tab. The tester loads the real battle engine and the real database, puts your skill first in the player's list and gives the player three random skills and the enemy four.
Here Ambush was edited from 100 + 50 AD to 120 + 60 AD and used once on a 400-health enemy. The log says 156: 120 plus 60 percent of the caster's 60 AD. The health bar shows what was really lost, 141, because the enemy's armor, reduced by the attacker's penetration, takes its share. The tooltip describes the skill in words, built from the same JSON, together with the buffs it applies.
The Battle Tester inside the editor after one cast of the edited Ambush. Combo Point sits on the player, Bleeding on the enemy, and the tooltip is generated from the skill's JSON.
Rules that make it work
What keeps a graph editor honest
A node editor looks like a drawing tool. It is only worth having if the file behind it stays exactly what the engine expects.
The editor edits the real file
It parses the skill or buff JSON and changes those objects in place, with no model of its own in between. Fields it has no card for stay in the file, and extra text or number fields on a skill show up as plain text rows.
Source: the node editor's load and field code
Nothing is written until you download
The editor works on a deep copy of the skills and buffs files. Save updates the list in memory, Copy JSON puts the open node's JSON on the clipboard, and Download writes skills.json or buffs.json. A half-finished edit cannot break the database the games load.
Source: the editor's entry file
Changing a type replaces the node
The header of each card is a dropdown. Picking another effect type swaps the node for that type's defaults, so a Damage card cannot keep a stale buff id, and every card shows only the fields its type has. Every add button creates a complete node with default values.
Source: the default node builders
Layout is computed from the tree, in passes
Cards are created hidden, measured, laid out one column per depth with each parent centred on its children, positioned, and only then joined with curves, so the lines meet the real card heights. Structural changes rebuild the graph, typing in a field does not.
Source: the render pipeline, six passes
One engine, one tooltip, one data file
The tester, the games and the editor all read the same data files through the engine's own deserializer. Tooltips and the combat log come from a shared UI package. The editor knows nothing about combat rules: formulas are text and it never evaluates them.
Source: the tester's entry file and the shared UI package
Order does not matter, so there are no ordering controls
Behind the cards the engine applies modifiers in four fixed passes: structure, chance, flat and percent. Reordering the subjects on a skill cannot change the outcome, so the editor needs no drag handles and no priorities.
Source: the engine notes and its pass tests
What the two share
The same four habits, in two very different tools
One edits space and the other edits rules, but I designed them the same way.
The file format comes first
Both editors draw a tree out of data that the game code already reads. Neither keeps a private model that has to be translated back on save, so a change in the editor is a change in the file and nothing else.
Edits are cheap to undo or discard
The world editor has Ctrl+Z for every shape kind and a single undo step for a deleted city. The skill editor keeps everything in memory until a download. Trying something never costs anything.
A short loop to the real thing
One button bakes a map into the files the server and client read. One button drops the open skill into a live battle. The distance between an idea and a result is a click, not a build.
Plain parts, no framework
Both are plain DOM and small modules: a generic tree renderer fed by a small adapter per tab in one, a single node renderer driven by node kinds in the other. They are easy to read, and an agent can change one without learning a framework first.