TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeFAQSearchUsergroupsRegisterLog in
Latest topics
» TAB Version 66 Available
Mon Sep 26, 2016 12:02 pm by catventure

» TAB Version 65 Available
Mon Feb 23, 2015 12:04 pm by catventure

» Incubation pt 1
Wed Apr 24, 2013 9:24 am by Kabrinski

» Charecter movements - doors
Wed Mar 20, 2013 2:55 pm by garethfx

» Member feedback on game planning
Sun Mar 03, 2013 1:47 pm by garethfx

» Still alive - just!
Thu Feb 28, 2013 11:34 am by catventure

» TAB 64 crashes ...
Mon Aug 20, 2012 11:31 am by acko

» Idea on addition to object being container
Sat Aug 18, 2012 3:49 pm by catventure

» sizex=y action ...
Thu Aug 09, 2012 11:29 am by catventure


Share | 
 

 having a few problems with characters.

View previous topic View next topic Go down 
AuthorMessage
stants
Experienced Adventurer
avatar

Number of posts : 71
Age : 43
Location : Maidstone, Kent, UK
Humor : I shall tear your soul Apart!!!!!
Adventure Points : 32
Registration date : 2009-09-16

PostSubject: having a few problems with characters.   Wed May 25, 2011 11:29 am

Ive got 1 character.

If i say talk to jim i have put a response entry to reply to this which is fine.

But when i type say to jim,inventory i get a message saying sorry character commands are not used in this game or something similiar.

How do i enable it so it doesnt come up with that message. I dont even know where its getting this message from??

Its not in the respons, script 1 or 2 or messages or system messages cos ive searched for it.

so just want it so i can say say to jim,i

many thanks
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: having a few problems with characters.   Wed May 25, 2011 7:19 pm

stants wrote:

Ive got 1 character.

If i say talk to jim i have put a response entry to reply to this which is fine.

But when i type say to jim,inventory i get a message saying sorry character commands are not used in this game or something similiar.

How do i enable it so it doesnt come up with that message. I dont even know where its getting this message from??

Its not in the respons, script 1 or 2 or messages or system messages cos ive searched for it.

so just want it so i can say say to jim,i

many thanks

Hi Stants,

The default character command coding entries are listed on the CHARACTER EDITOR -----> "Char. Commands" BUTTON.

Inside this particular list are the coding entries that allow Character "speech" commands to be used in a game...

However, in the "default.tab" database (the one you used to begin creation of your game) these are initially set to:

[start][acts]cmessYou did not type in any commands for %speechname%.[end]

[start]%_%[acts]cmessSorry, this game does not support commands to characters.[end]

In other words there are no entries present facilitating this at the moment.

Now take a look at the equivalent "char.commands" list in the "char_commands_demo.tab" example game.

So to enable character speech commands in YOUR game you need to COPY all of the speech entries listed from there to REPLACE the above entries in YOUR database ...

Then you can pick and choose which you would like to keep or delete.

To start with please delete the 2 default entries in the "char. commands" list in YOUR game database.

To make it easy for you I've put all of the required default coding entries below so you can copy them in one block and then paste them into the "char commands" list in YOUR database using (SHIFT+Insert)

==============================
DEFAULT CHARACTER COMMANDS
===============================
This list is executed by TAB after a "say to <character>, <command>" player input. By default commands can be carried out by ALL characters.

The first entry checks if any commands were given to a character
'===============================
[start][acts]cmessYou did not type in any commands for %speechname%.[end]
'===============================
Entries below this can adjust "speech" variable
Then do the speech entries
'===============================

dospeech:

First check that speech character is in current room
'================================
[start]%_%#speechcount=1#charabsent%speech%[acts]cmessSorry, %speechname% is not here!#done#else#speechcount=1#charpresent%speech%[acts]sysmess86#jumpdospeech2[end]
'================================

dospeech2:

[start]hello#charpresent%speech%[acts]cmess%speechname% replies "Hello."[end]

[start]examine %objn1%#or_objlocn1=%speechworn%#or_objlocn1=%speechcarr%#or_objlocn1=charloc%speech%[acts]charobjn1msg[end]

