Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADOM Weapon Damage Calculator

317 views
Skip to first unread message

Chris Cardoso

unread,
Apr 17, 2002, 8:14:22 PM4/17/02
to
Hello everyone, first time posting, although I've been hanging around
here for a while.

I made a simple yet effective ADOM utility which, when given the
statistics of a weapon (or the damage you're doing with it), will give
you its minimum, maximum, and average damage. If anyone is interested,
e-mail me and I will send you a copy.

I assure you this program contains nothing harmful to your PC. Since I
made it in Visual Basic, it's just an .exe with no documentation or
anything like that. I'll admit it looks suspicious. I would have my
doubts if I were reading this too. :)

Also, if anyone wants to give me any suggestions on how to improve
this program, I'd be interested in hearing them.

Thank you.

Karkadinn

unread,
Apr 17, 2002, 8:37:44 PM4/17/02
to
Chris Cardoso said:

>Also, if anyone wants to give me any suggestions on how to improve
>this program, I'd be interested in hearing them.
>

::ponder::
Maybe if you allowed it to also adjust damage for inputting prefixes and
suffixes?
Welcome to the 'group, by the by. :)

--

Signing off as Stephen Mackey, the Multi-Threaded RFE Database Liaison.

"Sore wa himitsu desu."

Sam Blanning

unread,
Apr 18, 2002, 3:08:07 AM4/18/02
to

"Chris Cardoso" <stri...@cheatcc.com> wrote in message
news:67dcca87.02041...@posting.google.com...

> Hello everyone, first time posting, although I've been hanging around
> here for a while.
>
> I made a simple yet effective ADOM utility which, when given the
> statistics of a weapon (or the damage you're doing with it), will give
> you its minimum, maximum, and average damage. If anyone is interested,
> e-mail me and I will send you a copy.

Personally, I just do it in my head... I think. The way I work it out is,
say, if you've got a 2d10+5 weapon, then the two ten-sided dice can each
result in:

1 2 3 4 5 6 7 8 9 10

In a straight series like this, I'm fairly sure the mean and the median are
the same, which here is 5.5. So the average damage is 2*5.5+5, which is 16.

Am I right in my method?


Pasi Niskanen

unread,
Apr 18, 2002, 5:59:16 AM4/18/02
to

Sam Blanning <enqu...@nationalcoursingclub.freeserve.co.uk> skrev i
diskussionsgruppsmeddelandet:a9lqns$c2h$1...@newsg4.svr.pol.co.uk...

> Personally, I just do it in my head... I think. The way I work it out is,
> say, if you've got a 2d10+5 weapon, then the two ten-sided dice can each
> result in:
>
> 1 2 3 4 5 6 7 8 9 10
>
> In a straight series like this, I'm fairly sure the mean and the median
are
> the same, which here is 5.5. So the average damage is 2*5.5+5, which is
16.
>
> Am I right in my method?

I would think that you are right, however just calculating the average
damage is not always the best.
for example, if you have weapon with 1d100 it would make 50 average damage,
and a weapon with 50d1 would also make 50 average damage, but I guess
everyone would agree the latter one is a lot better :)
It's better to always do somewhat high damage, than to have a chance of
doing very high or very low damage.
Of course my examples are a bit extreme, there shouldn't be that many
weapons like this in the game ^_^ none that I've found anyway.
My point is, it's always good to have the minimum, average and maximum
damage to really figure out which weapon is the best, but if you are too
lazy then just go with highest average which is the best in most cases :)


Gustav Grusell

unread,
Apr 18, 2002, 6:55:13 AM4/18/02
to

Pasi Niskanen wrote:

> Sam Blanning <enqu...@nationalcoursingclub.freeserve.co.uk> skrev i
> diskussionsgruppsmeddelandet:a9lqns$c2h$1...@newsg4.svr.pol.co.uk...
>
>>Personally, I just do it in my head... I think. The way I work it out is,
>>say, if you've got a 2d10+5 weapon, then the two ten-sided dice can each
>>result in:
>>
>>1 2 3 4 5 6 7 8 9 10
>>
>>In a straight series like this, I'm fairly sure the mean and the median
>>
> are
>
>>the same, which here is 5.5. So the average damage is 2*5.5+5, which is
>>
> 16.
>
>>Am I right in my method?
>>
>
> I would think that you are right, however just calculating the average
> damage is not always the best.
> for example, if you have weapon with 1d100 it would make 50 average damage,
> and a weapon with 50d1 would also make 50 average damage, but I guess
> everyone would agree the latter one is a lot better :)
> It's better to always do somewhat high damage, than to have a chance of
> doing very high or very low damage.


I'm not sure I agree. It's obvious that a weapon with higher max damage
lets you damage opponents with higher PV. Also, when striking against
targets with PV > 1, the 1d100 weapon would give a better average damage
as long as PV <= 100. In general, when comparing two weapons with equal
average damage with no PV taken into account, the one with the lower
minimum would give a better average damage against opponents with PV >
minimum damage.

/Gustav


Skylar Thompson

unread,
Apr 18, 2002, 7:37:36 AM4/18/02
to

You might want to make a port into another language, as all non-Windoze
users will be unable to take advantage of this without something like
VMWare.

--
-- Skylar Thompson (sky...@attglobal.net)

Frances Kathleen Moffatt

unread,
Apr 18, 2002, 8:30:39 AM4/18/02
to
"Pasi Niskanen" (pasi.n...@telia.com) writes:
> Sam Blanning <enqu...@nationalcoursingclub.freeserve.co.uk> skrev i
>> Personally, I just do it in my head... I think. The way I work it out is,
>> say, if you've got a 2d10+5 weapon, then the two ten-sided dice can each
>> result in:
>> 1 2 3 4 5 6 7 8 9 10
>> In a straight series like this, I'm fairly sure the mean and the median
>> are
>> the same, which here is 5.5. So the average damage is 2*5.5+5, which is
>> 16.
>> Am I right in my method?
> I would think that you are right, however just calculating the average
> damage is not always the best.
> for example, if you have weapon with 1d100 it would make 50 average damage,
> and a weapon with 50d1 would also make 50 average damage, but I guess
> everyone would agree the latter one is a lot better :)

I don't think so, really. A weapon that does 50 damage is boring, and a
weapon without any dice in damage would make me suspect that that the game
was about to do something horribly buggy and crash-related at me. Give me
a 5d12+10 eternium halberd of devastation over a 0d1+50 <foo>. It does an
average of 7 or 8 points less damage, can do nearly time-and-a-half, and
sounds so much cooler. :)

> It's better to always do somewhat high damage, than to have a chance of
> doing very high or very low damage.

Trying to make sure that I've got what you mean straight... Say you've
got a 1d149 weapon, and a 50d2 weapon; both of them average 75 points on a
hit, yes?

Add "+50" to one and dice that can add another 50 to the other. In one
case, you get 1d149+50 (average of 125, never lower than 51, never higher
than 199) and 75d2 (average of 112/113, never lower than 75, never higher
than 150. In the other case, you get 1d199 (average of 100, never lower
than 1, never higher than 199) and 50d2+50 (average of 125, never lower
than 100, never higher than 200). In both cases, I'd use the weapon with
the modifier, myself.

...so the more of a weapon's damage that comes from a modifier rather
than a variable, the smaller the damage range of the weapon, so the safer
and more consistent it is to use it?

> My point is, it's always good to have the minimum, average and maximum
> damage to really figure out which weapon is the best, but if you are too
> lazy then just go with highest average which is the best in most cases :)

