Automatic special exits mapper problem.

Post Reply
azure_glass
Posts: 97
Joined: Wed Jul 25, 2012 12:35 pm

Automatic special exits mapper problem.

Post by azure_glass »

I have big map in one abundance (map is simply flat), MUD naturally have exits like up, down and others. But i don't create exitStubs() from beginning so sometimes i have problem to know with location have special exit. So....

There is a way to automatically create exitStubs for Up, Down, and Other("out") on entire map with one script?
English is not my native language. If you don't understand what im writing ask. :)
Ubuntu 17.04, Mudlet 3.1

azure_glass
Posts: 97
Joined: Wed Jul 25, 2012 12:35 pm

Re: Automatic special exits mapper problem.

Post by azure_glass »

I menage myself :) but I don't know how to do "Other" - In my table of exits is: But none worked propertly. By getExitStubs i can't find "code?" of out exit
Code: [show] | [select all] lua
			["In"] = 11,
			["in"] = 12,
			["Out"] = 13,
			["out"] = 14,
Code: [show] | [select all] lua
xyz = 1

while xyz < 21058 do


EXITY = getSpecialExits(xyz)

if table.contains(EXITY, "u") then
setExitStub(xyz, 9, true) -- u
end
if table.contains(EXITY, "d") then
setExitStub(xyz, 10, true) -- d
end

xyz = xyz + 1

end
English is not my native language. If you don't understand what im writing ask. :)
Ubuntu 17.04, Mudlet 3.1

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Automatic special exits mapper problem.

Post by SlySven »

The up, down, in and out are "normal" exits despite not being in what I would call the "XY-plane" and they have the following code numbers:
  • 9 = "up"
  • 10 = "down"
  • 11 = "in"
  • 12 = "out"
They do show to some extent on the 2D mapper (see the following image taken from a sort of current 3.0.0 preview version) as "triangle" shapes pointing in a relevant direction:
Current Mudlet Exits sample
Current Mudlet Exits sample
Mudlet Exits sample.png (112.82 KiB) Viewed 2755 times
unfortunately the code that does these is bugged for "in" and "out" stub exits - it just draws a line as you can seen in Rooms 'E' and 'N'!

I do have some tweaks that I haven't yet showed to anyone which more uniformly (or actually does) shows doors on normal and stub and non-XY plane exits even when the doors are different types in the opposite direction, and has some other useful things IMHO like am auto resizing multiple room selection widget that will nudge the map information display over as required, and the latter will also show WHAT the current selection is (default: current player room OR: a single room that has been highlighted OR: the total number of rooms selected, and which is the currently highlighted "central room" - and it is the room nearest the geometry middle of the selection!) - of course I don't know if anyone wants these things!
Mudlet Exits sample (unreleased code)
Mudlet Exits sample (unreleased code)
You may have to click on the images to see them properly!

Explanation:
Room 'B' has a real "down" exit (with an "open" door)
Room 'D' has both up and a down stub exits, the first with an "open" door and the second a "closed" door
Room 'E ' has an "out" stub exit (with NO door)
Room 'F' has a real "in" exit (with an "open" door)
Room 'J' has a real "up" exit (with an "open" door)
Room 'M' has both up and a down stub exits (both have NO door)
Room 'N' has an "in" stub exit (with NO door).
Room 'O' (lowest left highlighted room so the highlight obscures most of the details) a real "out" eixt (with a "locked" door)...,

The colour used for the triangles on 'E' is black rather than white because the room colour is so bright it is needed to use a dark colour for contrast (like as used for the room Id numbers) - this happens for the stub exits for the non-XY-plane exits that do not have a door (that are drawn on the room symbol) so that - as the inside of the triangles are not filled in they still show up whatever colour the room is drawn in. If there is a door the triangle is drawn in the relevant colour.

My revised code also puts a cross bar across the normal X-Y-plane stub exits so that they can be coloured to show doors or be left white if there is not one; it is not an unheard of scenario for an unknown exit in a MUD to be barred by a door which if the player is building a map themselves and they cannot open it all they know about the route is that it has a door with a name - which is exactly where a stub exit mark is useful.

"Special Exits" (NOT the non-XY plane ones) are different and will only show in the map if you have drawn a custom exit line for them. Some of the lua commands to work with Special Exits are also separate - and "Special Exits" CANNOT be stubs...

Post Reply