Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Arcane Thesis (http://forums.wolflair.com/showthread.php?t=44854)

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

CptCoots July 9th, 2013 11:16 AM

Easy Metamagic eval
 
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

Sendric July 9th, 2013 11:24 AM

Quote:

Originally Posted by CptCoots (Post 160602)
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.

CptCoots 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

Sendric July 9th, 2013 11:59 AM

Quote:

Originally Posted by CptCoots (Post 160610)
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.

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

Sendric July 9th, 2013 12:09 PM

Quote:

Originally Posted by CptCoots (Post 160612)
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.

CptCoots July 9th, 2013 12:19 PM

Hey Sendric, we just kicked those feats' ass.

Sendric July 9th, 2013 12:21 PM

Quote:

Originally Posted by CptCoots (Post 160614)
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.

Lord Magus 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


All times are GMT -8. The time now is 03:12 PM.

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