Page 44 of 44

Re: Generic Mapping Script

Posted: Wed Jan 04, 2023 5:46 am
by oldmudder
Thanks much for having some foundation for map scripting. I'm finding it helpful in learning through your work.

I was wondering if anyone here has any suggestions or ideas on how I can ignore/prevent tick information from messing up the room description?

For example:-
You are hungry.
You are thirsty.
The sun slowly disappears in the east.
Holy energy runs through your body.
The life blood flowing through the land pulses, and the world begins anew...

Would the approach be to create triggers for all these texts? Would that prevent these details from showing up in the mapping capture? It's only my third day working on the scripts (and using Mudlet) so my understanding is still a bit shallow. Any help/input is appreciated.

Re: Generic Mapping Script

Posted: Thu Jan 05, 2023 10:15 am
by Vadi
Hey, check the `map help ignore` - you can add those as Lua patterns to be ignored by the script.

Re: Generic Mapping Script

Posted: Fri Jan 06, 2023 2:59 pm
by Scolius
Been a while since I've been on my MUD or used mapper

I thought last time I used mapper I could right click and modify things from there, is that gone now or is that some separate addon?

Also, is there a quick ctrl+z undo like function? I would like to delete a lot of rooms, maybe even hit a full reset since I just barely started.

Re: Generic Mapping Script

Posted: Fri Jan 06, 2023 5:15 pm
by Vadi
You can, just go into 'edit mode' first - it's not on by default so you don't accidentally mess something up. There is no undo for the mapper though.

Re: Generic Mapping Script

Posted: Sun Jan 08, 2023 8:06 am
by oldmudder
Thanks for the feedback Vadi! I've tried map help ignore and added those patterns but it still seems to be captured by grab_line function.

@Scolius I have been using the delete function instead. Its under Settings > Mapping > Delete Map

Re: Generic Mapping Script

Posted: Mon Jan 09, 2023 8:02 pm
by Scolius
Thanks oldmudder and Vadi. Both of y'alls advice was helpful.

And I'm having trouble understanding the speedwalk. Is there an inherent way I can type a command into my MUD? Or do I need to write an alias/trigger/whatever that uses a speedwalk script someplace?

Re: Generic Mapping Script

Posted: Tue Jan 10, 2023 3:40 pm
by Jor'Mox
oldmudder wrote:
Wed Jan 04, 2023 5:46 am
Thanks much for having some foundation for map scripting. I'm finding it helpful in learning through your work.

I was wondering if anyone here has any suggestions or ideas on how I can ignore/prevent tick information from messing up the room description?

For example:-
You are hungry.
You are thirsty.
The sun slowly disappears in the east.
Holy energy runs through your body.
The life blood flowing through the land pulses, and the world begins anew...

Would the approach be to create triggers for all these texts? Would that prevent these details from showing up in the mapping capture? It's only my third day working on the scripts (and using Mudlet) so my understanding is still a bit shallow. Any help/input is appreciated.
So rather than creating triggers for those lines to try to filter them out from getting captured by whatever trigger you have grabbing the room description (which I know isn't a native part of the generic mapping script), I would just go ahead and capture the description, and then filter those lines out after the fact. Now since that sort of text searching isn't as fast as using triggers, it would be better if you had a way to know if a tick had occurred, so you would know if there was a reason to bother looking for this text in the first place or not. But even if you can't do that, new room descriptions aren't coming up too often, so the extra processing needed isn't that much of a drag, so even doing it every time isn't too big of a deal.

The basic strategy would be to create a table with carefully constructed patterns for each of the texts you want to remove from your description, and then loop through them using the string.gsub function to replace those patterns with an empty string, like this:

Code: Select all

local sub_tbl = {"You are hungry\.\n", "You are thirsty\.\n"}
for i, v in ipairs(sub_tbl) do
	string.gsub(room_desc, v, "", 1)
end[\code]

Re: Generic Mapping Script

Posted: Wed Jan 18, 2023 7:38 pm
by Scolius
How do I change the room name of a room already made?

There's a room connected with a special command with the same name as nearby rooms, so mapper is getting confused. I decided to just rightt click and create a room, but now that room name doesn't match the actual room name either.

Re: Generic Mapping Script

Posted: Thu Jan 19, 2023 11:26 pm
by Jor'Mox
With the function, setRoomName. Give it the roomID, and the name you want it to have, and BAM, the room now has that name.

Re: Generic Mapping Script

Posted: Tue Jan 24, 2023 2:18 pm
by Scolius
Jor'Mox wrote:
Thu Jan 19, 2023 11:26 pm
With the function, setRoomName. Give it the roomID, and the name you want it to have, and BAM, the room now has that name.
Thanks