ADGE: Bug report: Changing 'monster drops' causes error
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
ADGE: Bug report: Changing 'monster drops' causes error
Changing the Monster Drops causes a crash: Setting any 'sometimes dropped' item to 'always dropped' (ie, untick the box for 'sometimes dropped') generates this error when you save the file:
"Run-time error '6' Overflow"
EDIT: Strange though. Sometimes the file saves and sometimes it doesn't -- seems dependent on the monster drop you've just edited but it's not consistent.
"Run-time error '6' Overflow"
EDIT: Strange though. Sometimes the file saves and sometimes it doesn't -- seems dependent on the monster drop you've just edited but it's not consistent.
Monster drops are an interesting phenomenon, I'll make it clear how it works here.
Each monster has a specific 'starting point' on the monster drop chart. For instance, Dragon#1 is the first drop to check when a dragon dies, knight#1 is the first to check when a knight dies, etc. When a monster dies, it checks the list at the appropriate spot, if it is "sometimes drops", it will have (i believe this is accurate, but may be 25%...) 50% chance to drop that item. If it DOES pass the test and drops that item, it goes to the next item on the list. If it does not drop the item, it stops and ends the loop. If the item dropped is a 0, meaning the "----" selection, then the loop will end. It is extremely important that you end the entire list of monster drops with a 0, otherwise when a monster dies in the game, anything could happen (crash, infinite loop, bad memory checks, etc).
The neat thing about monster drops is you can have a 0 item drop at the end of the dragon's list, but not the end of a worms list, and the worm will drop items from another monsters designated list (perhaps... maybe only sometimes? ). Think of it as a case statement, and having the 0 resembles a break.
I'll look into the saving problem, and does it crash in ADGE or in CSBWin?
-rain`
Each monster has a specific 'starting point' on the monster drop chart. For instance, Dragon#1 is the first drop to check when a dragon dies, knight#1 is the first to check when a knight dies, etc. When a monster dies, it checks the list at the appropriate spot, if it is "sometimes drops", it will have (i believe this is accurate, but may be 25%...) 50% chance to drop that item. If it DOES pass the test and drops that item, it goes to the next item on the list. If it does not drop the item, it stops and ends the loop. If the item dropped is a 0, meaning the "----" selection, then the loop will end. It is extremely important that you end the entire list of monster drops with a 0, otherwise when a monster dies in the game, anything could happen (crash, infinite loop, bad memory checks, etc).
The neat thing about monster drops is you can have a 0 item drop at the end of the dragon's list, but not the end of a worms list, and the worm will drop items from another monsters designated list (perhaps... maybe only sometimes? ). Think of it as a case statement, and having the 0 resembles a break.
I'll look into the saving problem, and does it crash in ADGE or in CSBWin?
-rain`
-
- Artisan
- Posts: 178
- Joined: Wed Dec 17, 2003 1:39 am
- Location: Osaka, Japan
- Contact:
about Overflow problem, following 2 parts should be fixed to avoid it.
original:
should be:
original:
should be:
a Byte variable cannot have neither negative value nor value greater than 255. e.g. if you give -1 or 256 to a Byte variable, Overflow causes.
original:
Code: Select all
Function write_word(ByVal num As Integer)
Dim b1, b2 As Byte
Dim l1 As Long
l1 = num And &HFF00
b1 = l1 / &H100
b2 = num And &HFF
write_byte (b2)
write_byte (b1)
End Function
Code: Select all
Function write_word(ByVal num As Integer)
Dim b1 As Byte, b2 As Byte
Dim l1 As Long
l1 = num And &HFF00
b1 = (l1 / &H100) And &HFF
b2 = num And &HFF
write_byte (b2)
write_byte (b1)
End Function
original:
Code: Select all
Function write_int(num As Long)
Dim b1, b2 As Byte
Dim l1 As Long
l1 = num And &HFF00
b1 = l1 / &H100
b2 = num And &HFF
write_byte (b1)
write_byte (b2)
End Function
Code: Select all
Function write_int(num As Long)
Dim b1 As Byte, b2 As Byte
Dim l1 As Long
l1 = num And &HFF00
b1 = (l1 / &H100) And &HFF
b2 = num And &HFF
write_byte (b1)
write_byte (b2)
End Function
a Byte variable cannot have neither negative value nor value greater than 255. e.g. if you give -1 or 256 to a Byte variable, Overflow causes.
Ohhhh. This explains why my worm was dropping 2 screamer slices along with everything else.rain` wrote:The neat thing about monster drops is you can have a 0 item drop at the end of the dragon's list, but not the end of a worms list, and the worm will drop items from another monsters designated list (perhaps... maybe only sometimes? ).
-rain`
But will someone please explain why my rockpile is dropping ra keys (weighing 8.6 kg each) instead of flasks? I'm pretty sure I haven't told any of my monsters to drop ra keys. I haven't even messed with ra keys in ADGE. Or with empty flasks. The rock monster's drop items (all without a check in the "sometimes dropped box") are as follows:
22 EMPTY FLASK
0 -
0 -
0 -
0 -
I noticed:
I have changed one important skeleton attribute in ADGE (in "monster drops" editor). This editor can change things, that certain monster drops every time you kill him. It has 3 slots in for skeletons(although skeleton drops only 2 things: sword and shield), so I tried to fill 3rd slot (marked as "0"). In that case skeleton would THEORETICLY drop: sword, shield and other thing, that have I choosen. But it doesn`t work. When you kill skeleton, the game crashes (BUT!!! maybe you have different experiences???).
It seems that every monster, (that drops items automaticly), have item slot(s), that shows a number of items that he drops + onother one slot, that allways have to be empty.
I think there should be some warning in ADGE not to fill the last slot in "monster drops" editor, because it may cause game problems!
Not a problem for me, because my skeletons are not generated by monster generator on that level, so I can add that thing I want to them manually and it should work fine.[/i]
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
weird. I tried to reproduce this bug. In my case rockpiles leaves nothing.
Monster drop editor (rock pile) is set on:
22 EMPTY FLASK
0 -
0 -
0 -
0 -
however, you can do it by monster dropping filter. It`s safer and all monsters can leave items, not only rockpiles, dragons etc., but also rives and oitus, etc.
it is described here:
http://www.dungeon-master.com/forum/vie ... 02&start=0
Monster drop editor (rock pile) is set on:
22 EMPTY FLASK
0 -
0 -
0 -
0 -
however, you can do it by monster dropping filter. It`s safer and all monsters can leave items, not only rockpiles, dragons etc., but also rives and oitus, etc.
Code: Select all
0S0: L8 L0 &PARAM@ L4 &@ ??{(3,C0)}
0C0: L0 &@ L10 L2 &MONSTER@ L0 L20 &! LA L11 &@ &+ L21 &! L1 &@ L32 &* L2 &@ &+ L32 &* L3 &@ &+ L22 &! JT0
0T0: L15 L22 &@ L20 &@ &DUP &1+ L20 &! L21 &@ L15 L65535 F &DUP L1 &NEG &= ?JT3 &%ADD JT0
0T3: N
http://www.dungeon-master.com/forum/vie ... 02&start=0
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Thanks a lot, Adamo. I think I'll use that filter.
It might be noteable that I changed the picture of the rock pile, as well as some of its stats.
I tried dropping a different item, a water flask, and got a samurai sword, and when I dropped a RA key, I got a RA key. It is interesting to note that a samurai sword (145) - a water flask (17) = 128, and a RA key (object 150) - an empty flask (22) = 128. 128 / 16 = 8, no remainder.
It might be noteable that I changed the picture of the rock pile, as well as some of its stats.
I tried dropping a different item, a water flask, and got a samurai sword, and when I dropped a RA key, I got a RA key. It is interesting to note that a samurai sword (145) - a water flask (17) = 128, and a RA key (object 150) - an empty flask (22) = 128. 128 / 16 = 8, no remainder.
TyGuy6. Remember to put that filter on comnpletely empty 32x32 leve (except the tiles with objects of course) That`ll be saver, especially, if you have some other entries to monster death filter.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)