Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
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. |
#21 |
Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
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 |
#22 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
And thanks for the Easy Metamagic script. Looks good. Last edited by Sendric; July 9th, 2013 at 11:26 AM. |
|
#23 |
Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
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 |
#24 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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.
|
#25 |
Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
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. |
#26 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
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. |
|
#27 |
Senior Member
Join Date: Apr 2013
Location: Poughkeepsie, NY
Posts: 102
|
Hey Sendric, we just kicked those feats' ass.
|
#28 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#29 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
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 |
#30 |
|
|