...it doesn't take people thirty-odd seconds to figure this out by looking
at the weapon stats on screen?

I've been playing too long, or gamer-geeking too hard.

Love and coffee,
Frances

Malte Helmert

unread,
Apr 18, 2002, 6:46:35 AM4/18/02
to
Pasi Niskanen wrote:
> Sam Blanning <enqu...@nationalcoursingclub.freeserve.co.uk> skrev i
> diskussionsgruppsmeddelandet:a9lqns$c2h$1...@newsg4.svr.pol.co.uk...
>
>>Personally, I just do it in my head... I think. The way I work it out is,
>>say, if you've got a 2d10+5 weapon, then the two ten-sided dice can each
>>result in:
>>
>>1 2 3 4 5 6 7 8 9 10
>>
>>In a straight series like this, I'm fairly sure the mean and the median
>>
> are
>
>>the same, which here is 5.5. So the average damage is 2*5.5+5, which is
>>
> 16.
>
>>Am I right in my method?

Yes, the mean for a "adb+c" is a(b+1)/2+c.

>
> I would think that you are right, however just calculating the average
> damage is not always the best.
> for example, if you have weapon with 1d100 it would make 50 average damage,
> and a weapon with 50d1 would also make 50 average damage, but I guess
> everyone would agree the latter one is a lot better :)

For an average damage of 50, the first weapon should be 1d99, but that's
nitpicking. Anyway, I think that the 1d100 (or 1d99) weapon is far
better, because of the influence of monster PV.

If a monster has a PV of 50, then the 1d100 weapon leads to 0 points of
damage 50% of the time and 1-50 damage 50% of the time. So on average,
the monster would lose 12.75 HP per hit with that weapon. With the 50d1
weapon, you couldn't hurt it (barring critical hits).

> It's better to always do somewhat high damage, than to have a chance of
> doing very high or very low damage.

Quite the contrary, in my opinion. If you take into account monster PV
in the average damage calculation, then weapons with high variance in
damage will always be better (except in those case where monster PV is
so low that you always get past the opponent's armor).

Malte

rachel walmsley

unread,
Apr 18, 2002, 9:26:01 AM4/18/02
to
Malte Helmert <hel...@informatik.uni-freiburg.de> wrote:
> Pasi Niskanen wrote:

[a weapon doing damage of 1d100 compared to 50d1]

> If a monster has a PV of 50, then the 1d100 weapon leads to 0 points of
> damage 50% of the time and 1-50 damage 50% of the time. So on average,
> the monster would lose 12.75 HP per hit with that weapon. With the 50d1
> weapon, you couldn't hurt it (barring critical hits).
>
>> It's better to always do somewhat high damage, than to have a chance of
>> doing very high or very low damage.
>
> Quite the contrary, in my opinion. If you take into account monster PV
> in the average damage calculation, then weapons with high variance in
> damage will always be better (except in those case where monster PV is
> so low that you always get past the opponent's armor).

This fails to take into account hitpoints. Doing high damage
is only useful up to the number of HP the enemy has. Against
an enemy with PV of 40 and 10HP, 50d1 would be much better.
Indeed, it is an instakill if you hit for anything with
PV+HP<=50, which is probably the vast majority of things. Of
course, these are generally also the things you don't mind
spending an extra turn or two in melee with. Which weapon is
better does very much depend on the opponent though.

r"but I'd still use the 1d100"w.

--
http://www.quoth.org.uk/ - Quoth the Rachel... /////
Bringing giant hedgehogs to the , o__///////
common steamroller since 2001 O=O___\'///////___
"my foo's got no bar!" "then how does it baz?" "quux!"

Malte Helmert

unread,
Apr 18, 2002, 9:46:12 AM4/18/02
to
rachel walmsley wrote:
> Malte Helmert <hel...@informatik.uni-freiburg.de> wrote:
>
>>Pasi Niskanen wrote:
>>
>
> [a weapon doing damage of 1d100 compared to 50d1]
>
>
>>If a monster has a PV of 50, then the 1d100 weapon leads to 0 points of
>>damage 50% of the time and 1-50 damage 50% of the time. So on average,
>>the monster would lose 12.75 HP per hit with that weapon. With the 50d1
>>weapon, you couldn't hurt it (barring critical hits).
>>
>>
>>>It's better to always do somewhat high damage, than to have a chance of
>>>doing very high or very low damage.
>>>
>>Quite the contrary, in my opinion. If you take into account monster PV
>>in the average damage calculation, then weapons with high variance in
>>damage will always be better (except in those case where monster PV is
>>so low that you always get past the opponent's armor).
>>
>
> This fails to take into account hitpoints. Doing high damage
> is only useful up to the number of HP the enemy has. Against
> an enemy with PV of 40 and 10HP, 50d1 would be much better.

It would kill them quicker, yes. But that's only a theoretical point
really. Ever tried a stethoscope on a rat late in the game? Those
critters usually have huge amounts of hitpoints, and high PV monsters
even more so.

> Indeed, it is an instakill if you hit for anything with
> PV+HP<=50, which is probably the vast majority of things. Of
> course, these are generally also the things you don't mind
> spending an extra turn or two in melee with. Which weapon is
> better does very much depend on the opponent though.

Yep, but all in all the high-maximum damage is certainly better by my
standards. It is better against monsters that you usually have trouble
with, and that's what counts.

Malte

matija

unread,
Apr 18, 2002, 10:48:50 AM4/18/02
to
Chris Cardoso, completely geschtonkenflapped, wrote:
> I made a simple yet effective ADOM utility which, when given the
> statistics of a weapon (or the damage you're doing with it), will give
> you its minimum, maximum, and average damage. If anyone is interested,
> e-mail me and I will send you a copy. [...] I made it in Visual Basic

i can code it in x86 assembly under 300 bytes ;)


--
the yeti loves to drink shnaps too, so he's like a real shaman... he, uhm,
uh, if you want to contact him, you have to put some alcoholic offerings in
front of the forest. [-mystery of the yeti]

address is scrambled - remove SPAMISEVIL to reply

Juuso Heimonen

unread,
Apr 18, 2002, 1:30:07 PM4/18/02
to
"matija" <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message
news:MPG.1728b415c...@news.carnet.hr...

: > I made a simple yet effective ADOM utility which, when given the


: > statistics of a weapon (or the damage you're doing with it), will give
: > you its minimum, maximum, and average damage. If anyone is interested,
: > e-mail me and I will send you a copy. [...] I made it in Visual Basic
:
: i can code it in x86 assembly under 300 bytes ;)

Show-off =)

--
Juuso Heimonen / juuso.h...@gmx.co.uk


Artraze

unread,
Apr 18, 2002, 3:38:29 PM4/18/02
to
> I would think that you are right, however just calculating the average
> damage is not always the best.
> for example, if you have weapon with 1d100 it would make 50 average damage,
> and a weapon with 50d1 would also make 50 average damage, but I guess
> everyone would agree the latter one is a lot better :)
> It's better to always do somewhat high damage, than to have a chance of
> doing very high or very low damage.
> Of course my examples are a bit extreme, there shouldn't be that many
> weapons like this in the game ^_^ none that I've found anyway.
> My point is, it's always good to have the minimum, average and maximum
> damage to really figure out which weapon is the best, but if you are too
> lazy then just go with highest average which is the best in most cases :)

