- Posts: 345
- Thank you received: 73
Exit Flags
- WhiskyTest
-
Topic Author
- Offline
- Platinum Member
-
Less
More
11 years 2 months ago #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?
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.
- Vatiken
-
- Offline
- Administrator
-
- tbaMUD Programmer
Less
More
- Posts: 227
- Thank you received: 52
11 years 2 months ago - 11 years 2 months ago #331
by Vatiken
tbaMUD developer/programmer
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.
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: 11 years 2 months ago by Vatiken.
Please Log in or Create an account to join the conversation.
- WhiskyTest
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 345
- Thank you received: 73
11 years 2 months ago - 11 years 2 months ago #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.
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!
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!
Last edit: 11 years 2 months ago by WhiskyTest.
The following user(s) said Thank You: Papaya Pete
Please Log in or Create an account to join the conversation.
- Vatiken
-
- Offline
- Administrator
-
- tbaMUD Programmer
Less
More
- Posts: 227
- Thank you received: 52
11 years 2 months ago #337
by Vatiken
tbaMUD developer/programmer
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
Good job
tbaMUD developer/programmer
The following user(s) said Thank You: WhiskyTest
Please Log in or Create an account to join the conversation.
- Papaya Pete
- Offline
- Elite Member
-
Less
More
- Posts: 217
- Thank you received: 22
9 years 9 months ago #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.
- RussBrown
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 2
9 years 9 months ago - 9 years 6 months ago #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.
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: 9 years 6 months ago by RussBrown. Reason: spelling
Please Log in or Create an account to join the conversation.
- Papaya Pete
- Offline
- Elite Member
-
Less
More
- Posts: 217
- Thank you received: 22
9 years 7 months ago #4726
by Papaya Pete
Replied by Papaya Pete on topic Re: Exit Flags
I know I'm a little late on replying, but here's an idea I was thinking of putting in:
Jumping and Climbing flags for exits. Have to use a skill in order to get through it.
Jumping and Climbing flags for exits. Have to use a skill in order to get through it.
Please Log in or Create an account to join the conversation.
- Rumble
-
- Offline
- Administrator
-
5 years 9 months ago #7261
by Rumble
Rumble
The Builder Academy
tbamud.com 9091
This email address is being protected from spambots. You need JavaScript enabled to view it.
Replied by Rumble on topic Re: Exit Flags
Anyone still have the attachment destupid2.txt that WhiskyTest made? We seem to have lost it during an upgrade or server move.
Rumble
The Builder Academy
tbamud.com 9091
This email address is being protected from spambots. You need JavaScript enabled to view it.
Please Log in or Create an account to join the conversation.
- WhiskyTest
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 345
- Thank you received: 73
5 years 9 months ago #7262
by WhiskyTest
Replied by WhiskyTest on topic Re: Exit Flags
Attached
Please Log in or Create an account to join the conversation.
- Rumble
-
- Offline
- Administrator
-
5 years 9 months ago #7268
by Rumble
Rumble
The Builder Academy
tbamud.com 9091
This email address is being protected from spambots. You need JavaScript enabled to view it.
Replied by Rumble on topic Re: Exit Flags
Thanks, added to the Downloads->tbamud->patches as well.
Rumble
The Builder Academy
tbamud.com 9091
This email address is being protected from spambots. You need JavaScript enabled to view it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.152 seconds