TextBlock Issues

Started by soul, September 18, 2006, 09:13:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Please post here if you encounter TextBlock issues. There are a few types of issues you might encounter.

1. unimplemented textblock commands. These might appear as follows:
[HP=3656/KAI=612]:roll dice
[HP=3656/KAI=612]:price 10000 1560random 998

2. Variable expansion strings aren't being filled in, for example:
[HP=3656/KAI=612]:ask gambler
The %s looks at you in a stupor and mumbles "Hash brushash slarash amsh boinga?"
then he tries to take a drink but his drink can't seem to reach his mouth.

3. Misaligned text blocks:

The barmaid smiles at you wearily, and says, "Welcome, traveller. Please look
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?at
our list of foods and drinks on sale here. When you are
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ready to order, just call
me over." Then in a conspiratorial whisper she adds,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"And if you bring any stori
es of love or adventure I'd be glad to hear them."

Please let me know if anything is found. I am working on implementing and fixing them all quickly :)

September 18, 2006, 10:03:43 PM #1 Last Edit: September 19, 2006, 04:13:12 AM by Ian
Ok, just tested out talking to most of the people in town, and got a few issues already.

1. The greet command does not work, just ask.
2. There is no command line refresh after talking to an NPC.  The cursor sits at the end of the textblock message until a timed statline refresh
3. Some NPCs don't respond at all.  Eg Sheriff Lionheart, Mayor Godfrey, priest in temple spell store.  In the case of priest (who actually doesn't) it should say "priest has nothing to tell you!".  Sheriff and Mayor SHOULD have text to say
4. Colors are often missing (temple healer, bishop), or sometimes kick in midway through the text (barmaid).
5. The barmaid gives the same response regardless of what I ask about
6. There is a BUY command from the temple healer which does not work.  I assume that is textblock and not shop.

There's a few starters, I might add to it later :)


