Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
I've noticed that a few of my foreach pick in hero have stopped working when they were working just fine previously. This puzzled me for a while until I discovered I could see what pick each thing is on.
The question I have is, does the foreach pick in hero behave differently than it did in a previous version? Are all things on a hero part of a foreach pick in hero or do I have to specifically indicate somehow that the pick is from another source. Here's my dilemma, I refactored the zombie ages ago to figure out my slam damage for me. I noticed that it no longer respects the following piece of code (the first sign something might be amiss). hero.child[wSlam].field[wDamage].value += damageup Where the damageup variable is determined by the size of the creature. However, no matter at what phase I place this, it always has the same 1d6 Slam damage (the base Medium size damage). Then I looked through some of my other code that sizes up all natural weapons in a template, that were working previously and they were as follows. foreach pick in hero from BaseNatWep eachpick.field[wDamage] += 1 nexteach And this also doesn't appear to be working. However, when I stack the two templates (in this case the Zombie template stacked on an Undead Lord template (the one indicated in the second code example), the second code would finally operate. Completely baffled by the behavior. If anyone has a clue, I'm all ears, because I can't decipher this conundrum. Thanks! |
#1 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
I tried this again today without changing anything and it now works. I did a short investigation running through a few scenarios.
What I've discovered is, that the damage tag or some other damage thing is keeping its state even after I've removed the template. As a result, that "memory" was affecting this and causing it to not work, even though I did tons of reloads on the files. It's inconsistent and baffling on what exactly causes it. And I haven't been able to recreate it except to use a foreach to all the weapons, then remove the foreach for all of them and apply it only to the one (wSlam) and the other natural weapons were being set to '0' and remembered. The other odd behavior is that after removing the zombie template, the creature's Charisma which was originally 2 was remembering the subtracted statistic and ends up at -7. Since the original creature had a -8, when the template was removed, the now "memory" of 1 was applying the -8, blech! Anyways, food for fodder. |
#2 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
And once again proven wrong. I've been able to reproduce, I created a tail slap attack on crocodiles (the thing I'm trying to zombify) that have a Slam attack already (which was livename changed to Tail Slap that I've since moved to Tentacle attack). Once I run the code to damage up, that is where the 'memory' comes along. I damages up the wrong Slam attack and doesn't do the other one. Unfortunately, even though I change the attack type, things still don't work (the 'memory' I'm talking about) until I shut down the entire application and reload it.
Weird behavior, but really just a user error duplicating an attack type of Slam. Nothing to see here, move along. |
#3 |
Senior Member
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,623
|
If HL appears to "remember" something, then quite often it is a timing issue with your scripts. In that a script is seeing the value set on the previous run, and then a later timed script changes the value (the new value being ignored until the "next" run).
Farling Author of the Realm Works Import tool, Realm Works Output tool and Realm Works to Foundry module Donations gratefully received via Patreon, Ko-Fi or Paypal |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Which game system is this for? You've posted in the general questions forum.
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
@Kendall-DM about a year ago HL has its binary logic changed to no longer do full script evaluations anymore. It tries to make intelligent decisions so that not as much CPU is required to simply change a skill rank. This means not all scripts are executed anymore in HL when something changes. In the past EVERY script fires always. I would guess that is what you are running into. To find out setup your test and once you see the issue happen go to "Develop->Trigger Full Evaluation Immediately" and see if the "memory" thing is fixed. This Full Evaluation would also be happening during a character load or a restart of HL. If this does fix the issue then I am not 100% sure what needs to be fixed. If its in the binary or something I can change in the d20 game system to force it to fire. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#6 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Hmm... well I was doing full character reloads, but that didn't help it. I actually had to shut down the program and restart. That said, even after reloading a character, I could still see that tasks are grayed out (which I assume aren't being run), so it's likely I had to restart to get everything in sync again.
The more you know. :P But yeah, the d20 system, though I wasn't sure it was d20 specific, which is why I posted here. |
#7 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Oh, and I would condsider this resolved as a non-issue.
Thanks guys! |
#8 |
|
|