GithubHelp home page GithubHelp logo

ire-mudlet-mapping / ire-mapping-script Goto Github PK

View Code? Open in Web Editor NEW
17.0 10.0 33.0 1.82 MB

IRE Mapping Script

Home Page: http://wiki.mudlet.org/w/IRE_mapping_script

Shell 100.00%
mud iron-realms mapping mudlet lua ire mudlet-mapper-script achaea lusternia aeolia

ire-mapping-script's Introduction

IRE Mapping Script

This script allows Mudlet's mapper to do autowalking on Achaea, Aetolia, Lusternia, Imperian, Starmourn or StickMUD. See the download section to get started!

It has many features such as:

  • automatic repathing if you get offcourse
  • locking of whole areas
  • auto-swimming
  • mapping
  • scriptable exits

The script is originally written by Vadi and includes contributions from Kard, Keneanung, Patrick, Qwindor, Wyd and others! Would you like to add something? Submit a PR!

Are you a game admin and would like to add another game to the script? See here.

Notable mappers:

  • Qwindor (Achaea)
  • you?

ire-mapping-script's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ire-mapping-script's Issues

mudlet-mapper.xml could use update to mmp.clearspecials(...)

Brief summary of issue / Description of requested feature:

The existing function used extensively for some IRE specific code carries the comment:

-- cleanup function to remove the temp special exit we made - only way to remove specials in Mudlet atm is by clearing them all

However this has not been true since the addition of (int) TLuaInterpreter::removeSpecialExit(lua_State*) in commit 83db9f94eda83ede696b9b0ead9b236f3c8ab05b four years ago (2014/03/15)

Mapper attempts to 'sprint key ptp 1'

I recently learned the Dashing skill in Skirmishing, so I did mconfig sprint on in the hopes that it would work. It did! Initially!

Later on, I tried goto anemoi 1 from within Sabiak. It got most of the way there, but when I arrived at the Starlily, the goto script repeatedly attempted to do the command sprint key ptp 1, and would not proceed until I did mconfig sprint off and left the room to trigger it to move again.

My Mudlet is version 3.16.1
I use crowdmap and my Mudlet Mapper version is 19.1.2

Crowdmap data issues

Mudlet warns about this stuff:

Loading map(1) "/home/vadi/.config/mudlet/profiles/svo/map downloads/crowdmap" at 2017-06-03T06:23:10 report
================================== Map issues ==================================
[ INFO ]  - Reading map (format version:16) file: "/home/vadi/.config/mudlet/profiles/svo/map downloads/crowdmap".
[ INFO ]  - Sucessfully read the map file (0.21s), checking some consistency details...
[ ALERT ] - 10 area(s) detected as missing in map: adding it/them in.  Look for further messsages related to the rooms that is/are supposed to  be in this/these area(s)...

34 ==> "Unnamed Area_001"
45 ==> "Unnamed Area_002"
47 ==> "Unnamed Area_003"
255 ==> "Unnamed Area_004"
257 ==> "Unnamed Area_005"
363 ==> "Unnamed Area_006"
370 ==> "Unnamed Area_007"
392 ==> "Luminai Estate"
403 ==> "Battlefields"
424 ==> "The Citadel of Storms"
[ INFO ]  - Area id numbering is satisfactory.
[ INFO ]  - Room id numbering is satisfactory.
[  OK  ]  - Auditing of map completed (0.56s). Enjoy your game...
================================= Area issues =================================
------------------------ Area id: 34 "Unnamed Area_001" ------------------------
[ ALERT ] - Area with this id expected but not found, will be created.
------------------------ Area id: 45 "Unnamed Area_002" ------------------------
[ ALERT ] - Area with this id expected but not found, will be created.
------------------------ Area id: 47 "Unnamed Area_003" ------------------------
[ ALERT ] - Area with this id expected but not found, will be created.
----------------------- Area id: 255 "Unnamed Area_004" -----------------------
[ ALERT ] - Area with this id expected but not found, will be created.
[ INFO ]  - In this area there were 1 rooms missing from those it should be recorded as possessing.  They are: 9822.  They have been added.
----------------------- Area id: 257 "Unnamed Area_005" -----------------------
[ ALERT ] - Area with this id expected but not found, will be created.
----------------------- Area id: 363 "Unnamed Area_006" -----------------------
[ ALERT ] - Area with this id expected but not found, will be created.
----------------------- Area id: 370 "Unnamed Area_007" -----------------------
[ ALERT ] - Area with this id expected but not found, will be created.
------------------------ Area id: 392 "Luminai Estate" ------------------------
[ ALERT ] - Area with this id expected but not found, will be created.
------------------------- Area id: 403 "Battlefields" -------------------------
[ ALERT ] - Area with this id expected but not found, will be created.
--------------------- Area id: 424 "The Citadel of Storms" ---------------------
[ ALERT ] - Area with this id expected but not found, will be created.
================================= Room issues =================================
-------------------------- Room id: 9822 "New Thera" --------------------------
[ INFO ]  - This room claims to be in area id: 255, but that did not have a record of it.  The area has been updated to include this room.
################################ End of report ################################