I would think that the average plus the standard deviation would be the most
thing.


matija

unread,
Apr 18, 2002, 6:04:06 PM4/18/02
to
Juuso Heimonen, completely geschtonkenflapped, wrote:
> : i can code it in x86 assembly under 300 bytes ;)
>
> Show-off =)

don't make me lower it to 200 bytes, juSSo ;)

Chris Cardoso

unread,
Apr 18, 2002, 10:14:58 PM4/18/02
to
matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message news:<MPG.1728b415c...@news.carnet.hr>...
> Chris Cardoso, completely geschtonkenflapped, wrote:
> > I made a simple yet effective ADOM utility which, when given the
> > statistics of a weapon (or the damage you're doing with it), will give
> > you its minimum, maximum, and average damage. If anyone is interested,
> > e-mail me and I will send you a copy. [...] I made it in Visual Basic
>
> i can code it in x86 assembly under 300 bytes ;)

Why haven't you done it then? ;) It's not like I'm trying to show off.
I'm a senior in high school and just started learning Visual Basic
this year. I simply used this project as a test of my ability. I'm
just surprised no one thought of this (or executed it) before I did.
:)

John Rowat

unread,
Apr 19, 2002, 2:29:54 AM4/19/02
to
As roses wither, so does Chris Cardoso:

> matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message

>> i can code it in x86 assembly under 300 bytes ;)

> Why haven't you done it then? ;) It's not like I'm trying to show off.
> I'm a senior in high school and just started learning Visual Basic
> this year. I simply used this project as a test of my ability. I'm
> just surprised no one thought of this (or executed it) before I did.

Why bother?

And Matija, I'll do it directly in 8086 machine code in 30 bytes.

So there.

(And that's WITHOUT the 8087 coprocessor, thankyouverymuch.)

-John
--
Sometimes, you just have to grin and try again with a fresher corpse and
slight changes to the formula.
-The Onion Horoscopes, Feb 13 2002.

matija

unread,
Apr 19, 2002, 7:16:37 AM4/19/02
to
John Rowat, completely geschtonkenflapped, wrote:
> >> i can code it in x86 assembly under 300 bytes ;)
>
> > Why haven't you done it then? ;) [...]
>
> Why bother?

Because it's cool! :)


> And Matija, I'll do it directly in 8086 machine code in 30 bytes.
> So there.
> (And that's WITHOUT the 8087 coprocessor, thankyouverymuch.)

If you can do it in 30, I can do it in at least 29 ;)

But I don't think it's possible to go so low. Hmm, I'll be
darned if I don't try it today. OK, I officially declare
the contest for the smallest weapon damage calculator open!

There should be two challenges:

1) make a version that accepts command line parameters (big);
2) hardcode the params in the .ASM file (use equ's for constants,
we define X, Y and Z from XdY+Z, smaller version).

The calculated values must be written on screen.

I'll go first. In the meantime, here's a task for you, John:
make a program that will draw a blue background on the screen
(in text mode, of course), draw a custom-sized window made out
of custom characters on it, wait for a keypress and terminate.
You need not clear the screen or specifically enter a text mode,
whatever is in your DOS window should do fine. All coordinates
and the chars that the window will consist of should be declared
as equ's in the code so you can easily change it. H4x0r tricks
are more than welcome. I won't tell you the size of my final
effort, but here's a completely useless fact: the first version,
completely geschto^H^H^H (whoops!) *unoptimized* was 100 bytes.
C'mon, how low can you go? :)

matija

unread,
Apr 19, 2002, 9:47:51 AM4/19/02
to
matija, completely geschtonkenflapped, wrote:
> OK, I officially declare
> the contest for the smallest weapon damage calculator open!
>
> 2) hardcode the params in the .ASM file (use equ's for constants,
> we define X, Y and Z from XdY+Z, smaller version).

here's the first version. i'm too lazy to FTP it online ;)

it's 94 bytes in size. won't work with three-digit numbers,
and it's almost useless because you have to recompile it
every time you want to change the dice values ;)

seg_a segment byte public
assume cs:seg_a, ds:seg_a


;---

X equ 5
Y equ 6
Z equ 18

;---

org 100h

damage proc near

start:

mov ax,X
mov bx,Y
mov cx,Z

mov dx,ax
add dx,cx
push dx ; X + Z = min. damage

imul bx ; ax = al*bx; ax = X*Y

mov dx,ax
add dx,cx
push dx ; X*Y + Z = max. damage

add ax,X
shr ax,1
jnc isOdd
mov decimal,1
isOdd:
add ax,cx ; (X*(Y+1))/2 + Z = avg. damage

call writeno

cmp decimal,1
jne noWriteDecimal
mov dl, '.'
int 21h ; ah=2 left over from writeno
mov dl, '5'
int 21h

noWriteDecimal:
mov dl, ' '
int 21h

pop ax
call writeno ; max. damage

mov dl, ' '
int 21h

pop ax
call writeno ; min. damage


int 20h

damage endp

writeno proc near
mov dl,10
idiv dl ; al = ax div 10; ah = ax mod 10
mov dx,ax
add dl,48 ; number -> ascii number 0..9
mov ah,2 ; ah=2, int21h = write char in dl
int 21h
mov cl,8
shr dx,cl ; upper 8 bits (mod)
add dl,48
int 21h
ret
writeno endp


;---

decimal db ?

;---


seg_a ends

end start

John Rowat

unread,
Apr 19, 2002, 2:52:47 PM4/19/02
to
As roses wither, so does matija:

> John Rowat, completely geschtonkenflapped, wrote:

> But I don't think it's possible to go so low. Hmm, I'll be
> darned if I don't try it today. OK, I officially declare
> the contest for the smallest weapon damage calculator open!

It is. The trick is, it requires more than 30 bytes of MEMORY, but the
code itself requires only 30 or so bytes.

> 1) make a version that accepts command line parameters (big);

What command line? This is machine code.

> 2) hardcode the params in the .ASM file (use equ's for constants,
> we define X, Y and Z from XdY+Z, smaller version).

What ASM file? This is machine code.

> The calculated values must be written on screen.

Adds two bytes of code, and two of data.

> as equ's in the code so you can easily change it. H4x0r tricks
> are more than welcome. I won't tell you the size of my final
> effort, but here's a completely useless fact: the first version,
> completely geschto^H^H^H (whoops!) *unoptimized* was 100 bytes.
> C'mon, how low can you go? :)

Probably about 15 bytes, but it's by cheating and not REALLY doing what
the program is suppposed to.

I'm not going to do the whole program. That would take too long, but this
is basically how you do it:
You place the number of dice in DS:0000, the size of dice in DS:0001, and
the bonus in DS:0003.

Start running at CS:0000

10001010 00001101
10001010 01000101 00000001
00000011 11011000
01001001
01110101 00000100
10001001 01011101 00001000


