User Name:


Forgot your password?
Vote for Us!
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot

Members: 0
Guests: 17
Newest Member
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWFOTE FUSS Bugfix List » [Bug] Nested put resets do no...
Forum Rules | Mark all | Recent Posts

[Bug] Nested put resets do not work properly when reset_area fires
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 7, 2005, 12:19 am
Go to the top of the page
Go to the bottom of the page

Black Hand
JoinedJan 1, 2002

Bug: Nested put resets do not work properly when reset_area fires.
Danger: Low - Items resetting in wrong locations
Found by: Samson
Fixed by: Samson


This is a relatively involved fix. Please download the "SWR Reset system fix" file from the downloads section.

Discussion of the problem is welcome in the SMAUG 1.6 FUSS forum.

The problem

Nested put resets in Smaug have had a notorious history for not working correctly.
In stock form, the code is incapable of generating them properly using the OLC,
incapable of processing them properly when area files are loaded, and incapable of
loading items properly according to how resets are defined in the file even if the
file is manually edited.

Part of this was corrected with a previous bugfix which allowed the OLC to generate
the proper resets which will then save correctly into the area files. These resets
load to the area in the proper order but the nested puts still did not perform as

An example of the issue:

Load a chest into a room.
Load a bag into the chest.
Load a pouch into the bag.
Load a trinket into the pouch.

The expected result would of course be to have to dig through all that to get the trinket
out of the chest, but what really happens is that it all just loads as contents of the chest.
This problem has existed at least as far back as Smaug 1.4a and therefore affects practically
all codebases derived from it. I have confirmed that this problem exists on Smaug FUSS, as well
as ResortMUD and the public AFKMud code, so in all likelyhood all Smaug derivatives are affected.

The solution

In order to fix this problem, I decided it would be best to disassociate resets with an overall
area and instead focus them on individual rooms, which are then associated with an area so
that normal whole area resetting can still take place. Of course this required alot of reworking
of how the entire system works. But the end result is that the example above will perform properly
and all objects assigned to put resets will load exactly as intended.

Areas now have a list of rooms.
Rooms now have a list of resets that should take place in them.
Object and Mobile resets now have child resets which belong to them.

There is one caveat to be aware of though. Area files may have invalid data still in them and once
the fix is applied they may produce unexpected results, such as swords loading inside of shoes, etc.
Affected area files will need to be fixed by hand, so you will need a working knowledge of how
they are formatted. Trap and Hide resets will also not be convertable because the code has no
confirmed way to know where they should be placed. These will also need to be hand corrected.
There may also be items and mobs loading into unexpected rooms. Some functionality of the
manual reset editing has also been removed for now. Best to scale back and rebuild rather than keep
kludgy code that would only need to be rewritten anyway. If this functionality is desired, it
can be added back in easily enough.

Once all that is corrected though, the reset system will hum along quite nicely.
Pages:<< prev 1 next >>