TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» Happy New Year 2024!
having a few problems with characters. I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
having a few problems with characters. I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
having a few problems with characters. I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
having a few problems with characters. I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
having a few problems with characters. I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
having a few problems with characters. I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
having a few problems with characters. I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
having a few problems with characters. I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
having a few problems with characters. I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 having a few problems with characters.

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

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

having a few problems with characters. Empty
PostSubject: having a few problems with characters.   having a few problems with characters. I_icon_minitimeWed 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
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 72
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

having a few problems with characters. Empty
PostSubject: Re: having a few problems with characters.   having a few problems with characters. I_icon_minitimeWed 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)

Back to top Go down
https://adventure.forumotion.com
stants
Experienced Adventurer
stants

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

having a few problems with characters. Empty
PostSubject: Re: having a few problems with characters.   having a few problems with characters. I_icon_minitimeThu 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
stants
Experienced Adventurer
stants

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

having a few problems with characters. Empty
PostSubject: Re: having a few problems with characters.   having a few problems with characters. I_icon_minitimeThu 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
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 72
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

having a few problems with characters. Empty
PostSubject: Re: having a few problems with characters.   having a few problems with characters. I_icon_minitimeThu 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)
Back to top Go down
https://adventure.forumotion.com
stants
Experienced Adventurer
stants

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

having a few problems with characters. Empty
PostSubject: Re: Thankyou   having a few problems with characters. I_icon_minitimeThu May 26, 2011 9:59 am

Cheers Phil

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




having a few problems with characters. Empty
PostSubject: Re: having a few problems with characters.   having a few problems with characters. I_icon_minitime

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: