Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old January 18th, 2019, 04:22 PM
Unfortunately, I haven't been able to find enough documentation on Configurables to figure out if what I'm trying to do is even possible.

Our group was discussing that putting a point in Linguistics gives you a language, but your understand of that language might be more rudimentary. While in this state, you might need some Linguistics checks to see if you understand it correctly or can communicate your idea properly. Taking the language a second time would grant mastery/fluency in that language.

So what I envisioned is this:
A Configurable with 2 list selections: Rudimentary Languages and Fluent Languages. A combination between INT bonus and Linguistic ranks would determine the number of 'Language Points' you have. You could either 'spend' that language point learning the fundamentals of a new language or upgrading a Rudimentary Language to Fluency. So the first selection should be all languages not already selected and the second one should be the selection list from the first selection.

I created a configurable, but since everything on there is abilities, it doesn't seem to want to show languages as an option (my candidate expression returns no results for Component.BaseLang).

Can anyone point me in the direction of the magic juju for Configurables or offer a suggested better way to accomplish what I described?
Valdacil is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 20th, 2019, 01:36 PM
Configurables do have a table devoted to adding languages, but just one. Is your intention to cut out adding languages on the background (starting languages) and personal (for linguistic ranks learned languages) completely?

If so, I would zero those out entirely (IIRC the totals for starting and learned languages are stored in herofields) then create a configurable which had two tables. The language table to choose whichever languages you like, and an ability table to add any number of copies of a single pick.

The Single Pick would have a selector to choose among languages, and the Helper.Incrementer tag (which will show an incrementer for you to decide how many of your Language Points are spent toward the chosen language. It would also have an eval script to alter the livename of the chosen language, based on the value of the increenter, to append either "Rudimentary" or "Fluent"
Aaron is offline   #2 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old January 25th, 2019, 07:34 PM
Your tips gave me a way to go after this. I created the configurable for Languages and an ability called Language Picker. Language Picker has a drop down to select a language, and an incrementer (the exact tag is Helper.Increment since it was made when the limit was still 10 characters). I've got an eval script that loops through all picks and totals the incrementers to set that value for cfgSpent1. I have another eval script that grabs herofield[tLangsSta].value and herofield[tLangsSpk].value, sets cfgMax1 to the sum of those values, then zeros them out. So high INT and points in Linguistics shift selections to the Languages tab.

Now I'm trying to figure out how to resolve automatically added languages. Example: certain human heritages will grant the regional language; elves, dwarfs, etc get their native language; druids get Druidic. Ideally, I could programmatically detect the presence of one of these languages (foreach pick in hero from BaseLang), add a Language Picker to the Languages tab, select the language and increment the incrementer by 2, then add 2 to the cfgMax1 field. Is this possible?
Valdacil is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 26th, 2019, 07:37 PM
There is a toggle on the background tab for replacing the default languages for NPCs, I believe, giving free slots for each suppressed languages. IIRC, that is also connected to a herofield, but since it is a user field you'd have to do a "trustme" if you wanted to toggle it in a script. I'm also not 100% sure it would work for PCs, but I think it might.

If it turns out that the toggle is limited to NPCs, I can look into how it accomplishes that in the background and see if you can adapt that.
Aaron is offline   #4 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 26th, 2019, 07:39 PM
Also, sorry for the wrong ID for the Helper tag, sometimes my memory fails me.
Aaron is offline   #5 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old January 27th, 2019, 01:11 PM
I looked into your idea. It was a good idea, but the toggle only replaces Common. So if your race is Elf granting you Elvish and Common, the checkbox only removes Common (leaving behind Elvish). Also if you choose a human ethnicity (like Varisian) that grants Common and Varisian, the toggle only removes Common leaving Varisian.
Valdacil is offline   #6 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 27th, 2019, 02:51 PM
Wrong toggle, the one inside the Customize form (the button for it is just right of the race selection) clears all languages bootstrapped to the race, though it won't get ones bootstrapped from an ethnicity or something else.

The actual code for this triggers off a hero tag applied when the toggle is switched, and is run from the race component.

First 50
Code:
      ~If we're customizing languages for this race, find the languages we
      ~bootstrap and disable them
      if (hero.tagexpr[Hero.NoPreSel | Hero.RacCstLang] <> 0) then
        var addlang as number
        foreach pick in hero from BaseLang where "!Helper.SpeakLang"
          if (eachpick.isroot <> 0) then
            if (eachpick.root.isidentity[thingid] <> 0) then
              perform eachpick.assign[Hide.Language]
              addlang += 1
              endif
          elseif (eachpick.tagis[thingid.lCommon] <> 0) then
            perform eachpick.assign[Hide.Language]
            addlang += 1
            endif
          nexteach
        field[rLangBonus].value += addlang

        ~ Customized races can replace the removed ones with any language
        perform assign[Language.Any]
        endif
Fortunately, the actual mechanism is just applying a Hide tag, it seems, and counting each application to add to the field later.
Aaron is offline   #7 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old January 27th, 2019, 04:04 PM
I noticed something similar looking at the tags on lCommon and another language when toggling the Hide Common toggle on the Background screen.

Thank you for the code snippet, it's always super useful to see what is going on behind the scenes. Any ideas for adding an instance of the Language Picker ability to the Configurable table and setting it to the hidden language?

Also, is there a tag or field to limit the incrementer to 1 or 2? Right now it starts at 0 and could be any number. I've coded it for Rudamentary if 1 and Fluent if 2, Error if >2; but it would be much better if not even allowed.
Valdacil is offline   #8 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 27th, 2019, 04:53 PM
Quote:
Originally Posted by Valdacil View Post
Any ideas for adding an instance of the Language Picker ability to the Configurable table and setting it to the hidden language?
I'm not sure I understand what you're asking here, or why.

Quote:
Originally Posted by Valdacil View Post
Also, is there a tag or field to limit the incrementer to 1 or 2? Right now it starts at 0 and could be any number. I've coded it for Rudamentary if 1 and Fluent if 2, Error if >2; but it would be much better if not even allowed.
Check the debug for the pick with the incrementer, and find out which field is being incremented. Do you see a similarly named field which mentions Min, or Max? If so, those are probably the fields you'd need to set. You'd need to set them early, before whatever bound scripts run for that field.
Aaron is offline   #9 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old January 28th, 2019, 05:34 PM
Thanks for the tip for Min/Max. I'll take a look at that.

What I was asking about the adding an instance of the Language Picker is, let's say your race gets Elven automatically. I should be able to hide it and increase the allowed selections on the Configurable table to account for that. However, I'd like to take it a step further and automatically add a copy of the Language Picker to the Configurable table, set the drop down on that Language Picker to the same language disabled (Elven), and set the incrementer to 2. Basically, I want to 'move' the automatically granted language from the Background tab to the new Configurable.
Valdacil is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

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 11:03 PM.


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