Sourcedive

Nov 28, 2008, 10:43 pm
#1
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
I just sourcedove to find the answer to Capristo's question regarding Neerc se'Ulb, and came up with some other answers to questions that weren't asked (namely regarding special weapon effect triggering) while I was at it. While I havn't quite decoded the equations, I have learned some things. Be aware that some of this information might be inaccurate simply do to me improperly deciphering the code.

WARNING: Extreme spoilers ahead!

Flaming Sword: 50% chance for +3-6 fire damage.
Mjolak: 33.3% chance for +5-10 energy damage.
Vermis: 20% chance to teleport enemy randomly.
Turox: 20% chance to trigger explosion, strength 10-109. I may dig later into how explosions work.
Neerc se'Ulb: 20% chance for 10-20 point drain. (Wow, bigger than I thought!)
Thunder Hammer: 20% chance to generate lightning. (Plus, it's normal attacks seem to deal lightning damage!)
Staff of Wondrous Smells: 20% chance of creating clouds; 33.3% chance that it will create "evil" clouds over the enemey, and 66.6% chance it will create "good" clouds over you.
Whip of Thievery: Dependent on Cleptia favor, and weapon elasticity.
Chameleon Whip: Dependent on Scabies favor. I'm not entirely certain how it determines the polymorph; some further digging into the polymorph code could turn up further answers, but I don't want to do that right now. Maybe later.

Cleptia's Favor: If the enemy (Enemy in this context is the victim; the PC can be the "enemy") is Petrus, or is wielding a weapon who's material's flexibility is greater than 5; or if your favor with Cleptia is less than 0, the ability autofails. Otherwise, it creates a random number between 1 and (10 - (your Cleptia favor / 200) ), inclusive, and subtracts 1 (Well, not quite, but close enough). If that number is 0, the ability triggers. Thus at perfect favor the ability has a 20% chance of activating.

Scabies' Favor: Scabies' favor works similarly to Cleptias; autofails if the enemy is non-polymorphable or if your favor is less than 0. The formula for determining success is almost identical; however, your favor is divided by 150, rather than 200. This makes it slightly more likely to go off.

I hope someone learned something from this.
"Put more stuff in the... thing where... more stuff goes in."
Nov 29, 2008, 3:12 am
#2
Joined: Jan 27, 2008
Location: Finland, preparing my kin to take over the forum.
Posts: 257
Woah, well done Atomic. Cleared some foggy stuff out for me!
Right, now you killed me. Happy?
Nov 29, 2008, 4:06 am
#3
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
Also, the numbers don't *quite* seem right. To be precise the chance equations; they looked like, for example,
if(!(Rand() % 5))
which I interpreted as (essentially) a 1 in 5, or 20%, chance of the effect occurring. However when I was testing that, Vermis only seemed to trigger it's teleport effect once every 10 to 13 hits. (Nothing triggers on a missed attack.)

Also, something I should probably mention with the two whips: I'm not certain but I think they autofail unless they are wielded by the PC, since NPC's don't have a favor value.
"Put more stuff in the... thing where... more stuff goes in."
Nov 29, 2008, 4:12 am
#4
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,898
You wouldn't be saying that if you've seen Sherarax ravage Attnam.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Nov 29, 2008, 1:26 pm
#5
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,309
Cool, thanks Atomic

So I guess Neerc Se'ulb has the same chance as Turox of having the effect. Turox is clearly more visible of an effect so I assumed it had a higher probability. But wow, 20% chance of a 10-20 point drain is not bad at all.

For Mjolak when you say +5-10 (emphasis on the +), does that mean the limit is 5-10, or is it 5-10 plus some other quality of Mjolak (such as the enchantment? so if you had Mjolak +10 would that make it a 15-20 point drain? Thus making it comparable to Neerc but without the healing effect?)
Nov 29, 2008, 1:55 pm
#6
Joined: Dec 2, 2007
Occupation: Big Daddy
Location: Under a pile of my own offspring
Interests: Caves
Posts: 612
The whips don;t autofail. I know I've been polymorphed by a kobold weilding a chameleon whip in UT. Don;t forget that each time you use the whip it curries favor with the associated god.
Nov 29, 2008, 2:09 pm
#7
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
Slob: When you were poly'd you were still "the PC" and thus still had favor with the various gods. And yes, I forgot to mention the fact that it does raise your favor when it triggers.

Capristo: That's just my poor formatting; what I mean is that it does it's normal damage, and then an extra 5-10 damage on top of that.

Chao: Do the special abilities trigger when Sherry wields them?
"Put more stuff in the... thing where... more stuff goes in."
Nov 29, 2008, 4:49 pm
#8
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 992
Do the mutipliers for weapon skill get added on before or after the special damage?
Nov 30, 2008, 3:39 am
#9
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,898
Of course. Usually into golems, but that just works in her advantage because of her speed.

Also, could you check if enchantments have an effect? From what I've seen, more enchantments have a greater chance. WoT seem to steal more often, and CW seem to polymorph targets into stronger monsters.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Nov 30, 2008, 4:09 am
#10
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
Before, I'm assuming.
EDIT: Chao, I'll look into it. However I believe what you're seeing is simply the increased hit-rate; if the weapon misses it doesn't even go into the function to check for special effects. On the polymorphing, I noticed that the PC's danger level was passed in to the polymorph equation, so "more powerful polymorphs from higher plus weapons" may be an effect of increased danger level.
"Put more stuff in the... thing where... more stuff goes in."
Nov 30, 2008, 3:53 pm
#11
Joined: Mar 21, 2008
Location: Your ears!
Posts: 209
Nice work. I always thought Turox/thunder hammer had less chance to cause effects than the staff of wondrous smells, but apparently it's just because the latter does less damage per hit.
Nov 30, 2008, 3:58 pm
#12
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
Another note on the effects triggering: the line which makes that decision also appears to check if the attack was blocked by armor; thus, it seems you not only have to hit the enemy, AND be lucky, but you actually have to do DAMAGE with your attack.
"Put more stuff in the... thing where... more stuff goes in."
Dec 1, 2008, 11:50 pm
#13
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
OK, on a second pass through the source code I see that I was incorrect in thinking that whip of thievery and chameleon whip did not trigger when not wielded by the player; rather, they have a flat 10% chance of triggering. Also, I misread the flexibility part: the flexibility of the ENEMY's weapon doesn't matter; rather, if the whip of thievery is not made of something flexible (>5) the ability will autofail.

I still don't see any code related to a weapon's magical plus, but seeing as I missed those two moderately important bits I may still be missing it.

During this source dive I've also located the formulas used to determine item values. Suffice to say there are a lot of them. If there's enough interest I could post them all. Good lord this is getting spoily; I'm starting to think it ought to be in the programming forum. :/

Well, I meant to look up polymorph information in this codedive session, however my show is on in ten minutes so that'll have to wait until later. I might be back in an hour or so. We'll see.
"Put more stuff in the... thing where... more stuff goes in."
Dec 2, 2008, 1:29 am
#14
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
Since this thread is diverging from information regarding special effects I've changed the title accordingly.

Not that this would ever really happen due to the lack of any sort of dark-vision, but apparently reading in areas below a certain level of luminescence abuses perception. Being unconscious appears to abuse leg and arm strength, too. Also, this may have already been known, but it appears that your intelligence influences how long it takes to read a book: namely, reading a book takes roughly (Time / (Int * 10)) units of time. I've also located formulas for the calculation of stat training; however I'm missing some information needed to for the information to really be useful, most prominently how much experience it takes for a stat to "level up".

I found this while looking up information regarding polymorphing: The code calls the person who breaks a wand a "terrorist" (as opposed to a "hitter", "enemy" etc which are other names I've seen regarding weapons). I thought it was funny Also, breaking a wand is a dexterity action, difficulty 5 (which from what I read before regarding experience is standard and should take about one turn). So breaking enough wands will train your dexterity. Good luck with that!

On to polymorphing. While I don't yet know exactly what danger levels correlate with what sorts of monsters, this is what I do know. When the CW triggers it's effect, it passes in (CurrentDanger / 4) for a minimum value (I'm assuming CurrentDanger is the danger level of the area, however that is formulated), and CurrentDanger or 999999 (whichever is less) for a maximum value, then does some random stuff for the duration. I couldn't find hard data, but I'm going to venture a guess that wands of polymorph work the same way.

Also I would advise strongly against using polymorph items against creatures that have polymorph control. For a player you are given a choice; for a monster, the min and max values are simply multiplied. By 10.
"Put more stuff in the... thing where... more stuff goes in."
Dec 2, 2008, 6:41 am
#15
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,898
Which makes CW even more useless to the player :/
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Dec 2, 2008, 1:17 pm
#16
Joined: Mar 21, 2008
Location: Your ears!
Posts: 209
Quote
The code calls the person who breaks a wand a "terrorist" (as opposed to a "hitter", "enemy" etc which are other names I've seen regarding weapons). I thought it was funny

I could imagine kamikaze dwarves of Scabies wielding wands of polymorph. "Polymorph the nonbelievers! And ourselves in the process, too!"

Quote
Also I would advise strongly against using polymorph items against creatures that have polymorph control. For a player you are given a choice; for a monster, the min and max values are simply multiplied. By 10.

Ack. That hurts. It would make more sense it it somehow related to the Intelligence of the monster (since that stat allows more powerful transformations for the player). I was never a fan of the Chameleon Whip anyways, though.
Dec 3, 2008, 8:26 am
#17
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,898
Dwarves don't use wands. They will however pick up wands I believe. Any wands donated to the cathedral immediately goes to the dwarves' inventory.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Dec 3, 2008, 3:39 pm
#18
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
The code for backpacks of gunpowder also refer to the user as a "terrorist" in case you were curious.

I can't think of much else to look up. Any suggestions?
"Put more stuff in the... thing where... more stuff goes in."
Dec 4, 2008, 6:38 am
#19
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,898
Requirements for necromancers to summon Xinroch.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Dec 4, 2008, 3:22 pm
#20
Ex-Tyrant of the IVANers


Joined: Dec 8, 2007
Occupation: Junior Scientist
Location: Not California
Interests: Physics and Astronomy, Exoplanets, Singing praise to Valpurus while smashing skulls with a bloody warhammer, Jogging
Posts: 2,920
Necromancers can summon Xinroch? I'll look into it tonight, when I get home from work.
"Put more stuff in the... thing where... more stuff goes in."
Dec 5, 2008, 6:39 am
#21
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,898
Yeah, I was suprised when I found that out.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Jump to