Sign in to follow this  
neofit

Skill ids and skill names

Recommended Posts

Hi,


 


I looked into a way to import my toon's skills from WO into WU.


 


In wurmplayers.db I have:



CREATE TABLE PLAYERS(
    NAME                    VARCHAR(40)   NOT NULL UNIQUE,
[...]
    WURMID                  BIGINT        NOT NULL PRIMARY KEY,
[...]
);

and



CREATE TABLE SKILLS
(
    ID                      BIGINT        NOT NULL PRIMARY KEY,
    OWNER                   BIGINT        ,
    NUMBER                  INT           ,
    VALUE                   DOUBLE        ,
    MINVALUE                DOUBLE        ,
    LASTUSED                BIGINT        ,
[...]
);

Joining players.wurmid to skills.owner is no problem. But the skilldump uses skill names and I cannot find a reference table with those. Are they hardcoded in the game executable? Any idea on how to map skill ids to skill names?


 


There is the hard way: make a gm toon, increase every skill by something, then compare the skill dump with the db contents. But: 1. This is silly; 2. In WU I can find the chat channel logs, but can't find any skilldumps.txt :).


 


So, help please?


 


Thanks.


 


Share this post


Link to post
Share on other sites

skill dumps: C:\Program Files (x86)\Steam\steamapps\common\Wurm Unlimited\WurmLauncher\PlayerFiles\players\<your character>\test_dumps


 


Also, skills won't even appear in the db until you have a small gain in them, either from use or editing them in-game. 


Edited by Vanyel

Share this post


Link to post
Share on other sites

Is this what you're looking for? 


 



