That would kind of be a mess, I think
As you said, you'd have to make changes to skills.inc, though those look like they'd mostly be pretty straightforward changes (just add 'primary4' and 'secondary4' to the checks for skillcap and LoadSpecialization.)
Gumps are pretty confusing to start with, but they're usually pretty straightforward once you get used to them. The few sections of the spec.src that you'd need to change:
- Code: Select all
function LoadGumpLayout (character)
gumplayout := array {
"nodispose",
"page 0",
"gumppic 0 50 500",
"page 1",
"gumppic 0 50 500",
"button 356 50 502 502 0 2",
"text 50 60 1350 0",
"text 55 90 0 1",
"button 40 95 2104 2103 1 0 1",
"text 55 120 0 2",
"button 40 125 2104 2103 1 0 2",
"text 55 150 0 3",
"button 40 155 2104 2103 1 0 3",
"text 55 180 0 4",
"button 40 185 2104 2103 1 0 4",
"text 235 60 1350 5",
"text 245 90 0 6",
"button 230 95 2104 2103 1 0 5",
"text 245 120 0 7",
"button 230 125 2104 2103 1 0 6",
"text 245 150 0 8",
"button 230 155 2104 2103 1 0 7",
"text 245 180 0 9",
"button 230 185 2104 2103 1 0 8",
"text 35 215 0 10",
"text 35 235 0 11",
"button 250 235 2360 2360 1 0 9", //save changes
"text 270 230 37 14",
"page 2",
"gumppic 0 50 500",
"button 0 50 501 501 0 1",
"text 70 60 1350 12",
"text 55 100 0 13",
"button 40 105 2104 2103 1 0 9"
};
gumpdata := array {
"Primary Skills",
GetSkillName(specs[1])+" " + GetSkillValDisplay (character, specs[1]),
GetSkillName(specs[2])+" " + GetSkillValDisplay (character, specs[2]),
GetSkillName(specs[3])+" " + GetSkillValDisplay (character, specs[3]),
GetSkillName(specs[4])+" " + GetSkillValDisplay (character, specs[4]),
"Secondary Skills",
GetSkillName(specs[5])+" " + GetSkillValDisplay (character, specs[5]),
GetSkillName(specs[6])+" " + GetSkillValDisplay (character, specs[6]),
GetSkillName(specs[7])+" " + GetSkillValDisplay (character, specs[7]),
GetSkillName(specs[8])+" " + GetSkillValDisplay (character, specs[8]),
"STR/DEX/INT Caps:",
maxstr + " / " + maxdex + " / " + maxint,
"Trade skill",
GetSkillName(specs[9])+" "+ GetSkillValDisplay(character, specs[9]),
"",
"Save Changes"
};
endfunction
Then in the ListSkills function:
- Code: Select all
--- stuff ---
elseif (gump_return == 9) //Save the changes to skills
var nochanges := 1;
for i := 1 to 9
if (!specs[i] and specs[i] != 0)
SendSysMessage (character, "You must select all specializations before saving.");
return 0;
elseif (specs[i] != originalspecs[i])
nochanges := 0;
endif
endfor
if (nochanges)
SendSysMessage (character, "You haven't made any changes!");
return 0;
endif
SetObjProperty (character, "primary1", specs[1]);
SetObjProperty (character, "primary2", specs[2]);
SetObjProperty (character, "primary3", specs[3]);
SetObjProperty (character, "primary4", specs[4]);
SetObjProperty (character, "secondary1", specs[5]);
SetObjProperty (character, "secondary2", specs[6]);
SetObjProperty (character, "secondary3", specs[7]);
SetObjProperty (character, "secondary4", specs[8]);
SetObjProperty (character, "tradeskill", specs[9]);
SetMaxStats (character, 1);
SendSysMessage (character, "Changes saved!");
return 1;
else //specialize in a skill
var SkillNum := PickASkill (character);
if (SkillNum or SkillNum == 0)
var skillname := GetSkillName (skillnum);
if (gump_return == 9)
if (!IsTradeSkill (skillnum))
SendSysMessage (character, "That is not a tradeskill!");
return 0;
endif
endif
for i := 1 to 9
if (specs[i] == SkillNum)
SendSysMessage (character, "You're already specialized in that!");
return 0;
endif
endfor
specs [gump_return] := skillnum;
SetMaxStats (character, 0);
SendSysMessage (character, "You specialize in " + skillname);
return 0;
else
SendSysMessage (character, "Canceled");
return 1;
endif
endif
endfunction
I'm sure you'd want to change how the maximum stats are calculated, but that's up to you how you want to do it.