Closed firezblade closed 9 months ago
Axmud crashes after I enabled mxp on the server
I'm seeing the same crashes, but they aren't caused by any specific part of the Axmud code, nor by any specific MXP tag. I will investigate further when I have some free time. For the moment, you will have to disable MXP (Edit > Axmud preferences > Settings > Page 8 > Allow MXP)
Edit: You might have to wait some days, but not some months or years.
Can i read the mxp elements
Yes, in principle. Room data is stored by the Locator task (if it's running). HP and so on is stored by the Status task (if it's running). What exactly are you trying to retrieve the data with? An AxBasic script? A perl script? Triggers?
Is there a line wrap setting somewhere?
Yes, in principle. It has been a few years since I examined the code, but this is correct as far as I can remember:
Text is displayed exactly as it is received from the MUD. In many cases, the MUD will take care of the line-wrapping for you; normally, you have to use a command like "columns 80" to configure it.
There is an Axmud setting, if you use it, you should first disable any word-wrapping that the MUD is doing.
The setting is in the Axmud colour scheme. Different colours schemes might apply to different windows; the one you want for Axmud's main window is the colour scheme called "main".
Edit > Axmud preferences > Colours > Page 5 In the list of colour schemes, click the "main" one to select then, then click the "Edit" button In the new window, click the "Text settings" tab, there's a dropdown box you can use.
I poke around the mxp.txt in the coffeemud codebase and this shows up. I suspect we are not picking up ATT='name' correctly-
<!ELEMENT RMob '<SEND HREF="CONSIDER "&name;"|LOOK "&name;"|KILL "&name;"" hint="Right-Click to affect this creature|CONSIDER &name;|LOOK &name;|KILL &name;">' ATT='name'>
2a. I thought the server send a list of mxp tags and ;peek mxp.entity.list and mxp.entity.rexits etc is the solution but mxp don't seem to work that way. Do I need to define the "local" mxp tags somewhere on axclient to match the "server" mxp tags before I can reuse them? I prefer to move the mxp gauges/room desc etc to another window.
2b. Are there some examples of how to use these? World profile-override-page 3-use mxp room data-enable room Rooms-page 11-other room statement markers...mxp tag marking the beginning of the room Status-page 5-status task mxp variables
Axmud crashes after I enabled mxp on the server and and move to a room with mobs.
I believe that I have fixed these crashes. You can patch your installation by replacing the file ../lib/Games/Axmud/Session.pm
with the new file I uploaded to Github today.
I thought the server send a list of mxp tags and ;peek mxp.entity.list and mxp.entity.rexits etc is the solution but mxp don't seem to work that way
RExits is an element, not an entity. Therefore it doesn't appear in Axmud's entity list.
I spent some time checking the code. Apparently it isn't possible to ;peek the current room data directly, because it is stored as an object inside an object.
This works:
;peek task.current.locator.roomObj
But this doesn't work:
;peek task.current.locator.roomObj.sortedExitList
I can modify the code so you can ;peek
the current room's data directly, but it isn't possible at the moment.
However, the data is available to Axbasic scripts, for example with
PRINT Getroomtitle$ () PRINT Getroomdescrip$ ()
See here for more information.
I prefer to move the mxp gauges/room desc etc to another window.
I can't think of a simple way to do this (at the moment). For example, we can write an Axbasic script which opens a new window, and displays the room description there, but Axbasic scripts can't add gauges to these windows. At the moment.
2b. Are there some examples of how to use these? World profile-override-page 3-use mxp room data-enable room
This is an on/off setting. If enabled, it allows the Locator task to check for MXP elements like RExits
. If the Locator sees RExits
twice, then it stops looking for lines such as There are two obvious exits: north, sound
, and instead it uses only the MXP data.
Rooms-page 11-other room statement markers...mxp tag marking the beginning of the room
The settings in this tab tell the Locator how to recognise rooms in MUD1, LambdaMOO and so on. They aren't needed for most MUDs, including CoffeeMUD.
(to be continued...)
Thanks for fixing the crashes!
On second thought, I rather not auto populate the exits because they are the main reason for redrawing the map.
Do I need to use perl if I want to interact/trigger with the mxp tags
Status-page 5-status task mxp variables
From the main menu, click Edit > Session preferences. MXP
You'll see a list of values received from MXP. Let's display the one called "MaxMana" in the Status task window.
Click Edit > Edit current world > Status > Page 5
In the MXP entity box, type the entity name, MaxMana
In the Status task variable box, create a new Status task variable. You can use any name you like, for example testme
In the same window, click Page 2
At the bottom of the box, add the name of the Status task variable, testme
. It must be surrounded by @...@ characters.
Click OK to close the window. The Status task window should update itself, the next time the MXP value is received. (You might need to log out and log back in, if nothing is happening. EDIT: I have improved the code for that, it is not uploaded yet.)
Sorry for the late replies, I am once again extremely busy this week.
Do I need to use perl if I want to interact/trigger with the mxp tags etc? Can Axbasic or triggers access those custom tags via rawtoken task?
Short answer: the RawToken task just displays tokens, it doesn't store them.
Long answer: If you really wanted to, you could use triggers, or an AxBasic script, or a Perl script, to examine every line of text received from the world, looking for MXP tags like RName
and RDesc
and Ex
.
For example, click Display > Open object viewer > Buffers > Display buffer. Click on a line in the list to select it, the click the View line button. In the new window, you can see a list of MXP tags.
This data can be peeked, for example the 100th line is
;peek buffer.session.display.100
...and the MXP tags for that line are
;peek buffer.session.display.100.mxpFlagTextHash
However, this approach is bad idea. Why? Because MXP tags are not as simple as they appear; you can't just look for text between the RName
tags. There are several other complications that would not be obvious to anyone who hasn't written their own telnet client.
In fact, the correct approach is to let the Locator task gather this information for you, because I spent hundreds of hours writing it, so it is pretty robust.
So, if the automapper is running and you are using an AxBasic script, it's fairly simple to access this information.
LET descrip$ = getroomdescrip$()
PRINT descrip$
For a list of AxBasic functions, see here.
If the automapper isn't running, or if you want to PEEK at the data directly, then I'm afraid you need to update your installation again, replacing the ../lib/Games/Axmud/Session.pm
file with the one I uploaded today.
We can see the Locator's current room:
;peek room.locator
We can also see the automapper's current room, its previous room, the room at which the mapper got lost:
;peek room.map
;peek room.last
;peek room.ghost
We can see the room title, description, exits:
;peek room.locator.titleList
;peek room.locator.descripHash
;peek room.locator.sortedExitList
;peek room.locator.exitNumHash
All of this data can be PEEKed from an Axbasic script, of course (see here):
PEEK ARRAY titles$ = "room.locator.sortedExitList"
PEEKNUMBER size = "room.locator.sortedExitList"
PEEKFIRST firstexit$ = "room.locator.sortedExitList"
PEEKINDEX secondexit$ = "room.locator.sortedExitList", 2
PEEKLAST lastexit$ = "room.locator.sortedExitList"
I am still unclear, why you want to read this information. If there is an actual reason, besides simple curiosity, then I might be able to write the script for you.
v2.0.0, released today, adds a couple of features related to this issue:
I'll go ahead and close the issue, but let me know if I have missed anything.
mud: coffeemud.net port:23
Axmud crashes after I enabled mxp on the server and and move to a room with mobs. Works fine on a empty room though.
Can i read the mxp elements like hp, rname for room name, ex for exits defined by the server?
Is there a line wrap setting somewhere?
Thanks!