ublic static final int SKILLS = Integer.MAX_VALUE;

  public static final int CHARACTERISTICS = 2147483646;

  public static final int FAITH = 2147483645;

  public static final int FAVOR = 2147483644;

  public static final int RELIGION = 2147483643;

  public static final int ALIGNMENT = 2147483642;

  public static final int BODY = 1;

  public static final int MIND = 2;

  public static final int SOUL = 3;

  public static final int MIND_LOGICAL = 100;

  public static final int MIND_SPEED = 101;

  public static final int BODY_STRENGTH = 102;

  public static final int BODY_STAMINA = 103;

  public static final int BODY_CONTROL = 104;

  public static final int SOUL_STRENGTH = 105;

  public static final int SOUL_DEPTH = 106;

  public static final int GROUP_SWORDS = 1000;

  public static final int GROUP_KNIVES = 1001;

  public static final int GROUP_SHIELDS = 1002;

  public static final int GROUP_AXES = 1003;

  public static final int GROUP_MAULS = 1004;

  public static final int CARPENTRY = 1005;

  public static final int WOODCUTTING = 1007;

  public static final int MINING = 1008;

  public static final int DIGGING = 1009;

  public static final int FIREMAKING = 1010;

  public static final int POTTERY = 1011;

  public static final int GROUP_TAILORING = 1012;

  public static final int MASONRY = 1013;

  public static final int ROPEMAKING = 1014;

  public static final int GROUP_SMITHING = 1015;

  public static final int GROUP_SMITHING_WEAPONSMITHING = 1016;

  public static final int GROUP_SMITHING_ARMOURSMITHING = 1017;

  public static final int GROUP_COOKING = 1018;

  public static final int GROUP_NATURE = 1019;

  public static final int MISCELLANEOUS = 1020;

  public static final int GROUP_ALCHEMY = 1021;

  public static final int GROUP_TOYS = 1022;

  public static final int GROUP_FIGHTING = 1023;

  public static final int GROUP_HEALING = 1024;

  public static final int GROUP_CLUBS = 1025;

  public static final int GROUP_RELIGION = 1026;

  public static final int GROUP_HAMMERS = 1027;

  public static final int GROUP_THIEVERY = 1028;

  public static final int GROUP_WARMACHINES = 1029;

  public static final int GROUP_ARCHERY = 1030;

  public static final int GROUP_BOWYERY = 1031;

  public static final int GROUP_FLETCHING = 1032;

  public static final int GROUP_POLEARMS = 1033;

  public static final int AXE_SMALL = 10001;

  public static final int SHOVEL = 10002;

  public static final int HATCHET = 10003;

  public static final int RAKE = 10004;

  public static final int SWORD_LONG = 10005;

  public static final int SHIELD_MEDIUM_METAL = 10006;

  public static final int KNIFE_CARVING = 10007;

  public static final int SAW = 10008;

  public static final int PICKAXE = 10009;

  public static final int SMITHING_WEAPON_BLADES = 10010;

  public static final int SMITHING_WEAPON_HEADS = 10011;

  public static final int SMITHING_ARMOUR_CHAIN = 10012;

  public static final int SMITHING_ARMOUR_PLATE = 10013;

  public static final int SMITHING_SHIELDS = 10014;

  public static final int SMITHING_BLACKSMITHING = 10015;

  public static final int CLOTHTAILORING = 10016;

  public static final int LEATHERWORKING = 10017;

  public static final int TRACKING = 10018;

  public static final int SHIELD_SMALL_WOOD = 10019;

  public static final int SHIELD_MEDIUM_WOOD = 10020;

  public static final int SHIELD_LARGE_WOOD = 10021;

  public static final int SHIELD_SMALL_METAL = 10022;

  public static final int SHIELD_LARGE_METAL = 10023;

  public static final int AXE_LARGE = 10024;

  public static final int AXE_HUGE = 10025;

  public static final int HAMMER = 10026;

  public static final int SWORD_SHORT = 10027;

  public static final int SWORD_TWOHANDED = 10028;

  public static final int KNIFE_BUTCHERING = 10029;

  public static final int STONE_CHISEL = 10030;

  public static final int PAVING = 10031;

  public static final int PROSPECT = 10032;

  public static final int FISHING = 10033;

  public static final int SMITHING_LOCKSMITHING = 10034;

  public static final int REPAIR = 10035;

  public static final int COALING = 10036;

  public static final int COOKING_DAIRIES = 10037;

  public static final int COOKING_STEAKING = 10038;

  public static final int COOKING_BAKING = 10039;

  public static final int MILLING = 10040;

  public static final int SMITHING_METALLURGY = 10041;

  public static final int ALCHEMY_NATURAL = 10042;

  public static final int SMITHING_GOLDSMITHING = 10043;

  public static final int CARPENTRY_FINE = 10044;

  public static final int GARDENING = 10045;

  public static final int SICKLE = 10046;

  public static final int SCYTHE = 10047;

  public static final int FORESTRY = 10048;

  public static final int FARMING = 10049;

  public static final int YOYO = 10050;

  public static final int TOYMAKING = 10051;

  public static final int WEAPONLESS_FIGHTING = 10052;

  public static final int FIGHT_AGGRESSIVESTYLE = 10053;

  public static final int FIGHT_DEFENSIVESTYLE = 10054;

  public static final int FIGHT_NORMALSTYLE = 10055;

  public static final int FIRSTAID = 10056;

  public static final int TAUNTING = 10057;

  public static final int SHIELDBASHING = 10058;

  public static final int BUTCHERING = 10059;

  public static final int MILKING = 10060;

  public static final int MAUL_LARGE = 10061;

  public static final int MAUL_MEDIUM = 10062;

  public static final int MAUL_SMALL = 10063;

  public static final int CLUB_HUGE = 10064;

  public static final int PREACHING = 10065;

  public static final int PRAYER = 10066;

  public static final int CHANNELING = 10067;

  public static final int EXORCISM = 10068;

  public static final int ARTIFACTS = 10069;

  public static final int WARHAMMER = 10070;

  public static final int FORAGING = 10071;

  public static final int BOTANIZING = 10072;

  public static final int CLIMBING = 10073;

  public static final int STONECUTTING = 10074;

  public static final int STEALING = 10075;

  public static final int LOCKPICKING = 10076;

  public static final int CATAPULT = 10077;

  public static final int TAMEANIMAL = 10078;

  public static final int BOW_SHORT = 10079;

  public static final int BOW_MEDIUM = 10080;

  public static final int BOW_LONG = 10081;

  public static final int SHIPBUILDING = 10082;

  public static final int COOKING_BEVERAGES = 10083;

  public static final int TRAPS = 10084;

  public static final int BREEDING = 10085;

  public static final int MEDITATING = 10086;

  public static final int PUPPETEERING = 10087;

  public static final int SPEAR_LONG = 10088;

  public static final int HALBERD = 10089;

  public static final int STAFF = 10090;

  public static final int PAPYRUSMAKING = 10091;

  public static final int THATCHING = 10092;

  public static final int BALLISTA = 10093;

  public static final int TREBUCHET = 10094;

  public static final int PEWPEWDIE = 10095;

  public static final short TYPE_BASIC = 0;

  public static final short TYPE_MEMORY = 1;

  public static final short TYPE_ENHANCING = 2;

  public static final short TYPE_NORMAL = 4;

 



  • Like 2

