Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Shadowrun (http://forums.wolflair.com/forumdisplay.php?f=75)
-   -   How do you alter the base eval scripts? (http://forums.wolflair.com/showthread.php?t=13649)

cryptoknight August 6th, 2011 12:09 PM

How do you alter the base eval scripts?
 
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

orewashinigamiza August 6th, 2011 09:41 PM

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.

RavenX August 6th, 2011 11:10 PM

"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.

cryptoknight August 7th, 2011 06:25 AM

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.

Mathias August 11th, 2011 11:52 AM

Quote:

Originally Posted by cryptoknight (Post 60060)
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.

cryptoknight August 11th, 2011 11:59 AM

Quote:

Originally Posted by Mathias (Post 60482)
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) ?

Mathias August 11th, 2011 12:02 PM

Quote:

Originally Posted by cryptoknight (Post 60092)
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

Mathias August 11th, 2011 12:04 PM

Quote:

Originally Posted by orewashinigamiza (Post 60079)
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.

cryptoknight August 11th, 2011 12:31 PM

Quote:

Originally Posted by Mathias (Post 60485)
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!

Mathias August 11th, 2011 01:01 PM

http://hlkitwiki.wolflair.com/index....ext#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).


All times are GMT -8. The time now is 09:50 PM.

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