There you go - that calculates the max damage and stores it in DS:0008, in
13 bytes. Min damage will take another 12, and average damage will take
5. Outputting all three to the screen will take another 4 bytes each, but
I can actually save 3 bytes on each of the first two by sending it to the
screen, not memory, at that point, for a total of 37 bytes.

And it's a REAL bitch to read, too - just look at the code above, and
realise that at least I've spread it out into opcode-data pairs instead of
sticking it all on one line.

Pasi Niskanen

unread,
Apr 19, 2002, 5:17:54 PM4/19/02
to

Malte Helmert <hel...@informatik.uni-freiburg.de> skrev i
diskussionsgruppsmeddelandet:3CBEA40B...@informatik.uni-freiburg.de...

> Quite the contrary, in my opinion. If you take into account monster PV
> in the average damage calculation, then weapons with high variance in
> damage will always be better (except in those case where monster PV is
> so low that you always get past the opponent's armor).
>
> Malte

Point taken, I completely forgot about the way PV works :)
I took all my knowledge about what damage weapon to choose from my days on
the good old BelgaMUD, where armor class didn't affect how much damage you
dealt, and instead just making the target harder to hit. So most people
there considered weapons that would make, for example, 40-60 damage better
than 1-100 damage.
But I guess the way PV works in AdoM would in many cases make the 1-100
better instead.


matija

unread,
Apr 19, 2002, 5:18:33 PM4/19/02
to
John Rowat, completely geschtonkenflapped, wrote:
> > But I don't think it's possible to go so low. Hmm, I'll be
> > darned if I don't try it today. OK, I officially declare
> > the contest for the smallest weapon damage calculator open!
>
> It is. The trick is, it requires more than 30 bytes of MEMORY, but the
> code itself requires only 30 or so bytes.

The calculation itself can probably be squeezed in 30 bytes,
yes. But you can't use it without other code.


> > 1) make a version that accepts command line parameters (big);
>
> What command line? This is machine code.

What machine code? How the hell are you supposed to run it?
And on which machine do you plan to do so? It will *not*
run on anyone's PC, which makes it pointless.


> > 2) hardcode the params in the .ASM file (use equ's for constants,
> > we define X, Y and Z from XdY+Z, smaller version).
>
> What ASM file? This is machine code.

F*ck machine code. Machine code was used 40 years ago, until
assembler was "invented".


> > The calculated values must be written on screen.
>
> Adds two bytes of code, and two of data.

No, under DOS it requires 6 bytes for the first write, 4 for
subsequent ones. If you don't go straight to video memory.


> > C'mon, how low can you go? :)
>
> Probably about 15 bytes, but it's by cheating and not REALLY doing what
> the program is suppposed to.

From what I've seen, it does nothing.


> You place the number of dice in DS:0000, the size of dice in DS:0001, and
> the bonus in DS:0003.

Look, we're talking about a program that can be run on an
x86 machine in DOS or any emulators of DOS. If you put data
on DS:0000, then it means you're running an EXE file. With
all that overhead that increases the size of the file and
doesn't do any good to the size of the program.


> Start running at CS:0000

You don't. Unless you're in an EXE.


> 10001010 00001101
> 10001010 01000101 00000001
> 00000011 11011000
> 01001001
> 01110101 00000100
> 10001001 01011101 00001000

What the heck is this supposed to mean? The above code,
in plain 8086 assembly, is:

mov cl,[di]
mov al,[di+1]
add bx,ax
dec cx
add al,89
pop bp
or [bx+si],al (since the last instruction is really 08 00)


> There you go - that calculates the max damage and stores it in DS:0008, in
> 13 bytes.

Would you please explain what this was all about, since I
really don't understand any of it? In fact, this doesn't even
look like x86 since it makes no sense. Come on, I could've taken
a PIC and programmed an EEPROM with the calculation routines,
so I'd only need to supply three bytes and a CALL instruction.
In fact, I could've done it completely in hardware.

SlayerRocket

unread,
Apr 19, 2002, 5:37:44 PM4/19/02
to
Pasi Niskanen said

Okay, let me analize this...
.
.
.
done...
Typing readout...
*Beep*
2d10 can roll

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, or 20

in order to get a 2 you must roll 1 and 1
with 20 you need 10 and 10
11 is the average
1+10
2+9
3+8
4+7
5+6
6+5
7+4
8+3
9+2
10+1

10 possable rolls

however a 1 die damage has no average because each roll has equil odds. That
isnt really true, due to adoms curse, doom, fate, and luck.

*end of typing*

Chris Cardoso

unread,
Apr 19, 2002, 6:19:56 PM4/19/02
to
matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message news:<MPG.172a004bf...@news.carnet.hr>...

> John Rowat, completely geschtonkenflapped, wrote:
> > >> i can code it in x86 assembly under 300 bytes ;)
>
> > > Why haven't you done it then? ;) [...]
> >
> > Why bother?
>
> Because it's cool! :)
>
>
> > And Matija, I'll do it directly in 8086 machine code in 30 bytes.
> > So there.
> > (And that's WITHOUT the 8087 coprocessor, thankyouverymuch.)
>
> If you can do it in 30, I can do it in at least 29 ;)
>
> But I don't think it's possible to go so low. Hmm, I'll be
> darned if I don't try it today. OK, I officially declare
> the contest for the smallest weapon damage calculator open!
>

I think I've started a war...oh well. :) BTW, does anyone have any
ideas on other utilities which would be useful (not something
super-hard for poor me :))? Post 'em or mail 'em.

Tigershark7000

unread,
Apr 19, 2002, 6:27:18 PM4/19/02
to
Chris Cardoso said:
>I think I've started a war...oh well. :) BTW, does anyone have any
>ideas on other utilities which would be useful (not something
>super-hard for poor me :))? Post 'em or mail 'em.
>

Yeah port ADOM to mac, and do it with out the sorce code. :-)

As for your question if anybody else was going to make somthing like that, yeah
I was thinking about it. (probably wouldn't do it though because I can do most
of what this does in my head)


-John

John Rowat

unread,
Apr 19, 2002, 8:40:18 PM4/19/02
to
As roses wither, so does matija:
> John Rowat, completely geschtonkenflapped, wrote:

>> It is. The trick is, it requires more than 30 bytes of MEMORY, but the
>> code itself requires only 30 or so bytes.

> The calculation itself can probably be squeezed in 30 bytes,
> yes. But you can't use it without other code.

I disagree. You just need certain annoying hardware.

>> What command line? This is machine code.

> What machine code? How the hell are you supposed to run it?
> And on which machine do you plan to do so? It will *not*
> run on anyone's PC, which makes it pointless.

It will run on an 8086. We weren't looking for USEFUL, as far as I could
tell, we were looking for "smallest code that will accomplish the required
effect." - a reverse dicksize war, in effect, which is completely
pointless by it's very nature.

> F*ck machine code. Machine code was used 40 years ago, until
> assembler was "invented".

That would be the point of using machine code in a reverse dicksize war.

>> Adds two bytes of code, and two of data.

> No, under DOS it requires 6 bytes for the first write, 4 for
> subsequent ones. If you don't go straight to video memory.

Define "screen", here. I was defining it based on the 8086 board used for
a microprocessor architecture course.

