RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Updated 27/12/2003] Tools for adding new skills

omegared

Wanderer
You must run it from command line in the form:
[code:1]uo_loader <number of skills>[/code:1]
or create a shortcut and put above in the "target element" property of it.
For example, [code:1]uo_loader 58[/code:1]
Although if you run it with >52 skills and don't provide skills.mul with the names for them, the client will probably crash.
 

Ravenal

Knight
so if i want to add a new skill which right now there are exactly 52 skills???

So if i want to add a skill i need to first of all, go like 53 or something?
 

Ravenal

Knight
Okay what does this thing do?

[code:1]
// (c) 2003 Omega Red - [email protected]

#include <stdlib.h>
#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
typedef DWORD (__stdcall *tUOG_Client_Launch)(DWORD client_type);
tUOG_Client_Launch UOG_Client_Launch;
typedef DWORD (__stdcall *tUOG_Client_Resume)(void);
tUOG_Client_Resume UOG_Client_Resume;
typedef DWORD (__stdcall *tUOG_Client_Patch_Inject)(DWORD pid, char *DllPath, char *FunctionName, void *ParamsPtr, DWORD ParamsSize);
tUOG_Client_Patch_Inject UOG_Client_Patch_Inject;
typedef DWORD (__stdcall *tUOG_Client_Patch)(void);
tUOG_Client_Patch UOG_Client_Patch;

struct
{
DWORD pid;
byte max_skills;
} params;

params.max_skills = atoi(lpCmdLine);
if (params.max_skills > 52)
{
MessageBox(0, "Usage: uo_loader <max_skills>\n\nmax_skills must be in range 52-255", "UoLoader error", MB_ICONSTOP);
return -1;
}

HMODULE hUOG = LoadLibrary("uog.dll");
if (!hUOG)
{
MessageBox(0, "Failed to load uog.dll!", "UoLoader error", MB_ICONSTOP);
return -1;
}

UOG_Client_Launch = (tUOG_Client_Launch)GetProcAddress(hUOG, "UOG_Client_Launch");
UOG_Client_Resume = (tUOG_Client_Resume)GetProcAddress(hUOG, "UOG_Client_Resume");
UOG_Client_Patch_Inject = (tUOG_Client_Patch_Inject)GetProcAddress(hUOG, "UOG_Client_Patch_Inject");
UOG_Client_Patch = (tUOG_Client_Patch)GetProcAddress(hUOG, "UOG_Client_Patch");

params.pid = UOG_Client_Launch(0);

UOG_Client_Patch_Inject(params.pid, "UoPatch.dll", "_PatchClient@8", &params, sizeof(params));
UOG_Client_Patch();
UOG_Client_Resume();
}
[/code:1]
 

Ravenal

Knight
okay i did this....


Is this right?
[code:1]
params.max_skills = atoi(lpCmdLine);
if (params.max_skills < 53)
{
MessageBox(0, "Usage: uo_loader <max_skills>\n\nmax_skills must be in range 52-255", "UoLoader error", MB_ICONSTOP);
return -1;
}

HMODULE hUOG = LoadLibrary("uog.dll");
if (!hUOG)
{
MessageBox(0, "Failed to load uog.dll!", "UoLoader error", MB_ICONSTOP);
return -1;
}
[/code:1]

If not then what do i need...

I have my own txt whatever...

[code:1]
uo_loader <max_skills>
0 Shadowknight
[/code:1]
 

Ravenal

Knight
For somereason i am not sure what i am doing right or wrong, is there a step by step kinda feature for this, cuz * I hate it when i cannot figure shit out* I mean... I can't even get UOArch up and runnning, i am a guy who needs to be shown before i learn.... So anything for step by step I"ll learn better, thats how i learned alot from just looking at old scripts and stuff...
 

omegared

Wanderer
1. Unpack the archive
2. Edit the file uoskills.txt - ie add new skills at the bottom
3. Run: "SkillsMul.exe uoskills.txt" in the command prompt
4. Copy newly created skills.idx and skills.mul to uo directory
5. To launch the client, run "uo_loader xx" in the comand line, where xx is the TOTAL number of skills (lines in uoskills.txt)

NOTE 1: Only 2d clients of version 4xx are supported.
NOTE 2: The loader disables default client's skill window - you have to provide server-side script/gump for the purpose of skill management.
NOTE 3: The loader only causes that client displays new skill names in gain messages. Without loader the messages will be like "Your skill in has increased by 1.6%. It is now 1.6%." - without actual skill name. If you don't care about the messages - than don't use the loader ;)
 

FOOLVER

