TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

still about mapping

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Wed Jan 25, 2017 5:54 am    Post subject: still about mapping Reply with quote

Sorry about a new post, this would be a summary about #map use in different cases.

I am trying to make a map for the mud I am playing. Apart from the simplest structure in which every room is connected like in the real world, the mud world is more complex. Here are some cases, any help to solve or correct will be appreciated.

1. completely random maze where all the rooms have the same name and adjacent room changes at every move.

I guess no solution for this case.

2. maze, but there is a one-way route to reach all the rooms.

There should be a solution to define one-way room by #map

3 room A -> room B, but room B -> room C -> room A

the solution should be similar like the one to case 2

4. some message needed to trigger some direction on.

#map exit {currentroomname} {??} {#ac {a rainbow emerging on the north} {step north}}

5. no_move in some room for 2 seconds.

#map exit {currentroomname} {#delay 2 north}

6. some direction blocked by several guards

#map exit {currentroomname} {north??} {#ac {a guard say no} {kill guard};#ac {guard died} {north}}
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Wed Jan 25, 2017 10:41 am    Post subject: Reply with quote

1 - you can use the "#map leave" command on an exit that leads to a maze, so the mapper stops doing things, then trigger the "#map goto <num>" when entering a room outside the maze, so to update the position and activate again the map

2 and 3 - "#map unlink <direction>" will remove unilaterally an exit, making rooms connected "one way"
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Wed Jan 25, 2017 11:53 am    Post subject: Reply with quote

PowerGod wrote:
1 - you can use the "#map leave" command on an exit that leads to a maze, so the mapper stops doing things, then trigger the "#map goto <num>" when entering a room outside the maze, so to update the position and activate again the map

2 and 3 - "#map unlink <direction>" will remove unilaterally an exit, making rooms connected "one way"


Thanks.

For 1, not possible to map that maze.

are the cmd for 4,5,6 correct?
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Wed Jan 25, 2017 1:57 pm    Post subject: Reply with quote

If a maze is REALLY random, there's no way, but most of the time are just repetitive timed patterns, or maybe the rooms are just connected in strange ways... mainly if you put something on the ground of the rooms you can see better if there's a pattern (if no scavenger mobs are around).
Try to map it with pen and paper, and if you find how it works then it could be mapped.

#map exit always requires a direction (or exit name), have a better look with "#help map"

4 - should be something like this, but I'm not sure how this will behave if there are other directional commands after this, them could be launched before the action triggers, you need to try this out:
Code:

#map exit n command {#ac {a rainbow emerging on the north} {step north;#unac {a rainbow emerging on the north}}}


5 and 6 - same as before, the map doesn't wait for the delay command to be ended, it just launch it and goes on
Back to top
View user's profile Send private message
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Wed Jan 25, 2017 2:26 pm    Post subject: Reply with quote

Thanks, I will try your example for 4.

For case 5,
In some rooms, after entering which, will be busy for a certain seconds, means can't move to next room immediately. So how can I deal with this if #delday doesn't work?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Jan 26, 2017 8:31 pm    Post subject: Reply with quote

You can use #map find <location> which uses #path to store the path, then use #path walk to walk through each step.

The {END OF PATH} event is triggered when the path is out of steps.

This gives you greater control, though you'd have to figure out how to process the walking.


The most simple would be:
Code:

#var walking 0

#alias walkto (#var walking 1;#map find %0;#path walk}

#act {You walk {north|east|south|west|up|down}.}
{
    #if {$walking} {#path walk}
}

#event {END OF PATH} {#var walking 0}



If you need more control you can also save the path to a variable (#path save) and convert it to a list (#list create).

It can get complex real quick, but if you write your code elegantly it shouldn't be too bad.
Back to top
View user's profile Send private message Send e-mail
dawang10



Joined: 14 Feb 2015
Posts: 66

PostPosted: Sun Jan 29, 2017 4:53 am    Post subject: Reply with quote

Scandum wrote:
You can use #map find <location> which uses #path to store the path, then use #path walk to walk through each step.

The {END OF PATH} event is triggered when the path is out of steps.

This gives you greater control, though you'd have to figure out how to process the walking.


The most simple would be:
Code:

#var walking 0

#alias walkto (#var walking 1;#map find %0;#path walk}

#act {You walk {north|east|south|west|up|down}.}
{
    #if {$walking} {#path walk}
}

#event {END OF PATH} {#var walking 0}



If you need more control you can also save the path to a variable (#path save) and convert it to a list (#list create).


It can get complex real quick, but if you write your code elegantly it shouldn't be too bad.


Thanks very much. this makes me have a deeper understanding on use of #map
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group