[start]go %directn1%#invalidcharmove[acts]cmess%speechname% wasn't able to go %directn1%.[end]

[start]go %directn1%[acts]pattchar%speech%=static#movecharacter[end]

[start]i#charpresent%speech%[acts]charinv%speech%[end]

[start]get %objn1%#objlocn1=charloc%speech%#objn1notstatic[acts]cmess%speechname% picks up the %objn1%.#objlocn1=%speechcarr%[end]

[start]drop %objn1%#objlocn1=%speechcarr%[acts]cmess%speechname% drops the %objn1%.#objlocn1=charloc%speech%[end]

[start]wear %objn1%#objlocn1=%speechcarr%#objn1wearable[acts]cmess%speechname% wears the %objn1%.#objlocn1=%speechworn%[end]

[start]remove %objn1%#objlocn1=%speechworn%[acts]cmess%speechname% removes the %objn1%.#objlocn1=%speechcarr%[end]

[start]talk to %charn2%#charpresentn2#charn2=%speech%[acts]cmess%speechname%: "Are you asking me to talk to myself!?"[end]

[start]talk to %charn2%#charpresentn2[acts]cmess%speechname%: "Hello %charname2%."
%charname2%: "Hello yourself %speechname%."[end]

[start]give %objn1% to %charn2%#or_objlocn1=%speechcarr%#or_objlocn1=%speechworn%#charpresentn2[acts]cmess%speechname% gives the %objn1% to %charname2%.#objlocn1=carrcharn2[end]

[start]give %objn1% to me#charpresent%speech%#or_objlocn1=%speechcarr%#or_objlocn1=%speechworn%[acts]cmess%speechname% gives the %objn1% to you.#objlocn1=501[end]

[start]give all to %charn2%#charpresentn2#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% gives the %objn1% to %charname2%.#objlocn1=carrcharn2[end]

[start]give me %objn2%#charpresent%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%[acts]cmess%speechname% gives the %objn2% to you.#objlocn2=501[end]

[start]drop all#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% drops the %objn1%.#objlocn1=charloc%speech%[end]

[start]get all#anyobjscharloc%speech%[acts]all%speechloc%#cmess%speechname% picks up the %objn1%.#objlocn1=%speechcarr%[end]

[start]wear all#anywearable%speechcarr%[acts]speechwearall[end]

[start]remove all#anyobjs%speechworn%[acts]all%speechworn%#cmess%speechname% removes the %objn1%.#objlocn1=%speechcarr%[end]

[start]give all to me#charpresent%speech%#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% gives the %objn1% to you.#objlocn1=501[end]

[start]give me all#charpresent%speech%#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% gives the %objn1% to you.#objlocn1=501[end]

[start]follow/follow me#charpresent%speech%[acts]cmess%speechname% agrees to follow you...#pattchar%speech%=follow[end]

[start]quit following/quit following me#charpresent%speech%[acts]cmess%speechname%: "I will no longer follow you then."#pattchar%speech%=random[end]

[start]wait[acts]cmess%speechname%: "I will wait here then."#pattchar%speech%=static[end]

[start]get %objn1% out %objn2%#objn1<>objn2#objlocn1=contobjn2#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#objlocn2=container#openobjn2[acts]cmess%speechname% takes the %objn1% out of the %objn2%.#objlocn1=%speechcarr%[end]

[start]drop %objn1% in %objn2%#objn1<>objn2#objlocn1<>contobjn2#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#objlocn2=container#openobjn2#objlocn1=%speechcarr%#objn1fitsintoobjn2[acts]cmess%speechname% puts the %objn1% into the %objn2%.#putobjn1intoobjn2[end]

[start]drop all in %objn2%#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#openobjn2#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% puts the %objn1% into the %objn2%.#putobjn1intoobjn2[end]

[start]get all out %objn2%#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#objlocn2=container#openobjn2#anyobjscontn2[acts]allcontn2#cmess%speechname% gets the %objn1% from the %objn2%.#objlocn1=%speechcarr%[end]