Wanderer
omegared said:
At the moment it works like this:
In AOS.Configure() (first of all Configure()'s) I've added:
[code:1]
for (int i=0; i<SkillInfo.Table.Length; i++)
NewSkillInfo.Table = SkillInfo.Table;

NewSkillInfo.Table[52] = new SkillInfo (52, "TestSkill", 1, 1, 1, "Tester", null, 0, 0, 1, 1.0);

for (int i=0; i<NewSkillInfo.Table.Length; i++)
Console.WriteLine("Skill registry: added {0}", NewSkillInfo.Table.Name);
[/code:1]

NewSkillInfo is derived from SkillInfo with larger skills table.

And in PlayerMobile constructors:
[code:1]
Skills skills = new Skills(this);
NewSkills[0] = new Skill(skills, NewSkillInfo.Table[52], 0, 1000, SkillLock.Up);
[/code:1]

Now I'm thinking how to merge my NewSkills and Skills, but hint for this is in repliy to my post in Script Support :)



with this method i get a lots of compilation's errors with beta36 :(
 

Ravenal

Knight
omegared said:
1. Unpack the archive
2. Edit the file uoskills.txt - ie add new skills at the bottom
3. Run: "SkillsMul.exe uoskills.txt" in the command prompt
4. Copy newly created skills.idx and skills.mul to uo directory
5. To launch the client, run "uo_loader xx" in the comand line, where xx is the TOTAL number of skills (lines in uoskills.txt)

NOTE 1: Only 2d clients of version 4xx are supported.
NOTE 2: The loader disables default client's skill window - you have to provide server-side script/gump for the purpose of skill management.
NOTE 3: The loader only causes that client displays new skill names in gain messages. Without loader the messages will be like "Your skill in has increased by 1.6%. It is now 1.6%." - without actual skill name. If you don't care about the messages - than don't use the loader ;)

Thanks a bunch this will not only help me but proably others like me that don't follow well :) thanks alot, now i am off to try your steps :) *copies and adds to notes*
 

Ravenal

Knight
Is this the Command Line???

[code:1]
params.max_skills = atoi(lpCmdLine);
[/code:1]

Do i do this???

[code:1]
params.max_skills = 53;
[/code:1]
?
 

Ravenal

Knight
[code:1]
id start size use unkn name
-------------------------------------------------
0000: 0000 [0009]: [ ] [ 0] Alchemy
0001: 0009 [0009]: [*] [ 0] Anatomy
0002: 0012 [000d]: [*] [ 0] Animal lore
0003: 001f [000f]: [*] [ 0] Item Identify
0004: 002e [000b]: [*] [ 0] Arms lore
0005: 0039 [000a]: [ ] [ 0] Parrying
0006: 0043 [0009]: [ ] [ 0] Begging
0007: 004c [000f]: [ ] [ 0] Blacksmithing
0008: 005b [000a]: [ ] [ 0] Bowcraft
0009: 0065 [000d]: [*] [ 0] Peacemaking
0010: 0072 [0009]: [ ] [ 0] Camping
0011: 007b [000b]: [ ] [ 0] Carpentry
0012: 0086 [000d]: [ ] [ 0] Cartography
0013: 0093 [0009]: [ ] [ 0] Cooking
0014: 009c [0012]: [*] [ 0] Detecting Hidden
0015: 00ae [000d]: [*] [ 0] Discordance
0016: 00bb [0017]: [*] [ 0] Evaluate intelligence
0017: 00d2 [0009]: [ ] [ 0] Healing
0018: 00db [0009]: [ ] [ 0] Fishing
0019: 00e4 [0015]: [ ] [ 0] Forensic Evaluation
0020: 00f9 [0009]: [ ] [ 0] Herding
0021: 0102 [0008]: [*] [ 0] Hiding
0022: 010a [000d]: [*] [ 0] Provocation
0023: 0117 [000d]: [*] [ 0] Inscription
0024: 0124 [000d]: [ ] [ 0] Lockpicking
0025: 0131 [0008]: [ ] [ 0] Magery
0026: 0139 [0012]: [ ] [ 0] Magic Resistance
0027: 014b [0009]: [ ] [ 0] Tactics
0028: 0154 [000a]: [ ] [ 0] Snooping
0029: 015e [000e]: [ ] [ 0] Musicianship
0030: 016c [000b]: [*] [ 0] Poisoning
0031: 0177 [0009]: [ ] [ 0] Archery
0032: 0180 [0011]: [*] [ 0] Spirit Speaking
0033: 0191 [000a]: [*] [ 0] Stealing
0034: 019b [000b]: [ ] [ 0] Tailoring
0035: 01a6 [000f]: [*] [ 0] Animal Taming
0036: 01b5 [0016]: [ ] [ 0] Taste Identification
0037: 01cb [000b]: [ ] [ 0] Tinkering
0038: 01d6 [000a]: [*] [ 0] Tracking
0039: 01e0 [000c]: [ ] [ 0] Veterinary
0040: 01ec [000f]: [ ] [ 0] Swordsmanship
0041: 01fb [000e]: [ ] [ 0] Macefighting
0042: 0209 [0009]: [ ] [ 0] Fencing
0043: 0212 [000b]: [ ] [ 0] Wrestling
0044: 021d [000f]: [ ] [ 0] Lumberjacking
0045: 022c [0008]: [ ] [ 0] Mining
0046: 0234 [000c]: [*] [ 0] Meditation
0047: 0240 [0009]: [*] [ 0] Stealth
0048: 0249 [000e]: [ ] [ 0] Remove Traps
0049: 0257 [000c]: [ ] [ 0] Necromancy
0050: 0263 [0007]: [ ] [ 0] Focus
0051: 026a [000a]: [ ] [ 0] Chivalry
0052: 0274 [000b]: [ ] [ 0] TestSkill
[/code:1]

