Invoking scripts

Share your scripts and packages with other Mudlet users.
Post Reply
vegetating
Posts: 5
Joined: Wed Oct 11, 2017 9:48 pm

Invoking scripts

Post by vegetating »

I have a newbie question:

How do I invoke scripts?

More information, I've downloaded the IRE mudlet-mapper.xml script and the generic mapping script provided by Jor'Mox, added it to the package (and then later, the module) manager. I log into the server (Shadow Gate Mud), open the map window and "Map loaded successfully" is displayed. I then type:

start mapping
- or -
start mapping Starting Point

Other than the text being passed onto the MUD server and having it respond "What?" nothing happens.

Is it actually running, because it displays "Map loaded successfully" and I don't need to type: start mapping? I know it needs to be configured because all the muds are different, I'm reading up on that, but it just seems like it not running because there are no error messages and map commands in the terminal window just pass to the server.

Thank you!

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Invoking scripts

Post by Jor'Mox »

So, first things first, the IRE mapper DOES NOT work in concert with the Generic Mapping script, and isn't meant to work with any game that isn't an IRE mud (which it doesn't appear Shadow Gate is). So, you should completely get rid of that.

As for the other bits, the "Map loaded successfully" is a message from Mudlet saying it loaded in the map it has for that profile successfully... which given that you have no map, isn't much of a feat. It has nothing to do with either mapping script working or not working.

Getting the "What?" message from your game means that, for some reason, the "start mapping" alias in the Generic Mapping script failed to get created. When the Generic Mapping script loads properly, it makes a fistful of aliases (all via tempAlias), and also brings up a map window in the top right corner of the screen. If you haven't yet, I recommend saving the profile (once you have removed the IRE mapper), closing Mudlet, and starting it back up. Things always seem to run better after that happens, and I don't know why. If that doesn't help, let me know, and I'll see if I can figure out what is going on.

Also, side note, "start mapping" won't do anything until you have a room name and room exits getting captured and properly stored, as it needs some initial info to make the first room of the map.

vegetating
Posts: 5
Joined: Wed Oct 11, 2017 9:48 pm

Re: Invoking scripts

Post by vegetating »

IRE mapper - uninstalled, removed and deleted. Remove, restarted and reinstalled the generic mapper, saved the profile and restarted Mudlet again. (version 3.4.0, by the way)

The only aliases are:
deleteOldProfiles
echo
run-lua-code-v4

<start mapping> is still passed to the server.

If I'm understanding correctly, I'm not to the point where I need to tinker with the data it is capturing for the room data, right? I'm still researching that at LuaDOTorg and these forums.

Thanks again for you help.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Invoking scripts

Post by Jor'Mox »

So, temp aliases won’t show up when you are looking at aliases. That is actually why I made them that way. It makes it so they can’t be tampered with, and thus can’t be broken by someone who doesn’t know what they are doing.

The most common reason I have seen for things not working right away is someone just copying in the mapper script, but not the window manager script it uses to position the mapper window. When that happens, no mapper window appears when they connect to the game. Is that what you are seeing?

vegetating
Posts: 5
Joined: Wed Oct 11, 2017 9:48 pm

Re: Invoking scripts

Post by vegetating »

Tampering.. people do that?

The map window appears and displays "No map or valid position". I can wander around from room to room with no change on the map (assuming I haven't told it what to look for) and when I type "start mapping" nothing changes, other than the server responding with "what?".

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Invoking scripts

Post by Jor'Mox »

So, for comparison, I created a totally new profile to a MUD, and loaded in the Generic Mapping script using the command line code included at the bottom of the first post in that threat (included at the bottom of this post for reference). Once it finished loading, the mapping window popped up, and I typed in "start mapping", and got the following message: "Start Mapping Error: No room detected!"

When I open the script window, and then open the error pane (clicking the button along the side that looks like a red circle with a white exclamation point in it), there are no errors, other than the ones printed there when the "start mapping" alias failed and printed an identical error on the main screen. Can you walk me through what you did to get the script installed, and what if any errors are there, so I can hopefully debug remotely?
Code: [show] | [select all] lua
lua function downloaded_package(a,b) if not b:find("generic_mapper",1,true) then return end installPackage(b) os.remove(b) end registerAnonymousEventHandler("sysDownloadDone","downloaded_package") downloadFile(getMudletHomeDir().."/generic_mapper.mpackage","http://dslpnp.altervista.org/Generic_Mapper.mpackage")

vegetating
Posts: 5
Joined: Wed Oct 11, 2017 9:48 pm

Re: Invoking scripts

Post by vegetating »

Following the steps you just provided, I was able to replicate what you just described.

I previously loaded the generic map file through the package manager and/or the module manager, which apparently was wrong.

I'm assuming at this point, I will need to edit the triggers the generic script will recognize the room output and directions of the mud I use. Would that be correct or is there something else I'm completely missing, like how to load the script, to begin with?

Thank you again for your time

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Invoking scripts

Post by Jor'Mox »

I honestly don't know why loading it in via the package manager manually would be a problem, since the command line thing is doing exactly the same thing, only via code, but such is life. I'll have to look into what is going on at some point, when I have more free time.

The triggers included with the package are there as examples, which may or may not fit well with what is needed for your game. In the help at the top of the script (which you can also view by looking at the map.help variable), you will see a section labeled "Important Events for Proper Mapping". Two of those events are covered by the included triggers (which will, as you mentioned, need to be adjusted, potentially significantly, to capture the necessary info from your game). The others have varying levels of utility, especially during the map creation process, though the onMoveFail event is very helpful to avoid having rooms created in the wrong locations when you accidentally try to move a direction where there isn't an exit when creating a map.

But yes, you are correct. At this point, it is all about setting up the triggers properly, and then getting down to the business of actually making the maps. If you need help getting the triggers set up, feel free to ask. So far, I have yet to find a game I haven't been able to make appropriate triggers for.

vegetating
Posts: 5
Joined: Wed Oct 11, 2017 9:48 pm

Re: Invoking scripts

Post by vegetating »

I thank you again for your help, and I appreciate your willingness to set up the triggers form me. First, I need to try and make a mess of them before I ask for more help.

BTW, I've exited out and restarted several times and it's still loading on my profile.

Post Reply