Several incorrect mmp.envids for Achaea.

mmp.envids as populated in register_achaeas_envdata() has several terrains in the table with duplicate ids. This serves to neuter the mmp.envidsr table when it is generated, which results in rooms reporting the incorrect terrain when translating back from the map's terrain id to a terrain type.

The latter entries in mmp.envids are preserved in mmp.envidsr while the earlier entries are overwritten.

Catacombs and Mountains both share id 14, resulting in entry 14 in mmp.envidsr always returning Mountains. Thus the Azdun catacombs in the crowdmap will erroneously report as Mountains when trying to translate their terrain back from id 14. Even if you manually remap the rooms to Catacombs, it will again save as id 14 and be reported back as Mountains.

Shared ids are:
Catacombs and Mountains share id 14
River and Skies share id 10
Deep Ocean floor and Water share id 30

Don't spam mapper script update messages

If you're disconnected and nothing else is happening, the update hourly update check tends to spam you out:

selection_078

The script could check in the buffer if the last x messages are from it.

Clean up globals exposure

The mapping script bleeds quite a few globals - some of them were created before Mudlet could handle event handling functions within namespaces, but that's not the case for ages now. It is a good idea to clean all of this up now.

image

Move crowdmap and mapping script to organisation

@QwindorRousseau and I brainstormed a little more about the crowdmap and came up with an idea: GitHub now supports file uploads directly on the Gitub webpage. If an existing file is uploaded, it gets converted to a git change, so collaborators don't need to touch git at all (additionally there are no other maintainers than Qwindor right now).

With the help of GitHub pages, we can push the map file then over http to the users.

To consolidate everything mapper related, we created the organisation @IRE-Mudlet-Mapping, which curently has the new crowdmap repository.

And we would like to move the script over there too. It would also allow other people to accept merge requests and do updates.

Crowdmap updates should save and then reapply room marks when updates occur.

The crowdmap is a massive boon to those who don't - or won't / can't - map games on their own, but it does mean that the use of room mark is somewhat limited. If you make your own marks on the map, they're lost when a new update is released.

I'd suggest that an update be made to the update fetching / installing script to store marks in a table before the latest update is downloaded / applied, and then said table is used to apply marks once the update registers as successful.

showpath fails silently if a path can't be found(?)

When trying to use the showpath command, it appears to fail silently if a path can't be found.

Try showpath 1320 1321 -- a path is found and shown.
Try showpath 1320 6544 -- I know that you have to fly through space to get to this room, but showpath gives no feedback.

I'm assuming it's because it can't find a path. (these rooms were tested in Starmourn)

Deleting room 1

There should probably be a check to prevent someone from accidentally deleted room 1 as this room stores valuable RoomUserData for the map.

script checks wrong value for getRoomUserData

For example, the "Add Room Mark" alias:

local tmp = getRoomUserData(1, "gotoMapping")
local maptable = {}

