Diablo 1 Mechanics in d2

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

User avatar
zjat
Junior Member
Champion of the Light
Posts: 324
Joined: Tue Jan 18, 2011 10:59 pm
United States of America

Diablo 1 Mechanics in d2

Post by zjat » Fri Jul 28, 2023 4:17 pm

I'm curious if any of the following might be possible and known.

1. Durability on Bows - Is there a way to do this like d1?

2. Attack Rating on Spells - I know you can set the tohit value in the missiles.txt file, but if I understand correctly missiles ignore % chance to hit bonuses inside the skill that spawns them. Any way to do spell-hit-rates that are more nuanced than global attack rating on the player?

User avatar
Nagahaku
Junior Member
Paladin
Posts: 120
Joined: Sat Nov 30, 2019 1:11 am

Re: Diablo 1 Mechanics in d2

Post by Nagahaku » Sat Jul 29, 2023 6:29 am

No need of code editing, they could be done in txt.
1. go to weapons.txt, find column 'nodurability', remove '1' from bows & crossbows, then go to itemtypes.txt, find 'bow' and 'xbow', change their column 'repair' to '1', you would get what you want.
2. not all spells are able to get a skill tohit bonus, but for those have an empty 'srvdofunc' column in skills.txt, you can make it 18, then give it an aurastate, and put tohit bonus stats into the aurastat columns, oh, and don't forget to give it a state length as long as the missile range, which would be 'auralencalc=miss('the skill missile'.rang)'.

User avatar
zjat
Junior Member
Champion of the Light
Posts: 324
Joined: Tue Jan 18, 2011 10:59 pm
United States of America

Re: Diablo 1 Mechanics in d2

Post by zjat » Sat Jul 29, 2023 3:32 pm

Nagahaku wrote:
Sat Jul 29, 2023 6:29 am
No need of code editing, they could be done in txt.
1. go to weapons.txt, find column 'nodurability', remove '1' from bows & crossbows, then go to itemtypes.txt, find 'bow' and 'xbow', change their column 'repair' to '1', you would get what you want.
2. not all spells are able to get a skill tohit bonus, but for those have an empty 'srvdofunc' column in skills.txt, you can make it 18, then give it an aurastate, and put tohit bonus stats into the aurastat columns, oh, and don't forget to give it a state length as long as the missile range, which would be 'auralencalc=miss('the skill missile'.rang)'.
Tried both.
#1 doesn't allow the bow to fire anything.
#2 works fine, though I'm unsure how I might handle skills that do use the srvdofunc or missiles not spawned as directly by skills.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: Diablo 1 Mechanics in d2

Post by Cypress » Sat Jul 29, 2023 4:05 pm

Hi zjat, you can also use:
srvstfunc=28 (used by Blade Shield to apply aurastate)

srvmissile, by creating one of the state missiles under yourself, such as from Shout (psrvhitfunc=18, collidefriend=1). Make sure the missile doesn't have nextdelay, you don't want that triggering on you repeatedly or it will give you unexpected resistance to some enemy attacks.

And if you have a really crazy skill that uses srvstfunc, srvdofunc, srvmissile and srvmissilea, then you can make a volcano + moltenboulderemerge missile: the volcano will create the state missile, and moltenboulderemerge remembers missile direction so you can use that to create the srvmissile you actually want.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 120
Joined: Sat Nov 30, 2019 1:11 am

Re: Diablo 1 Mechanics in d2

Post by Nagahaku » Sat Jul 29, 2023 5:41 pm