The "screen" is an LED display, with a port #.

>> > C'mon, how low can you go? :)
>>
>> Probably about 15 bytes, but it's by cheating and not REALLY doing what
>> the program is suppposed to.

> From what I've seen, it does nothing.

I wasn't trying to do that particular challenge.

>> You place the number of dice in DS:0000, the size of dice in DS:0001, and
>> the bonus in DS:0003.

> Look, we're talking about a program that can be run on an
> x86 machine in DOS or any emulators of DOS. If you put data
> on DS:0000, then it means you're running an EXE file. With
> all that overhead that increases the size of the file and
> doesn't do any good to the size of the program.

Not necessarily. You see, I was still talking about the lowest possible
implementation, not the lowest USEFUL implementation. Useful is
completely different from possible.

>> Start running at CS:0000

> You don't. Unless you're in an EXE.

>> 10001010 00001101
>> 10001010 01000101 00000001
>> 00000011 11011000
>> 01001001
>> 01110101 00000100
>> 10001001 01011101 00001000

> What the heck is this supposed to mean? The above code,
> in plain 8086 assembly, is:

> mov cl,[di]
> mov al,[di+1]
> add bx,ax
> dec cx
> add al,89
> pop bp
> or [bx+si],al (since the last instruction is really 08 00)

Unless I've got some bits wrong (which is possible), it's supposed to put
the number of dice in CL, the size of dice in AL, and then add AL to BX
once for every CL - then store BX in memory.

I forgot to add the modifier, naturally, but the concept is still there.
It's just another add BX [di+3]

>> There you go - that calculates the max damage and stores it in DS:0008, in
>> 13 bytes.

> Would you please explain what this was all about, since I
> really don't understand any of it? In fact, this doesn't even
> look like x86 since it makes no sense. Come on, I could've taken
> a PIC and programmed an EEPROM with the calculation routines,
> so I'd only need to supply three bytes and a CALL instruction.
> In fact, I could've done it completely in hardware.

So could I, but the challenge was supposed to be for smallest, least
useful while still remaining technically functional code to handle
calculating the max, min, and average damage.

You want useful? I'd go with assembler, like you did. I thought we were
going for small and technically funcitonal, not useful.

matija

unread,
Apr 20, 2002, 7:52:44 AM4/20/02
to
John Rowat, completely geschtonkenflapped, wrote:
> > The calculation itself can probably be squeezed in 30 bytes,
> > yes. But you can't use it without other code.
>
> I disagree. You just need certain annoying hardware.

Just as I thought.


> > mov cl,[di]
> > mov al,[di+1]
> > add bx,ax
> > dec cx
> > add al,89
> > pop bp
> > or [bx+si],al (since the last instruction is really 08 00)
>
> Unless I've got some bits wrong (which is possible),

Or if I got them wrong when converting to hex. This is why
machine code suxx0rz.


> it's supposed to put
> the number of dice in CL, the size of dice in AL, and then add AL to BX
> once for every CL - then store BX in memory.

Even so, you need to go with the source index register, not the
destination one. The most efficient thing would be to load the
values from DS:SI with LODS and store the calculated ones in ES:DI
with simple STOS instructions. OK, let's assume the number of dice
is at DS:0000, the size at DS:0001 and the modifier at DS:0002:

lodsb ; AL <- DS:SI, SI++ 1
xchg cx,ax ; CL = number of dice 1
lodsb ; AL = size of dice 1
mov bl,[si] ; BL = modifier 2
foo:
add bx,ax 2
loopne foo 2

xchg bx,ax 1
stosb ; AL -> ES:DI, DI++ 1


So, as I said, if you can do it in 30 bytes, I can do it in 29.
This one is 11 bytes, two bytes smaller than your version.


> You want useful? I'd go with assembler, like you did. I thought we were
> going for small and technically funcitonal, not useful.

No, we were going for useful :)
I'll code a version that accepts command-line parameters today.


This group is so cool. We get to learn how to optimize assembly,
as well as how nukes work. I love you people.

Markku Rikola

unread,
Apr 20, 2002, 8:27:06 AM4/20/02
to
On Sat, 20 Apr 2002, matija wrote:

<snip asm optimization match Krnic vs. Rowat>

> This group is so cool. We get to learn how to optimize assembly,
> as well as how nukes work. I love you people.
>

And besides, you've started to use capital letters! ;)

-- Markku Rikola

(all we need now is an efficiently profiting stock expert that could
help us all become gazillionaires so that we can fund ADOM development
-- then again, after the news that a 5-year-old girl beat both an
astrologer and a pro stock broker... *sigh*)

Hey, RFE! The Tiny Girl should be able to teach Merchants! :D

rachel walmsley

unread,
Apr 20, 2002, 9:36:05 AM4/20/02
to
SlayerRocket <slayer...@aol.com> wrote:

> however a 1 die damage has no average because each roll has equil odds. That
> isnt really true, due to adoms curse, doom, fate, and luck.

Um. No. It has no mode, but a definite mean.

rw

matija

unread,
Apr 20, 2002, 11:41:51 AM4/20/02
to
Markku Rikola, completely geschtonkenflapped, wrote:
> > This group is so cool. We get to learn how to optimize assembly,
> > as well as how nukes work. I love you people.
>
> And besides, you've started to use capital letters! ;)

no i haven't. i use them just when talking to john, so don't
get your hopes up too high ;)

John Rowat

unread,
Apr 20, 2002, 1:18:54 PM4/20/02
to
As roses wither, so does matija:
> John Rowat, completely geschtonkenflapped, wrote:

>> > The calculation itself can probably be squeezed in 30 bytes,
>> > yes. But you can't use it without other code.
>>
>> I disagree. You just need certain annoying hardware.

> Just as I thought.

It's perfectly normal, off-the-shelf PC hardware, that I happen to have
access to. It's just an 8086, which was top-of-the-line when it was
purchased.

> Or if I got them wrong when converting to hex. This is why
> machine code suxx0rz.

This would be why you use machine code to win the "pointless but
technically working" discksize war.

> lodsb ; AL <- DS:SI, SI++ 1
> xchg cx,ax ; CL = number of dice 1
> lodsb ; AL = size of dice 1
> mov bl,[si] ; BL = modifier 2
> foo:
> add bx,ax 2
> loopne foo 2

> xchg bx,ax 1
> stosb ; AL -> ES:DI, DI++ 1


> So, as I said, if you can do it in 30 bytes, I can do it in 29.
> This one is 11 bytes, two bytes smaller than your version.

You're using commands that didn't exist in the 8086. This requires
bigger, more complex hardware - why should I need to go spend money on a
new computer just because you've bloated your code so it won't work on my
8086 with a 6-character LED viewscreen and custom non-alphabetic keyboard?

This is how Microsoft got started.

Ex_Ottoyuhr

unread,
Apr 20, 2002, 1:29:03 PM4/20/02
to
stri...@cheatcc.com (Chris Cardoso) wrote in message news:<67dcca87.02041...@posting.google.com>...
<snip>

> I think I've started a war...oh well. :)

Don't worry, they're always like this. But they're not nearly
as bad as rec.arts.books.tolkien on homosexuality...

> BTW, does anyone have any
> ideas on other utilities which would be useful (not something
> super-hard for poor me :))? Post 'em or mail 'em.