if tmp ~= "" then
  maptable = yajl.to_value(tmp)
end

tmp is nil not "", it looks like the wrong check.

Minor issue of Lusternia World Events

From Discord:
Just noticed a little error in the lusternia mapper scripts the trigger name
World events
is set to:
mmp.locateAndEcho(matches[1])
it should be
mmp.locateAndEcho(matches[2])

goto not stopping once it gets to the area you wanted

Goto is not stopping once you get to the area that you wanted to goto when you use wings. From what I can tell it's still going to the nearest room it calculated before it took wings exits into consideration and will path to that room nearest it calculated even if it was on the other side of the area when wings exit drops you off on the other side.

Speedwalk issues on latest release

I've noticed with the latest version available on the website (16.6.2) there seems to be a pathfinding issue. I'm not sure if it's with the mudlet getPath or this scripts mmp.getPath. I can't really isolate it.

What's happening is that it's not considering some of the temporary added special exits but is considering others. I can't isolate why this is, but for example, I have both the 'belt' and 'vernalcurio' configs activated. When going from outside the aetherplex (room 148) to Gaudiguch's nexus (11401) it should be using the belt and moving down (2 rooms, exits all line up) and instead is using the vernalcurio and taking a much longer path through the hearthstone.

Both the special exits for these scripts are being added (and removed) as they should be, there is no cached path saved to override anything. I can't determine why it's choosing the one exit over the other one.

Mapper updates automatically downloading

If you're not on the latest version of the mapper, reconnecting to the game after a long disconnect forces a download of the mapper, and causes Mudlet to hang. This issue seems intermittent and I'm not at all sure what's causing it. (unhelpful pastebin)

Not urgent, but definitely annoying as hell, and something to keep in mind when looking into other issues in case someone comes across this.

Switching priority between gallop/dash/runaway.

If someone has gallop/dash both enabled (or some other combination therein) the mapper should attempt one and trigger off the "must be mounted to gallop" or "can't do that while mounted" message to use the proper fast-travel config, instead of flailing uselessly and forcing the client to reconfigure each time they switch/remount.

Possibly also include handling for phase/mass/etc, so that when the user is unable to dash they don't need to reconfigure that as well, each time?

The only bit that would actually need to be triggered would be the mount/unmount bit, the rest could be handled with gmcp defs. The difficult bit would be reworking the fast-travel script to use the appropriate priorities. Either have them reordered according to priorities, or store priorities separately and instead of pointing the script at the mconfig values point them at the priority table (this seems easier).

Seems like a decent chunk of work, to be honest. May take a crack at it when I get some time, but given my schedule it'll likely be awhile, so if someone else wants to do so feel free. Or maybe it's not worth the effort and someone will shoot it down, and I'll just keep using my fugly self-serving script.

ETA: This would be primarily for Achaea, ofc. Could be expanded into other IREs, but would take contributions from people familiar with those games.

Pierce the Veil - Achaea

mconfig option for dragons for pierce the veil
Syntax: PIERCE THE VEIL
Cooldown: 3.00 seconds of equilibrium
Resource: 500 mana
Arrival Room: 12695 (Dragonspire Mount.)
Takes 2.2 - 3 seconds to go through (so 4 seconds to account for people with slower connections)

Can be done from anywhere island wings work (duanatharic)

Updating shackle functionality in Achaea

Probably a relic from when mass used to do damage on movement, but shackle use by mapper can be made more efficient.

Changes that can be made:

  • No longer remove shackle on normal speedwalking when the config option for shackle is enabled. Mass has no impact on normal speedwalking, so its unnecessary.

-With shackle option enabled, remove shackle only when the dash argument and its sister equivalents are included. Can do this two ways - easier to just remove shackle at the start of speedwalking and wear it once completed, like it currently does. Or can remove the shackle before each individual dash and wear it after the dash is completed, which is all that is necessary.

"weight ferry exits" does not handle Starmourn Syntaxes

TAKEOFF TO
STATION TRANSFER TO