Cypress wrote:
Sat Jul 29, 2023 4:05 pm
srvmissile, by creating one of the state missiles under yourself, such as from Shout (psrvhitfunc=18, collidefriend=1). Make sure the missile doesn't have nextdelay, you don't want that triggering on you repeatedly or it will give you unexpected resistance to some enemy attacks.
this idea is wonderful!
perhaps i can make strafe has a tohit bonus :D
Edit: failed... a srvmissile would break a rollback action. :(
Last edited by Nagahaku on Mon Jul 31, 2023 3:20 pm, edited 1 time in total.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 120
Joined: Sat Nov 30, 2019 1:11 am

Re: Diablo 1 Mechanics in d2

Post by Nagahaku » Sat Jul 29, 2023 5:43 pm

zjat wrote:
Sat Jul 29, 2023 3:32 pm
#1 doesn't allow the bow to fire anything.
Uh... maybe I had modified something else and forgot what they were... i'll modify it again from vanilla when i have some time... :(

User avatar
zjat
Junior Member
Champion of the Light
Posts: 324
Joined: Tue Jan 18, 2011 10:59 pm
United States of America

Re: Diablo 1 Mechanics in d2

Post by zjat » Wed Aug 02, 2023 2:21 pm

Cypress wrote:
Sat Jul 29, 2023 4:05 pm
Hi zjat, you can also use:
srvstfunc=28 (used by Blade Shield to apply aurastate)

srvmissile, by creating one of the state missiles under yourself, such as from Shout (psrvhitfunc=18, collidefriend=1). Make sure the missile doesn't have nextdelay, you don't want that triggering on you repeatedly or it will give you unexpected resistance to some enemy attacks.

And if you have a really crazy skill that uses srvstfunc, srvdofunc, srvmissile and srvmissilea, then you can make a volcano + moltenboulderemerge missile: the volcano will create the state missile, and moltenboulderemerge remembers missile direction so you can use that to create the srvmissile you actually want.
I would hope and plan to adjust all player and monster missiles. Primarily adding AR to spells since they normally had guaranteed hits. Though I'll likely skip ground effects like gas and fire. Will these techniques have any issues with being used on monsters, summons, bosses, etc. that you can think of?

User avatar
Cypress
Moderator
Champion of the Light
Posts: 448
Joined: Fri Dec 01, 2017 2:08 am

Re: Diablo 1 Mechanics in d2

Post by Cypress » Fri Aug 04, 2023 12:00 am

zjat wrote:
Wed Aug 02, 2023 2:21 pm
Cypress wrote:
Sat Jul 29, 2023 4:05 pm
Hi zjat, you can also use:
srvstfunc=28 (used by Blade Shield to apply aurastate)

srvmissile, by creating one of the state missiles under yourself, such as from Shout (psrvhitfunc=18, collidefriend=1). Make sure the missile doesn't have nextdelay, you don't want that triggering on you repeatedly or it will give you unexpected resistance to some enemy attacks.

And if you have a really crazy skill that uses srvstfunc, srvdofunc, srvmissile and srvmissilea, then you can make a volcano + moltenboulderemerge missile: the volcano will create the state missile, and moltenboulderemerge remembers missile direction so you can use that to create the srvmissile you actually want.
I would hope and plan to adjust all player and monster missiles. Primarily adding AR to spells since they normally had guaranteed hits. Though I'll likely skip ground effects like gas and fire. Will these techniques have any issues with being used on monsters, summons, bosses, etc. that you can think of?
None that I am aware of. I would recommend testing it first with extreme cases (like by giving the monster terrible AR and then boosting it massively with a state and seeing if it hits you more often to prove that the AR is actually being boosted), but it should work as long as the monster is gaining the state. I suppose the biggest risk would be in the "crazy skill" example

But now that I look back up, Nagahaku notes that using a srvmissile to produce a state can break the sequence, such as in the case of Strafe, which I did not consider. You can use the "crazy skill" fix for this. For example, you can add strafearrowstart to srvmissilea/cltmissilea, and strafeboltstart to srvmissileb/cltmissileb:

Code: Select all

strafearrowstart	453	1	53	15	48				3	explosion radius																															2	bounces	50	damping	10	lob							1	1			1				255	178	64	5	0	0	expansion\MoltenBoulderEmerge	1024	6	16					8	1		1		1							2					1						1				1																																													32	8			druid_bouldereremerge					statebuff			strafearrow							strafearrow				0
strafeboltstart	453	1	53	15	48				3	explosion radius																															2	bounces	50	damping	10	lob							1	1			1				255	178	64	5	0	0	expansion\MoltenBoulderEmerge	1024	6	16					8	1		1		1							2					1						1				1																																													32	8			druid_bouldereremerge					statebuff			strafebolt							strafebolt				0
statebuff	149	1		1	18																																																4	4			4				192	192	192	1	0	0	BAYellShockWave01	1024	15	16					3	1	1										1																1																																													32			barbarian_circle_1																			0
Note that it may be slightly leaky and sometimes give the buff to unintended targets, although from my limited testing it would only give the buff to the player even when standing directly on top of a Valkyrie.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 120
Joined: Sat Nov 30, 2019 1:11 am

Re: Diablo 1 Mechanics in d2

Post by Nagahaku » Fri Aug 04, 2023 4:29 am

zjat wrote:
Sat Jul 29, 2023 3:32 pm
#1 doesn't allow the bow to fire anything.
Ah, i think i remembered what i did:
i made arrows and bolts have itemtype bow & xbow aswell. perhaps that was why i got a success, since they don't have any durability as vanilla bows.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 120
Joined: Sat Nov 30, 2019 1:11 am

Re: Diablo 1 Mechanics in d2

Post by Nagahaku » Fri Aug 04, 2023 5:03 am

Cypress wrote:
Fri Aug 04, 2023 12:00 am
You can use the "crazy skill" fix for this. For example, you can add strafearrowstart to srvmissilea/cltmissilea, and strafeboltstart to srvmissileb/cltmissileb:
wonderful, this definitely saved strafe-like skills! i'm tired of 'always hit' ones... i'll surely put them into my mod :D

User avatar
zjat
Junior Member
Champion of the Light
Posts: 324
Joined: Tue Jan 18, 2011 10:59 pm
United States of America

Re: Diablo 1 Mechanics in d2

Post by zjat » Sat Aug 05, 2023 1:15 am

Nagahaku wrote:
Fri Aug 04, 2023 4:29 am
zjat wrote:
Sat Jul 29, 2023 3:32 pm
#1 doesn't allow the bow to fire anything.
Ah, i think i remembered what i did:
i made arrows and bolts have itemtype bow & xbow aswell. perhaps that was why i got a success, since they don't have any durability as vanilla bows.
Doesn't seem to solve it.

User avatar
Nagahaku
Junior Member
Paladin
Posts: 120
Joined: Sat Nov 30, 2019 1:11 am

Re: Diablo 1 Mechanics in d2

Post by Nagahaku » Sat Aug 05, 2023 3:28 am

zjat wrote:
Sat Aug 05, 2023 1:15 am
Doesn't seem to solve it.
I can't remember what i did to make it work, but maybe you can take a look at my txt, i think weapons.txt and itemtypes.txt would be enough...
excel.7z
You do not have the required permissions to view the files attached to this post.

User avatar
zjat
Junior Member
Champion of the Light
Posts: 324
Joined: Tue Jan 18, 2011 10:59 pm
United States of America

Re: Diablo 1 Mechanics in d2

Post by zjat » Sat Aug 05, 2023 5:00 am

Nagahaku wrote:
Sat Aug 05, 2023 3:28 am
zjat wrote:
Sat Aug 05, 2023 1:15 am
Doesn't seem to solve it.
I can't remember what i did to make it work, but maybe you can take a look at my txt, i think weapons.txt and itemtypes.txt would be enough...excel.7z
it appears that you are using a custom weapon type wbow which still uses bowq. I mimicked the bow quiver, the bow, the weapon bow, and the short bow entries. Nothing seems broken with vanilla functionality here, which is interesting, but doesn't seem to do anything with durability itself. no idea. *shrug*

Return to “Code Editing”