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

#map read also seems to trigger #action

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Sinister Stairs



Joined: 26 Apr 2010
Posts: 9

PostPosted: Mon Apr 26, 2010 7:58 pm    Post subject: #map read also seems to trigger #action Reply with quote

It appears that #map read can cause #action's to trigger.

In my map file, I've named them after room names; for example, maps/Valathyr contains:

R { 58} {16} {<178>} {the woods of Valien [n, e, w, out]} {58} {} {} {}

I also have an #action based on that name, for example:

#ACTION {the woods of Valien [n, e, w, out]} {/echo {Triggered by %0:};/mapread {Valathyr} {%0};}

When I try to #map read maps/Valathyr, I get this output:

#map read maps/Valathyr
% Triggered by the woods of Valien [n, e, w, out]:

So #map read is causing #actions to trigger. (Note I used "#actions," plural -- #map read is also causing other #actions to trigger which I haven't listed for brevity.)
Back to top
View user's profile Send private message
Sinister Stairs



Joined: 26 Apr 2010
Posts: 9

PostPosted: Mon Apr 26, 2010 11:20 pm    Post subject: Reply with quote

I'm using tintin++ 2.00.1 compiled from source on OS X. Changing line 1354 in mapper.c from tintin_printf to tintin_printf2 fixed the problem.

Prior to that, I was getting seg faults because reading in a map file would set off numerous #action (which in turn potentially read in other map files).

I noticed that map files load a lot faster now, too.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Apr 27, 2010 7:52 am    Post subject: Reply with quote

Regarding only one action triggering per line, that's how tintin worked historically, and changing it would mess up a lot of scripts. I've never encountered a situation where there was no way to work around multiple actions triggering per line, while the advantages are quite clear, especially combined with trigger priorities.

Regarding #map, I've updated the beta with a fix for this:

http://tintin.sourceforge.net/download/tintin-beta.tar.gz

In the new beta you'll only get spammed when manually moving or loading a file.
Back to top
View user's profile Send private message Send e-mail
Sinister Stairs



Joined: 26 Apr 2010
Posts: 9

PostPosted: Tue Apr 27, 2010 8:16 am    Post subject: Reply with quote

Thanks.

Just to clarify the problem I was encountering re: "multiple #action": It was one action per matching line as expected, but they originated from the same #map read.

The MUD I play is fairly large with each kingdom being ~30000 rooms and continents containing ~4 kingdoms, so I've split my map files based on regions.

To transition between continents, kingdoms and "dungeons", I used triggers on the room name. Similarly, in my map file, the map room names are the same as the MUD names. (e.g. "The Tower of Barbs", "Bluebrook Village", etc.)

When I read in the mapfile for a kingdom, it contain rooms named after the dungeons in that area. Each map room only triggers one action (a #map read to load the dungeon), but the original #map read for the kingdom would trigger n number of #map reads for each dungeon or city within the kingdom.

Hope that made sense -- if not, the short story is that the patch fixes it. Smile
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 -> Bug Reports 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