Welcome to the Builder Academy

Question Exit Flags

More
05 Jul 2012 23:28 #327 by WhiskyTest
Exit Flags was created by WhiskyTest
Hi guys,

I would like to request a change to the way stock code handles exit flags for future releases.

There is an old snippet from the CircleMUD site which I would always hand patch in whenever I downloaded the latest tbaMUD release called DESTUPID, it is still here: circlemud.org/pub/CircleMUD/contrib/snippets/rooms/

It allows you to easily create new flags for exits in much the same way as you could add room flags or object flags and so on.

Some examples I have used are: HIDDEN, NO_MOVE, NO_SHOOT, NO_<class>, NO_VEHICLE, NO_MORTAL... once the change is in place you can really get creative!

The patch is backwards compatible so there are no changes required to existing world files.

The reason I am requesting this for a stock release is that each new version of tbaMUD becomes a little more complicated to patch this old code into, currently the 128bit array needs to be considered, write_to_q is different, and there are a handful of places in the DG Script files that are affected.

I believe this would be a very worthwhile upgrade to stock code.

So - is anyone keen to take this on?

Please Log in or Create an account to join the conversation.

More
06 Jul 2012 05:03 - 06 Jul 2012 05:04 #331 by Vatiken
Replied by Vatiken on topic Re: Exit Flags
I looked into this, but don't think I'll be taking it on at the moment. Although I fully agree with the fact that how exit flags are saved/loaded is absolutely ridiculous, the fact is with the inclusion of EX_HIDDEN to tbaMUD the saving/loading system is even more ridiculous. Thus there would be potentially 2 ways to fix this:

1) The "Bad Way": This would involve having to find some method of backwards compatibility with the current system as to not potentially corrupt world files.
2) The "Right Way": This would be just ditching the current system and using a more "De-Stupid" implementation and then provide some sort of script or direction on how to alter your world files to suit it.

Both these ways involve a large percentage of chance of human error, which then results in me having to spend an exorbitant amount of time on the forum answering the same questions over and over again. (Lesson Learned)

That said, taking a look over the patch you provided, I see no reason to concern yourself with write_to_q, or 128 bit arrays, or anything upcoming in future tbaMUD releases. Unless you are d/ling additional tbaMUD world files there is little reason to keep the backport code within your MUD current, which would seem to be the most confusing transition.

tbaMUD developer/programmer
Last edit: 06 Jul 2012 05:04 by Vatiken.

Please Log in or Create an account to join the conversation.

More
07 Jul 2012 03:33 - 07 Jul 2012 03:35 #336 by WhiskyTest
Replied by WhiskyTest on topic Re: Exit Flags
Well I went for option 2 as I don't have any existing world files that I wanted to keep intact.
Just as well because after patching in the changes all the exits are set to NO_BITS >.<

The diff file is attached for anyone who is interested, I created it using the latest checkout which was #320.

Attachment destupid2.txt not found



After patching it in I performed a copyover which crashed the mud, it started fine after that however.
I've tested OLC and saving and everything seems to be working, but if someone with more programming knowledge feels like idiot checking things that would be great!
Attachments:
Last edit: 07 Jul 2012 03:35 by WhiskyTest.
The following user(s) said Thank You: Papaya Pete

Please Log in or Create an account to join the conversation.

More
07 Jul 2012 04:48 #337 by Vatiken
Replied by Vatiken on topic Re: Exit Flags
Looks good, only thing worth mentioning is that there should be no reason to swap the CLOSED & LOCKED, as that appears to just be a simple hack by the original snippet creator for the purpose of back-porting older world files.

Good job

tbaMUD developer/programmer
The following user(s) said Thank You: WhiskyTest

Please Log in or Create an account to join the conversation.

More
08 Dec 2013 05:25 #4561 by Papaya Pete
Replied by Papaya Pete on topic Re: Exit Flags
Here here! I know this is an old post, but I was hoping to find a snippet for adding exit flags and stumbled across this. Thanks a million!

Please Log in or Create an account to join the conversation.

More
31 Dec 2013 18:04 - 26 Mar 2014 22:04 #4603 by RussBrown
Replied by RussBrown on topic Re: Exit Flags
Here are some other ideas for exit flags that I have implemented on my mud.

We have mob and player sizes, so having different size doors made sense as well.
Anti-race or anti-class flags that prevent certain players from passing.
Recall Portal - step through with/without the key object and be recalled - as the spell.
Teleport Portal - step through with/without the key object and be teleported to a random room in the zone or entire world.

Just wanted to give some ideas on neat ways to use exit flags.
Last edit: 26 Mar 2014 22:04 by RussBrown. Reason: spelling

Please Log in or Create an account to join the conversation.

Time to create page: 0.212 seconds