• 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

Splitting up Perception

Adunaphel

Member
Well, I really like to give search back to the players.
I copied the Perception skill.

My problem #1 is that I want to have them at least half the ranks of perception, so a pc with 8 ranks in perception und 1 in search gets a bonus of +4.

#2 How do I make it a class skill for rogues without editing the rogue class?

Thanks a lot, Adu
 
Well, I really like to give search back to the players.
I copied the Perception skill.
So all these can be done but you will need to write scripts for them. If you have not worked with scripts before I recommend reading the "Glossary of Terms" for HL editor and watching the editor intro videos in FAQ#2. Video number three is useful for finding the Fields on different Things.

My problem #1 is that I want to have them at least half the ranks of perception, so a pc with 8 ranks in perception und 1 in search gets a bonus of +4.
You will need to add a new script on your Search skill that will get the number of Ranks on the Perception skill. Then divide that in half and then round the value. Then set that into Search bonus field.

"Develop->Enable Data File Debugging". This means you can now "right" click on the "?" next to Perception and see its "Fields". Do any of the fields look like the one that holds number of Ranks in the Skill?

Pre-Levels/10000
Code:
~ Give a bonus based on half ranks of perception.
field[Bonus].value += round(hero.child[skPercep].field[[B]XXXXX[/B]].value/2,0,-1)
So above is most of the code you need. Where it says XXXXX you have to fill in the correct "Field" name from the Perception Skill Thing. The rest is the round() function that will allow us to round the half value to integer and round the value down.

hero.child[] is a transition code that tells the script to go from the HERO down to the CHILD with the Unique ID of "skPercep". Then we transition to a specific field we wish to get its "value".

#2 How do I make it a class skill for rogues without editing the rogue class?
Their is a "tag" that is assigned to a skill to make it a class skill. We can easily tell from tags on the Hero if the class Rogue was taken.

So right click on the "?" by perception and look at its "Tags". Now then add a level of Rogue to your character and see what "new" tags where added. Do any of these look like a Tag that will make it a "ClassSkill"?

If so once again I will provide part of the script you will need:
Post-Levels/10000
Code:
~ If we have NO rogue levels then we are done and this script will finish!
doneif (hero.tagcount[Classes.cHelpRog] = 0)

~ Assign the Helper Tag here that will make us a Class Skill
perform assign[[B]XXXXX.XXXXX[/B]]
So the above is almost done. You have fill in the correct tag where it says XXXXX.XXXXX. A tag is always made up of two parts. The Group.TagID where you start with a Group Name followed by a dot then the unique Tag ID. So in example above "Classes" is the GROUP name that holds all classes tags. The specific tag is the "cHelpRog" which is the unique ID of the Rogue Helper Class. So together we get "Classes.cHelpRog".
 
Hello ShadowChemosh,
at first i tried your hints and i found more information with your help but i don't get the pieces puzzled together.

You will need to add a new script on your Search skill that will get the number of Ranks on the Perception skill. Then divide that in half and then round the value. Then set that into Search bonus field.

Your code did that, but it should give the maximum ([skPercep]/2, [skSearch]) regarding the ranks.
7 ranks Perception, 0 ranks Search -> +3 from ranks
7 ranks Perception, 2 ranks Search -> +3 from ranks
7 ranks Perception, 4 ranks Search -> +4 from ranks

I would use "if ... then" but I always get a "reserved keyword" error.
 
Here is the current version:
Code:
~Adds the rounded down half Ranks of Perception reduced by the ranks in 
~Skill Search itself
hero.child[skRGSearch].field[Bonus].value += 
round((hero.child[skPercep].field[skUser].value)/2,0,-1)-
(hero.child[skRGSearch].field[skRanks].value)
 
Last edited:
Your code did that, but it should give the maximum ([skPercep]/2, [skSearch]) regarding the ranks.
7 ranks Perception, 0 ranks Search -> +3 from ranks
7 ranks Perception, 2 ranks Search -> +3 from ranks
7 ranks Perception, 4 ranks Search -> +4 from ranks

I would use "if ... then" but I always get a "reserved keyword" error.
Oh opppsss. I read what your wrote a little too fast. In that case their is the Maximum keyword you can use.

Code:
#skillbonus[skRGSearch] += maximum(round(#skillranks[skPercep]/2,0,-1), #skillranks[skRGSearch])

I am not near HL to actually test the above but logically it should work. The only reason it my not is I could have too many macros wrapped inside of a function.

So macro's are those things that start with a "#" sign. They are basically short cuts that HL will turn into the long version. So #skillranks[skPercep] is the exactly the same as hero.child[skPercep].field[skUser].value but one is just shorter/faster to write than the other. :)

If it complains about the above try taking the macro's out and using the long verbiage.

Here is a link to a list of macros for HL from AndrewD2.
 
Okay, at first i got some errors and then i dissolved some macros.
My code is now:
Code:
#skillbonus[skRGSearch] += 
maximum(round(hero.child[skPercep].field[skRanks].value /2,0,-1), 
hero.child[skRGSearch].field[skRanks].value)

It can be tested without error, but it did nothing to skRGSearch, the field Bonus was zero. Then i switched it to postlevels-phase and now it works.
Thanks a lot for your dedication to the community.
 
Last edited:
Back
Top