The compass is just to tell you what directions you can go in. If you look in the gif, it's colored differently for the directions. Yellow means you can go that direction. the U/D is technically another compass, but it's up/down. Gray means no-go, can't go. Sometimes there's a yellow direction, but move will fail due to a door being present, which can or can't be open, it depends on the door. I'm not exactly experienced enough to see exceptions to the the gravity always being after the room name, but I know it's not before the room name, at least.
EDIT: I went to Earth for normal gravity, since the game measures by N * Earth gravity, and the Gravity was still there, but it said Gravity: Normal.
So it doesn't disappear if gravity became 1x instead of 10x on Vegeta. 100x is a thing in training rooms, and 400x is a thing in Bardock's training room.
EDIT 2: I tried to get drunk to test possible fail checks, and it's just another movefail, although it's not because there's no exit, it's just because I have my sense of balance gone.
EDIT 3: not sure if zanzoken is randommove or forcemove, since it moves you to a random room without you typing anything while you can't predict where you're going It's design as a move to help you flee by evading and running away to a different room.
EDIT 4: Zanzoken is randommove, but if I use 'recall' I go to my newbie zone, no matter how many rooms away I am. Also, there's transport ship which can take you to different planets. You can go from my home planet Vegeta to Earth to Vegeta to Namek and to Vegeta again for example. How do i classify that?
EDIT 5: I talked to the owner of the game, and get some triggers set up, I still have onNewRoom and onNewExit and onForcedMove unfilled. The owner said he doesn't think there's a event where you're forced to move in a direction you know you're going.
Generic Mapping Script
Re: Generic Mapping Script
The defining feature of forced move vs random move is that by reading whatever message tells you it happened, it is possible to know the direction in which you moved. If there is a random move, the script knows it has to search around and try to make educated guesses as to what room you ended up in, with a forced move, it knows the direction of travel. The most common example of a forced move is following someone, and that is likely something that exists even in your game.
Recall is a special case. To manage recalls, you need to first set a character (via the set character command), then you go to the room you recall to, and use the set recall command. If the place you recall to ever changes, you just go to the new room, and use the set recall command again. The script is designed for the possibility of different recall locations for multiple different characters, so you MUST set a character to use the recall feature of the script, though if you only have one character, or if every character always recalls to the same location, there is no need to be particular about setting things for each character. That said, there are often commands in the game that will show your character identity (like whoami, or score), which can potentially be used in concert with a trigger to automatically set the character name for the script.
The ships that transport you between worlds could be a number of things. They might act like portals, in which you enter the ship, and instantly show up on the new planet. They might act like normal rooms, in which you walk into the ship one way, and walk out another, with the exit you take determining which world you end up on. Both of those options are handled pretty easily by the script. The third option though, in which they act like ferries, actually moving from world to world, with the same exit leading to different destinations, isn't handled well by the script. However, this is fairly easy to work around, as the script has mechanisms in place to locate you if it doesn't recognize where you are. So, if this is the case, I would recommend just not mapping out the ships, and so long as the landing areas are distinctive, you should just be able to step off the ship, walk a room or two, and the map will catch up to you.
Recall is a special case. To manage recalls, you need to first set a character (via the set character command), then you go to the room you recall to, and use the set recall command. If the place you recall to ever changes, you just go to the new room, and use the set recall command again. The script is designed for the possibility of different recall locations for multiple different characters, so you MUST set a character to use the recall feature of the script, though if you only have one character, or if every character always recalls to the same location, there is no need to be particular about setting things for each character. That said, there are often commands in the game that will show your character identity (like whoami, or score), which can potentially be used in concert with a trigger to automatically set the character name for the script.
The ships that transport you between worlds could be a number of things. They might act like portals, in which you enter the ship, and instantly show up on the new planet. They might act like normal rooms, in which you walk into the ship one way, and walk out another, with the exit you take determining which world you end up on. Both of those options are handled pretty easily by the script. The third option though, in which they act like ferries, actually moving from world to world, with the same exit leading to different destinations, isn't handled well by the script. However, this is fairly easy to work around, as the script has mechanisms in place to locate you if it doesn't recognize where you are. So, if this is the case, I would recommend just not mapping out the ships, and so long as the landing areas are distinctive, you should just be able to step off the ship, walk a room or two, and the map will catch up to you.
Re: Generic Mapping Script
Okay, so I worked out what I think should be a reasonable set of triggers to capture room names and exits.
For the room name trigger, you will need the following:
Set the following two trigger patterns, in order:
^(.*)$
^Gravity: (.*)$
Set both patterns to the type "perl regex"
Check the "multiline / AND Trigger" check box, and set the "line delta" value to 1
Set the code for the trigger to this:
^> (\w+)\s+\-
It will have the following code:
For the room name trigger, you will need the following:
Set the following two trigger patterns, in order:
^(.*)$
^Gravity: (.*)$
Set both patterns to the type "perl regex"
Check the "multiline / AND Trigger" check box, and set the "line delta" value to 1
Set the code for the trigger to this:
Then, you need two triggers to capture the room exits. The first will trigger off of "Visible Exits:", as a beginning of line substring type trigger, and it will have the following code:
The second will be a trigger to capture each individual exit from the lines that follow, using the following "perl regex" type pattern:
^> (\w+)\s+\-
It will have the following code:
And finally, you need to modify the code of your prompt trigger to the following:
Once those are all setup, and they have captured their first set of data (via looking or moving at least once), you should be able to "start mapping" and begin building a map for your game.
Re: Generic Mapping Script
https://gyazo.com/c5edb81d581bb34e4211bb6acafa4d68
I wanted to show you my triggers so I can get correctional advice on them and also advice on where to put them.
I'm not sure where I should put some of these triggers.\
EDIT:
Here's another log of me using the ship to three different planets (so far) with some in-game commentary thrown in:
I wanted to show you my triggers so I can get correctional advice on them and also advice on where to put them.
I'm not sure where I should put some of these triggers.\
EDIT:
Here's another log of me using the ship to three different planets (so far) with some in-game commentary thrown in:
Re: Generic Mapping Script
Okay, so the onVisionFail and onRandomMove triggers just need to raise the event for which they are named, and they should work fine.
Your onNewExit trigger needs to use as a beginning of line substring pattern: Visible Exits:
And your onPrompt trigger which is disabling that trigger needs to be changed to disable a new trigger that you need to create, the one that will be enabled by the onNewExit trigger, and which captures each additional exit (the third one I listed in the post above). This new trigger doesn't correspond to any event, or any of the triggers you currently have in place, as the way your game displays available exits is more complex than occurs in most games (in which exits are typically all on one line, or possibly spilling over into a second line if there are too many).
Also, your onPrompt trigger should use a beginning of line substring pattern, rather than a regular substring pattern. Granted, I'm sure the chances of "[Pl:" showing up anywhere is are pretty slim, but it is best to be safe.
The log of how spaceships work definitely seems like what I would term a portal for the purposes of this script, though admittedly one with some delay. So, you should be able to use the built in commands to create portals to handle them.
Your onNewExit trigger needs to use as a beginning of line substring pattern: Visible Exits:
And your onPrompt trigger which is disabling that trigger needs to be changed to disable a new trigger that you need to create, the one that will be enabled by the onNewExit trigger, and which captures each additional exit (the third one I listed in the post above). This new trigger doesn't correspond to any event, or any of the triggers you currently have in place, as the way your game displays available exits is more complex than occurs in most games (in which exits are typically all on one line, or possibly spilling over into a second line if there are too many).
Also, your onPrompt trigger should use a beginning of line substring pattern, rather than a regular substring pattern. Granted, I'm sure the chances of "[Pl:" showing up anywhere is are pretty slim, but it is best to be safe.
The log of how spaceships work definitely seems like what I would term a portal for the purposes of this script, though admittedly one with some delay. So, you should be able to use the built in commands to create portals to handle them.
Re: Generic Mapping Script
https://gyazo.com/a891cec3d03fe53bcd801d255cab9df3
This is my updated trigger list. After we finish on triggers, what should I do next?
This is my updated trigger list. After we finish on triggers, what should I do next?
Re: Generic Mapping Script
So, this should be good for now, though obviously at some point you will want to figure out what message you see when you follow someone (note that the code for that trigger will be slightly different, in that you will need to capture the relevant direction, and include it in the raiseEvent call, like this: raiseEvent("onForcedMove",matches[2]) ).
At this point, you will want to review the help at the top of the script, particularly the section talking about the aliases that are used to control the script. At the most basic level, you will want to determine what name you want to give to the area you will start mapping in, and then use the command: start mapping AREA NAME
Then, start walking around in a mindful way, mapping things out as you go. Other than 'start mapping' and 'stop mapping', you will most typically be using the 'set area', 'shift', 'merge rooms', 'add portal', and 'add door' commands.
At this point, you will want to review the help at the top of the script, particularly the section talking about the aliases that are used to control the script. At the most basic level, you will want to determine what name you want to give to the area you will start mapping in, and then use the command: start mapping AREA NAME
Then, start walking around in a mindful way, mapping things out as you go. Other than 'start mapping' and 'stop mapping', you will most typically be using the 'set area', 'shift', 'merge rooms', 'add portal', and 'add door' commands.
Re: Generic Mapping Script
Here's the log for me following a mob.
Also, is capturing the relevant direction just in the code, or do I have to get a beginning of substring from the MUD?
EDIT: How does adding alias exactly work? Do I have to add code to every alias like I did the triggers?
Or will the pattern and command be enough?
EDIT 2: Have a look at my Aliases set up so far on this gif:
https://gyazo.com/c6bc4d027aae438ee2d916461b735bce
Also, is capturing the relevant direction just in the code, or do I have to get a beginning of substring from the MUD?
EDIT: How does adding alias exactly work? Do I have to add code to every alias like I did the triggers?
Or will the pattern and command be enough?
EDIT 2: Have a look at my Aliases set up so far on this gif:
https://gyazo.com/c6bc4d027aae438ee2d916461b735bce
Re: Generic Mapping Script
Okay, so first thing you need to know is that all the aliases mentioned in the documentation already exist. You do not need to make them, you just need to use them as indicated. So all the ones you created can be deleted. I realize that you don't see the aliases, but that is because they are created as tempAliases so that people can't accidentally mess them up/delete them. Conveniently, they remain fixed, while the triggers have to be adapted to each game.
As for your onForcedMove trigger, you will need a pair of patterns, like you have for the room name trigger. Seeing the forms of movement so far, I think these will work (both perl regex patterns):
^.* (moves|flies) (\w+)\.
^You follow .*\.
And you want the code to be this: raiseEvent("onForcedMove", multimatches[1][3])
If there are other words that come up that are used to move around, other than 'moves' and 'flies', just add them into the pattern, separated from the other words with a '|' (that acts as an OR, letting the pattern match any of the listed words). As with the room name trigger, you need the multiline / AND trigger checkbox checked, and the line delta value set to 1 (which means the second pattern must match within one line of when the first pattern is matched, keeping it from going crazy when you just see things move around but aren't following them).
As for your onForcedMove trigger, you will need a pair of patterns, like you have for the room name trigger. Seeing the forms of movement so far, I think these will work (both perl regex patterns):
^.* (moves|flies) (\w+)\.
^You follow .*\.
And you want the code to be this: raiseEvent("onForcedMove", multimatches[1][3])
If there are other words that come up that are used to move around, other than 'moves' and 'flies', just add them into the pattern, separated from the other words with a '|' (that acts as an OR, letting the pattern match any of the listed words). As with the room name trigger, you need the multiline / AND trigger checkbox checked, and the line delta value set to 1 (which means the second pattern must match within one line of when the first pattern is matched, keeping it from going crazy when you just see things move around but aren't following them).
Re: Generic Mapping Script
How do I delete incorrect map data? I want to be able to start over if I make mistakes.
EDIT: I set the recall place, but now when I recall, map freezes and doesn't change when I move.
EDIT 2:
https://gyazo.com/415e61652c0e1d67e80b1d5ad2729b59
EDIT 3: Set recall does nothing now, it set the room the very first time I did it just fine, but now the subsequent times (in the same location) give this error:
https://gyazo.com/2844fc7a92242459ab654e89daa7910e
EDIT 4: It got fixed when I set a new area.
EDIT 5: Sometimes they make duplicates when i recall and try to go to the same area with different directions and succeed at getting there.
How do I merge them, since trying 'merge rooms' does nothing to the map.\
EDIT 6: You really should allow highlighting two adjacent duplicates, right click and scroll and click 'merge'.
EDIT 7: Oh, what if you happened to die? What event do I raise?
EDIT 8: Tried to change exits of a node and deleted the duplicate nodes, but watch this gif of this odd change (no errors can be found in the debug):
https://gyazo.com/e76518a28f2b1316fb8ee16eb9097fb3
Seems very strange, since it seems to be not tracking the exit ID I put in the exit configuration menu and instead put me in the wrong ID room because the rooms happens to have the same name, but not location...
EDIT: I set the recall place, but now when I recall, map freezes and doesn't change when I move.
EDIT 2:
https://gyazo.com/415e61652c0e1d67e80b1d5ad2729b59
EDIT 3: Set recall does nothing now, it set the room the very first time I did it just fine, but now the subsequent times (in the same location) give this error:
https://gyazo.com/2844fc7a92242459ab654e89daa7910e
EDIT 4: It got fixed when I set a new area.
EDIT 5: Sometimes they make duplicates when i recall and try to go to the same area with different directions and succeed at getting there.
How do I merge them, since trying 'merge rooms' does nothing to the map.\
EDIT 6: You really should allow highlighting two adjacent duplicates, right click and scroll and click 'merge'.
EDIT 7: Oh, what if you happened to die? What event do I raise?
EDIT 8: Tried to change exits of a node and deleted the duplicate nodes, but watch this gif of this odd change (no errors can be found in the debug):
https://gyazo.com/e76518a28f2b1316fb8ee16eb9097fb3
Seems very strange, since it seems to be not tracking the exit ID I put in the exit configuration menu and instead put me in the wrong ID room because the rooms happens to have the same name, but not location...
Last edited by Allaboard on Wed Jun 13, 2018 11:06 pm, edited 9 times in total.