Mudlet features and API requests

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Mudlet features and API requests

Post by kevutian »

Oh, here's one. Can the new double click to highlight word function be extended to highlight on whitespace, too?

Would be awesome.

Knute
Posts: 87
Joined: Fri Mar 05, 2010 12:08 am

Re: Mudlet features and API requests

Post by Knute »

It would be awesome to have triggers created from functions actually be the name you chose rather than some random number. (permBeginOfLineStringTrigger, permRegexTrigger, etc...)

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet features and API requests

Post by Vadi »

That's a bug! Not intended - it'll certainly be fixed. Sorry about that.

User avatar
Omni
Posts: 131
Joined: Fri Feb 12, 2010 10:26 am

Re: Mudlet features and API requests

Post by Omni »

One idea brought up by Vadi due to an issue I'm currently having: a way to load a specific xml file as a map file.
Also, the way to possibly add/remove patterns from triggers with multiple patterns.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet features and API requests

Post by Vadi »

A loadMMP() function, to load an MMP-compatible XML map file.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Mudlet features and API requests

Post by chris »

I don't get this request. You can just make the parser in lua and use the existing map functions.

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mudlet features and API requests

Post by SlySven »

At present a room in a map belongs to one area. Looking at the structures involved it seems that it would be theoretically possible to modify things so that one could place a room in more than one area. I would see that this could be useful for a couple of situations:
  • Detailed "City" maps could be done with more space between rooms, yet the same rooms could also be drawn much closer together for a "Country" map.
  • Border regions between two map areas could be shown on BOTH maps so if you are using something that locates other players/item/smobs and they are close to you they don't disappear/appear as you cross the boundary between one area and the next.
I'm sure that there is code that returns the area that a room with a specific ID is in, this would have to change to return list of areas instead. I did see that someone has also asked a question about changing the area a room is in on another branch of these forums recently, this proposal would affect an answer to that I guess - instead of just moving a room from one area to another you also would need functionality to both copy a room from one area to another as will as the move one that "cuts" that he is asking about. Of course you also need a room "delete" or perhaps it should be more properly be a room "unlink" function which only destroys the data for that room if it is not allocated to ANY area. Also, the map painting code will have to determine which area to display which will be a bit more convoluted when the current room is allocated to multiple areas, perhaps it will have to track the area that the room before the current one was in...

Am I talking off the top of my head here or does anyone else see any other potential bonuses with this?

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Mudlet features and API requests

Post by chris »

You could script through and reposition rooms to do the City versus Country mode.

For case 2, given that areas have their own x,y,z that don't necessarily respect neighboring x,y,z this wouldn't work as well and would need to be hacked together.

Honestly, I don't see the reason to do this, it seems like it would just introduce a ton of kludges.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet features and API requests

Post by Vadi »

#1 rule of Mudlet - we don't break scripts, so we adhere to very good backwards compatibility. I think we can't do the change the way you propose because that'd just mess with a lot of the scripts (ie returning a list of areas is a break right there. We won't do it).

As for your points!

1) This is a good one... have you looked into gridmode though? setGridMode(areaid, true/false). It does what you mention!

2) I agree with this... but I think it should be solved in some other manner. Perhaps by having the mapper draw a bit of the other areas as well, but at 50% transparency or something?

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet features and API requests

Post by Heiko »

Vadi wrote:2) I agree with this... but I think it should be solved in some other manner. Perhaps by having the mapper draw a bit of the other areas as well, but at 50% transparency or something?
Impossible. Where would you draw the bordering areas? All area coordinate systems are based at 0,0,0 as areas have no "world coordinates" and if they had you wouldn't need to use different areas in the first place.

Post Reply