Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Plugins
➜ MUSHclient generic graphical mapper module
MUSHclient generic graphical mapper module
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
3
4
5
6 7
8
9
10
11
12
13
14
15
16
17
Posted by
| Killergate
Denmark (4 posts) Bio
|
Date
| Reply #75 on Sun 04 Apr 2010 11:31 AM (UTC) |
Message
| Hi,
Is there any way to make this work with an lpmud-style mud like 3-Kingdoms, if anyone is familiar with that mud?
Theres no visible roomnumbers or otherwise uniqueness to the rooms visible to the player. Altho its mappable with for instance the zmud/cmud-mapper, setting it up to grab room exits/short description etc.
Any input/thought on this?
/kg
| Top |
|
Posted by
| Stellit
(1 post) Bio
|
Date
| Reply #76 on Sun 04 Apr 2010 08:55 PM (UTC) |
Message
| is there any way to customize the connection between rooms?
for instance, enter a room needs a few actions or/and wait some reaction of NPC.
is it possible of implementing those "complex connection" with current lua mapper module? | Top |
|
Posted by
| Nick Gammon
Australia (23,057 posts) Bio
Forum Administrator |
Date
| Reply #77 on Mon 05 Apr 2010 06:52 AM (UTC) |
Message
|
Killergate said:
Hi,
Is there any way to make this work with an lpmud-style mud like 3-Kingdoms, if anyone is familiar with that mud?
Theres no visible roomnumbers or otherwise uniqueness to the rooms visible to the player.
Well it won't be totally trivial. The mapper module itself will draw stuff when it knows the room identifier. If you can detect the room name/description in a trigger you might be able to hash that to give each room a unique hash id.
Then you need to detect exits (eg. if you go east you need to remember that, so that when going east from room 1234, and you find yourself in room 1235, you remember that so next time you can tell the mapper where the east exit from room 1234 goes). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,057 posts) Bio
Forum Administrator |
Date
| Reply #78 on Mon 05 Apr 2010 06:53 AM (UTC) |
Message
|
Stellit said:
is there any way to customize the connection between rooms?
for instance, enter a room needs a few actions or/and wait some reaction of NPC.
is it possible of implementing those "complex connection" with current lua mapper module?
There is no provision for that at present. Waiting for NPC interaction can be a bit tricky. That is more something you would do with a trigger, and then attempt to keep speedwalking from that point. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| AaronM86
(42 posts) Bio
|
Date
| Reply #79 on Mon 05 Apr 2010 07:07 PM (UTC) |
Message
| I dream of one day having a map like this for Dark-Legacy haha :P Cept, I'd have to set it up a bit different. It has a world map and then areas and dungeons that you enter on the map itself. Would cool to have the entire world map mapped and every area mapped... *drools* or better yet every dungeon lol I should totally hire an experienced coder rofl | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #80 on Tue 13 Apr 2010 01:15 PM (UTC) |
Message
| Any chance of getting a render function that takes advantage of the pre-calculated X,Y[,Z] coordinates to properly space rooms and avoid the "broken" exit thing?
And, if I want to leverage this module/plugin, making my own customizations on top of the script, how would I best do that? I mean, I don't want to edit your code directly because I would like to include any future enhancements without having to merge yours and mine. So, I want to essentially wrap your mapper script, add a few things, override one or two things, and use that in my own plugin. Suggestions? | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #81 on Tue 20 Apr 2010 02:16 AM (UTC) |
Message
| Ok, so I'm looking at this mapper. And I'll be honest, I haven't a clue how it works. I'm hoping to puzzle that out later. As I learn some Lua maybe in a month or so. I think the first step is to get triggers to feed this thing the necessary raw room information (and I can worry about fixing it later). I have working triggers that can capture room info for another project I had started prior to seeing this mapper. So... how do I adapt them for this?
<triggers>
<trigger
enabled="y"
lines_to_match="3"
keep_evaluating="y"
match="^([A-Za-z\'\,\- ]+)\n([^\n]*)\nThere are no obvious exits\.$"
multi_line="y"
regexp="y"
script="ProcessRoom0"
sequence="100"
>
</trigger>
<trigger
enabled="y"
lines_to_match="3"
keep_evaluating="y"
match="^([A-Za-z\'\,\- ]+)\n([^\n]*)\nThere (is|are) (\w+) (obvious exit|exits)\: (.[^\.]+)\.$"
multi_line="y"
regexp="y"
script="ProcessRoom1"
sequence="100"
>
</trigger>
<trigger
enabled="y"
lines_to_match="4"
keep_evaluating="y"
match="^([A-Za-z\'\,\- ]+)\n([^\n]*)\nThere (is|are) (\w+) (obvious exit|exits)\: (.[^\.]+)\n(.[^\.]+)\.$"
multi_line="y"
regexp="y"
script="ProcessRoom2"
sequence="100"
>
</trigger>
<trigger
enabled="y"
lines_to_match="5"
keep_evaluating="y"
match="^([A-Za-z\'\,\- ]+)\n([^\n]*)\nThere (is|are) (\w+) (obvious exit|exits)\: (.[^\.]+)\n(.[^\.]+)\n(.[^\.]+)\.$"
multi_line="y"
regexp="y"
script="ProcessRoom3"
sequence="100"
>
</trigger>
The old version is written in python, and I'll have to convert the specifics later. But here are those functions:
def ProcessRoom0(TriggerName, trig_line, wildcards):
ProcessRoom(str(wildcards[0]), str(wildcards[1]), 'There are no obvious exits.')
def ProcessRoom1(TriggerName, trig_line, wildcards):
ProcessRoom(str(wildcards[0]), str(wildcards[1]), str(wildcards[5]))
def ProcessRoom2(TriggerName, trig_line, wildcards):
ProcessRoom(str(wildcards[0]), str(wildcards[1]), str(wildcards[5])+str(wildcards[6]))
def ProcessRoom3(TriggerName, trig_line, wildcards):
ProcessRoom(str(wildcards[0]), str(wildcards[1]), str(wildcards[5])+str(wildcards[6])+str(wildcards[7]))
def ProcessRoom(tName, tDesc, tExits):
global gRoomName, gRoomDescription, gExitDescription
world.Note('Debug Note: Room Trigger Fired')
gRoomName = tName
gRoomDescription = tDesc
gExitDescription = tExits
ProcessText()
As you can expect I have further code that does all sorts of things to get these to be the same every time you go to a room (i.e. extract information that is character dependent/time of day dependent/etc...)
For now, I'd be ecstatic if I can get that working, the rest is a matter of me figuring out Lua enough to rewrite my python code. | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #82 on Tue 20 Apr 2010 06:32 PM (UTC) |
Message
| You should give the ATCP mapper module a try first before you write too many unnecessary triggers. | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #83 on Thu 22 Apr 2010 02:53 AM (UTC) |
Message
| Well, I gave it a whirl for the hell of it--as suggested. Doesn't throw any errors, but also doesn't seem to work. Probably because the mud isn't ATCP, whatever that is. Or maybe because I can't figure out how to create a new database. | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #84 on Thu 22 Apr 2010 04:18 AM (UTC) |
Message
| If it's not an IRE, chances are extremely small that it uses ATCP (Achaea Telnet Client Protocol). |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #85 on Thu 22 Apr 2010 03:19 PM (UTC) |
Message
| I was 99% sure LupusFatalis was an IRE gamer, and those triggers look suspiciously like every IRE game I've seen so far. (Note: if it is an IRE game, you need to install the plugin before you connect or the ATCP won't be enabled.)
Okay, I've been looking at the room rendering code, and what should (in theory) be an easy change is giving me a small headache.
I want to draw the rooms are their game-supplied x,y coordinates instead of assuming standard exit lengths. I changed a couple of lines in draw_room to make this happen, but I'm terrible with coordinate systems...
local dist_x = room.x - rooms[current_room].x
local dist_y = room.y - rooms[current_room].y
local next_x = x + (ROOM_SIZE + DISTANCE_TO_NEXT_ROOM) * dist_x
local next_y = y + (ROOM_SIZE + DISTANCE_TO_NEXT_ROOM) * dist_y
Any clues on what I should be doing instead? | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #86 on Thu 22 Apr 2010 05:24 PM (UTC) |
Message
| nah, I believe the code is heavily modified LPmud. First came about in 1991, I think the ATCP thing came about after that, as the mud that bears its name says its ~9 years old.
Anyhow, assuming with triggers I can determine the appropriate room name, description, and exits how can I set it, etc...
I suppose a better question might be, has anyone modified the code to work for something other than ATCP? And if so, is it somewhere that I can take a peek at it? | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #87 on Thu 22 Apr 2010 05:43 PM (UTC) |
Message
|
Larkin said: Any clues on what I should be doing instead?
Sure, that is something I can figure out pretty easily if you can let me know what the variables you actually want are...
i.e. specifically what are:
dist_x := ?
next_x := ?
DISTANCE_TO_NEXT_ROOM := ?
ROOM_SIZE := ?
i.e. I'm assuming you have the current coordinates
(x,y) and new coordinates (x',y')
that for dist_x you want the distance between the points if they were both projected onto the x axis? dist_y similar.
if so... |x'-x| will do. y similar. But if your actually looking for the length of the line segment connecting:
(x',y') and (x,y) then you'll want:
length = sqrt( (x'-x)^2 + (y'-y)^2)
In short, what specifically do you know, and what do you want to find? | Top |
|
Posted by
| Larkin
(278 posts) Bio
|
Date
| Reply #88 on Thu 22 Apr 2010 05:47 PM (UTC) |
Message
| Well, Nick isn't using the room coordinates to draw the rooms (IRE games now provide room coordinates for us, which implicitly defines the length of the exit connectors when drawing a map), instead assuming all exits are of "length 1," essentially.
I want to render the room boxes at the coordinates as they're known, relative to the box in the center. So, if you draw(1234), you have X and Y for room 1234 as your center on that map.
Nick picks up the X, Y, and even Z coordinates from the game, but they're not actually used to render the map. I'm just trying to fix that. | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #89 on Thu 22 Apr 2010 06:08 PM (UTC) |
Message
| Ah, I see. What your trying to do.
Ok, for simplicity, consider the center of the map to have pixel coordinates (0,0). Its simple enough to translate everything accordingly after you get the other part working (as this probably isn't the case).
So your current room A has coordinates (x,y) room B has coordinates (x',y').
Your location on the map for A is going to be (0,0). But its more than 1 pixel, so lets say its the square formed by: (-d,d), (-d,-d), (d,-d), (d,d)
Your 'local' coordinates for (x',y') are going to be Length*(x'-x,y'-y). I.E. whatever you want the spacing to be between the center of the squares. So your square for that will be drawn inside: (l(x'-x)-d,l(y'-y)+d), (l(x'-x)-d,l(y'-y)-d), (l(x'-x)+d,l(y'-y)-d), (l(x'-x)+d,l(y'-y)+d)
Hope that helps somewhat, I gotta run, but I'll peek back here later. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
746,141 views.
This is page 6, subject is 17 pages long:
1
2
3
4
5
6 7
8
9
10
11
12
13
14
15
16
17
It is now over 60 days since the last post. This thread is closed.
Refresh page
top