Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS 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 Mar 6, 2005, 11:12 am   Last edited Mar 10, 2008, 6:52 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
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

Note: This fix raises the Smaug FUSS package to version 1.6 to distinguish the area file format changes this makes.

---

This is a relatively involved fix. Please download the "SMAUG Reset system fix" file from the downloads section at http://www.smaugmuds.org

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
expected.

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 >>