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

Mass set avoid roomflags based on room terrain?

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



Joined: 09 Oct 2014
Posts: 25

PostPosted: Sun Oct 12, 2014 11:12 am    Post subject: Mass set avoid roomflags based on room terrain? Reply with quote

Here's what I have: a HUGE mapfile that is a free-walk area with NPCs, sometimes aggressive NPCs on non road terrian.

I would like to set ALL the non-road rooms to "avoid" so that the mapper does not try to "take the shortcut" through the woods, but instead stays on the roads.

The problem is, this would involve editing thousands, if not millions of rooms just to set them as 'avoid'

The other two options is to script a removal of all non-road rooms, and have the GMCP script simply ignore them from now on... but that breaks a few paths, notably ones that have no road to them.....

Any ideas on how to manage this easily?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Oct 13, 2014 6:57 am    Post subject: Reply with quote

Can lower the weight of the road rooms. Default is 1, so could try 0.5. That'd probably be easiest.

You can visit all rooms using:

Code:

#loop {1} {1000000} {vnum}
{
  #map at $vnum
  {
     #nop hopefully you can take it from here
  }
}
Back to top
View user's profile Send private message Send e-mail
Xozes



Joined: 09 Oct 2014
Posts: 25

PostPosted: Mon Oct 13, 2014 12:23 pm    Post subject: Reply with quote

Ah. Yes. I see. Awesome, thanks.
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Thu Oct 16, 2014 6:43 pm    Post subject: Reply with quote

Save the file before running a script that does this and test it first with a small upper room limit, say 1000. Because if you get it wrong there is little you can do to stop it until it has processed all the rooms it wants to try {Killing the executable is a sure-fire way but it lacks something in finesse}- Confused
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