I get something much different... Odd thing is i cannot see it because it scrolls down really fast and then disappears. why is it doing that... :?
 

Ravenal

Knight
:p so is the umm thing spose to show when i run skillsmul??? [code:1]
id start size use unkn name
-------------------------------------------------
0000: 0000 [0009]: [ ] [ 0] Alchemy
0001: 0009 [0009]: [*] [ 0] Anatomy
0002: 0012 [000d]: [*] [ 0] Animal lore
0003: 001f [000f]: [*] [ 0] Item Identify
0004: 002e [000b]: [*] [ 0] Arms lore
0005: 0039 [000a]: [ ] [ 0] Parrying
0006: 0043 [0009]: [ ] [ 0] Begging
0007: 004c [000f]: [ ] [ 0] Blacksmithing
0008: 005b [000a]: [ ] [ 0] Bowcraft
0009: 0065 [000d]: [*] [ 0] Peacemaking
0010: 0072 [0009]: [ ] [ 0] Camping
0011: 007b [000b]: [ ] [ 0] Carpentry
0012: 0086 [000d]: [ ] [ 0] Cartography
0013: 0093 [0009]: [ ] [ 0] Cooking
0014: 009c [0012]: [*] [ 0] Detecting Hidden
0015: 00ae [000d]: [*] [ 0] Discordance
0016: 00bb [0017]: [*] [ 0] Evaluate intelligence
0017: 00d2 [0009]: [ ] [ 0] Healing
0018: 00db [0009]: [ ] [ 0] Fishing
0019: 00e4 [0015]: [ ] [ 0] Forensic Evaluation
0020: 00f9 [0009]: [ ] [ 0] Herding
0021: 0102 [0008]: [*] [ 0] Hiding
0022: 010a [000d]: [*] [ 0] Provocation
0023: 0117 [000d]: [*] [ 0] Inscription
0024: 0124 [000d]: [ ] [ 0] Lockpicking
0025: 0131 [0008]: [ ] [ 0] Magery
0026: 0139 [0012]: [ ] [ 0] Magic Resistance
0027: 014b [0009]: [ ] [ 0] Tactics
0028: 0154 [000a]: [ ] [ 0] Snooping
0029: 015e [000e]: [ ] [ 0] Musicianship
0030: 016c [000b]: [*] [ 0] Poisoning
0031: 0177 [0009]: [ ] [ 0] Archery
0032: 0180 [0011]: [*] [ 0] Spirit Speaking
0033: 0191 [000a]: [*] [ 0] Stealing
0034: 019b [000b]: [ ] [ 0] Tailoring
0035: 01a6 [000f]: [*] [ 0] Animal Taming
0036: 01b5 [0016]: [ ] [ 0] Taste Identification
0037: 01cb [000b]: [ ] [ 0] Tinkering
0038: 01d6 [000a]: [*] [ 0] Tracking
0039: 01e0 [000c]: [ ] [ 0] Veterinary
0040: 01ec [000f]: [ ] [ 0] Swordsmanship
0041: 01fb [000e]: [ ] [ 0] Macefighting
0042: 0209 [0009]: [ ] [ 0] Fencing
0043: 0212 [000b]: [ ] [ 0] Wrestling
0044: 021d [000f]: [ ] [ 0] Lumberjacking
0045: 022c [0008]: [ ] [ 0] Mining
0046: 0234 [000c]: [*] [ 0] Meditation
0047: 0240 [0009]: [*] [ 0] Stealth
0048: 0249 [000e]: [ ] [ 0] Remove Traps
0049: 0257 [000c]: [ ] [ 0] Necromancy
0050: 0263 [0007]: [ ] [ 0] Focus
0051: 026a [000a]: [ ] [ 0] Chivalry
0052: 0274 [000b]: [ ] [ 0] TestSkill

[/code:1]

And PS. how do i get in the command thing i already there... but not sure what to put in it :p

[code:1]
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>
[/code:1]

is what i have now :p
 
Top