Thread: Tradeskills
View Single Post
  #1  
Old 08-24-2006, 09:50 AM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default Tradeskills

This is more or less a snap&paste from the Darktides board. I intended to write a patch first bevore posting here but since I don't get time to work on this for at least a week I post it anyway. Maybe someone already works on it and I would waste my time.

-----
I looked in the EQEmu code and right now the only way to get better chances on a skillup is maxing INT. So unlike EQLive it is not the higher of INT or WIS(and STR for smithing and DEX for alchemy, fletching)
Based on the information of eqtraders.com I intend to write a patch that it will make it more EQLive like, but that will take some time since I intend to update some other things that are out of whack in the current implementation.
Below is a quickhack that would at least allow for either INT or WIS. But be aware that I did not have time to test this.

Code:
--- tradeskills.cpp     2006-07-25 05:43:11.000000000 +0200
+++ tradeskills_new.cpp 2006-08-22 16:36:15.701103500 +0200
@@ -654,5 +654,9 @@
        // statbonus 20%/10% with 200 + 0.05% / 0.025% per point above 200
-       float wisebonus =  (m_pp.WIS > 200) ? 20 + ((m_pp.WIS - 200) * 0.05) : m_pp.WIS * 0.1;
-       float intbonus =  (m_pp.INT > 200) ? 10 + ((m_pp.INT - 200) * 0.025) : m_pp.INT * 0.05;
-
+       float successintbonus =  (m_pp.INT > 200) ? 20 + ((m_pp.INT - 200) * 0.05) : m_pp.INT * 0.1;
+       float successwisbonus =  (m_pp.WIS > 200) ? 20 + ((m_pp.WIS - 200) * 0.05) : m_pp.WIS * 0.1;
+       float skillupintbonus =  (m_pp.INT > 200) ? 10 + ((m_pp.INT - 200) * 0.025) : m_pp.INT * 0.05;
+       float skillupwisbonus =  (m_pp.WIS > 200) ? 10 + ((m_pp.WIS - 200) * 0.025) : m_pp.WIS * 0.05;
+       float successbonus =  (successintbonus > successwisbonus) ? successintbonus : successwisbonus;
+       float skillupbonus =  (skillupintbonus > skillupwisbonus) ? skillupintbonus : skillupwisbonus;
+
        vector< pair<uint32,uint8> >::iterator itr;
@@ -666,3 +670,3 @@
        } else if (((sint16)user_skill - (sint16)spec->trivial) >= 0) {
-               chance = 80+wisebonus-10; // 80% basechance + max 20% stats
+               chance = 80+successbonus-10; // 80% basechance + max 20% stats
                Message_StringID(4,TRADESKILL_TRIVIAL);
@@ -671,3 +675,3 @@
                        // 40 base chance success + max 40% skill + 20% max stats
-                       chance = 40 + wisebonus + 40 - ((spec->trivial - user_skill)*2);
+                       chance = 40 + successbonus + 40 - ((spec->trivial - user_skill)*2);
                }
@@ -675,3 +679,3 @@
                        // 0 base chance success + max 30% skill + 10% max stats
-                       chance = 0 + (wisebonus/2) + 30 - (((spec->trivial - user_skill) * (spec->trivial - user_skill))*0.01875);
+                       chance = 0 + (successbonus/2) + 30 - (((spec->trivial - user_skill) * (spec->trivial - user_skill))*0.01875);
                }
@@ -680,3 +684,3 @@
                // skillincrease?
-               if ((55-(user_skill*0.236))+intbonus > (float)rand()/RAND_MAX*100) {
+               if ((55-(user_skill*0.236))+skillupbonus > (float)rand()/RAND_MAX*100) {
                        SetSkill(tradeskill, GetRawSkill(tradeskill) + 1);
Reply With Quote