That's the TADS bookshelf and it comes included in the download with the SDK and are accessible via the HELP menu in the IDE ("TADS Workbench"). In fact, I use these documents in the library all the time to figure out how to do things or how to convert the specifications and code from Hugo to TADS.
In fact, the IDE that TADS 3 provides is something I wish I had had when I was using Hugo, it would have made it much easier to program in. I was seriously thinking of doing one and if I had this was the sort of thing I would have wanted to have.
It's slick, polished and very useful. Especially the location-sensitive error messages. Click on the compile error in the log window and in almost every case it will go to the exact line where the error is located. The only time it can't is when two places create an identical reference that apparently can't be diagnosed until "linkage" time as opposed to compile time. Nonetheless it's a huge improvement in productivity and to do better you'd have to go to something representing overkill, like if they developed a plugin for Eclipse to edit TADS code, where it not only brought up your files and libraries, but partially processed the code so if you wanted to find where an object or verb was defined it would be in the object explorer.
For PLUG, you need to learn about direct and indirect objects in a command (when you plug something into something, you have two objects in play, the direct one (dobj) and the indirect one (iobj), and you need to know where to write the action handler depending on whether the object is the direct or indirect one (PLUG TV INTO WALL vs PLUG WALL INTO TV.)
Yeah, I know, the
dobjFor(Verb) and
iobjFor(Verb) methods attached to the object named as the direct object, depending on whether there is an indirect object, to handle the command defined as the identifier "verb". But I was doing something wrong because I could not get it to work.
Now this did:
Code: Select all
+ TV: RestrictedSurface, PlugAttachable 'tv television set' 'television set'
"34 Inch LCD HD-TV mounted on the wall. "
;
++ cablebox: Thing, Attachable, PlugAttachable 'cable box' 'cable box'
"Cable box connected to the TV"
attachedObjects = [TV]
dobjFor(Take) { check() { failCheck('You can\'t take the \\self.name\\.
It is connected to the TV, and you lack the tools to disconnect it.'); }}
;
(In the above example \ replaces the symbols "<" and ">" because this BBS software doesn't like it when they show up in code examples. "Self.name" becomes "Self" if I leave the double greater than and less than symbols.)
When someone tries to TAKE the CABLE BOX they get that message instead of the standard one.
Also, you should read more about the Tads language, especially about the "modify" and "replace" keywords. You should never replace system files in Tads. If you want to modify or add something to them, you use "modify" or "replace".
Right, as I said, changing a system file is "ugly" and like violence, it should only be invoked as a last resort. When the language has the capacity to override things then, it is not their only resort and eliminates the need to do that.
Sounds like Modify and Replace are probably what I might use if I can't figure out how to do what I want to do.
I will note here that I decided to port Tripkey over to TADS in order to get my feet wet in a system where I knew what the program I was porting already did. I did not want to try this with something brand new. I made that mistake once with Open Office when I took a gig writing a manual for a software program and they wanted the document in DOC format, which Open Office supports (as opposed to a conversion from Word Perfect 8, which is what I've been using for about 20 years. I have never used Microsoft Word, so I'm not used to its idiosyncrasies and bugs, which Open Office tries to emulate.)
Whatever behavior TADS has WRT Tripkey, I'll know if it matches what happens in Hugo or if it acts in a different way. And thus I will learn how it works.
[quote="RealNC"]I would recommend one of the books (or several of them) from here:
http://www.tads.org/t3doc/doc/index.htm[/quote]
That's the TADS bookshelf and it comes included in the download with the SDK and are accessible via the HELP menu in the IDE ("TADS Workbench"). In fact, I use these documents in the library all the time to figure out how to do things or how to convert the specifications and code from Hugo to TADS.
In fact, the IDE that TADS 3 provides is something I wish I had had when I was using Hugo, it would have made it much easier to program in. I was seriously thinking of doing one and if I had this was the sort of thing I would have wanted to have.
It's slick, polished and very useful. Especially the location-sensitive error messages. Click on the compile error in the log window and in almost every case it will go to the exact line where the error is located. The only time it can't is when two places create an identical reference that apparently can't be diagnosed until "linkage" time as opposed to compile time. Nonetheless it's a huge improvement in productivity and to do better you'd have to go to something representing overkill, like if they developed a plugin for Eclipse to edit TADS code, where it not only brought up your files and libraries, but partially processed the code so if you wanted to find where an object or verb was defined it would be in the object explorer.
[quote]For PLUG, you need to learn about direct and indirect objects in a command (when you plug something into something, you have two objects in play, the direct one (dobj) and the indirect one (iobj), and you need to know where to write the action handler depending on whether the object is the direct or indirect one (PLUG TV INTO WALL vs PLUG WALL INTO TV.)[/quote]
Yeah, I know, the [b]dobjFor(Verb)[/b] and [b]iobjFor(Verb)[/b] methods attached to the object named as the direct object, depending on whether there is an indirect object, to handle the command defined as the identifier "verb". But I was doing something wrong because I could not get it to work.
Now this did:[code]
+ TV: RestrictedSurface, PlugAttachable 'tv television set' 'television set'
"34 Inch LCD HD-TV mounted on the wall. "
;
++ cablebox: Thing, Attachable, PlugAttachable 'cable box' 'cable box'
"Cable box connected to the TV"
attachedObjects = [TV]
dobjFor(Take) { check() { failCheck('You can\'t take the \\self.name\\.
It is connected to the TV, and you lack the tools to disconnect it.'); }}
;
[/code]
(In the above example \ replaces the symbols "<" and ">" because this BBS software doesn't like it when they show up in code examples. "Self.name" becomes "Self" if I leave the double greater than and less than symbols.)
When someone tries to TAKE the CABLE BOX they get that message instead of the standard one.
[quote]Also, you should read more about the Tads language, especially about the "modify" and "replace" keywords. You should never replace system files in Tads. If you want to modify or add something to them, you use "modify" or "replace".[/quote]
Right, as I said, changing a system file is "ugly" and like violence, it should only be invoked as a last resort. When the language has the capacity to override things then, it is not their only resort and eliminates the need to do that.
Sounds like Modify and Replace are probably what I might use if I can't figure out how to do what I want to do.
I will note here that I decided to port Tripkey over to TADS in order to get my feet wet in a system where I knew what the program I was porting already did. I did not want to try this with something brand new. I made that mistake once with Open Office when I took a gig writing a manual for a software program and they wanted the document in DOC format, which Open Office supports (as opposed to a conversion from Word Perfect 8, which is what I've been using for about 20 years. I have never used Microsoft Word, so I'm not used to its idiosyncrasies and bugs, which Open Office tries to emulate.)
Whatever behavior TADS has WRT Tripkey, I'll know if it matches what happens in Hugo or if it acts in a different way. And thus I will learn how it works.