Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 8th, 2012, 08:54 AM
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.
Sendric is offline   #11 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 8th, 2012, 01:41 PM
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.
Kendall-DM is offline   #12 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 9th, 2012, 11:05 AM
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.
Kendall-DM is offline   #13 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 10th, 2012, 09:08 AM
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.
Kendall-DM is offline   #14 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 10th, 2012, 10:24 AM
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.
Sendric is offline   #15 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 10th, 2012, 11:03 AM
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.
Sendric is offline   #16 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 10th, 2012, 01:29 PM
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"
Modified code:

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
Kendall-DM is offline   #17 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 10th, 2012, 01:42 PM
Quote:
Originally Posted by Sendric View Post
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.
I think you are being a bit ambitious with this. There is a lot of things that go into the attacks, whether they are primary or secondary, whether they do two-handed damage, a tag for each type of attack, a tag for each type of damage. That makes a bunch of custom tags, all of which have to be added to each creature (the actual attacks are easy enough, but the damage varies by which creature it is and how much it does). So each creature would have a tag for each damage and what type (primary, secondary, two-handed) and then each attack type would have a custom tag for its attack name basically (everything else is variable by creature). That's a ton of tags to assign, kind of a monumental task, and all for the possibility that the creature may be chosen as a race being mimicked. I, for one, thought of this and discarded it as far too much work for little reward.
Kendall-DM is offline   #18 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 11th, 2012, 05:04 AM
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.
Sendric is offline   #19 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 11th, 2012, 06:29 AM
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
Am I taking the completely wrong approach or is my if statement just not right?
Sendric is offline   #20 Reply With Quote
Reply


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 10:44 PM.


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