Edit:  After just reading some textblocks in mmview, I can see that coloring info isn't included until a highlighted keyword is found (hence colouring doesn't work for some textblocks, and picks up halfway through others).  That means that you must set the default colour manually at the beginning of text to <ESC>[0;32m
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

September 18, 2006, 10:38:29 PM #2 Last Edit: September 19, 2006, 04:09:41 AM by Ian
Ok, here's some extra debug info.  We know why Guildmaster, Sheriff Lionheart and Mayor Godrey don't work (capital letters).
Edit
Here is the info on bishop (who didn't work last time):

[HP=4908]:ask bishop
'ask' parameters are bishop
Comparing MOB bishop to your bishop
Mobs Greet Text is 217
bishop is a match to bishop
AskCommand: executing textblock 217
Executing textblock 217 part 0
Execution of part 0 has failed. Attempting LinkTo
The bishop greets you with a wan smile, saying, "Welcome, child, it is
etc etc etc

Bishop DID work last time idiot!  I got him confused with priest I guess.
Regardless, it still says it failed.

and asking barmaid specific questions:
[HP=4908]:ask bar
'ask' parameters are bar
Comparing MOB barmaid to your bar
Mobs Greet Text is 344
barmaid is a match to bar
AskCommand: executing textblock 344
Executing textblock 344 part 0
Execution of part 0 has failed. Attempting LinkTo
The barmaid smiles at you wearily, and says, "Welcome, traveller. Please look
                                                                             at
our list of foods and drinks on sale here. When you are
                                                       ready to order, just call
me over." Then in a conspiratorial whisper she adds,
                                                     "And if you bring any stori
es of love or adventure I'd be glad to hear them."

The Homely Hearth, Common Room
You notice 3 wooden chairs here.
Also here: barmaid.
Obvious exits: north, south, east, west
[HP=4908]:ask bar love
'ask' parameters are bar love
Comparing MOB barmaid to your bar
Mobs Greet Text is 344
barmaid is a match to bar
AskCommand: executing textblock 344
Executing textblock 344 part 0
command love
block command: 4362



Executing textblock 4379 part 0
Execution of part 0 has failed. Attempting LinkTo
Execution of textblock 4379 part 0 failed
Execution of TextBlock 4379 failed
Execution of part 0 has failed. Attempting LinkTo
The barmaid smiles at you wearily, and says, "Welcome, traveller. Please look
                                                                             at
our list of foods and drinks on sale here. When you are
                                                       ready to order, just call
me over." Then in a conspiratorial whisper she adds,
                                                     "And if you bring any stori
es of love or adventure I'd be glad to hear them."


There's a few failures in there, I assume will make more sense to Soul than they do to me :)
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

September 18, 2006, 10:50:10 PM #3 Last Edit: September 18, 2006, 11:27:37 PM by Ian
Another odd one for you Soul.

[HP=4908]:ask nomad materials
'ask' parameters are nomad materials
Comparing MOB nomad to your nomad
Mobs Greet Text is 2663
nomad is a match to nomad
AskCommand: executing textblock 2663
Executing textblock 2663 part 0
command materials
block command: 4145
The nomad nods, "Living in this harsh land have provided me with new skills, one
being the craft of hide-making. Ever since the blue lizard beasts appeared to t
he south, they have caused no end of trouble when traveling along the southern t
rails, a few times I have had to dispatch one myself and learned I am able to fa
shion armour from their hide." With a slight smile  he adds,  "While the extermi
nation of those monsters benefits us all, there is little room for charity in th
is land. I have a  price for my craft, which you may or may not afford.



Bank of Godfrey
You notice white gold ring, black and white serpent ring, 2 ruby-eyed skull
rings here.
Also here: Vitoc, Beezlebub, Animal, nomad.
Obvious exits: north, east, closed gate west
[HP=4908]:ask nomad water
'ask' parameters are nomad water
Comparing MOB nomad to your nomad
Mobs Greet Text is 2663
nomad is a match to nomad
AskCommand: executing textblock 2663
Executing textblock 2663 part 0
command water
block command: 2665


Executing textblock 2691 part 0
Execution of part 0 has failed. Attempting LinkTo
Execution of textblock 2691 part 0 failed
Execution of TextBlock 2691 failed
Execution of part 0 has failed. Attempting LinkTo
The nomad smiles at you and bow, saying:

                                        "Greetings, fellow traveler. I notice yo
u are strangers to this land, and I must warn you, it is not friendly to outside
rs. I may offer you some
                          water, if you have gold to pay for it. Also, I can off
er my services at hide-making, should you have the right materials


When I ask materials it works, but when I ask water it fails (and gives the first textblock, but only cos of debug).  Same as when I just ask nomad it fails (and gives first textblock cos of debug).

Edit: Apparently greeting nomad DOES work for players without debug on, even though debug gives a failure.
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

The wounded messenger smiles wanly as you approach, and extends a hand in
                                                                         greeting. "Well m
et, stranger", he says, "Though I admit, if it were in my
                                                         hands, it would be a meeting held
over a mug of ale at the inn, instead of in
                                            this sterile hospice." He turns to the healer,
smirks, and says "No offense
                             intended, of course."

                                                  "The lord has seen fit to delay my missi
on, it seems-- the reason I am resting
                                      here and not working on my fourth ale is because on
the way through the
                   Dragon's Teeth, a bandit leaped out from behind a large stone and attem
pted to
       ambush me. Fortunately for me, my mount panicked and trampled him-- however,
                                                                                   the dum
b animal also threw me in the process and charged off. I obtained this
                                                                      nasty-looking gash w
hen I landed on one of those blastedly sharp rocks. I was
                                                         knocked unconscious, and when I a
woke, I was here." He pauses to shift his leg,
                                              and continues, "I was on my way to deliver a
vital message to Chancellor Annora
                                   at the mountaintop monastery. For some reason Lord Mark
us insisted that it be
                      delivered as quickly as possible. But now, there is no way I can mak
e it there,
           and I know no one here who I may trust to be my surrogate." He then adds, "If y
ou already serve for the cause of good
                                      and need guidance, tell me of your travels friend, a
nd I will do what I can."

                          <Game note: if you ask about 'mission', you will embark on the m
ission, and
             you will not be able to participate in the Neutral or Evil quests. Make your

decision before you answer.>

The invasion commands in sysop support chamber don't work so well.  And also there is crap on the ground that shouldn't be there.
Sysop Support Chamber
You notice huge bulletin, orc check, dragon check, cultist check, green check,
duergar check, saracen check here.
Obvious exits: north, south, east, west, up, down
[HP=4908]:orc invasion
Executing textblock 4657 part 0
command orc invasion
block command: roomitem
Unknown item: roomitem 1976block command: clearitem
block command: random
Unknown item: random 4659block command: teleport
Unknown item: teleport 164 1block command: random
Unknown item: random 4660block command: teleport
Unknown item: teleport 164 1block command: random
Unknown item: random 4661block command: teleport
Unknown item: teleport 164 1block command: random
Unknown item: random 4662block command: message
Executing message
A horde of orcs have invaded the Darkwood forest!
block command: teleport
Unknown item: teleport 164 1


Can't open chests.  DC just crashed the board so I can't quote exact messages, but it says something about chest not being a door or exit.  "open" should be able to target containers and start executing textblocks.

Can't execute textblocks starting with "jump" (eg, jump north).  You don't know the first thing about jumpkicking.

Can't execute textblocks beginning with "buy" (eg buy minor healing).  You can't buy unless you're in a shop.

Ooh, must remember (when the board comes back up) to try using the crowbar on that warehouse in the slums :)


On the plus side, selling items in junkyard works, and pulling the lever in sysop rubbish disposal chamber works.
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

Quote from: Ian on September 19, 2006, 12:18:40 AM
The invasion commands in sysop support chamber don't work so well.? And also there is crap on the ground that shouldn't be there.
Sysop Support Chamber
You notice huge bulletin, orc check, dragon check, cultist check, green check,
duergar check, saracen check here.
Obvious exits: north, south, east, west, up, down
[HP=4908]:orc invasion
Executing textblock 4657 part 0
command orc invasion
block command: roomitem
Unknown item: roomitem 1976block command: clearitem
block command: random
Unknown item: random 4659block command: teleport
Unknown item: teleport 164 1block command: random
Unknown item: random 4660block command: teleport
Unknown item: teleport 164 1block command: random
Unknown item: random 4661block command: teleport
Unknown item: teleport 164 1block command: random
Unknown item: random 4662block command: message
Executing message
A horde of orcs have invaded the Darkwood forest!
block command: teleport
Unknown item: teleport 164 1


Can't open chests.? DC just crashed the board so I can't quote exact messages, but it says something about chest not being a door or exit.? "open" should be able to target containers and start executing textblocks.

Can't execute textblocks starting with "jump" (eg, jump north).? You don't know the first thing about jumpkicking.

Can't execute textblocks beginning with "buy" (eg buy minor healing).? You can't buy unless you're in a shop.

Ooh, must remember (when the board comes back up) to try using the crowbar on that warehouse in the slums :)


