Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
CptCoots
Senior Member
 
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102

Old July 9th, 2013, 10:43 AM
doneif (isgizmo <> 0)

this actually breaks the entire script. It always seems to make it fail.

EDIT: changed the spell string that we're using for the top foreach loop to
spell = "thingid." & id&" & Helper.CustomItem"

Last edited by CptCoots; July 9th, 2013 at 11:05 AM.
CptCoots is offline   #21 Reply With Quote
CptCoots
Senior Member
 
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102

Old July 9th, 2013, 11:16 AM
So popping in the tag on the Metamagic feat and testing it out worked. As usual I put my timing in Final with a huge number.

First - Grab the metamagic feat chosen
Second - Grab customized spells
Third - Grab customized spell's level
Fourth - Grab the original spell's level
Fifth- Is our metamagic feat there? ->increment level reduction
sixth - overhead.

var Lvl as number
var LvlRed as number
var MMg as string
var nlvl as number
var BLvl as number

doneif (field[fChosen].ischosen = 0)

MMg = field[fChosen].chosen.field[mmAbbr].text

foreach pick in hero where "NeedHelper.CustomSpl"
~Grab current level of the customized spell
Lvl = eachpick.field[sLevel].value
LvlRed=0
~Need the level of the base spell; I anticipate that this foreach
~will only find one thing.

foreach pick in eachpick.gizmo from BaseSpell
BLvl=eachpick.field[sLevel].value
nexteach

~Look for the metamagic chosen within the gizmos
foreach pick in eachpick.gizmo from BaseMetamg
if (compare(eachpick.field[mmAbbr].text,MMg) = 0) then
LvlRed += 1
endif
nexteach

nlvl=maximum(Lvl-LvlRed,BLvl)
perform eachpick.delete[sLevel.?]

~Set the field.
eachpick.field[sLevel].value=nlvl

~Set the correct tag
if (eachpick.field[sLevel].value = 0) then
perform eachpick.assign[sLevel.0]
elseif (eachpick.field[sLevel].value = 1) then
perform eachpick.assign[sLevel.1]
elseif (eachpick.field[sLevel].value = 2) then
perform eachpick.assign[sLevel.2]
elseif (eachpick.field[sLevel].value = 3) then
perform eachpick.assign[sLevel.3]
elseif (eachpick.field[sLevel].value = 4) then
perform eachpick.assign[sLevel.4]
elseif (eachpick.field[sLevel].value = 5) then
perform eachpick.assign[sLevel.5]
elseif (eachpick.field[sLevel].value = 6) then
perform eachpick.assign[sLevel.6]
elseif (eachpick.field[sLevel].value = 7) then
perform eachpick.assign[sLevel.7]
elseif (eachpick.field[sLevel].value = 8) then
perform eachpick.assign[sLevel.8]
else
perform eachpick.assign[sLevel.9]
endif
nexteach
CptCoots is offline   #22 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,744

Old July 9th, 2013, 11:24 AM
Quote:
Originally Posted by CptCoots View Post
doneif (isgizmo <> 0)

this actually breaks the entire script. It always seems to make it fail.

EDIT: changed the spell string that we're using for the top foreach loop to
spell = "thingid." & id&" & Helper.CustomItem"
Awesome. I was trying to figure this one out, but was getting nowhere. Sorry about that.

And thanks for the Easy Metamagic script. Looks good.

Last edited by Sendric; July 9th, 2013 at 11:26 AM.
Sendric is online now   #23 Reply With Quote
CptCoots
Senior Member
 
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102

Old July 9th, 2013, 11:31 AM
The timing has to be adjusted to get all the levels to change correctly:
Pre-levels 5000 works

Oh and the custom metamagic items are throwing:
Live state of gizmo 'CustSpell' is being tested before live state of parent pick 'sCustomSpl' is resolved
CptCoots is offline   #24 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,744

Old July 9th, 2013, 11:59 AM
Quote:
Originally Posted by CptCoots View Post
The timing has to be adjusted to get all the levels to change correctly:
Pre-levels 5000 works

Oh and the custom metamagic items are throwing:
Live state of gizmo 'CustSpell' is being tested before live state of parent pick 'sCustomSpl' is resolved
I'm not seeing this error, though I did realize that a script on a metamagic item doesn't seem to do anything. It looks like I will just have to add the tags to every available metamagic feat.
Sendric is online now   #25 Reply With Quote
CptCoots
Senior Member
 
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102

Old July 9th, 2013, 12:02 PM
I did:
Final Phase 30000
if (hero.pickexists[fRepeatSpl] <>0) then
perform assign[User.EasyMM]
endif

and added the User Tags via the gui button and made sure to replace the stock metamagic item... it is working for me, except for the error.
CptCoots is offline   #26 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,744

Old July 9th, 2013, 12:09 PM
Quote:
Originally Posted by CptCoots View Post
I did:
Final Phase 30000
if (hero.pickexists[fRepeatSpl] <>0) then
perform assign[User.EasyMM]
endif

and added the User Tags via the gui button and made sure to replace the stock metamagic item... it is working for me, except for the error.
Yea. I think you can ignore the script and just add the tag through the gui. Also, Repeat Spell isn't a stock item. You can just modify the existing one in the Complete Arcane file. I only used replace thingid on Quicken cause its an original d20 metamagic feat and we can't modify that one.

Note: I am seeing the error now.

Update: Reload the code (ctrl-r) and the error goes away.

Last edited by Sendric; July 9th, 2013 at 12:16 PM.
Sendric is online now   #27 Reply With Quote
CptCoots
Senior Member
 
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102

Old July 9th, 2013, 12:19 PM
Hey Sendric, we just kicked those feats' ass.
CptCoots is offline   #28 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,744

Old July 9th, 2013, 12:21 PM
Quote:
Originally Posted by CptCoots View Post
Hey Sendric, we just kicked those feats' ass.
I feel pretty good about that. Especially since I accomplished absolutely nothing else at work today. Drinks all around.
Sendric is online now   #29 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 355

Old July 9th, 2013, 04:43 PM
You guys just might have solved my years-old quandary about how to code the Forgotten Realms PrC Incantatrix' capstone power, which I had tried to script years ago but was told then that it probably couldn't be done without shenanigans such as rescripting the entire metamagic feats.

Kudos for that! Please try to craft your system so that said PrC could use it as well. Thanks.

*the power in question reduces the cost of all metamagic used by the character by 1 level, without bringing it lower than 1
Lord Magus is offline   #30 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 06:38 PM.


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