• 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

want to make custom -/+ adjustments

tahltwo

Well-known member
.
hiya.

i want to create some flaws from a 3.5e list -- which i've done already (which mostly dependent on the use the conditions checkboxes so i didn't have to learn the coding for penalties per flaw :-P)

anyway, the houserule is per 2 flaws, i get 1 feat and 2 traits.

how do i code this in the flaws themselves, like per 1 flaw = 1/2 feat "point" + 1 trait?

if it cannot be done, i can always go the easy route and use the "adjust" tab :-1
 
Their is adjustments in HL for increasing Talents/Feats and you can view those scripts in the editor. Start the Editor and go to "General->Adjustments" and then click on "New (Copy)". Select "Feats, Total" and look at its script that is running at First/1000.

Script from the Adjustment "Feats, Total":
Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ Add to feats allowed
      #resmax[resFeat] += field[pAdjust].value

The first part:
Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)
Is whats called a shut down code that prevents the rest of the script from running if the Adjustment is not ON. As your Trait has no on/off you don't care about this.

First/1000
Code:
      ~ Add to feats allowed
      #resmax[resFeat] += field[pAdjust].value
This we can see is increasing the number of Feats by something called the pAdjust amount. Which we can assume is the counter value. So instead we want to set it to ".5".

First/1000
Code:
      ~ Add to feats allowed
      #resmax[resFeat] += .5

The only issue is we will have the Feat tab show that .5 value. So to fix this we can just round it away 1000 secs later. This way the Feats tab will still only ever show full values.

First/2000
Code:
~ Round out any "half-point" feat increases
#resmax[resFeat] = round(#resmax[resFeat],0,-1)

Try and add the "Trait" increase yourself now by looking at the script on the adjustment.
 
all right, this is what i have set up so far:

made a 35eflaws.user file with flaws added.
go to the adjustment tab and followed your directions above for feats.
did same for traits, except traits is 1:1 to every flaw added, no need to do 2000

tested and save out file.
tried adding flaw and got 1 extra feat for every flaw, and no traits added at all.
this is same as scripts were never added.

what am i missing?
 
Well I need to see the scripts. So either post your scripts here or the whole .user file. Its really hard to debug stuff without seeing what you did. :) In scripting one line of code can cause issues....
 
.
35eflaws file.

keep in mind the flaws list is partial, and the flaws have not been scripted to account for each flaw's penalties -- long way to go before i can do that :-1

one baby step at a time :-D

and thx for your time!
 
Ok so the issue is you never put the scripts on the actual Flaws. You made a copy of the adjustments and changed their scripts. The idea is that you actually put the scripts ON to the Flaw so when a flaw is taken the script runs. The adjustment was just a place to get an idea of how to script increasing the number of Talents/Feats a character has.

To help you out I did the first two Flaws by adding the scripts. You will need to duplicate that for each flaw. :)
 

Attachments

yea! it worked!

you now have gained a grasshopper, whether you like it or not, master. my code kung fu will blossom!

how about another lesson?

one of the flaws has a prereq of either/or: wis or int 17. i looked around and tried some codes but i think i may be more complicated than i think.

how and where do i start -- i had try filling in scripts from something similar, like combat expertise, but it didn't work because that does not have an either/or condition. then again, i wasn't sure if it didn't work for other reasons so i decided i have no idea what i'm doing (looool)
 
For that you need to make a pre-req instead of expr-req

Set the name to "Wisdom or Intelligence 17"

and then in the code section you enter

Code:
validif (#attrvalue[aWIS] >= 17)
validif (#attrvalue[aINT] >= 17)

This tells hero lab that the pre-req is valid either for 17 wisdom or 17 intelligence.
 
how would i set up the flaws files so that it could be used on the ipad hero lab -- ideally, kinda like the how the community bestiary or chemoshadjustments are set up for updates?
 
so is there a wiki or how-to to scripts hero lab for custom stuff, or peeps just come hang out here for tips/lessons (lol)

i saw the Editor and Scripting Resources topic above, but not sure if that provides info for those who already know how to script and familiar with h.l, or for everybody (as a newb, i couldn't find what i needed to start).
 
Back
Top