CubeMain mod codes for specific skill trees

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

Lanboost
Posts: 12
Joined: Wed Aug 26, 2020 12:05 pm
United States of America

CubeMain mod codes for specific skill trees

Post by Lanboost » Sat Aug 29, 2020 11:57 am

So I know how to create my own recipes, but I was wondering if there's a list of specific mod codes for say, something like +1 to Lightning Spells (Sorceress Only). If I wanted to do +1 to All Skills, the mod code is simply allskills, but that's not what I'm looking for. Thank you!

User avatar
HarvestWombs
Senior Moderator
Arch-Angel
Posts: 1019
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: CubeMain mod codes for specific skill trees

Post by HarvestWombs » Sat Aug 29, 2020 1:01 pm

Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

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

Re: CubeMain mod codes for specific skill trees

Post by Cypress » Sat Aug 29, 2020 1:07 pm

Cubemain mods are taken from Properties.txt, the same as are used for magic, rare, unique and set items. If you cannot immediately find the correct property, then consider looking for a unique or set or magic affix that you know gives that property.

In your case, you want skilltab (unless you want a randomized skill tab type, in which case refer to HarvestWombs's post). Min and max determine how much, and param determines which tab (with 0 being amazon bow skills, 1 being amazon passive skills, 2 being amazon javelin skills, etc).

Code: Select all

AMAZON
0 - Bow & Crossbow
1 - Passive & Magic
2 - Spear & Javelin
SORCERESS
3 - Fire
4 - Lightning
5 - Cold
NECROMANCER
6 - Curses
7 - Poison & Bone
8 - Summoning
PALADIN
9 - Combat Skills
10 - Offensive Auras
11 - Defensive Auras
BARBARIAN
12 - Combat Skills
13 - Masteries
14 - Warcries
DRUID
15 - Summoning
16 - Shapeshifting
17 - Elemental
ASSASSIN
18 - Traps
19 - Shadow Disciplines
20 - Martial Arts 
The above is derived from kb/viewarticle?a=45, but I corrected the placement of combat skills for barbarian and paladin.

Lanboost
Posts: 12
Joined: Wed Aug 26, 2020 12:05 pm
United States of America

Re: CubeMain mod codes for specific skill trees

Post by Lanboost » Sun Aug 30, 2020 7:34 am

Now that I know you can do a random skill tab, I would like to take that approach instead of creating an individual recipe for every skill tab. I took a look at the link HarvestWomb posted but am still a little unsure.

I created a new property in properties.txt called randomskilltab. I put 12 in func1, and stat1 as item_addskill_tab. However, this doesn't seem to be doing anything when I create a recipe using randomskilltab as mod1 in cubemain.txt.

Edit: Ok so the route I took was SVR's post in viewtopic.php?f=4&t=20197.
SVR wrote:
Sun Feb 08, 2004 2:54 pm
use skill-rand modifier.
The parameters are Level,min Skill #, max skill #
Level is fixed to what you enter. Skill will be random.

To get random skill tabs you can make a new properties.txt entry...

code = tab-rand
done =1
func1=12
stat1 = item_addskilltab

Then in cubemain ...

mod = tab-rand

param = skill level
min = charclass * 8 (where charclass is a number 0 - 6)
max = min + 2

This will give you +level randomtab skills (charclass only).

I don't know a way to get both level and skill random.
I have a new issue however, where the charms I craft are coming with extra mods that I do not want. I simply want the tab-rand mod and an hp mod. Is there a way to limit the amount of mods on an item?
Last edited by Lanboost on Sun Aug 30, 2020 12:34 pm, edited 1 time in total.

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

Re: CubeMain mod codes for specific skill trees

Post by Cypress » Sun Aug 30, 2020 12:30 pm

What exactly did you input for the chance/param/min/max? For the randomized function, param is the amount you get (so if you put in 3 and roll amazon bow skills, you get +3 to amazon bow skills) whereas min and max are the range of skill tabs you want to roll for (the randomized skill tab thread describes which values correspond with which tabs); this works fine if you want to roll between a single character's three tabs, but works awkwardly otherwise. Note that randomized skill tabs are inherently chance based if you run the entire list of tabs since there are gaps in the min/max range (there's a 21/51 chance of rolling a skill tab and a 30/51 chance of getting nothing).

