Basic Scripting:Custom Templates
To be written...
Though these look like Javascript template literals, they are not.*asset:{
string: "The icy north door is { north [is] open [or] closed }.",
to split this use
var bar = foo.split(':').map(function(e){return (e.trim())})
split and serialize
var bar = foo.split(':').map(function(e){return (MyGame.serialize(e.trim()))})
literal: function(){ return ${MyGame.world.icy_door.print_open_or_closed} }
}
MyGame.createAsset({
class: "Chest",
name: "brass chest",
place: { in: "Central Chamber" },
description: `It's a small but sturdy looking chest bound in brass{ brass chest [is] open [then] and lined with yolk colored satin }. `,
adjectives: [ "treasure", "holy" ],
is: {
closed: true,
locked: false,
},
dov: {
open: {
with_nothing: true,
on_first_success: function(){ MyGame01.overrideOutput(`The chest's interior is lined with a rich golden yolk colored satin that fairly glows in the dim dungeon. Nestled comfortably inside the yolky satin bed is a small jade statuette. `); }, },
close: { with_nothing: true },
},
});