• 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

How do you alter the base eval scripts?

cryptoknight

Well-known member
For instance,

I'm trying to put in the Bilingual Quality from RC. All it does is give a player a second Native tongue.

That should be easy enough right? I'll add a language to the character and flag it as N

Except the eval scripts tell me I can't have two Native languages.

Or Born Rich, which allows a character to spend up to 60 BP for money, except the eval script allows you to only have up to 50.

Is there a list of values I can modify via script to increase them? Such as Native Language limits or BP to be spent on money?

Thanks
 
After looking for a while, I finally found the script in question that sets the max BP. Judging by the wording of your earlier post, you did as well. It's a Resource called Starting Resources BP, you might have to scroll down a bit to see where it mentions rsGearBP and you're right about the value being hard-coded into the script. Perhaps copying the script, setting the timing to be a little bit later than the original and overwriting the effects of the original script might be possible. You could just add a check for the born rich quality there, and if it passes change the number to 60. Now, this is probably horribly inefficient and exceedingly dirty :( But it might be one option.
 
"I'm trying to put in the Bilingual Quality from RC. All it does is give a player a second Native tongue."

If you figure this one out let me know. I have a player that has this quality. Right now I have given the player's sheet the two as native tongues and ignored the validation error. Most of my players are using various other supplements and I am using the "Custom" options in gear and qualities to place these things in the character sheets.
 
I didn't even know about the Resources tab... didn't realize those were the eval scripts to validate a character.

Thanks Ore!

Now if I could only figure out how to check if a quality is present on a character.

I'm trying something like this.

Code:
      if (hero.tagis[CharMethod.MethBP] <> 0) then
        ~determine our maximum based on what we used, how many BP we have left, and the cap of 50 (60 if Born Rich)
        field[resMax].value = round(field[resSpent].value / #costBP[mechCashBP],0,1) + maximum(#resleft[resBP],0)

	if (hero.qubornrich) then
            field[resMax].value = minimum(field[resMax].value, 60) * #costBP[mechCashBP]
        else
            field[resMax].value = minimum(field[resMax].value, 50) * #costBP[mechCashBP]
        endif
      elseif (hero.tagis[CharMethod.MethKarma] <> 0) then
        ~determine our maximum based on what we used, how many Karma we have left, and the cap of 100
        field[resMax].value = round(field[resSpent].value / #costKarma[mechCashKa],0,1) + maximum(#resleft[resBP],0)
        field[resMax].value = minimum(field[resMax].value, 100) * #costKarma[mechCashKa]
        endif

      ~recalculate resLeft based on the new maximum
      field[resLeft].value = field[resMax].value - field[resSpent].value

But of course I know I'm referencing my new quality born rich incorrectly, I just can't figure out how to get at it.

I also found the Languages and Knowledge skills eval script, but I don't even see it checking for a Native tongue in there.
 
I'm trying to put in the Bilingual Quality from RC. All it does is give a player a second Native tongue.

That should be easy enough right? I'll add a language to the character and flag it as N

Except the eval scripts tell me I can't have two Native languages.

I'm afraid this is in a place you won't be able to get at it. I'm sorry to say that you'll have to ignore the error message for this for a while.
 
I'm afraid this is in a place you won't be able to get at it. I'm sorry to say that you'll have to ignore the error message for this for a while.

*sigh* Ok...

What about my other question as to how to test for a quality on the character to see if they have the Born Rich Quality (qubornrich) ?
 
Now if I could only figure out how to check if a quality is present on a character.

Along the top of the Hero Lab window, find the develop menu. Make sure the first option there, "Enable Data File Debugging" is checked.

Now, at the bottom of that menu, choose "Floating Info Windows", then "Show Hero Tags".

Watch the menu that pops up as you add and delete some qualities on a test character - you'll see that a Quality tag from each one is added to the character (actually, 2 of each - I'll have to figure out what's duplicating those), along with an Ability tag. So, what you want to do is test for the presence of that tag:

Code:
if (hero.tagis[Quality.TheIdOfYourQuality] <> 0) then
 
After looking for a while, I finally found the script in question that sets the max BP. Judging by the wording of your earlier post, you did as well. It's a Resource called Starting Resources BP, you might have to scroll down a bit to see where it mentions rsGearBP and you're right about the value being hard-coded into the script. Perhaps copying the script, setting the timing to be a little bit later than the original and overwriting the effects of the original script might be possible. You could just add a check for the born rich quality there, and if it passes change the number to 60. Now, this is probably horribly inefficient and exceedingly dirty :( But it might be one option.

Rather than fooling with the timing, when you create your copy, write down the unique Id of the original version (it'll be in parentheses after the name of the thing you're copying). Then, type that Id into the "Replaces Thing Id" box on the right-hand side - what you're creating will now be a replacement for what's there, instead of a new thing.
 
Along the top of the Hero Lab window, find the develop menu. Make sure the first option there, "Enable Data File Debugging" is checked.

Now, at the bottom of that menu, choose "Floating Info Windows", then "Show Hero Tags".

Watch the menu that pops up as you add and delete some qualities on a test character - you'll see that a Quality tag from each one is added to the character (actually, 2 of each - I'll have to figure out what's duplicating those), along with an Ability tag. So, what you want to do is test for the presence of that tag:

Code:
if (hero.tagis[Quality.TheIdOfYourQuality] <> 0) then

Thank you!

Where is that in the Wiki? I've been lost there trying to figure out how to test for things.... OMG I can add so much now... still can't do 2nd native languages, but I can do so much!
 
http://hlkitwiki.wolflair.com/index.php5/Pick_Context#references

I have this page of the wiki bookmarked: http://hlkitwiki.wolflair.com/index.php5/Kit_Reference

Looking at that, my recently followed links are:
Other Language Statements
Language Intrinsics
Formatting with Encoded Text
Target References (within target references, I usually only need "Pick Target References", which is the link I posted at the top of this thread).

Although I haven't needed the rest in a while, you'll probably also take a look at everything else in the Scripting Language section (probably best done in order).
 
Last edited:
Looking for help on a script for In Debt.

I'm not a coder, so the scripting functionality seems a bit arcane to me. Nonetheless, I have a number of characters that make use of the In Debt negative quality. Is there someone in the community that is more savvy that could provide that script?

I posted the question here as it will require modifying a base script for maximum nuyen limit.

Thanks much in advance.
 
Back
Top