These syntaxes do not currently get matched when using alias "weight ferry exits."
Duplicating the current matching block:
if (cmd:lower():find("buy passage to", 1, true)) then
and replacing 'buy passage to' with the above syntaxes works, although additional checking of game may be desired.

IRE moved all map.xml files to https, mudlet mapper ONLY looks for http address

Please see full comments here:

https://bugs.launchpad.net/mudlet/+bug/1427364

User "Chris" identifies the exact issue within the script here, in comment 11:

https://bugs.launchpad.net/mudlet/+bug/1427364/comments/11

That said, the issue is not with the downloaded file that I think is the main focus of this site, it's with a "backend" script that runs the mapper, so directly related, but... different, and possibly outside the scope of what people here are working on. The problem is significant. Even 3.0 delta users cannot download IRE's map.xml files, and since the mapper does not "see" map.xml files that the user might manually put into the appropriate spot in their profile, this means that the IRE maps are essentially invisible/inaccessible to all mudlet users until this issue is fixed. Thanks for looking.

Speedwalking issue since updating

Playing Imperian:

Updated mapper and currently trying to use goto Necropolis(for example) and this is the message I receive since downloading the latest update. I'm not sure what is happening or how to correct it.

goto Necropolis
(mapper): Starting speedwalk from 13197 to

When I try to use the game's option to goto a city of Kinsarmar i get this:

(mapper): Starting speedwalk from 9234 to Lua error:[string
"function mmp.gotoRoom(where, dashtype, goto..."]:543: attempt to concatenate field 'echocolour' (a
nil value)

I noticed the file also looked a bit different, so figured I'd comment. First time ever having this issue, when I deleted the current version of speedwalking with the older version. I was able to correctly use the goto feature again.

locateAndEchoSide

with the veil change in Achaea you now get the area when you farsee someone, that means you should be able to limit the 'found rooms' to be in the area it indicates. At the same time it should be possible to limit a room search to only be somewhere you can scry to anyway. It makes no sense to get a list of rooms on the planes/islands/Meropis/far north if you're sitting at prime and sensing somone via a non-veil farsee

Starmourn doesn't append flying suffixes to GMCP

Starmourn uses <roomname> (mid) or (high) to denote flying status, but does not relay this to GMCP.

It however does use standard FLY/LAND commands and the client will receive You must land before you can move indoors. when trying to move indoors while flying.

I think this is is most easily resolved by the devs, not the script, however some detection to prevent failed pathfinding spam while flying would be beneficial.

Adding universe tarot

Another addition that was requested for pathing though this one might be quite a bit more complicated in the terms to getting it to work right and clearing out the special exits correctly.

Typo in "Load a map" alias