Lanboost
Posts: 12
Joined: Wed Aug 26, 2020 12:05 pm
United States of America

Re: CubeMain mod codes for specific skill trees

Post by Lanboost » Sun Aug 30, 2020 12:35 pm

We ended up posting at the same time kinda, haha. I ended up taking SVR's approach and everything works. I have a new issue however where multiple mods are generated onto the things I craft. Is there a way to make it so my charms only come with the tab-rand mod and hp mod?

User avatar
EzechielP
Junior Member
Paladin
Posts: 118
Joined: Fri Jan 27, 2006 1:17 pm
Location: Vienna
Austria

Re: CubeMain mod codes for specific skill trees

Post by EzechielP » Sun Aug 30, 2020 4:24 pm

Lanboost wrote:
Sun Aug 30, 2020 12:35 pm
We ended up posting at the same time kinda, haha. I ended up taking SVR's approach and everything works. I have a new issue however where multiple mods are generated onto the things I craft. Is there a way to make it so my charms only come with the tab-rand mod and hp mod?
You can control the mods added to items via the "group" column in MagicSuffix.txt. Only one suffix per group number is added to an item under any condition afaik
Back from the dreaded realms of... the outside world ;)

I'll keep my old account name but just as an FYI you are more likely to find me as dEmergence nowadays across other platforms.

EzechielP a.k.a dEmergence
--------
My first attempt at a mod back in the day... good times: FAITH-Mod Discussion

Lanboost
Posts: 12
Joined: Wed Aug 26, 2020 12:05 pm
United States of America

Re: CubeMain mod codes for specific skill trees

Post by Lanboost » Sun Aug 30, 2020 5:53 pm

EzechielP wrote:
Sun Aug 30, 2020 4:24 pm
Lanboost wrote:
Sun Aug 30, 2020 12:35 pm
We ended up posting at the same time kinda, haha. I ended up taking SVR's approach and everything works. I have a new issue however where multiple mods are generated onto the things I craft. Is there a way to make it so my charms only come with the tab-rand mod and hp mod?
You can control the mods added to items via the "group" column in MagicSuffix.txt. Only one suffix per group number is added to an item under any condition afaik
When I make my charms using the tab-rand and hp mod, I get both of those mods, and usually always an extra random mod like attack rating or poison damage, or even MORE life. Sometimes I'll even have another random mod, for a total of 4 mods on my charm. Strange considering the recipe I made in cubemain only has the 2 mods, tab-rand and hp.

I took a look at MagicSuffix.txt but I'm not quite sure what to do here exactly. I searched for the "of Vita" 41-45 life property, and changed the group number from 4 to 2, and then 1, and both routes seemingly did nothing.

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

Re: CubeMain mod codes for specific skill trees

Post by Cypress » Sun Aug 30, 2020 7:11 pm

If you want the charm to only have tab-rand and hp, then generate it as a quality that does not roll additional affixes. Since charms do not natively support normal item type, you could use tempered (tmp) which also does not roll affixes.

Lanboost
Posts: 12
Joined: Wed Aug 26, 2020 12:05 pm
United States of America

Re: CubeMain mod codes for specific skill trees

Post by Lanboost » Mon Aug 31, 2020 11:44 am

Thank you so much, seriously. One last thing. For these tempered items, is there a way to set a character level restriction on them? I would like it so you would have to be a certain level to gain benefits or wield these tempered items.

Edit: Just realized there's a levelreq property. Thank you so much everybody.

Return to “General Mod Making”