The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Skillcap issues
Author Message
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #1
Skillcap issues
What i'd like to do is a skillcap for allplayer that affects only job skills, in detail, i want to have a 180.0 skill cap for all the resource skills (mining, lumber, farming & fishing) and 300.0 skill cap for all the craft skills (blacksmithing, bowcraft, tailoring, etc..)

The problem is when i equip an item which gives me skill...like..."minoc gloves" that gives me +5.0 of mining and blacksmthing.
They will be counted in the skillcap check process...and i want to avoid this (this is why i proposed the modskill function in feature request section) otherwise ppl with these gloves cannot go further in their skill when they reach cap (thx to these gloves)

Code:
[DEFNAME skill_cap]
skill_estrattive 400  // resources skills
skill_lavorative 900 // craft skills

[FUNCTION check_caps]  // this return the 2 values
LOCAL.CAPTOT=<get_work_skill>
LOCAL.CAPCRAFT=<RITORNA 1,<LOCAL.CAPTOT>>
LOCAL.CAPEXT=<RITORNA 2,<LOCAL.CAPTOT>>


[DEFNAME group_skills] // i added the group=group_work or group_extraction to the related skills in sphere_skills.scp
group_work 01
group_extraction 02

[FUNCTION get_work_skill]
FOR 50
IF <serv.skill.<dlocal._for>.group>&group_work
        IF (<eval <src.<serv.skill.<dlocal._for>.key>>> > 700)      
        LOCAL.CAPCRAFTSUM +=<EVAL <src.<serv.skill.<dlocal._for>.key>>-700>
    ENDIF
ELIF <serv.skill.<dlocal._for>.group>&group_extraction
        IF (<eval <src.<serv.skill.<dlocal._for>.key>>> > 700)    
        LOCAL.CAPEXTRACTSUM +=<EVAL <src.<serv.skill.<dlocal._for>.key>>-700>
    ENDIF
ENDIF
ENDFOR
RETURN <DLOCAL.CAPCRAFTSUM>,<DLOCAL.CAPEXTRACTSUM>
02-26-2013 12:40 PM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Skillcap issues
So I think you want the player to be able to raise their "natural skill" (the unmodified value they would have if they were not wearing skill enhancing items) even when they ARE wearing some skill enhancing items... makes sense to me.

I think you need to define "individual skill limits" (for example, no individual skill can exceed 100.0), and you need "skill group limits" (for example, all resource skills added together cannot exceed 300.0)... do you also need "cumulative skill limits" (for example, all skills added together cannot exceed 1000.0?)

So, would the wearing of a skill enhancing item not impact ANY of those types of limits?
02-26-2013 01:33 PM
Find all posts by this user Like Post Quote this message in a reply
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #3
RE: Skillcap issues
The individual skill limit is 100.0 (but i plan to raise this in the future giving the chance to players to specialize (125.0) to one choosen skill.

The group skill limit is also set, but i have to explain in detail here, i'll take the example of the resource skills, they are 4:
farming
fishing
mining
lumber

Your group cap is 180.0 which means that u can have one skill to 100.0 and one to 80.0, or, u can have 2 skills with 90.0.
Actually the real skillcap is 40.0 because i want that the other skills can still raise 'till 70.0.
So having
farming 70.0
mining 80.0
lumber 100.0
fishing 70.0
Will be ok and these are the max value inside the cap.
In other words...all skills can reach 70.0 without affecting the cap, but when they do more than that, points start to affect the cap (that's why the real cap is 40.0):
fishing 70.0
mining 70.0 +10
lumber 70.0 +30
farming 70.0


Now, with this introduction, let's go to the point:
Let's say, for instance, that i have
Lumber: 80.0
Mining: 90.0
If i have minoc gloves that raise my mining skill up to 10.0 This value can eventually make me reach the cap (in fact i will have mining 100 and lumber 80: cap reached), and in that case i'm unable to raise other skill (like lumber, coz thx to these 10.0 points, the system think that i'm at the cap).
But i'm not really at the cap, and i want player to raise their lumber without the cap take into account items enhanging skills.

I thought a couple of things like:

a memory that i wear every time i wear an item enhancing skill, which add a tag to this memory with the name of skill enhanced and the value.
And every time i check the cap i go to see if there is this memory and the tag.

Or, i could check all my body items everytime i check the cap.

In both cases it's a pain in the ass.
If u have a smarter solution or u can do a modskill function, it will be VERY appreciated Smile
02-26-2013 09:22 PM
Find all posts by this user Like Post Quote this message in a reply
Norlack
Apprentice
*

Posts: 35
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

New Hera Reborn

Post: #4
RE: Skillcap issues
you have a PM.
02-27-2013 10:54 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #5
RE: Skillcap issues
I think you should ditch the entire memory item idea and implement it as TAGs (one per skill) on the items that need them, for example:

TAG.ModAlchemy=10.0

Implement the equip and unequip side effects of those tags in an EVENT that all equipable items have... Something like:

Code:
[EVENT e_equipitem]
ON=@Equip
   IF (<TAG0.ModAlchemy>)
      IF (<TAG0.ModAlchemy> < 0)
         SRC.SYSMESSAGE @032,,You equipped a cursed item that lowered your Alchemy
      ENDIF
      SRC.TAG.ModAlchemy=<EVAL <SRC.TAG0.ModAlchemy> + <TAG0.ModAlchemy>>
      TRY SRC.Alchemy=<EVAL <SRC.Alchemy>+<TAG0.ModAlchemy>>
   ENDIF

ON=@UnEquip
   IF (<TAG0.ModAlchemy>)
      SRC.TAG.ModAlchemy=<EVAL <SRC.TAG0.ModAlchemy> - <TAG0.ModAlchemy>>
      TRY SRC.Alchemy=<EVAL <SRC.Alchemy>-<TAG0.ModAlchemy>>
      IF (<SRC.TAG0.ModAlchemy>==0)
         SRC.TAG.ModAlchemy=
         SRC.SYSMESSAGE @032,,Your Alchemy has returned to normal
      ENDIF
   ENDIF

In your skillgain overrides, to check if someone is wearing an item that has affected their skill, just look for a TAG.ModAlchemy with a non zero value directly on the player.

You could try and get crafty and write some kind of FOR loop to go through all the skill KEYs so you dont need an IF structure for each skill... but try to get it working without that first.

PS... I am not sure what happens when you set a skill to a negative value... so maybe setting the TAG on an item to a negative number is a bad idea.
(This post was last modified: 03-01-2013 02:05 PM by RanXerox.)
03-01-2013 02:03 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)