Minor typo in line 4050 of that alias reproduced below:

            <Alias isActive="yes" isFolder="no">
                <name>Load a map</name>
                <script>local function s(loc)
    if not loadMap(loc) then
      mmp.echo(&quot;Couldn't save the map :(&quot;)`

change the above to: mmp.echo(&quot;Couldn't load the map :(&quot;)

      mmp.lockWormholes(); mmp.lockSewers(); mmp.lockPebble();
      if mmp.settings.waterwalk then mmp.enableWaterWalk() else mmp.disableWaterWalk() end

      if loc ~= &quot;&quot; then mmp.echo(&quot;Map loaded.&quot;) else mmp.echo(&quot;Loaded the default map.&quot;) end
      raiseEvent(&quot;mmapper updated map&quot;)
    end
end

if not loadMap then
  mmp.echo(&quot;Your Mudlet can't load maps. Please upgrade it!&quot;)
else
  if matches[2] and matches[2] == &quot;custom&quot; then
    s(invokeFileDialog(true, &quot;Please select the map file and click Open to load it&quot;))
  elseif matches[2] then
    s(getMudletHomeDir()..&quot;/map/&quot;..matches[2])
  else
    s(&quot;&quot;)
  end
end</script>
                <command></command>
                <packageName></packageName>
                <regex>^map load(?: (.+))?$</regex>
            </Alias>

Proposal: rename to GMCP mapping script

This mapping script is now used on more than IREs @mpconley's StickMUD for one, Asteria and I think a few others - so we should adapt to the wider community's use of it by renaming the script to welcome support for more games.

getShortestOfMultipleRooms doesn't account for weights

The internal function 'getShortestOfMultipleRooms' doesn't account for exit weights...this is most noticeable in Achaea when attempting GOTO FEATURE WILDERNESS near a ferry that has a large weight attached to that exit. The mapper attempts to go to the wilderness exit on the island rather than one nearby on the mainland.

Downloading version and changelog from the wrong host.

Due to this line of mmp.checkforupdate() the mmp_downloaded_file() function still thinks the latest version is 15.3.1 and reports that version 15.5.1 is out of date.

downloadFile(mmp.mapperfile, "http://bazaar.launchpad.net/~mudlet-makers/mudlet/mapper-lua/download/head:/version-20110910005237-2917fpevgi4koxqk-1/version")

mmp.retrievechangelog() also retrieves a file from the old host.

downloadFile(mmp.changelogfile, "http://bazaar.launchpad.net/~mudlet-makers/mudlet/mapper-lua/files")

mmp_checkupdatestart() is called when the "mmp logged in" event is raised which then creates a temptimer to call mmp.checkforupdate()

Add auto-update functionality

The mapper script can detect when it's out of date and offer to download a new version of the script for the person, but not install it as well.

Now that Mudlet can install packages, instead of just downloading the script, the same offer should now offer to download+install the update.

Clear labels for whole map might be broken

A user reported:

I had a problem trying to remove these labels... I used the link on doing 'rl' then clicking the whole map on clear labels but apparently it didn't work?

The JSON map export still included the labels

goto <area> # doesn't work

If 'goto ' brings up a menu with several options because of name ambiguity, clicking on any of the options doesn't work.

For example try goto omni in Starmournorgoto mhaldor` in Achaea.

chenubian wings for Achaea

an mconfig option for whetever you have chenubian wings with an room ID option to the owners special cloud area so pathfinding can go through that as the syntax is the same as eagle wings, so the syntax doesn't actually take them to 'On the Clouds'. (Owners would most likely have to manually add their own room to their maps)

Improve message about map updates

(mapper): The games map was updated - you should update yours! Go to Settings -> Mapper tab and 
click on the button there. Once you've updated, click here to remove the reminder.

Discord user GamingBuddy commented this:

how do we update the map again? I have always gotten the game map was updated, you should update yours. And everytime I update, I miss a step and keep getting spammed. Till I learnt I need to delete old map first or something before updating. Can someone tell me that extra step? In a new game and it's annoying me
I know there are extra steps and I think I fixed it. But maybe a suggestion where it gives clearer instructions?
click on the button there isn't very instructive

Maybe "click on the button there." Should read more like maybe "click on the button that says XXX." Where XXX is what exactly?

To be explicit, this is referring the second sentence in above message starting with "Go to". Not the third sentence with the embedded link.

mmp.areatabler not defined

I have had a lot of the mapping functions fail on me. Debugging the problem they all complain that mmp.areatabler is not defined. Indeed if I run

lua display(mmp.areatabler)

it displays nil.

The work-around is to type

lua mmp_regenerate_areas()

when I first log in.

Looking at the code, I can see no place where mmp.areatabler is defined except in that function. I would have thought it may have been loaded from a file once generated.

To me the fix is either:

  • save/load mmp.areatabler when you logout/login
  • Add mmp_regenerate_areas() when you login, perhaps even conditional if mmp.areatabler is nil

I cannot see how, but I assume it has something to do with me upgrading from 3.0.0-delta to the latest in the release_30 git repository. That's where the problem happened OR because release_30 enabled me to download a new map, the problem is with the download and process map code.

Orb of Confinement in Achaea

Orb of Confinement prevents use of eagle / atavian / chenubian / island wings in cities with it active. Implement config options to not use wings in those cities with active orbs (I'll work on this)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.