Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old August 13th, 2010, 09:01 AM
I would like to implement the Swift Hunter feat from Complete Scoundrel. This feat allows Ranger and Scout levels to stack for the purpose of determining the Scout's Skirmish Ability, and the Ranger's Favored Enemy progression. I have no idea how to even begin on this...

Any thoughts?

BTW: I have already implemented the Scout class...
Dastir is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 19th, 2010, 11:13 AM
For the skirmish ability, you'll make use of the xExtraLev field. The value of xExtraLev is added to the level of the class an ability is added to, to determine whether a class is eligible for that ability and what level the ability is calculated at.

So, here's how to modify the xExtraLev field of skirmish:

Phase: PreLevels, Timing: 10000
Code:
 
~how many levels of ranger will we be adding to skirmish?
var bonus as number
bonus = #levelcount[Ranger]
 
~Add those effective levels to skirmish
hero.childfound[cScoSkirm1].field[xExtraLev].value += bonus
hero.childfound[cScoSkirm2].field[xExtraLev].value += bonus
I'm just guessing as to the Ids of the various copies of skirmish, so fix those, and continue the list with all the other copies of Skirmish that are present on the scout.

For the favored enemies, first you'll have to figure out how favored enemies are stored. Start by adding a level of ranger to a blank character.

Go to the develop menu, make sure that the first item, "Enable Data File Debugging" is checked, then at the bottom of the develop menu, select "Floating Info Windows" and then "Show Selection List". That's a list of everything that's been added to your character. Right at the top, you'll see "2nd favored enemy" through "5th favored enemy". Down in the "f"'s, you'll find "Favored Enemies" and "First Favored Enemy".

Okay, we have some good candidates. Now to see how they function.

Close the "Show Selection List" window, go back to the develop menu, floating info windows, then select "Show Selection Fields" In the list of picks that pops up there, select all the candidates that were identified earlier.

Rearrange all the windows that pop up so that you can see them all, and start adding and subtracting ranger levels (especially the thresholds when the number of favored enemies change). You can also add or remove favored enemy choices to see where those are recorded.

You'll find that the most important one is the one labeled "Favored Enemies". The feTotal field appears to store the number of favored enemy selections available, and feUpTotal stores the number of upgrades (and it's always 1 less than feTotal).

Okay, now to calculate the bonus favored enemies.

We can't directly alter the number of levels on the "Favored Enemies" pick - it only stores the calculated results. So, we'll compute how much the extra levels make the count of favored enemies change.

Phase: Post-Levels, Priority: 10000
Code:
 
~how many favored enemies do we currently have
var currfavor as number
currfavor = round(#levelcount[Ranger]/5,0,-1) + 1
 
~how many favored enemies should we have
var newfavor as number
newfavor = #levelcount[Ranger] + #levelcount[Scout]
newfavor = round(newfavor/5,0,-1)
 
~by adding newfavor and subtracting currfavor from the existing favored
~enemies, we'll end up adding only the difference
hero.child[cFavEnemy].field[feTotal].value += newfavor - currfavor
hero.child[cFavEnemy].field[feUpTotal].value += newfavor - currfavor
Mathias is online now   #2 Reply With Quote
Dastir
Member
 
Join Date: Sep 2008
Posts: 48

Old August 19th, 2010, 11:33 AM
Wow Mathias, fantastic explanation! I will implement this as soon as I have a chance and let you know how it works out.

Thanks!
Dastir is offline   #3 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:06 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.