I, for one, can't think of any off the top of my head. Probably
because I've not read this NG or played ADOM for the past
few weeks (more for the NG). If you find that there's anything
you need, as a general rule, go ahead and write it -- someone
else will probably appreciate it as well.

matija

unread,
Apr 20, 2002, 6:15:08 PM4/20/02
to
John Rowat, completely geschtonkenflapped, wrote:
> >> I disagree. You just need certain annoying hardware.
>
> > Just as I thought.
>
> It's perfectly normal, off-the-shelf PC hardware, that I happen to have
> access to. It's just an 8086, which was top-of-the-line when it was
> purchased.

Oh, come on, I have an 8088 and still I don't brag about it.


> > Or if I got them wrong when converting to hex. This is why
> > machine code suxx0rz.
>
> This would be why you use machine code to win the "pointless but
> technically working" discksize war.

I have to admit - yours is bigger (the code, of course).


> > So, as I said, if you can do it in 30 bytes, I can do it in 29.
> > This one is 11 bytes, two bytes smaller than your version.
>
> You're using commands that didn't exist in the 8086.

???
What would those be?


> This requires
> bigger, more complex hardware - why should I need to go spend money on a
> new computer just because you've bloated your code so it won't work on my
> 8086 with a 6-character LED viewscreen and custom non-alphabetic keyboard?

I haven't bloated it, I reduced the size. You got something
mixed up. And I'm not talking about two potions of water here.


> This is how Microsoft got started.

I don't mind. That makes me one step closer to Bill. When he
adopts me, I'll have a whole sh*tload of money.

John Rowat

unread,
Apr 20, 2002, 6:59:23 PM4/20/02
to
As roses wither, so does matija:
> John Rowat, completely geschtonkenflapped, wrote:

>> It's perfectly normal, off-the-shelf PC hardware, that I happen to have
>> access to. It's just an 8086, which was top-of-the-line when it was
>> purchased.

> Oh, come on, I have an 8088 and still I don't brag about it.

Then you haven't gotten into the SPIRIT of a proper "My hardware is worse
than yours" argument yet.

>> > So, as I said, if you can do it in 30 bytes, I can do it in 29.
>> > This one is 11 bytes, two bytes smaller than your version.
>>
>> You're using commands that didn't exist in the 8086.

> ???
> What would those be?

Exchange, for one.

(I could be wrong, but I doubt it.)

>> This requires
>> bigger, more complex hardware - why should I need to go spend money on a
>> new computer just because you've bloated your code so it won't work on my
>> 8086 with a 6-character LED viewscreen and custom non-alphabetic keyboard?

> I haven't bloated it, I reduced the size. You got something
> mixed up. And I'm not talking about two potions of water here.

"Bloated" by "adding things that don't work in the old versions".
Neglecting backwards compatibility, maybe?

You don't seem to be laughing at this whole thread. Maybe that's your
problem.

matija

unread,
Apr 21, 2002, 12:08:59 PM4/21/02
to
John Rowat, completely geschtonkenflapped, wrote:
> > Oh, come on, I have an 8088 and still I don't brag about it.
>
> Then you haven't gotten into the SPIRIT of a proper "My hardware is worse
> than yours" argument yet.

I will, when I get my CDP 1802 up and running.


> >> You're using commands that didn't exist in the 8086.
>
> > ???
> > What would those be?
>
> Exchange, for one.
> (I could be wrong, but I doubt it.)

XCHG is a valid 808x instruction. It uses 4 clocks with two
registers, 17+EA when memory is involved, and 3 with the
accumulator and another register.


> > I haven't bloated it, I reduced the size. You got something
> > mixed up. And I'm not talking about two potions of water here.
>
> "Bloated" by "adding things that don't work in the old versions".
> Neglecting backwards compatibility, maybe?

Well, Microsoft's greatest problem is quite the opposite,
giving support for backwards compatibility - that's why Win9x
suxx0rd so much, as well as why WinXP does.


> You don't seem to be laughing at this whole thread. Maybe that's your
> problem.

WANNA SEE MY PROBLEM?! HUH?!?!? HUH?!? DON'T GET ME STARTED
ON THIS ONE, YOU LAME NooB! GO STUDY THE x86 OPCODE LIST!!!1!11!1

Ex_Ottoyuhr

unread,
Apr 21, 2002, 5:41:47 PM4/21/02
to
matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message news:<MPG.172cd9a74...@news.carnet.hr>...
<snip a really wierd argument>

Are either of you going to post a working
assembler/C/something-or-other damage roller, or are you going to rant
about your ancient computers all day? (No offense intended...)

It isn't possibly so hard that you're just stalling for time, _is_
_it_? :)

matija

unread,
Apr 21, 2002, 6:19:02 PM4/21/02
to
Ex_Ottoyuhr, completely geschtonkenflapped, wrote:
> Are either of you going to post a working
> assembler/C/something-or-other damage roller,

we weren't talking about damage rollers. calculators, dude.


> or are you going to rant
> about your ancient computers all day? (No offense intended...)

one of these days i'm gonna find a working 4004.


> It isn't possibly so hard that you're just stalling for time, _is_
> _it_? :)

no. i'm busy with college so i don't have time to create
the version that accepts command line parameters. it's
an hour at most, but i can't seem to find one extra :/

wish me luck at math on tuesday and operating systems
on wednesday. integrals and threads, what a lovely combo!

Angilion

unread,
Apr 21, 2002, 10:19:22 PM4/21/02
to
On 18 Apr 2002 19:14:58 -0700, stri...@cheatcc.com (Chris Cardoso)
wrote:

I'm not at all surpised, since it would take longer to run the program
and input the figures than it would to perform the calculations in
your head.

--

Always remember you're unique.
Just like everyone else. (Anon)

Angilion

unread,
Apr 21, 2002, 10:19:23 PM4/21/02
to
On Sat, 20 Apr 2002 13:52:44 +0200, matija
<mSkPr...@jaIgSor.srEcVe.IhLr> wrote:

>John Rowat, completely geschtonkenflapped, wrote:

[..]

>> Unless I've got some bits wrong (which is possible),
>
> Or if I got them wrong when converting to hex. This is why
> machine code suxx0rz.

This is about bragging rights and machine code is just the job for that
(especially if you can do it directly in binary, rather than having to
mentally convert from hex).

Garbled quazi-English which is just a combination of bad spelling
and substitutions of letters is not.

Me? I'm not skilled enough for this sort of competition. I'd
dredge my memory and knock something up in C. Just plain
C - none of this newfangled object-orientated stuff for me! 8-)

It is kind of nice to see this sort of "smaller, smaller!" thing in
the days of bloatware and hugely overpowered PCs. I have
an image of an artist facing a blank wall a mile long and painting
a complete picture smaller than their fingernail on it, because they can.

[..]

Angilion

unread,
Apr 21, 2002, 10:25:13 PM4/21/02
to
On 21 Apr 2002 14:41:47 -0700, ex_ot...@hotmail.com (Ex_Ottoyuhr)
wrote:

>matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message news:<MPG.172cd9a74...@news.carnet.hr>...
><snip a really wierd argument>
>
>Are either of you going to post a working
>assembler/C/something-or-other damage roller, or are you going to rant
>about your ancient computers all day? (No offense intended...)

