Edit drop rate of a specific unique.

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
arkolyno
Posts: 4
Joined: Fri Jan 22, 2021 10:23 pm
Romania

Edit drop rate of a specific unique.

Post by arkolyno » Sun Jan 24, 2021 7:38 pm

Hello there!

I was reading today and learned from here ''viewtopic.php?f=4&t=40224'' how to make a simple drop mod.

But I need to learn how to edit only specific items drop rates. Let's say I only want to increase Tyrael's drop rate. Not changing it's TC or what monsters can drop it or from what areas. Only to increase it's odds of dropping. I imagine that I have to edit it's base type drop (sacred armour) as well. Does anyone have a link to a more comprehensive tutorial ?
Thx!

Devangell
Posts: 64
Joined: Thu Jul 30, 2020 10:06 am
Belgium

Re: Edit drop rate of a specific unique.

Post by Devangell » Sun Jan 24, 2021 10:18 pm

Hello

I don't think you can make a specific unique item have a higher drop rate without changing the TC's.
As the guides say in the Knowledge Base, the rarity-column in armor.txt sets the droprate for armors to drop from a rack. In uniqueitems.txt, the rarity-column is checked in game when there are 2 or more unique types of the same armor. If you'd set Tyrael to 80 and Templar to 5 (both unique Sacred Armors) the chance to drop would 95% and 5% respectively.
I did a quick test by editing the rarity in both armor.txt and uniqueitem.txt and it didn't change anything.
I might be wrong but it seems you should edit the TC's in order to make that item drop early in game.

Grtz

User avatar
Cypress
Junior Member
Paladin
Posts: 137
Joined: Fri Dec 01, 2017 2:08 am

Re: Edit drop rate of a specific unique.

Post by Cypress » Mon Jan 25, 2021 3:34 am

The only way I can think of doing that is cloning the base item and unique item, and only modifying the "code" column to match the two together. Clone once, and the drop rate is 2x. Clone twice, 3x. It's horribly inefficient, but if you are only interested in making a drop mod then using up a ton of armor.txt/uniqueitems.txt space shouldn't matter.

Also, this awkward solution will pose issues with cubemain.txt, if cubemain.txt references a specific item code. If that is the case, then you'll want to create an itemtype that references the original and all the clones. You can do this by going into armor.txt and finding the "type2" column, making a new itemtype in itemtypes.txt, then adding that itemtype to every single instance's type2. Then in cubemain.txt, you would want to change any item references to reference this new combined itemtype, which includes all Sacred Armors.

Also, I believe armor/weapon racks have a 511 selection limit, which if exceeded causes crashes when taking from a rack. I'm not sure if setting rarity=0 for the clones will prevent them from counting towards this limit.

arkolyno
Posts: 4
Joined: Fri Jan 22, 2021 10:23 pm
Romania

Re: Edit drop rate of a specific unique.

Post by arkolyno » Tue Jan 26, 2021 3:03 am

Well, for convenience and efficiency I edited hell Pindleskin's drop table to remove his junk and other TC and only kept those that include the armour 87 . Then I forced him to drop only uniques. Every time I kill him he drops as expected, crown of ages , griffons ,sacred armour and other two or three items in tc87.
After ID'ing about 30 sacred armours , I gave up. All of them Templar might . No tyrael.
It's true, I didn't edit the rarity in unique items.txt . Are those values for rarity expressed as percentages cumulated between all possible item outcomes for that particular item type (ie sacred armour) in that particular TC (87)?
Meaning if I set templars to 60 ,I have to set tyraels to 40? 40 percent from all sacred armours that drop would be tyraels?

Devangell
Posts: 64
Joined: Thu Jul 30, 2020 10:06 am
Belgium

Re: Edit drop rate of a specific unique.

Post by Devangell » Tue Jan 26, 2021 6:24 pm

The rarity in uniqueitems.txt is calculated as following: rarity/total_rarity (for same itemcodes)
So in your example Tyrael would have indeed 40% chance to drop. (40/100)

BUT

Code: Select all

index	version	enabled	ladder	rarity	nolimit	lvl	lvl req	code	*type	*uber	carry1	cost mult	cost add	chrtransform	invtransform	flippyfile	invfile	dropsound	dropsfxframe	usesound	prop1	par1	min1	max1	prop2	par2	min2	max2	prop3	par3	min3	max3	prop4	par4	min4	max4	prop5	par5	min5	max5	prop6	par6	min6	max6	prop7	par7	min7	max7	prop8	par8	min8	max8	prop9	par9	min9	max9	prop10	par10	min10	max10	prop11	par11	min11	max11	prop12	par12	min12	max12	*eol
Templar's Might	100	1		8		82	74	uar	sacred armor			5	5000	cgrn	cgrn		invaaru				ac%		170	220	balance2		20	20	ac-miss		250	300	stam		40	50	str		10	15	vit		10	15	skilltab	10	1	2																					0
Tyrael's Might	100	1	1	1		87	84	uar	sacred armor	1		5	5000	dblu	dblu		invaaru				ease		-100	-100	indestruct		1	1	ac%		120	150	rip		1	1	dmg-demon		50	100	nofreeze		1	1	move2		20	20	res-all		20	30	str		20	30													0
Tyrael has the ladder-column checked as 1, making it impossible to drop in SP. Remove it, perhaps change the rarity as well, and kill Pindleskin a few times and you'll get it eventually.

Hope this'll help you a bit further

Grtz

arkolyno
Posts: 4
Joined: Fri Jan 22, 2021 10:23 pm
Romania

Re: Edit drop rate of a specific unique.

Post by arkolyno » Wed Jan 27, 2021 4:11 pm

It does, thx a lot . I'm using SP plugy where ladder content is enabled. Thx again.

Post Reply

Return to “General Mod Making”