Lone Wolf Development Forums Advancement question
 Register FAQ Members List Search Today's Posts Mark Forums Read

 Notices 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

Senior Member

Join Date: Jun 2014
Posts: 239

August 22nd, 2019, 01:01 PM
I have a game system that increases the cost of increasing skills as they level.
How can I set the value of the field advCost to current value of the skill + 2.

and

to access the skill that was selected and the first seems to work. Except that all the fields are default values. It doesn't seem to matter what the phase and priority are set to, the values come back default.
It just came to me that this won't work without saving the value of the skill at the time the advancement was added, or the order they are processed in is important.

I know this has to be possible since Shadowrun works this way.

Any ideas of the direction to go in would be greatly appreciated.

Thanks,

Pathfinder: Player and GM

#1
Senior Member
Volunteer Data File Contributor

Join Date: Nov 2009
Posts: 1,444

August 22nd, 2019, 05:19 PM
How does your advancement system work? Points? If so, you just need to calculate the cost of skills with a function based on the total.
#2
Senior Member

Join Date: Jun 2014
Posts: 239

August 22nd, 2019, 06:33 PM
Each skill costs what you are going to +1.
Buying a new skills costs 1, as you are going to a 0.
going to a 1 costs 2, 2 costs 3, and so on.
I see in the advance component where it is setting the resource picks resSpent, but I've no idea where to set advCost, which itself is static, but that is easy to change.
I thought I would put code in the advance component replacing the use of advCost but when I try to access the pick that has been selected it gives me values that are the default. I tried changing the timing of when the script is run but still get default values.
I'm thinking something needs to set advCost but I'm not sure where or how to do so.
What's worse there are three pools of points that are used in advancement not 1. Different things are increase from different pools.

Pathfinder: Player and GM

#3
Senior Member
Volunteer Data File Contributor

Join Date: Nov 2009
Posts: 1,444

August 22nd, 2019, 07:30 PM
#4
Senior Member

Join Date: Jun 2014
Posts: 239

August 22nd, 2019, 08:13 PM
Okay I got it sort of working.
I was missing the linkage[basis] in the first incarnation of the code.
This gets the proper values, sort of.
If I add another advancement for the same skill both advancements get the latest skill value and cost out at that new value.
So if I go from not having the skill to having it costs correctly at 1 point.
As soon as I add the second advancement it costs 4, 2 for each. instead of 3. 1 and 2 respectively.

Code:
```perform gizmo.findchild[none,"Advance.Gizmo"].setfocus
doneif (state.isfocus = 0)
if (focus.tagis[Skill.?] <> 0) then
var value as number
value = focus.field[trtBonus].value
if (focus.tagis[User.Combat] = 0) then
var resLeft as number
if (resLeft >= value) then
elseif (resLeft > 0) then
else
endif
else
endif
endif```

Pathfinder: Player and GM

Last edited by ShadowWalker; August 22nd, 2019 at 08:19 PM.
#5
Senior Member

Join Date: Jun 2014
Posts: 239

August 23rd, 2019, 03:12 PM
I was able to get this working by using the history in the field.
In the above script I count the number of items in the history.
Compare it to the value of the field.
At the end of the script I attach a tag to the pick being advanced.
That way I can tell how many times the script has already run and I can then get the right cost.
If anyone can tell me a better way to do this please do. Thankfully the game only has 5 levels in skills. So this runs quick.

Pathfinder: Player and GM

#6
Senior Member

Join Date: Jun 2014
Posts: 239

August 30th, 2019, 02:25 PM
Ok. So After much digging and guess work I figured out how to do this.
I changed advCost to derived and persistence full.
The change script gets called only once and calculates the cost and stores that value in the now persistent advCost field.
Within the advance component I can now use the advCost field to assign cost to the correct pool of advancement points.

Pathfinder: Player and GM

#7

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Lone Wolf Development Web Site Announcements Realm Works Forums     Realm Works Discussion         Realm Works in Action         Realm Works Feature Requests     Realm Works in Action     Realm Works Feature Requests Hero Lab Online Forums     Hero Lab Online Discussion     HLO - Pathfinder 1st Edition     HLO - Pathfinder 2nd Edition     HLO - Starfinder     HLO - Shadowrun Hero Lab Forums     HL - Pathfinder Roleplaying Game     HL - D&D 5th Edition SRD     HL - Shadowrun     HL - Mutants & Masterminds     HL - d20 System     HL - World of Darkness     HL - Call of Cthulhu     HL - 4th Edition     HL - Savage Worlds     HL - Cortex System     HL - Authoring Kit     HL - User Projects     HL - Alternity (user-created)     Hero Lab Discussion Army Builder Forums     Army Builder Army Builder Data Files     Babylon 5: A Call to Arms     Battlefleet Gothic     Blood Bowl     Black Powder, Bolt Action, Hail Caesar, Judge Dredd, and Pike & Shotte     Confrontation - English     Kings of War (2nd Edition)     Lord of the Rings (Tabletop)     Mordheim     Necromunda     Starship Troopers     Star Wars: X-Wing and Armada Miniatures Game     The 9th Age     Warhammer Ancient Battles     Warhammer 40,000     Warhammer Fantasy 8th Ed.     Warhammer Historical: The Great War     Warhammer Fantasy 3rd Ed.     Warlord     Warmachine & Hordes     Warmaster Card Vault Forums     Card Vault Card Vault Data Files     MLB Showdown     Lord of the Rings CCG     .hack//ENEMY     Vs. System     Yu-Gi-Oh!     D&D Miniatures

All times are GMT -8. The time now is 10:05 AM.

 -- Default Style -- Majestic Contact Us - Lone Wolf Development Forums - Archive - Top