They already have. Not useful, but working.

>It isn't possibly so hard that you're just stalling for time, _is_
>_it_? :)

It's not worth doing seriously because it is too easy a task to
do without a program.

For the usual damage roll of XdY + Z...

min = X+Z
max = (X*Y) +Z
mean average = (X*((Y+1)/2)) + Z

It's quicker to do it in your head than it is to
even think what the formula is, let along run
a program and type the 3 numbers in.

Knocking up a snippet of a spreadsheet to do
it would probably be easier than a program specifically
for it. If you just want some program that does the job,
why not do that for yourself?

Trying to make the most efficient program (in terms of
execution speed or memory requirements) may be worth
taking seriously because it requires skill and knowledge.

John Rowat

unread,
Apr 22, 2002, 12:14:20 AM4/22/02
to
As roses wither, so does Ex_Ottoyuhr:

> matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message

> Are either of you going to post a working


> assembler/C/something-or-other damage roller, or are you going to rant
> about your ancient computers all day? (No offense intended...)
> It isn't possibly so hard that you're just stalling for time, _is_
> _it_? :)

No. It is, however, so utterly useless that simply calculating it in your
head is much, much faster than any computer program could be, so I'm not
going to bother. Discussing doing it in the lamest way posible, however,
*is* interesting.

Petr Zweistein Prokop

unread,
Apr 22, 2002, 4:13:51 AM4/22/02
to
angi...@ypical.fsnet.co.uk (Angilion) wrote in message news:<3cc37162...@news.freeserve.net>...

> On 21 Apr 2002 14:41:47 -0700, ex_ot...@hotmail.com (Ex_Ottoyuhr)
> wrote:
>
> >matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message news:<MPG.172cd9a74...@news.carnet.hr>...
> ><snip a really wierd argument>
> >
> >Are either of you going to post a working
> >assembler/C/something-or-other damage roller, or are you going to rant
> >about your ancient computers all day? (No offense intended...)
>
> They already have. Not useful, but working.
>
> >It isn't possibly so hard that you're just stalling for time, _is_
> >_it_? :)
>
> It's not worth doing seriously because it is too easy a task to
> do without a program.
>
> For the usual damage roll of XdY + Z...
>
> min = X+Z
> max = (X*Y) +Z
> mean average = (X*((Y+1)/2)) + Z
>
> It's quicker to do it in your head than it is to
> even think what the formula is, let along run
> a program and type the 3 numbers in.
>
> Knocking up a snippet of a spreadsheet to do
> it would probably be easier than a program specifically
> for it. If you just want some program that does the job,
> why not do that for yourself?
>

Well, one could make usefull program which will "read" ADOM screen and then
calculate best weapon found in inventory; (or which will even search inv do
find best weapon/armour and then wield it)
I did a bit testing and it is quite easy to make utility in which you paste
part of inv screen (using windows copy & paste feature) and it will extract
dices.

What do you think, should I try to code it?

/sorry for bad english & spelling/

Frances Kathleen Moffatt

unread,
Apr 22, 2002, 9:33:40 AM4/22/02
to
Petr Zweistein Prokop (zwei....@worldonline.cz) writes:

> Well, one could make usefull program which will "read" ADOM screen and then
> calculate best weapon found in inventory; (or which will even search inv do
> find best weapon/armour and then wield it)
> I did a bit testing and it is quite easy to make utility in which you paste
> part of inv screen (using windows copy & paste feature) and it will extract
> dices.
> What do you think, should I try to code it?

*shrug* If the screen displays the damage of a weapon (or the protection
of armour, or what-have-you), then you already know what it is and how it
compares to what you already have. If you aren't wielding the 5d8+7
eternium sword, there's probably a good reason for it (the fact that it's
a cursed eternium sword of weakness, for example). A program that decides
you should wear/wield the 'best' armour/weapon would not, IMHO, be much
good unless you could manage the settings to never wield certain types of
items.

(A program that actually reads weapon damage without it being displayed on
screen yet would 1) be impressive, and 2) probably should make even more
of a point of checking for key qualities, like "trapped", "cursed", "mild",
"fickle", etcetera.)

And even if you could set it to never wield cursed/mild/fickle/delicate
items, I foresee too many problems unless you can turn it off, and I can't
see why you'd use it if it isn't smooth enough that you don't have to turn
it off.

"What do you mean, I can't use my delicate arrows of undead slaying? I
*need* my delicate arrows of undead slaying. Right now, in fac--"

Do you want to see the last messages before your death [y/N]?

In short: the calculations are faster to do in your head than to write,
and I don't think a program could handle all the prefixes, suffixes, and
b/u/c status issues. Prove me wrong, by all means, but you did ask. :)

Love and coffee,
Frances

Ex_Ottoyuhr

unread,
Apr 22, 2002, 8:25:29 PM4/22/02
to
matija <mSkPr...@jaIgSor.srEcVe.IhLr> wrote in message news:<MPG.172d5940e...@news.carnet.hr>...
> Ex_Ottoyuhr, completely geschtonkenflapped, wrote:
<snip: Dust off the TI-85>
>
> > or are you going to rant
> > about your ancient computers all day? (No offense intended...)
>
> one of these days i'm gonna find a working 4004.

Good luck. Do you also intend to find a computer or calculator built
around it?

> > It isn't possibly so hard that you're just stalling for time, _is_
> > _it_? :)
>
> no. i'm busy with college so i don't have time to create
> the version that accepts command line parameters. it's
> an hour at most, but i can't seem to find one extra :/
>
> wish me luck at math on tuesday and operating systems
> on wednesday. integrals and threads, what a lovely combo!

Good luck (wished at 8:22 Monday evening, so I hope it gets there
on time, wherever .hr is...). I know this is a pretty
basic kind of thing to write, but unfortunately, I don't know any
C, Perl, Assembler, etc., etc.

matija

unread,
Apr 23, 2002, 5:48:26 AM4/23/02
to
Ex_Ottoyuhr, completely geschtonkenflapped, wrote:
> > one of these days i'm gonna find a working 4004.
>
> Good luck. Do you also intend to find a computer or calculator built
> around it?

i thought about making my own. it shoule be fun.


> > wish me luck at math on tuesday and operating systems
> > on wednesday. integrals and threads, what a lovely combo!
>
> Good luck (wished at 8:22 Monday evening, so I hope it gets there
> on time

thanks, i'll need this afternoon and tomorrow at the same time.


> wherever .hr is...).

ouch! dude!!! look at the world map and find croatia.


> I know this is a pretty
> basic kind of thing to write, but unfortunately, I don't know any
> C, Perl, Assembler, etc., etc.

if you don't know anything about programming, start with
pascal. it's easy, readable and doesn't lack anything serious.
C is a step ... erm ... away from pascal - some argue it's
a step forward, but i actually went from C to pascal. perl
and other scripting languages have their quirks and are
usually a PITA to learn and understand, and don't even bother
trying to learn assembler if you don't know how a processor
works. you'll just get lost.

Nicholas Taylor

unread,
Apr 23, 2002, 10:21:36 AM4/23/02
to
dv...@FreeNet.Carleton.CA (Frances Kathleen Moffatt) writes:

