NPCs that hold grudges. Ghosts that get lonely. JSON files with anxiety.
You write this:
{
"essence": "Lonely ghost",
"dialogue": {
"intro": [{ "lang": { "en": "Why am I alone?" } }]
}
}
Result:
- Ghost spawns ✅
- Ghost speaks its dialogue ✅
- Ghost gets lonelier over time ✅
- Ghost eventually fades away ✅
You wrote zero code.
Yeah. In any language you want.
{
"dialogue": {
"intro": [{
"lang": {
"en": "You see me, but do you remember me?",
"th": "เธอเห็นฉัน... แต่เธอจำฉันได้ไหม?",
"ja": "見えているのか…それとも、思い出しているのか?"
}
}]
}
}
It auto-detects browser language. Falls back to English. No translation library needed.
{
"emotion": {
"transitions": [
{
"trigger": "player.attack",
"to": "anger",
"intensity": 0.9
}
]
},
"dialogue": {
"onPlayerAttack": [{
"lang": { "en": "So you strike your own shadow?" }
}]
}
}
What happens:
- Player attacks
- Entity gets angry (emotion.valence = -0.54)
- Entity says the dialogue
- Entity remembers being attacked
Forever.
I Want To... | Go Here |
---|---|
🎮 Game NPCs that remember I'm evil | Gaming |
🏠 Smart home that learns my habits | Smart Home |
🏫 Simulate ecosystems for school | Education |
🎨 Art that has emotions | Art |
📖 Stories where choices matter | Storytelling |
🔬 Research with reproducible data | Research |
💻 Code examples (for devs) | Advanced |
Start here: 3-Minute Overview
npm install @v1b3x0r/mds-core
Or CDN (no install):
<script type="module">
import { World } from 'https://esm.sh/@v1b3x0r/mds-core'
</script>
if (player.near(npc)) {
if (npc.remembers(player)) {
if (player.attackedBefore) {
npc.mood = "angry"
npc.say(getAngryDialogue(npc.language))
}
}
}
Next chapter? NPC forgot everything.
{
"essence": "NPC who remembers violence",
"emotion": {
"transitions": [
{ "trigger": "player.attack", "to": "anger" }
]
},
"dialogue": {
"onPlayerClose": [{
"lang": { "en": "I remember what you did." }
}]
}
}
Next chapter? NPC still remembers. Forever.
See heroblind.mdm — a fully functional entity with:
- ✅ Multilingual dialogue (EN, TH, JA, ES, ZH)
- ✅ Emotion triggers (anger, curiosity, fear)
- ✅ Self-monologue (internal thoughts)
- ✅ Event-driven responses
- ✅ Memory of interactions
277 lines of JSON. Zero code.
Ages 12+ | Minecraft players | Students | Artists | Game devs | Researchers
You don't need to code. Just describe what something IS, and behavior emerges.
When you describe an entity, you automatically get:
🧠 Memory
- Entities remember interactions
- Memories decay over time (Ebbinghaus curve)
- Important events stick longer
💚 Emotion
- PAD model (Pleasure, Arousal, Dominance)
- Emotional contagion (entities affect each other)
- Trigger-based transitions
💬 Dialogue
- Multilingual support (any language)
- Event-driven phrases
- Auto-detects user language
🎓 Learning
- Entities learn from rewards
- Skills improve with practice
- Q-learning built-in
🌍 Physics
- Entities move based on similarity
- Info-physics (meaning creates gravity)
- Environmental effects
💾 Save/Load
- Full world state serialization
- Memories survive page refresh
- Deterministic replay
"I wanted NPCs that remember I quicksaved before killing them. Now they do."
Made in Chiang Mai, Thailand 🇹🇭 | MIT License