

a 100% moddable ansi adventure game engine, scripted using a combination of my own little variation of xml, and lua. the engine is nearly done.
I have literally no idea why I've dedicated my day to doing this.
on the plus side, now I know how to implement lua scripting in my games.
just for fun, the script for my stray cat (pictured above with a red 'c')
#entity[
name: "Stray cat";
script: "../scripts/cat.lua";
portrait: "../graphics/portraits/cat.bam";
#loc[ map: "test"; x: 4; y: 4; layer: 1; ];
#tile[ char: 99; fg: 2; bg: 9; ];
];
function runonce() -- runs once and before main, when the map containing this entity is entered.
--math.randomseed(os.time())
end
function activated() -- runs when another entity uses the action key at this entity
local show=""
local choose=random(0,2)
if choose==0 then
show="Mrow."
elseif choose==1 then
show="Purr..."
elseif choose==2 then
show="Mew!"
end
-- argument 1: target. leave as a blank string to target whatever did the action.
-- argument 2: speaker. whose portrait to use, basically.
-- argument 3: speaker name. leave blank to use the speaker's regular name.
-- argument 4: text. this is the actual message that should be displayed.
message("","this","",show)
end
function main() -- runs once every frame.
local value = random(0,60)
if (value==0) then
move(1,0)
elseif (value==1) then
move(-1,0)
elseif (value==2) then
move(0,1)
elseif (value==3) then
move(0,-1)
end
end