Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Just a quick note. The second script is expecting this feat to be named "xAltForm".
One possible solution to the problem of returning the character back to normal. Create an adjustment that bootstraps this feat and adds it when activated. Then when the adjustment is deactivated, it will remove the feat and the character should go back to normal. Also, nice work Kendall, and thanks for sharing it. Last edited by Sendric; May 8th, 2012 at 09:01 AM. |
#11 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
What I did was, I just added the Helper.ShowCharge tag to the xAltForm (or whatever you want to call yours, as I alluded to), then added an hName1 that I named "Active" that will only apply the changes while checked. Then all I needed to do was add a doneif statement checking this at the beginning of each script.
Thanks for the compliment. I've been trying various methods to improve what I have, but unfortunately, tags that are added while live are not accessible (such as wMain tags, livename fields, etc). I'm still playing around with the script, but it is a good starting point for any improvements. For example, I've already started adding Type.XXX tags to each monsters and appended each ftCandExpr (I think that is the field name off the top of my head) with inclusions of only those Type.XXX and/or RaceSize.XXX tags. Unfortunately, that lead to more upkeep, as I have to add the Type.XXX tags to each race, but no worries, it's just time. |
#12 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
I've even thought of a more elaborate, but better and more thorough way to get this done. There is a "foreach actor in portfolio" command, where you can pull the idstring from the chosen race, then look in the current portfolio for that race (which could be loaded up), and then you would actually be able to pull the tags from it. It's a little more complex, since you may have to load a creature into a portfolio that isn't in the fight, but you can also pretty easily exclude them from the combat as well. It may turn out to be a better, and more thorough, shape changing solution. Stay tuned.
|
#13 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Dang. It works that I can go through each actor in the portfolio by loading up a complete creature that will be copied and accessing all its bootstraps and fields. Unfortunately, only the active hero is live, as attempts to access another hero in the portfolio results in the same as what has already been done here. So with the inactive hero not being live, this also is not a solution. I've done the best I can at this point.
|
#14 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Your work has given me a chance to take a new approach to the Wild Shape issue. Instead of creating a new class with a custom ability, I am modifying the class special Wild Shape to grant a feat (called Wild Shape) that functions basically the same as your Alternate Form feat. I modified it to only allow animals for now, and I'm seeing a problem where the ability scores aren't changing. I haven't yet figured out why, but its a far cry better than what I was doing.
Edit: Whoops. Ability scores weren't changing because I hadn't yet chosen a race for my druid. Last edited by Sendric; May 10th, 2012 at 10:26 AM. |
#15 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
I had a thought that might help assign natural weapons. Start with a foreach loop to look for various natural weapons then assign a custom tag. Then you could create various bootstraps that are conditional upon those custom tags being present. This would likely require making specials like I did with my custom ability. I don't have time to try it out now, but I wanted to write it down somewhere so I don't forget it. Hopefully tomorrow I can take a crack at this.
|
#16 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
My code turns out to have a few errors, just so you know. It was calculating the sizes wrong, something I didn't test thoroughly enough the first time through to be aware of it.
You have to add the Helper.ShowCharge to the tags for this part to work. Then when you choose a race, you also have to select the ability as active. On each creature with the Alternate Form (or Change Shape) ability I append to the ftCandExpr field to get the right creatures up for each one. First/105 Code:
~ Set our selector so that we can return to normal. field[hName1].text = "Active" First/110 Code:
doneif (field[hIsOn1].value = 0) ~ If we haven't chosen anything, get out now. doneif (field[fChosen].ischosen = 0) ~ Determine new size. var newsize as number if (field[fChosen].chosen.tagis[RaceSize.Fine?] <> 0) then newsize = -4 elseif (field[fChosen].chosen.tagis[RaceSize.Dimin?] <> 0) then newsize = -3 elseif (field[fChosen].chosen.tagis[RaceSize.Tiny?] <> 0) then newsize = -2 elseif (field[fChosen].chosen.tagis[RaceSize.Small?] <> 0) then newsize = -1 elseif (field[fChosen].chosen.tagis[RaceSize.Medium?] <> 0) then newsize = 0 elseif (field[fChosen].chosen.tagis[RaceSize.Large?] <> 0) then newsize = 1 elseif (field[fChosen].chosen.tagis[RaceSize.Huge?] <> 0) then newsize = 2 elseif (field[fChosen].chosen.tagis[RaceSize.Gargant?] <> 0) then newsize = 3 elseif (field[fChosen].chosen.tagis[RaceSize.Colossal?] <> 0) then newsize = 4 endif ~ Set all our physical changes. var oldsize as number foreach pick in hero from BaseRace where "thingid.r?" each.field[rSTR].value = field[fChosen].chosen.field[rSTR].value each.field[rDEX].value = field[fChosen].chosen.field[rDEX].value each.field[rCON].value = field[fChosen].chosen.field[rCON].value each.field[rAC].value = field[fChosen].chosen.field[rAC].value each.field[rSpeed].value = field[fChosen].chosen.field[rSpeed].value if (field[fChosen].chosen.tagis[RaceSize.Fine?] <> 0) then oldsize = -4 elseif (each.tagis[RaceSize.Dimin?] <> 0) then oldsize = -3 elseif (each.tagis[RaceSize.Tiny?] <> 0) then oldsize = -2 elseif (each.tagis[RaceSize.Small?] <> 0) then oldsize = -1 elseif (each.tagis[RaceSize.Medium?] <> 0) then oldsize = 0 elseif (each.tagis[RaceSize.Large?] <> 0) then oldsize = 1 elseif (each.tagis[RaceSize.Huge?] <> 0) then oldsize = 2 elseif (each.tagis[RaceSize.Gargant?] <> 0) then oldsize = 3 elseif (each.tagis[RaceSize.Colossal?] <> 0) then oldsize = 4 endif nexteach newsize -= oldsize herofield[tSize].value += newsize ~ Change our extraordinary special attacks. foreach pick in hero from BaseSpec where "((thingid.x? | thingid.r?) & AbilType.Extra & SpecType.Attack) | thingid.xBrthWpn | thingid.xGaze | thingid.xFly | thingid.xBurrow | thingid.xClimb | thingid.xSwim" perform each.assign[Helper.SpcDisable] nexteach ~ List of new extraordinary special attacks. var counter as number counter = 0 foreach bootstrap in field[fChosen].chosen where "(thingid.x? | thingid.r?) & AbilType.Extra & SpecType.Attack" if (counter <> 0) then hero.child[xAltForm].field[CustDesc].text &= ", " & eachthing.field[name].text else hero.child[xAltForm].field[CustDesc].text = hero.child[xAltForm].field[CustDesc].text & "{br}{vert 7}Extraordinary Special Attacks: " & eachthing.field[name].text endif counter += 1 nexteach if (counter <> 0) then hero.child[xAltForm].field[CustDesc].text &= "." endif ~ List our new movement modes. counter = 0 foreach bootstrap in field[fChosen].chosen where "thingid.xBurrow | thingid.xClimb | thingid.xFly | thingid.xSwim" if (counter <> 0) then hero.child[xAltForm].field[CustDesc].text &= ", " & eachthing.field[name].text else hero.child[xAltForm].field[CustDesc].text = hero.child[xAltForm].field[CustDesc].text & "{br}{vert 7}Movement Types: " & eachthing.field[name].text endif counter += 1 nexteach if (counter <> 0) then hero.child[xAltForm].field[CustDesc].text &= "." endif ~ List our new natural attacks. counter = 0 foreach bootstrap in field[fChosen].chosen where "component.BaseNatWep" if (counter <> 0) then hero.child[xAltForm].field[CustDesc].text &= ", " & eachthing.field[name].text else hero.child[xAltForm].field[CustDesc].text = hero.child[xAltForm].field[CustDesc].text & "{br}{vert 7}Natural Attacks: " & eachthing.field[name].text endif counter += 1 nexteach if (counter <> 0) then hero.child[xAltForm].field[CustDesc].text &= "." endif |
#17 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
|
|
#18 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
You may be right, but I usually start off small. The hope is that I can find a way to carry the various flags like NatPrimary and damage dice over to the new form. It may not be possible, but I'll give it a whirl and let you know what happens.
Also, thanks for the update. I hadn't played around with size changes enough to see any problems. |
#19 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
For some reason (probably cause I'm dumb), I'm having a hard time determining if the Helper.NatPrimary tag exists on something. Here's the code I'm trying and failing with:
Code:
foreach bootstrap in field[fChosen].chosen where "component.BaseNatWep & thingid.wBite" if (tagis[Helper.NatPrimary] <> 0) then blah blah blah endif nexteach |
#20 |
|
|