> Petr Zweistein Prokop (zwei....@worldonline.cz) writes:
>
> > Well, one could make usefull program which will "read" ADOM screen
> > and then calculate best weapon found in inventory; (or which will
> > even search inv do find best weapon/armour and then wield it) I
> > did a bit testing and it is quite easy to make utility in which
> > you paste part of inv screen (using windows copy & paste feature)
> > and it will extract dices. What do you think, should I try to
> > code it?
>
> *shrug* If the screen displays the damage of a weapon (or the
> protection of armour, or what-have-you), then you already know what
> it is and how it compares to what you already have. If you aren't
> wielding the 5d8+7 eternium sword, there's probably a good reason
> for it (the fact that it's a cursed eternium sword of weakness, for
> example). A program that decides you should wear/wield the 'best'
> armour/weapon would not, IMHO, be much good unless you could manage
> the settings to never wield certain types of items.

I think having a program do any automatic wielding would be far more
trouble than it was worth. On the other hand, ranking your weaponry
based on damage could have some use, if you had a lot of fairly nice
stuff and no understanding of statistics at all. I'm not sure how many
ADoM players that covers, though.

> (A program that actually reads weapon damage without it being displayed on
> screen yet would 1) be impressive, and 2) probably should make even more
> of a point of checking for key qualities, like "trapped", "cursed", "mild",
> "fickle", etcetera.)

It could, however, be an interesting exercise, and might be worthwhile
doing just for that.

> And even if you could set it to never wield cursed/mild/fickle/delicate
> items, I foresee too many problems unless you can turn it off, and I can't
> see why you'd use it if it isn't smooth enough that you don't have to turn
> it off.
>
> "What do you mean, I can't use my delicate arrows of undead slaying? I
> *need* my delicate arrows of undead slaying. Right now, in fac--"
>
> Do you want to see the last messages before your death [y/N]?

Now, a program which could keep you from wielding stuff in ADoM would
be pretty impressive. I suppose you could make your program
immediately replace the wielded item with what it thought was best.
The idea seems a little Microsofty to me, though.
--
Nicholas Taylor
The Shadows - "Building a better Galaxy through Friendship and Respect"

John Rowat

unread,
Apr 23, 2002, 3:25:03 PM4/23/02
to
As roses wither, so does Nicholas Taylor:

> Now, a program which could keep you from wielding stuff in ADoM would
> be pretty impressive. I suppose you could make your program
> immediately replace the wielded item with what it thought was best.
> The idea seems a little Microsofty to me, though.

In fact, it's WAY too much like the "waving bread at my kitchen in the
hopes that the correct implement to make toast will select itself" design
theory that seems to be the motivating force behind modern MS products.

rachel walmsley

unread,
Apr 23, 2002, 4:03:07 PM4/23/02
to
Nicholas Taylor <ntay...@hotmail.com> wrote:

> Now, a program which could keep you from wielding stuff in ADoM would
> be pretty impressive. I suppose you could make your program
> immediately replace the wielded item with what it thought was best.
> The idea seems a little Microsofty to me, though.

It looks as if you are trying to kill fisty. Would you like help
with that?
y
You wield the cursed rusty broken fickle scalpel of damnation.
Fistinarius, the greater balor punches through your armour and
hits you. Your blessed eternium plate mail of life [+2, +17]
is damaged. You start to remove your....


*argh* remind me to select no next time...

(RFE -- new monster type. Paperclip. Curses, dooms, confuses,
comes back to life every time you think you've finally killed
it)

Sam Blanning

unread,
Apr 23, 2002, 6:27:26 PM4/23/02
to

"rachel walmsley" <flo...@sheepish.org.uk> wrote in message
news:rle4aa...@willow.local.intranet...

>
> > Now, a program which could keep you from wielding stuff in ADoM would
> > be pretty impressive. I suppose you could make your program
> > immediately replace the wielded item with what it thought was best.
> > The idea seems a little Microsofty to me, though.
>
> It looks as if you are trying to kill fisty. Would you like help
> with that? [...]

>
> (RFE -- new monster type. Paperclip. Curses, dooms, confuses,
> comes back to life every time you think you've finally killed
> it)
>
And if you throw a potion of exchange at it, it just turns into something
even more annoying.


Petr Zweistein Prokop

unread,
Apr 25, 2002, 9:53:19 AM4/25/02
to

I didn't mean that inv program to run on background and work all the
time (as
you wrote it would suck a lot). I meant it to be run on players demand
... for example after killing whole greater wault and using blessed
scroll of identify
on stuff you found there. then run program to choose useless crap
(like my
favourite pieces of colored glass ) and drop it and choose best
combination of
wearable/wieldable items. all done only when you want it to happen.

By the way - you can open inv, look at it and close it without loosing
time (in game), to program ran in background opening+paging down,
copying screens and closing it it will take less than 0.01s - no-one
will notice; so inv screen will be unnoticeable. thats that reading
without displaying.

After bit thinking I came even with better idea - creating adom-borg
( just like angbad-borg ) :)

Frances Kathleen Moffatt

unread,
Apr 25, 2002, 12:40:10 PM4/25/02
to
Petr Zweistein Prokop (zwei....@worldonline.cz) writes:

> I didn't mean that inv program to run on background and work all the
> time (as
> you wrote it would suck a lot). I meant it to be run on players demand
> ... for example after killing whole greater wault and using blessed
> scroll of identify
> on stuff you found there. then run program to choose useless crap
> (like my
> favourite pieces of colored glass ) and drop it and choose best
> combination of wearable/wieldable items.

That sounds a lot better than what I undestood you to say the first time.
But I still think that assigning a value to all the prefixes, suffixes,
colours, armour penalties, damage bonuses, etc., would be more work that it
was worth. Which is better, a (-1, 2d8+6) weapon or a (+3, 2d6+4)? Does
it take into account your weapon skills? Where does b/u/c status fit into
it?

> By the way - you can open inv, look at it and close it without loosing
> time (in game), to program ran in background opening+paging down,
> copying screens and closing it it will take less than 0.01s

(Damn, you type fast. I can't scroll, copy, Alt+Tab, paste, and Alt+Tab
in less than 12 seconds, at best.)

> - no-one
> will notice; so inv screen will be unnoticeable. thats that reading
> without displaying.

Ah. By reading without displaying, I meant a program which could
detect (or 'read', bad choice of words on my part) the statistics of a
weapon without the statistics of that weapon already being displayed on
the inventory screen.

Love and coffee,
Frances

sqweek

unread,
Apr 26, 2002, 6:57:42 PM4/26/02
to
In article <aa9bha$a1i$1...@freenet9.carleton.ca>,
dv...@FreeNet.Carleton.CA says...

> Petr Zweistein Prokop (zwei....@worldonline.cz) writes:
>
[background program to choose best weapon]

> > By the way - you can open inv, look at it and close it without loosing
> > time (in game), to program ran in background opening+paging down,
> > copying screens and closing it it will take less than 0.01s
>
> (Damn, you type fast. I can't scroll, copy, Alt+Tab, paste, and Alt+Tab
> in less than 12 seconds, at best.)

I think he meant have a program scroll down and copy the screens, rather
than doing it manually :)

0 new messages