Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
tekknowkub
Junior Member
 
Join Date: Mar 2014
Location: Milwaukee, WI
Posts: 20

Old October 23rd, 2022, 08:43 PM
I am trying to program the following feat from the Pathfinder sourcebook In the Company of Dragons Expanded. I have the base In the Company of Dragons source already purchased and need some assistance on how I can add this as a feat. The material also says there is an adjustment in HL for Dracomorphosis but I can only assume it was removed at some point because I can't find it.

Legendary Size (Dragon)
You are a dragon of truly prodigious size.
Prerequisite: dracomorphosis class feature, character level 8th
Benefit: Increase your effective level by 2 when determining the effects of dracomorphosis. If you have at least 20 class levels in classes with the draconic hero archetype, gain the Colossal size and other benefits of the draconic exemplar’s great wyrm class feature. If you have at least 20 draconic exemplar class levels, gain an additional +2 size bonus to Strength and Constitution.

How do I grant the Great Wyrm [cRPDraGrea] class special ability at level 20?

I'm using the following but its throwing an error.

if (HeroLev >= 20) then
perform hero.assign[cRPDraGrea]
endif

Last edited by tekknowkub; October 24th, 2022 at 04:11 AM.
tekknowkub is offline   #1 Reply With Quote
tekknowkub
Junior Member
 
Join Date: Mar 2014
Location: Milwaukee, WI
Posts: 20

Old October 24th, 2022, 04:25 PM
I have created the following Eval Script to attempt to replace the existing variable hero.child[xRPDraDrac].field[abValue5].value = maximum(ExIncr1,HeroIncr1)

Generally when I click Test it seems to work ok but if I add levels or restart Hero Lab the feat stops working again.

Can anyone assist?

First, 401, Index 1

~if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

var ExLev as number
var HeroLev as number
var HeroLev1 as number
var ExIncr1 as number
var HeroIncr1 as number
ExLev = 0
call DracHero

