Kelly
Since init() calls startroom.lookAround(true), I suppose you could override
adv.t's default lookAround() method, like this:
startroom: ...
...
lookAround(verbosity) = {
if (not self.isseen) { // ensures intro won't be repeated
"\bThis is my intro.\b";
}
pass lookAround; // continue with inherited lookAround
}
...
;
Did that help?
But, hmm, I'd rather make a copy of std.t and adapt it to my game. (Is it
possible at all to write a game using an unmodified adv.t/std.t?)
~ally
I do it like this:
startroom: room
sdesc = "<location>"
ldesc = {
if (global.turnsofar = 0) {
"<intro text and description>";
}
else
"<description>.";
}
;
But then again, the game I'm writing uses its own std.t and adv.t
because I hack them like mad to get a bit less of a robotic "feel" to
the piece.
--
It's like you've failed to make the connection,
You know how vital it is.
When something slips through your fingers,
You know how precious it is.
adv.t, I'd say yes - you might not use all of it, and you might add more
verbs and objet types, but what's in there is good for many games that don't
try to do anything fancy.
std.t, I doubt it - I don't think it was meant to be used in actual games, I
think it was made to be taken as a general template for beginning. At the
very least, you need to turn off the annoying eat/sleep daemons.
Eytan
> ~ally
>
>> But, hmm, I'd rather make a copy of std.t and adapt it to my game. (Is
>> it possible at all to write a game using an unmodified adv.t/std.t?)
>>
>
> adv.t, I'd say yes - you might not use all of it, and you might add more
> verbs and objet types, but what's in there is good for many games that
> don't try to do anything fancy.
It's not possible at all for me to write a game that doesn't try to do
*anything* fancy :/ (--and look at the amazing number of games I've
released)... Anyway. I still recommend breaking adv.t up into at least half
a dozen smaller files. It's such a pain to look up theFloor or
listcontcont() (say) in that monolith. Hm. Never occured to me to define
macros (or bookmarks or something) to do just that. Grrk. I'm babbling
(again).
>
> std.t, I doubt it - I don't think it was meant to be used in actual
> games, I think it was made to be taken as a general template for
> beginning. At the very least, you need to turn off the annoying eat/sleep
> daemons.
Or change the player character. Or the name of the game ("A TADS Adventure"
*is* a little generic, no?).
~ally
--
"It is bone-deep with her, though buried and frozen."
>> adv.t, I'd say yes - you might not use all of it, and you might add more
>> verbs and objet types, but what's in there is good for many games that
>> don't try to do anything fancy.
> It's not possible at all for me to write a game that doesn't try to do
> *anything* fancy :/ (--and look at the amazing number of games I've
> released)...
What's up with that anyway? :) Don't tell me there's someone who's more of a
perfectionist than I am?
> Anyway. I still recommend breaking adv.t up into at least half
> a dozen smaller files. It's such a pain to look up theFloor or
> listcontcont() (say) in that monolith. Hm. Never occured to me to define
> macros (or bookmarks or something) to do just that. Grrk. I'm babbling
> (again).
I finally duped a copy of adv.t, removed all the comments, and put 10 line
breaks between every section. Took me the better part of 2 hours since I had
to be extra careful not to muck up the code, but it makes for easier
browsing. BBEdit Lite for Macs has a killer search too which helps.
Not that it matters much for my WIP, since I have a mod file that replaces
darn near every function and definition in there, mostly just for text
formatting purposes. Setting up *that* was fun, let me tell you. :)
G.
> On 2/11/02 6:16 PM, ally at REMkitz...@gmx.co.uk posted:
>> It's not possible at all for me to write a game that doesn't try to do
>> *anything* fancy :/ (--and look at the amazing number of games I've
>> released)...
>
> What's up with that anyway? :) Don't tell me there's someone who's more
> of a perfectionist than I am?
'twas a mistake to tackle non-human senses, light levels, materials and a
conversation system without writing My Apartment games first. And I am a
perfectionist. With the mind of nine butterflies. Most of which have the
blues. La di da. I start something new each time I lose control of my
current masterplan.
Anyway, I guess you *have* to be a perfectionist in this medium. ...?
>> Anyway. I still recommend breaking adv.t up into at least half
>> a dozen smaller files. It's such a pain to look up theFloor or
>> listcontcont() (say) in that monolith. Hm. Never occured to me to define
>> macros (or bookmarks or something) to do just that. Grrk. I'm babbling
>> (again).
>
> I finally duped a copy of adv.t, removed all the comments, and put 10
> line breaks between every section. Took me the better part of 2 hours
> since I had to be extra careful not to muck up the code, but it makes for
> easier browsing. BBEdit Lite for Macs has a killer search too which
> helps.
>
> Not that it matters much for my WIP, since I have a mod file that
> replaces darn near every function and definition in there, mostly just
> for text formatting purposes. Setting up *that* was fun, let me tell you.
> :)
I wish I could get at the built-in say() in order to introduce new escape
codes--to print the next character as a decorative storybook-type initial,
per exemplum. (And I just know this will be a piece of cake with TADS 3.
Just like everything else, except TADS 3 itself I suppose *sighsigh*)
>>> It's not possible at all for me to write a game that doesn't try to do
>>> *anything* fancy :/ (--and look at the amazing number of games I've
>>> released)...
>> What's up with that anyway? :) Don't tell me there's someone who's more
>> of a perfectionist than I am?
> 'twas a mistake to tackle non-human senses, light levels, materials and a
> conversation system without writing My Apartment games first. And I am a
> perfectionist. With the mind of nine butterflies. Most of which have the
> blues. La di da. I start something new each time I lose control of my
> current masterplan.
Same here, although I'm commited to finishing this. Mostly because I like
it. I'm not sure anyone else will, but I refuse to fret about that. It'll
either be a good IF or a good learning experience. :)
> Anyway, I guess you *have* to be a perfectionist in this medium. ...?
To a point, but there's definitely degrees of polish, and I tend to lean
towards the obsessive end of that spectrum.
>> Not that it matters much for my WIP, since I have a mod file that
>> replaces darn near every function and definition in there, mostly just
>> for text formatting purposes. Setting up *that* was fun, let me tell you.
>> :)
> I wish I could get at the built-in say() in order to introduce new escape
> codes--to print the next character as a decorative storybook-type initial,
> per exemplum. (And I just know this will be a piece of cake with TADS 3.
> Just like everything else, except TADS 3 itself I suppose *sighsigh*)
It's working out well though, because when I first started, adv.t was like
this black box in the center of everything that was a total mystery, and by
hacking it up I'm learning the language better, now that I have more of a
grip on it.
I'm learning the hard way too. One little design decision - not even an
interactive one per se - is requiring me to change almost all the default
responses in the game just so they make sense in context. And it's
conditional (only on player location, but still). I'm not allowing myself to
worry about such problems until I'm ready to deal with them. :) I have
plenty of other things I can work on in the meantime.
G.
> On 2/11/02 10:40 PM, ally at REMkitz...@gmx.co.uk posted:
(...)
>> 'twas a mistake to tackle non-human senses, light levels, materials and
>> a conversation system without writing My Apartment games first. And I am
>> a perfectionist. With the mind of nine butterflies. Most of which have
>> the blues. La di da. I start something new each time I lose control of
>> my current masterplan.
>
> Same here, although I'm commited to finishing this. Mostly because I like
> it. I'm not sure anyone else will, but I refuse to fret about that. It'll
> either be a good IF or a good learning experience. :)
I only have your, er, "technically oriented writing", perfectionism,
ambition and steady progress to base this on, but I believe it will at the
very least *not* be dumb, crude, or painful to read ;) (...and "because I
like it" is a very good reason indeed)
>> Anyway, I guess you *have* to be a perfectionist in this medium. ...?
>
> To a point, but there's definitely degrees of polish, and I tend to lean
> towards the obsessive end of that spectrum.
Matter of perspective--I usually talk to the type of artist who assault
paper with pens until it bleeds and then call it art...because that's what
it is. I adore this. Apply that to coding, and you get ...bugs? Inspired,
sincere, but borken. (I'm trying to avoid the word "Rybread", but it won't
let me. Rybread. Maybe I'm a fan.)
>>> Not that it matters much for my WIP, since I have a mod file that
>>> replaces darn near every function and definition in there, mostly just
>>> for text formatting purposes. Setting up *that* was fun, let me tell
>>> you.
>>> :)
>
>> I wish I could get at the built-in say() in order to introduce new
>> escape codes--to print the next character as a decorative storybook-type
>> initial, per exemplum. (And I just know this will be a piece of cake
>> with TADS 3. Just like everything else, except TADS 3 itself I suppose
>> *sighsigh*)
>
> It's working out well though, because when I first started, adv.t was
> like this black box in the center of everything that was a total mystery,
> and by hacking it up I'm learning the language better, now that I have
> more of a grip on it.
>
> I'm learning the hard way too. One little design decision - not even an
> interactive one per se - is requiring me to change almost all the default
> responses in the game just so they make sense in context. And it's
> conditional (only on player location, but still). I'm not allowing myself
> to worry about such problems until I'm ready to deal with them. :) I have
> plenty of other things I can work on in the meantime.
Good advice ;) Whenever something seems impossible, everything else looks so
trivial I postpone it. I try new languages or authoring systems to get away
from "You Must Mess With The Library!"--but I *like* TADS. Actually, my
ministry of the interior is too busy to focus on IF. But *something* will
eventually come of that; if I have to get myself drunk and merge all my not-
yet-IF into one to make that happen, then so be it *g*
~a.
> I wish I could get at the built-in say() in order to introduce new escape
> codes--to print the next character as a decorative storybook-type initial,
> per exemplum. (And I just know this will be a piece of cake with TADS 3.
> Just like everything else, except TADS 3 itself I suppose *sighsigh*)
You can do this in TADS 2 by using output filters. Output filters are
passed every single bit of text that's to be printed, including html
tags. It wouldn't be too much trouble to create an output filter which
looked for your escape code and replaced it with the appropriate img
tag.
Iain Merrick's outputFilter (from
http://ifarchive.org/if-archive/programming/tads2/examples/outputFilter.zip)
uses an output filter, as you might imagine, and I used one in Common
Ground to turn single quote marks to typographic quote marks.
Stephen
--
Stephen Granade
sgra...@phy.duke.edu
Duke University, Physics Dept
That's great--I was wondering if I had to prettify all my text manually. I
had never heard of output filters before, and I couldn't find anything about
them in the manual either (not that I searched every single chapter.) Thanks
for telling me.
~a.
replace commonInit: function
{
/* enter HTML mode */
"\H+";
"\t<center><B><font size=3>Preface</font></B></center>\b";
"Somewhere in the woods of Amissville Virginia, lies a barren camp,
constructed by adventurers such as yourself, in attempt to survive the
horrors which layed within.\b ";
}
;
A.P. Hill,
Amateur IF Writer, Santoonie Corporation
> On 12 Feb 2002, Stephen Granade <sgra...@phy.duke.edu> wrote in
> news:jd4rkmb...@login2.phy.duke.edu:
>
> > You can do this in TADS 2 by using output filters. Output filters are
> > passed every single bit of text that's to be printed, including html
> > tags. It wouldn't be too much trouble to create an output filter which
> > looked for your escape code and replaced it with the appropriate img
> > tag.
>
> That's great--I was wondering if I had to prettify all my text manually. I
> had never heard of output filters before, and I couldn't find anything about
> them in the manual either (not that I searched every single chapter.) Thanks
> for telling me.
outputFilters are a relatively recent addition to TADS, and I'm not
sure whether even Neil K. Guy's updated manual covers them. So I'm not
too shocked that you wouldn't have heard of them before.
> It sounds like your afraid or confused about replace init function:
> Don't listen to the confusing 'Bobble Heads' in all these threads, it
> doesn't get any easier than this( I added some html for boring
> appearance):
>
> replace commonInit: function
[...code snipped...]
commonInit is for initialization that is common between both starting a
game and restoring a game from a saved file on the command line. Doing it
like this would result in the intro text being displayed if the interpreter
is started with a saved game -- and that is not wanted behaviour.
Like it says right in the opening comments for it, STD.T is not meant to be
used as an #include'd library file -- it is meant to be the base for a
starting game. Me, I modify it into a file called 'template.t', stripping
out the sleep and eat daemons and some of the comments, changing
the order of objects, changing some of the responses, making some generic
choices for game title and start room and the like (and marking them with
// GENERIC: comments so I can find them all later), and when starting a new
game, copy template.t to <game-title>.t and modify away. Since init becomes
a function in your game instead of in the library, you can modify it at
will.
If you MUST use std.t as a library, then just replace init, and block-copy
the init function from std.t and change what you want.
Adam
>>> 'twas a mistake to tackle non-human senses, light levels, materials and
>>> a conversation system without writing My Apartment games first. And I am
>>> a perfectionist. With the mind of nine butterflies. Most of which have
>>> the blues. La di da. I start something new each time I lose control of
>>> my current masterplan.
>> Same here, although I'm commited to finishing this. Mostly because I like
>> it. I'm not sure anyone else will, but I refuse to fret about that. It'll
>> either be a good IF or a good learning experience. :)
> I only have your, er, "technically oriented writing", perfectionism,
> ambition and steady progress to base this on, but I believe it will at the
> very least *not* be dumb, crude, or painful to read ;) (...and "because I
> like it" is a very good reason indeed)
Thanks. :) Well, it would stink if nobody liked it, seeing as how it's meant
to be enjoyed by others, but hopefully I'll like it. If I stop liking it
then I'll drop it. After it's done, I suppose there's not a whole lot I can
do about how it's received.
>>> Anyway, I guess you *have* to be a perfectionist in this medium. ...?
>> To a point, but there's definitely degrees of polish, and I tend to lean
>> towards the obsessive end of that spectrum.
> Matter of perspective--I usually talk to the type of artist who assault
> paper with pens until it bleeds and then call it art...because that's what
> it is. I adore this. Apply that to coding, and you get ...bugs? Inspired,
> sincere, but borken. (I'm trying to avoid the word "Rybread", but it won't
> let me. Rybread. Maybe I'm a fan.)
Yeah, IF is a kind of strange species of creative writing. One has to kind
of think out of the box to craft it and then think in the box to code it. :)
Obviously, there's creativity in coding and logic in storytelling, but it's
a strange mix. It works well for me though, because I have almost equal
needs for logic and creativity. It's a great antidote to writer's block,
because I can just code when I'm not up to writing, and vice versa. My WIP
has equal parts finished writing and equal parts of things like {"[Reveal PC
background element here.]"} inserts. And half-written code that's
temporarily commented out until I feel up to wrangling it. :)
>> I'm learning the hard way too. One little design decision - not even an
>> interactive one per se - is requiring me to change almost all the default
>> responses in the game just so they make sense in context. And it's
>> conditional (only on player location, but still). I'm not allowing myself
>> to worry about such problems until I'm ready to deal with them. :) I have
>> plenty of other things I can work on in the meantime.
> Good advice ;) Whenever something seems impossible, everything else looks so
> trivial I postpone it. I try new languages or authoring systems to get away
"The Back Burner" is a wonderful invention. One must not let anything simmer
too long on said burner however, lest it turn into inedible mush. :)
Gregg