Share this post


Link to post
Share on other sites

skill dumps: C:\Program Files (x86)\Steam\steamapps\common\Wurm Unlimited\WurmLauncher\PlayerFiles\players\<your character>\test_dumps

Also, skills won't even appear in the db until you have a small gain in them, either from use or editing them in-game.

I spent 5 minutes to kill a pig and get some skillups, no skilldumps there.

Share this post


Link to post
Share on other sites

if you change the server to a test server you can then use those functions to change 'all' your skills at once to a set value.  Then it would put all of them in the database for you to see.


Share this post


Link to post
Share on other sites

I made a spreadsheet with the skill NUMBERS for the SKILLS table. See my spreadsheet post.


Share this post


Link to post
Share on other sites
On 10/22/2015 at 2:47 AM, whykillme said:

Is this what you're looking for? 

 

 

  public static final int CHARACTERISTICS = 2147483646;

 

  public static final int FAITH = 2147483645;
...

 

Why on earth would those be static?  It`ll make translation tough for sure and makes database queries far less clear.  Just an odd choice, i think.  Waste of compiler and one more place for bugs to creep into code.

 

But THANKS for this awesome list!

Share this post


Link to post
Share on other sites

static I get, it allows you to make a direct static call to it from anywhere (including mods), the thing I don't like is final, there is a bunch of BS final all over the code that makes modding a pita, if it wasn't final we could extend and change a whole lot more.

Share this post


Link to post
Share on other sites

Static final primitive constants can be safely inlined by the compiler, which is a lot faster than a field lookup. That code was probably written for WO many years before anyone considered anything to do with modding.

 

16 hours ago, frozenjim said:

 It`ll make translation tough

 

WTF does this have to do with translation?

Edited by bdew
  • Like 1

Share this post


Link to post
Share on other sites

Most of the time I think Wurm's final use is a bit obsessive. I think some of the coders are of the school that thinks everything should be final that possibly can be final.

 

I'd searched SO looking for standard practices about Final. There seem to be two schools. One thinks final should be used liberally. Another thinks it should only be used when something really is final and usualy it's just fields.

 

Although, in this case I think the use of final for all those skills is proper.

 

Lastly, I be if Wurm where to redo that they'd use an Enum. Those little buggers are a pain to mod. You can change the contents of one but it's very difficult to extend them without changing the actual source. At least from what I've found anyway.

 

  • Like 1

Share this post


Link to post
Share on other sites
On 8/19/2016 at 0:42 AM, bdew said:

WTF does this have to do with translation?

 

You know, I am not CERTAIN what I was thinking at that point.. (my brain dumps stuff quick), but my comment would only apply to strings.

 

Thanks for the code review :-D

Edited by frozenjim
Stupid stuff said too early in the morning.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this