1

Closed

Overriding templates in libraries

description

Closed Jul 6, 2014 at 11:53 AM by alexwarren
All open Quest issues have now been migrated to GitHub: https://github.com/textadventures/quest/issues?state=open

comments

alexwarren wrote Aug 22, 2011 at 11:18 AM

The problem is that when you use square brackets to reference a template, that template is resolved immediately, and a subsequent template override won't have been loaded yet.

This means that UnresolvedLocation can't be overridden in the editor. The aslx file loads English.aslx first, which defines the default UnresolvedLocation template, then it loads Core.aslx, which will put that template into this XML:

<command name="go" pattern="[go]" unresolved="[UnresolvedLocation]">

Then a subsequent override will have no effect.

The solution may be to do an initial pass of the aslx looking for templates.

The impact of this is fairly minor so this will be fixed in a later release.

xordevoreaux wrote Aug 22, 2011 at 11:04 PM

Would I use templates to change the order of room descriptions? I don't like how the exits and all that appear before the prose describing the room. I was trying to create something like as a LOOK command but it didn't work.
For me, I'd like to see the room alias in bold first on a line by itself, then the description, then a list of objects in the room, and then the exits. I'm just used to seeing it that way in Simutronic's Gemstone III (now Gemstone IV).

alexwarren wrote Aug 23, 2011 at 8:38 AM

No, templates are for text substitution, they don't have anything to do with the order of room descriptions.