' entries dealing with words not understood

[start]?[acts]cmessSorry. %speechname% did not understand "%?%" as a verb.#done[end]

[start]%v% ?[acts]cmessSorry. %speechname% did not understand "%?%" as a noun in that sentence.#done[end]

[start]%v% %n1% ?/%v% %objn1% ?/%v% %charn1% ?[acts]cmessSorry. %speechname% did not understand "%?%" in that sentence.#done[end]

[start]%v% %n1% %p% ?/%v% %objn1% %p% ?/%v% %charn1% %p% ?[acts]cmess%speechname% didn't understand "%?%" as a noun in that sentence.#done[end]

[start]%v% %p% ?[acts]cmess%speechname says: "%?% - it's not in my vocabulary as a noun."#done[end]

'====last entries======
[start]%_%[acts]cmess%speechname% didn't seem to be able to carry out your last command...#done[end]

[start]%anywords%[acts][end]

=========END===========

You should now be able to command your character, Jim (and any other characters you create)

>say to jim, i
>say jim, inventory
>jim, hello
>jim, follow me
>jim, go east then north and wait


catventure. (Phil)


_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
stants
Experienced Adventurer
avatar

Number of posts : 71
Age : 43
Location : Maidstone, Kent, UK
Humor : I shall tear your soul Apart!!!!!
Adventure Points : 32
Registration date : 2009-09-16

PostSubject: Re: having a few problems with characters.   Thu May 26, 2011 7:09 am

cool thankyou very much phil. Ive deleted the 2 entires and replaced them with the commands you listed.

I have tested it and it works fine.

However when i have an object and i say give <object> to jim it replies as thats not possible.

Why i cant give objects to my character????

Back to top Go down
View user profile
stants
Experienced Adventurer
avatar

Number of posts : 71
Age : 43
Location : Maidstone, Kent, UK
Humor : I shall tear your soul Apart!!!!!
Adventure Points : 32
Registration date : 2009-09-16

PostSubject: Re: having a few problems with characters.   Thu May 26, 2011 7:45 am

Do I need to enter commands into the character editor or response. I assume before I can give objects to characters I need to enter them into the response table?
Is this correct???

Or do i need to put entries into the char commands table????

thankyou.
Back to top Go down
View user profile
catventure
Admin Adventurer
avatar

Male
Number of posts : 376
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 52
Registration date : 2008-06-08

PostSubject: Re: having a few problems with characters.   Thu May 26, 2011 8:20 am

Hi Stants,

Oh...OK I forgot the give code which should go into normal RESPONSE EDITOR.
The first entry is a good example of how you can change the words in a command and update the player's input command and then JUMP to a later RESPONSE entry with the label "givecode"

==============
[start]give %charn1% %objn2%#charpresentn1[acts]objn1=objn2#objn2=0#charn2=charn1#charn1=0#p=3#updatecommand#jumpgivecode[end]

givecode:

[start]give %objn1% to %charn2%#charpresentn2#objlocn1=501[acts]cmessYou give the %objn1% to %charname2%.#objlocn1=carrcharn2[end]

[start]give all to %charn2%#anyobjs501#charpresentn2[acts]all501#cmessYou give the %objn1% to %charname2%.#objlocn1=carrcharn2[end]
================

Assuming you have kept the word "to" as vocabulary preposition number 3 in the VOCAB EDITOR it should now work as intended. Smile

catventure (Phil)

_________________
http://tab.thinbasic.com ; Home of the TAB I.F. project.
Back to top Go down
View user profile http://adventure.rpgdynasty.com
stants
Experienced Adventurer
avatar

Number of posts : 71
Age : 43
Location : Maidstone, Kent, UK
Humor : I shall tear your soul Apart!!!!!
Adventure Points : 32
Registration date : 2009-09-16

PostSubject: Re: Thankyou   Thu May 26, 2011 9:59 am

Cheers Phil

Everything working great now.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: having a few problems with characters.   

Back to top Go down
 

having a few problems with characters.

View previous topic View next topic Back to top 

 Similar topics

+
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: General Forum-
Jump to: