Cube recipe for magic item with exact stats

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
Twizz
Posts: 5
Joined: Fri Jan 07, 2022 5:21 pm
Mongolia

Cube recipe for magic item with exact stats

Post by Twizz » Thu Jun 20, 2024 11:46 am

Hello, im trying to make cube recipe that rerolls skiller grand charms into other skiller grand charm, is it possible to make it work? I can't find a way to make the recipe check for required suffix.

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

Re: Cube recipe for magic item with exact stats

Post by Cypress » Thu Jun 20, 2024 11:51 am

Twizz, if you are modding 1.10f and don't mind using plugins, you can use cubemainops to find the stat and parameter. Otherwise, you'd have to use an invisible stat that corresponds to the suffix, for example maybe if the stat value is equal to:
1, then it's an amazon bow skiller
2, then it's an amazon magic/passive skiller
3, then it's an amazon spear/javelin skiller
4, then it's a sorceress fire skiller
etc

And if you get a successful match, you'd generate a magic charm of the same ilvl with the same skiller suffix.

Twizz
Posts: 5
Joined: Fri Jan 07, 2022 5:21 pm
Mongolia

Re: Cube recipe for magic item with exact stats

Post by Twizz » Thu Jun 20, 2024 12:57 pm

Sorry, but could you give an example? Im not sure what you mean by invisible stat :-|

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

Re: Cube recipe for magic item with exact stats

Post by Cypress » Thu Jun 20, 2024 11:53 pm

Actually, could you describe your desired recipe inputs and outputs? Would be easier if I know exactly what you are trying to achieve.

But as an example, Grand Charms don't spawn with Energy. So if you made it so the skiller charm affix also gives +1 Energy, then you'd know that every Grand Charm that has Energy is a skiller. This convoluted identification system is necessary, as the game cannot identify the +skilltab stats, but can identify the +energy stat. I suggest an invisible stat (that is, a new stat made in itemstatcost.txt with no display string, hence invisible), since you probably want to pretend the identifying stat does not exist, as it's only purpose is to tell the game whether your charm is a skiller or not.

Twizz
Posts: 5
Joined: Fri Jan 07, 2022 5:21 pm
Mongolia

Re: Cube recipe for magic item with exact stats

Post by Twizz » Sat Jun 22, 2024 11:58 am

The recipe im trying to make is like Sorc Skiller GC + key -> Other Sorc Skiller GC. For example If you cube Harpoonist's Grand Charm of Vita with 37life and key, it turns it into Fletcher's Grand Charm of Vita with 37life etc etc. Output charm being random class skilltab is also fine.
Cypress wrote:
Thu Jun 20, 2024 11:53 pm
But as an example, Grand Charms don't spawn with Energy. So if you made it so the skiller charm affix also gives +1 Energy, then you'd know that every Grand Charm that has Energy is a skiller. This convoluted identification system is necessary, as the game cannot identify the +skilltab stats, but can identify the +energy stat. I suggest an invisible stat (that is, a new stat made in itemstatcost.txt with no display string, hence invisible), since you probably want to pretend the identifying stat does not exist, as it's only purpose is to tell the game whether your charm is a skiller or not.
So does this mean i have to edit all skiller prefixes to have invisible +1 energy?

Twizz
Posts: 5
Joined: Fri Jan 07, 2022 5:21 pm
Mongolia

Re: Cube recipe for magic item with exact stats

Post by Twizz » Sat Jun 22, 2024 12:02 pm

The recipe im trying to make is like Sorc Skiller GC + key -> Other Sorc Skiller GC. For example If you cube Harpoonist's Grand Charm of Vita with 37life and key, it turns it into Fletcher's Grand Charm of Vita with 37life, and cubing Fletcher's charm makes Acrobat's GC etc etc. Output charm being random class skilltab is also fine.
Cypress wrote:
Thu Jun 20, 2024 11:53 pm
But as an example, Grand Charms don't spawn with Energy. So if you made it so the skiller charm affix also gives +1 Energy, then you'd know that every Grand Charm that has Energy is a skiller. This convoluted identification system is necessary, as the game cannot identify the +skilltab stats, but can identify the +energy stat. I suggest an invisible stat (that is, a new stat made in itemstatcost.txt with no display string, hence invisible), since you probably want to pretend the identifying stat does not exist, as it's only purpose is to tell the game whether your charm is a skiller or not.
So does this mean i have to edit all skiller prefixes to have invisible +1 energy? (Oops replied twice)

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

Re: Cube recipe for magic item with exact stats

Post by Cypress » Sat Jun 22, 2024 5:23 pm

Twizz, in that case, you would want a different value for each charm. To make it easier, start by using Energy, we can change it to another stat later.

We need a way to apply our identifying stat to items, and we don't want to use a property that already exists, this way we can change the property's stat later easily if we want to. Start with properties.txt. Find the "enr" row, for energy. Copy it and paste it to the end of the file and rename it to "identify". Here's what I put at the end of properties.txt:

Code: Select all

identify	1			1	energy																													none	0
Our skiller prefixes are in magicprefix.txt. Find them and add the identify stat to each, starting from 1 and incrementing by 1 per skiller, that way we can associate each suffix with a specific energy value. This is what results:

Code: Select all

Fletcher's		100	1		50		42	ama			1	125	skilltab	0	1	1	identify		1	1							lcha														0
Acrobat's		100	1		50		42	ama			1	125	skilltab	1	1	1	identify		2	2							lcha														0
Harpoonist's		100	1		50		42	ama			1	125	skilltab	2	1	1	identify		3	3							lcha														0

Burning		100	1	1	50		42	sor			1	125	skilltab	3	1	1	identify		4	4							lcha														0
Sparking		100	1	1	50		42	sor			1	125	skilltab	4	1	1	identify		5	5							lcha														0
Chilling		100	1	1	50		42	sor			1	125	skilltab	5	1	1	identify		6	6							lcha														0

Hexing		100	1	1	50		42	nec			1	125	skilltab	6	1	1	identify		7	7							lcha														0
Fungal		100	1	1	50		42	nec			1	125	skilltab	7	1	1	identify		8	8							lcha														0
Graverobber's		100	1	1	50		42	nec			1	125	skilltab	8	1	1	identify		9	9							lcha														0

Lion Branded		100	1	1	50		42	pal			1	125	skilltab	9	1	1	identify		10	10							lcha														0
Captain's		100	1	1	50		42	pal			1	125	skilltab	10	1	1	identify		11	11							lcha														0
Preserver's		100	1	1	50		42	pal			1	125	skilltab	11	1	1	identify		12	12							lcha														0

Expert's		100	1	1	50		42	bar			1	125	skilltab	12	1	1	identify		13	13							lcha														0
Fanatic		100	1	1	50		42	bar			1	125	skilltab	13	1	1	identify		14	14							lcha														0
Sounding		100	1	1	50		42	bar			1	125	skilltab	14	1	1	identify		15	15							lcha														0

Trainer's		100	1	1	50		42	dru			1	125	skilltab	15	1	1	identify		16	16							lcha														0
Spiritual		100	1	1	50		42	dru			1	125	skilltab	16	1	1	identify		17	17							lcha														0
Nature's		100	1	1	50		42	dru			1	125	skilltab	17	1	1	identify		18	18							lcha														0

Entrapping		100	1	1	50		42	ass			1	125	skilltab	18	1	1	identify		19	19							lcha														0
Mentalist's		100	1	1	50		42	ass			1	125	skilltab	19	1	1	identify		20	20							lcha														0
Shogukusha's		100	1	1	50		42	ass			1	125	skilltab	20	1	1	identify		21	21							lcha														0

Now we need to make cube recipes in cubemain.txt that read the identify value and transform to the next skiller. We'll need 21 recipes, one for each of the 21 tabs.

OP COLUMN is set to 18 since this tells the game to only use the recipe if the item has that same value of stat.
PARAM COLUMN reads stats from itemstatcost.txt, matching param value with itemstatcost ID, so if we put in 0 we get strength, 1 is energy, 2 is dexterity, 3 is vitality, 4 is statpts, etc. We use param=1 since we are using energy.
VALUE COLUMN determines the value to use for the parameter, since we have it so energy 1 = amazon bow, energy 2 = amazon magic, energy 3 = amazon javelin, etc, we'll want to apply it accordingly. The rest is simple number crunching and matching so that the energy and skiller bonuses stay synchronized.

Code: Select all

ama0->1	1			100	18	1	1		2	lcha,mag	key						useitem			100	skilltab		0	-1	-1	skilltab		1	1	1	identify			1	1											key,qty=1																																																										0
ama1->2	1			100	18	1	2		2	lcha,mag	key						useitem			100	skilltab		1	-1	-1	skilltab		2	1	1	identify			1	1											key,qty=1																																																										0
ama2->0	1			100	18	1	3		2	lcha,mag	key						useitem			100	skilltab		2	-1	-1	skilltab		0	1	1	identify			-2	-2											key,qty=1																																																										0
sor0->1	1			100	18	1	4		2	lcha,mag	key						useitem			100	skilltab		3	-1	-1	skilltab		4	1	1	identify			1	1											key,qty=1																																																										0
sor1->2	1			100	18	1	5		2	lcha,mag	key						useitem			100	skilltab		4	-1	-1	skilltab		5	1	1	identify			1	1											key,qty=1																																																										0
sor2->0	1			100	18	1	6		2	lcha,mag	key						useitem			100	skilltab		5	-1	-1	skilltab		3	1	1	identify			-2	-2											key,qty=1																																																										0
nec0->1	1			100	18	1	7		2	lcha,mag	key						useitem			100	skilltab		6	-1	-1	skilltab		7	1	1	identify			1	1											key,qty=1																																																										0
nec1->2	1			100	18	1	8		2	lcha,mag	key						useitem			100	skilltab		7	-1	-1	skilltab		8	1	1	identify			1	1											key,qty=1																																																										0
nec2->0	1			100	18	1	9		2	lcha,mag	key						useitem			100	skilltab		8	-1	-1	skilltab		6	1	1	identify			-2	-2											key,qty=1																																																										0
pal0->1	1			100	18	1	10		2	lcha,mag	key						useitem			100	skilltab		9	-1	-1	skilltab		10	1	1	identify			1	1											key,qty=1																																																										0
pal1->2	1			100	18	1	11		2	lcha,mag	key						useitem			100	skilltab		10	-1	-1	skilltab		11	1	1	identify			1	1											key,qty=1																																																										0
pal2->0	1			100	18	1	12		2	lcha,mag	key						useitem			100	skilltab		11	-1	-1	skilltab		9	1	1	identify			-2	-2											key,qty=1																																																										0
bar0->1	1			100	18	1	13		2	lcha,mag	key						useitem			100	skilltab		12	-1	-1	skilltab		13	1	1	identify			1	1											key,qty=1																																																										0
bar1->2	1			100	18	1	14		2	lcha,mag	key						useitem			100	skilltab		13	-1	-1	skilltab		14	1	1	identify			1	1											key,qty=1																																																										0
bar2->0	1			100	18	1	15		2	lcha,mag	key						useitem			100	skilltab		14	-1	-1	skilltab		12	1	1	identify			-2	-2											key,qty=1																																																										0
dru0->1	1			100	18	1	16		2	lcha,mag	key						useitem			100	skilltab		15	-1	-1	skilltab		16	1	1	identify			1	1											key,qty=1																																																										0
dru1->2	1			100	18	1	17		2	lcha,mag	key						useitem			100	skilltab		16	-1	-1	skilltab		17	1	1	identify			1	1											key,qty=1																																																										0
dru2->0	1			100	18	1	18		2	lcha,mag	key						useitem			100	skilltab		17	-1	-1	skilltab		15	1	1	identify			-2	-2											key,qty=1																																																										0
asn0->1	1			100	18	1	19		2	lcha,mag	key						useitem			100	skilltab		18	-1	-1	skilltab		19	1	1	identify			1	1											key,qty=1																																																										0
asn1->2	1			100	18	1	20		2	lcha,mag	key						useitem			100	skilltab		19	-1	-1	skilltab		20	1	1	identify			1	1											key,qty=1																																																										0
asn2->0	1			100	18	1	21		2	lcha,mag	key						useitem			100	skilltab		20	-1	-1	skilltab		18	1	1	identify			-2	-2											key,qty=1																																																										0

Post Reply

Return to “General Mod Making”