On the plus side, selling items in junkyard works, and pulling the lever in sysop rubbish disposal chamber works.

The jump and the buy thing make sense to me now. I check for Room textblocks only if the command hasn't been recognized. Vitoc catches "jump" and "buy" first, prints out an error message, and then my little piece of code doesn't even get called.  Can anybody elaborate on what MMUD does ?

Wow, didn't take me long to crash the board.  Go testing!

In the brief time the board was running, I tried the crowbar on the warehouse.
Slum Street, Warehouse Door
Obvious exits: closed door north, east, west
[HP=4908]:sys create 570
Item Added
[HP=4908]:i
You are carrying 1 runic coin, 70 platinum pieces, 34 gold crowns, gold jeweled
ring (Finger), Vitoc's Armour (Torso), crowbar
You have no keys.
Wealth: 1703400 copper farthings
Encumbrance: 141/9000 - None [1%]
[HP=4908]:use crowbar
Sorry, not yet implemented
[HP=4908]:use crowbar chains
You don't have crowbar chains.
[HP=4908]:use crowbar on chains
You don't have crowbar on chains.
[HP=4908]:snap chains
You force your crowbar between the chains, and heave mightily!
testskill strength -10remoteaction 1104 55 0 0
Slum Street, Warehouse Door
Obvious exits: closed door north, east, west
[HP=4908]:snap chains
You force your crowbar between the chains, and heave mightily!
testskill strength -10remoteaction 1104 55 0 0
Slum Street, Warehouse Door
Obvious exits: closed door north, east, west
[HP=4908]:


