• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Skill synergy

ErinRigh

Well-known member
Hey, its me again.

I am trying to add a new skill that adds a synergy bonus to heal checks, but I am running into a snag.

The only way I know to add synergy is to edit the skill it is being assigned to.

In otherwords, I have to add;


if (#skillranks[kKnowAnat] >= 5) then
field[Bonus].value = field[Bonus].value + 2
endif

to the Heal skill.

If I do that, it is just going to erase it next update.

So what I am asking is; How do I create an extension of code that will add the +2 Synergy bonus to heal without having to alter the heal skill?

Also good to know for my Epic project as Epic characters gain even higher synergy bonuses for 25 ranks, 45 ranks, 65 ranks etc that I could therefore add to take those into account!
 
One approach could be to replace the default "Heal" with your own "myheal" and in your Knowledge: Anatomy (I assume) have it reference the unique id "myheal" for your synergy.
You will also have to utilize the field in your version of heal by entering "kHeal" in the replaces Thing ID to the far right of your new "heal" (ie myheal).

I did this with the "Common" language that defaults in the D20 version... IMC I define the origins of "Common" language and it gives a situational bonus because of root languages that make up "Common" in our world.

IMPORTANT, be sure to also set the {b}Phase and the Priority{/b} in the Eval Script. I use Pre-levels and 10000 myself (seems to work for me Shadow or others may have more input on the timing nuances)
See Slides below


attachment.php

attachment.php


This approach leaves the "heal" skill intact but simply substitutes it for yours. So not exactly a "change" but an addition. And as long as you save it in your own *.user file the updates will not affect it unless Shadow suddenly desides heal is called something else by modifying its Unique ID
 

Attachments

  • skillsinEditor1.JPG
    skillsinEditor1.JPG
    156.9 KB · Views: 23
  • skillsinEditor2.JPG
    skillsinEditor2.JPG
    132.5 KB · Views: 23
Last edited:
Code:
      if (#skillranks[kKnowAnat] >= 5) then
        field[Bonus].value = field[Bonus].value + 2
        endif
I would recommend not doing a "replace thing id" as this can cause issues in the future. Plus any future enhancements I make to the Heal skill you will no longer see.

Instead I recommend reversing the logic of the script. So we run a script on your "new" skill (which I assume is kKnowAnat) that gives a bonus to the heal skill. Like this:

Pre-Level/10000
Code:
~ If we have 5+ ranks give a synergy bonus to the heal skill
if (field[kUserRanks].value >= 5) then
   hero.childfound[kHeal].field[Bonus].value += 2
endif
 
Last edited:
I would recommend not doing a "replace thing id" as this can cause issues in the future. Plus any future enhancements I make to the Heal skill you will no longer see.

Instead I recommend reversing the logic of the script. So we run a script on your "new" skill (which I assume is kKnowAnat) that gives a bonus to the heal skill. Like this:
Code:
~ If we have 5+ ranks give a synergy bonus to the heal skill
if (field[kUserRanks].value].value >= 5) then
   hero.childfound[kHeal].field[Bonus].value += 2
endif

Point taken SC.. had a bit of tunnel vision, but must confess my own application probably skewed that thought process...
Not to derail the thread, but similar concern of application... I used the replace field to substitute for the D20 Game Generic "Common Language" issued to most PCs when created. As noted above, IMC "common" is a modern version of combined older dialects (which are also created, but limited to scholars, bards etc).

Since the common language is a "core element" within Herolab, should I be taking the same approach? And if so, how would I make the background of "common" available to all that get "Common" with the defined origins? Though modifying the HML code?
See Slide for clarity...
attachment.php


Best Regards
DLG
 

Attachments

  • Common Lang GH.JPG
    Common Lang GH.JPG
    169.4 KB · Views: 21
:o Sorry to be a PITA, but, I am not sure what I am doing wrong?? Using this code and setting timing to Post-Attributes/10000 It has no effect on the heal skill, and I am far too thick to easily see what is wrong. Please help me!!!:o
 
I would look at the timing... would think this would be set to Prelevel.. but SC is certainly the expert
Correct. I think ErinRigh mixed up a couple of my posts. In another thread using attributes I said "Post-Attributes". I actually didn't list a timing this time which is bad.

Pre-Level/10000 would be a good timing because your looking at "Ranks" which are calculated very early.

Just did a quick test and Pre-Level/10000 works and actually so does Post-Attributes.

@ErinRigh are you getting any error messages or anything when you do Test Now! ???
 
Not to derail the thread, but similar concern of application... I used the replace field to substitute for the D20 Game Generic "Common Language" issued to most PCs when created. As noted above, IMC "common" is a modern version of combined older dialects (which are also created, but limited to scholars, bards etc).

Since the common language is a "core element" within Herolab, should I be taking the same approach? And if so, how would I make the background of "common" available to all that get "Common" with the defined origins? Though modifying the HML code?
See Slide for clarity...
For "Common" Language he easiest approach is what you did. Which "most" likely won't cause issues down the road. And actually changing it now would cause issues for your players with characters made with your data set. :(

Another "approach" is using a script to add the extra "text" that you needed.
Code:
perform state.thing[lCommon].amendthing[description,"Whatever you wanted to say"]

perform state.thing[lCommon].amendthing[name,"new name with your color green."]
Now don't go crazy with this logic. Its a bit CPU intensive and will happen/fire each time anything is changed on the character. But you can change text/name without doing a replace thing id or the underlying logic.

Sense ErinRigh was starting "new" its better to do not replace thing id if he can help it. Sense you already did removing the replace thing id right "now" could cause more issues than fixes. Just be on the alert if I do any "language" changes in the future it could cause you issues.
 
:o Sorry to be a PITA, but, I am not sure what I am doing wrong?? Using this code and setting timing to Post-Attributes/10000 It has no effect on the heal skill, and I am far too thick to easily see what is wrong. Please help me!!!:o
Just to confirm. You did put that script onto your "new" skill thingid.kKnowAnat correct? And you removed the replace thing id you did to the Heal skill?
 
Just did a quick test and Pre-Level/10000 works and actually so does Post-Attributes.

@ErinRigh are you getting any error messages or anything when you do Test Now! ???

Again a timing issue. I will get a handle on this timing thing, I swear! Thanks once again, mate:D
 
Again a timing issue. I will get a handle on this timing thing, I swear! Thanks once again, mate:D
I understand. Timing is a bit rough to get when first doing the scripting. Basically it controls "when" a script is fired. So if you have two scripts A and B and B must come after A does its calculation then you need a higher timing.

The drop down that shows the "Phase" names (First, Pre-Level) is listed in the order that the scripts will fire. So "First" comes well first in the list meaning its script run before Pre-Levels which is second.

Some "very" general guidelines:
1) Very few scripts should run at First unless you are doing bootstrap condition logic.

2) Skills scripts should be Pre-Level/10000 "most" of the time.

3) Class/race scripts should be Post-Level/10000.

3a) Your script does stuff with Attribute Values/Modifiers (Str, Dex, Con, Int, Wis, Cha) then you want Post-Attributes/10000.

4) Final script logic should be used when you are doing processing for building text strings to give useful information to gamers.

5) Validation timing should only be used to do any validation on pre-reqs when you are sure all other processing is finished.

Please note these are "guidelines" and you will find exceptions.
 
Back
Top