if (#levelcount[DraconicE] >= 1) then
ExLev = #levelcount[DraconicE]+2
hero.childfound[cRPDraDra4].field[xExtraLev].value += 2
elseif (HeroLev >= 1) then
HeroLev1 = HeroLev+2
hero.childfound[cRPDraDra5].field[xExtraLev].value += 2
endif

ExIncr1 = round(ExLev/4,0,-1)

if (HeroLev <= 19) then
HeroIncr1 = round(HeroLev1/5,0,-1)
elseif (HeroLev >= 20) then
HeroIncr1 = 5
perform hero.childfound[abCITDraHGrtWyrm].assign[Helper.ShowSpec]
endif

~debug "ExLev = " & ExLev
~debug "HeroLev = " & HeroLev

~ store for later script use
hero.child[xRPDraDrac].field[abValue5].value = maximum(ExIncr1,HeroIncr1)
tekknowkub is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old October 25th, 2022, 08:21 AM
Why have this script running ultra-early? At First/401? Normally, a script that's just altering xExtraLev I'd put in the pre-levels phase, and then use normal timings - I prefer multiples of 10000.

Where is the HeroLev variable set?

The xRPDraDrac pick - what phase & priority does its script to set abValue5 run?
Mathias is online now   #3 Reply With Quote
tekknowkub
Junior Member
 
Join Date: Mar 2014
Location: Milwaukee, WI
Posts: 20

Old October 27th, 2022, 03:23 PM
I'm not sure where HeroLev is set. I copied this eval script from the In the Company of Dragons, altered it a bit and then set it to run immediately after the original. The xExtraLev is just for the text of the power, the actual mechanics come from whats stored in abValue5 and the other variables based on it.

The Ability, Dracomorphosis (Functional) is xRPDraDrac. It have EvalScripts running at Pre-Attributes/10000, Post-Attributes/10000, First/400, First/401, Post-Attributes/9000
tekknowkub is offline   #4 Reply With Quote
ploturo
Member
 
Join Date: May 2021
Posts: 84

Old October 29th, 2022, 09:20 PM
In case it helps, the line in the script that reads
Quote:
call DracHero
is calling a procedure that the original Company of Dragons datafiles added to Herolab, and you should be able to view the script for that procedure with the editor to see exactly how it is getting or calculating the variables it uses.

Open the editor, and in the "General" tabs there is a "*Procedure" tab. Hit the "New Copy" button and choose the entry for "DracHero" in that list, and you will be able to read the script in the new copy you make.

You can't edit the original DracHero procedure used by the Company of Dragons data files, but sometimes it is helpful to see the code being used.
ploturo is offline   #5 Reply With Quote
tekknowkub
Junior Member
 
Join Date: Mar 2014
Location: Milwaukee, WI
Posts: 20

Old October 30th, 2022, 04:06 PM
Quote:
Originally Posted by ploturo View Post
In case it helps, the line in the script that reads

is calling a procedure that the original Company of Dragons datafiles added to Herolab, and you should be able to view the script for that procedure with the editor to see exactly how it is getting or calculating the variables it uses.

Open the editor, and in the "General" tabs there is a "*Procedure" tab. Hit the "New Copy" button and choose the entry for "DracHero" in that list, and you will be able to read the script in the new copy you make.

You can't edit the original DracHero procedure used by the Company of Dragons data files, but sometimes it is helpful to see the code being used.
ploturo, Thank you for this I had no idea how to find it. I can do minor edits but I am not very experienced in creating new HL classic content. Looks like its just calculating how many Draconic Hero archetypes levels have been taken.

Here is the Procedure DracHero


~ calculate Draconic Hero level

var HeroLev as number
HeroLev = 0

if (hero.tagis[ClassVary.arAlcDraco] <> 0) then
HeroLev += #levelcount[Alchemist]
endif
if (hero.tagis[ClassVary.arBbnDraco] <> 0) then
HeroLev += #levelcount[Barbarian]
endif
if (hero.tagis[ClassVary.arBrdDraco] <> 0) then
HeroLev += #levelcount[Bard]
endif
if (hero.tagis[ClassVary.arCavDraco] <> 0) then
HeroLev += #levelcount[Cavalier]
endif
if (hero.tagis[ClassVary.arClrDraco] <> 0) then
HeroLev += #levelcount[Cleric]
endif
if (hero.tagis[ClassVary.arDrdDraco] <> 0) then
HeroLev += #levelcount[Druid]
endif
if (hero.tagis[ClassVary.arFtrDraco] <> 0) then
HeroLev += #levelcount[Fighter]
endif
if (hero.tagis[ClassVary.arGunDraco] <> 0) then
HeroLev += #levelcount[Gunsling]
endif
if (hero.tagis[ClassVary.arInqDraco] <> 0) then
HeroLev += #levelcount[Inquisito]
endif
if (hero.tagis[ClassVary.arMagDraco] <> 0) then
HeroLev += #levelcount[Magus]
endif
if (hero.tagis[ClassVary.arMnkDraco] <> 0) then
HeroLev += #levelcount[Monk]
endif
if (hero.tagis[ClassVary.arOraDraco] <> 0) then
HeroLev += #levelcount[Oracle]
endif
if (hero.tagis[ClassVary.arPalDraco] <> 0) then
HeroLev += #levelcount[Paladin]
endif
if (hero.tagis[ClassVary.arRgrDraco] <> 0) then
HeroLev += #levelcount[Ranger]
endif
if (hero.tagis[ClassVary.arRogDraco] <> 0) then
HeroLev += #levelcount[Rogue]
endif
if (hero.tagis[ClassVary.arSorDraco] <> 0) then
HeroLev += #levelcount[Sorcerer]
endif
if (hero.tagis[ClassVary.arSumDraco] <> 0) then
HeroLev += #levelcount[Summoner]
endif
if (hero.tagis[ClassVary.arTasDraco] <> 0) then
HeroLev += #levelcount[Taskshape]
endif
if (hero.tagis[ClassVary.arWitDraco] <> 0) then
HeroLev += #levelcount[Witch]
endif
if (hero.tagis[ClassVary.arWizDraco] <> 0) then
HeroLev += #levelcount[Wizard]
endif
tekknowkub is offline   #6 Reply With Quote
tekknowkub
Junior Member
 
Join Date: Mar 2014
Location: Milwaukee, WI
Posts: 20

Old October 31st, 2022, 08:02 AM
I'm running this eval script at First/400/2 because I want it to run and replace the values set but the original eval script for ITC.

The racial size increase only works when I click "Test Now!", if I close Hero Lab or quick reload the files the size increase no longer functions. However the attributes increase adjust correctly.

I really appreciate any assistance.

~ determine new dracomorphosis increment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

var ExLev as number
var HeroLev as number
var HeroLev1 as number
var ExIncr1 as number
var HeroIncr1 as number
var incr as number
ExLev = 0
call DracHero

if (#levelcount[DraconicE] >= 1) then
ExLev = #levelcount[DraconicE]+2
hero.childfound[cRPDraDra4].field[xExtraLev].value += 2
elseif (HeroLev >= 1) then
HeroLev1 = HeroLev+2
hero.childfound[cRPDraDra5].field[xExtraLev].value += 2
endif

ExIncr1 = round(ExLev/4,0,-1)

if (HeroLev <= 19) then
HeroIncr1 = round(HeroLev1/5,0,-1)
elseif (HeroLev >= 20) then
HeroIncr1 = 5
perform hero.childfound[abCITDraHGrtWyrm].assign[Helper.ShowSpec]
endif

~debug "ExLev = " & ExLev
~debug "HeroLev = " & HeroLev

~ store for later script use
hero.child[xRPDraDrac].field[abValue5].value = maximum(ExIncr1,HeroIncr1)
field[abValue5].value = maximum(ExIncr1,HeroIncr1)

incr = hero.child[xRPDraDrac].field[abValue5].value
tekknowkub is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old October 31st, 2022, 08:40 AM
Let's go back to the basics - are you working in the right folder? In the main HL window, in the Tools menu, choose Explore Folders, and then Game System Data Folder. That'll open a folder from your computer - is the file you're creating this content in within that folder (and not a sub-folder)? Having a file somewhere else is something that can create the symptom of things only working after test now - HL only loads files from the correct folder when loading, but the test now operation just patches that one item into the database, and where the file it's from is located isn't checked.
Mathias is online now   #8 Reply With Quote
mikejacobs99
Junior Member
 
Join Date: Sep 2012
Posts: 6

Old October 31st, 2022, 07:47 PM
wow, this is weird. I did the HL coding for the original In the Company of Dragons, sooo long ago now (2016, according my files.)

I have my original source code, if you need to see any bits. (It's been a while, don't remember too much about HL coding these days.)
mikejacobs99 is offline   #9 Reply With Quote
tekknowkub
Junior Member
 
Join Date: Mar 2014
Location: Milwaukee, WI
Posts: 20

Old November 1st, 2022, 10:55 AM
I am coming at this from a different angle now. I found that the Dracomorphosis (functional) ability is actually assigned at the Race Taninim and I have been trying to attack it from a feat perspective. My though is to create an alternate racial trait that will replace the core Dracomorphosis ability with a custom one I create that allows for alterations from the expanded book.
tekknowkub 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 02:21 PM.


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