So "use" doesn't get recognised.  I only tried snapping the chains twice, but with a HOGs strength I figure it should have worked by then :)


Then I wanted to check the teleport textblock that moves you into the high druids room.  Unfortunately I missed my mark and went straight to high druids room, so I tried touch gem:
Large Clearing, Stone Altar
You notice 19 gold crowns, 93 silver nobles, 2 oaken staffs, 3 darkwood rings,
2 barkskin scrolls, golden sickle, wyvernhide tunic, antlered helm here.
Obvious exits: None
[HP=4908]:touch gem
nomonsters 289As you touch the black gem, a crackling field of energy surrounds
you!
teleport 20 7
minlevel 15failability 129addability 70 1giveability 129 2<For clensing the alta
r, you gain 750,000 experience points!>
minlevel 15

After which point it hung the board.


As for elaborating on mmuds behaviour regarding buy and jump... I don't know the mechanics of it.  I know that jump DOES work as a command for jumpkick.  Perhaps it tests against the target before deciding the intention of the command.
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

mmud checks textblock commands before any other command, and if it does a textblock it stop there and doesnt check the others.  I had something else to say..now i dont know what that was...grr.

Soul, left a message for ya in Dev section regarding latest error.


TGS v1.0 (coming soon)

Ok, a few more things to note since the last code was compiled in.

1. Need to set default color of textblock to <ESC>[0;32m

2. When asking an NPC about a keyword they don't know, you should get the response:
[HP=506/506 - KAI=53/61]:ask healer buy
healer has nothing to tell you!

Currently the NPC just repeats standard message.

Really only 1 I guess, I already mentioned the colour thing earlier.  Good work, other than that they seem to be working nicely.  AddDelay needs to be added (vortex is QUICK :))

There's something funky with your debug info :)  Whenever I execute ANY command in a room with a textblock I get the info.  Not critically important I know.

One last thing: I need to be able to check ability flags, otherwise testing quest textblocks will be so much harder.
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

1. Is that Foreground Green?
2. I coded that in, obviously there is a bug :)
3. Yeah I coded it that way because I wanted to know if the room had any command text in it. I don't know if Vitoc uploaded the new code, but you should be able to toggle debug information with 'sys debug' now.
4. If Vitoc is running the new code, then the 'sys abilities <player>' command is already in.

Note that abilities are not being saved between restarts at this point.

Quote from: Ian on September 20, 2006, 08:37:40 AM
Ok, a few more things to note since the last code was compiled in.

1. Need to set default color of textblock to <ESC>[0;32m

2. When asking an NPC about a keyword they don't know, you should get the response:
[HP=506/506 - KAI=53/61]:ask healer buy
healer has nothing to tell you!

Currently the NPC just repeats standard message.

Really only 1 I guess, I already mentioned the colour thing earlier.? Good work, other than that they seem to be working nicely.? AddDelay needs to be added (vortex is QUICK :))

There's something funky with your debug info :)? Whenever I execute ANY command in a room with a textblock I get the info.? Not critically important I know.

One last thing: I need to be able to check ability flags, otherwise testing quest textblocks will be so much harder.


Quote from: soul on September 20, 2006, 12:44:20 PM
1. Is that Foreground Green?
Yes.  I found this page a great help for ansi formatting codes.

Quote from: soul on September 20, 2006, 12:44:20 PM
3. Yeah I coded it that way because I wanted to know if the room had any command text in it. I don't know if Vitoc uploaded the new code, but you should be able to toggle debug information with 'sys debug' now.
Yeah, I noticed when I entered most recently debug was off, and when I switched it on I got a notification message.

Quote from: soul on September 20, 2006, 12:44:20 PM
4. If Vitoc is running the new code, then the 'sys abilities <player>' command is already in.
Awesome.

Quote from: soul on September 20, 2006, 12:44:20 PM
Note that abilities are not being saved between restarts at this point.
Not a problem, good to know.
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!