Post new topic    
Metal Slime
Send private message
Chain Condition based on target, or waking people up 
 PostSun Aug 11, 2013 10:26 pm
Send private message Reply with quote
Hi, what are the chances of extending the 'chain conditions' to include things like "target's stat < value"? Right now the only real options involve the attacker's stat.

Alternatively, perhaps there is already a way to do what I want. Basically, I want attacks to sometimes wake sleepers. If the attack DOES wake the sleeper, I want a caption to appear saying so (and a graphic on the 'waker'). However, if the target is already awake, then the caption shouldn't show up whether or not the attack was set for waking.
I am Srime
Liquid Metal King Slime
Send private message
 
 PostSun Aug 11, 2013 10:37 pm
Send private message Reply with quote
Chaining based on target stat is something I would like to support, but I have not attempted it yet because it is more complicated than chaining based on attacker stat.

There is always exactly 1 attacker for an attack, but there are sometimes multiple targets for an attack. This means that if a chain is based on target stat, the chain could effectively "fork" and you could have one attack happening on one set of targets, but another attack happening on a different set of targets. Two attacks can't animate at the same time, so I have to resolve which goes first.

Somewhat prickly, somewhat complicated, but possible.
Liquid Metal Slime
Send private message
 
 PostSun Aug 11, 2013 10:49 pm
Send private message Reply with quote
And what about "If all targets' (X) >"?
Remeber: God made you special and he loves you very much. Bye!
Metal Slime
Send private message
 
 PostMon Aug 12, 2013 12:00 am
Send private message Reply with quote
I don't really understand how the stun register works, so I'm asking if the following chain can somehow work around this issue currently:

1. first attack targets enemy stun register, and is set to ABSORB damage. However, this attack is also set to be unable to damage beyond the target's current amount (?) so that if the enemy is not stunned, then this attack should do nothing...? Maybe instead of the "unable to damage beyond current", I should set damage via setting the target's stun register to 100%, as if I were 'curing' it?

2. second attack resets target's stun register to 'max'

3. third attack resets attacker's stun register to 'max'

Then attack1 chains to attack2 only if the attacker's stun register is >0? or maybe is <100>100%)? What would be the proper way to handle this? Also, I'm assuming the chain will continue even though I've technically stunned the attacker?

This would all be for single target attacks only. For the present, it seems that spread attacks will never have the chance to wake sleepers (or perhaps I can arrange it so that they either wake everyone or wake no one...).
I am Srime
Metal Slime
Send private message
 
 PostMon Aug 12, 2013 6:54 pm
Send private message Reply with quote
I've been doing some experimenting for the past hour or so, and have been getting very frustrated. I believe I have unearthed a bug as well.

I'm still trying to show a caption for waking people up. Absorbing stun damage is no good, because the attacker becomes stunned, and has to wait for this stun to go away before continuing his chain. I then tried the following concept:

attack1 hurts the target
attack2 sets target stun to 100% of max
attack3 stuns attacker, using damage=(1% of "previous attack")
attack4 shows caption

the 3->4 chain is set to run only when attacker's stun register is <100%

The problem seems to be that "previous attack" is using the damage of attack1, rather than the 'damage' (actually curing) of attack2. Why would this be the case?

Regardless of all of this though, this method will only work if the target's stun register is 'reasonable', because the percentage calculation rounds its result (thus 1% of 49 is zero, but 1% of 51 is one). If I increase the percentage, I run the risk of adding noticeable delays to the chain. Does anyone have better ideas?
I am Srime
Liquid Metal King Slime
Send private message
 
 PostMon Aug 12, 2013 8:06 pm
Send private message Reply with quote
I am a bit confused by all this :)

However, I am pretty sure there is no way to do what you want without chaining conditions based on target stats.

I like Nathan Karr's suggestion of target stat conditions "if all target's stat"

I could also do "If any target stat"

Those would be pretty flexible, and would be much easier to implement than what I was describing.

msw188 wrote:
The problem seems to be that "previous attack" is using the damage of attack1, rather than the 'damage' (actually curing) of attack2. Why would this be the case?


This is happening because the "previous attack" damage base type ONLY works for HP damage. Maybe I should rename it to something like "previous damage to HP" to avoid confusion?
Liquid Metal Slime
Send private message
 
 PostMon Aug 12, 2013 8:48 pm
Send private message Reply with quote
Oh, also "If total targets' stat" for an alternate way to punish optional spread attacks Hurr
Remeber: God made you special and he loves you very much. Bye!
Metal Slime
Send private message
 
 PostMon Aug 12, 2013 9:02 pm
Send private message Reply with quote
Quote:
This is happening because the "previous attack" damage base type ONLY works for HP damage. Maybe I should rename it to something like "previous damage to HP" to avoid confusion?

I'm somewhat surprised this hasn't come up before. But yes, I think it would be helpful to rename it to something like that. Similarly for things like "last damage to target" or "last damage to attacker" if those things mean HP damage specifically.

And this is bad news for my ideas towards a workaround. My basic idea is that, since all chaining conditions are based on the attacker, I need to find a way for the ATTACKER's stats (really, the attacker's stun register, since it's the only stat I can guarantee hasn't been altered by OTHER attacks during the battle) to change if and only if the TARGET was stunned. My first idea was via absorbing damage, but the result there was stunning the attacker and so stopping the chain from continuing. My second idea was to use the damage from 'waking' (so actually the healing to the stun register) as the base for storing a small amount of stun register damage in the attacker, so that the pause in the chain would be negligible.

I think another workaround would be to use counter-attacks, if (when!!!) the heroes can be given counter-attacks similarly to enemies.
I am Srime
Liquid Metal King Slime
Send private message
 
 PostMon Aug 12, 2013 9:40 pm
Send private message Reply with quote
Try out the current nightly WIP build. I have added 8 new attack chain conditions

If any target stat greater than value
If any target stat less than value
If any target stat greater than %
If any target stat less than %
If all target stat greater than value
If all target stat less than value
If all target stat greater than %
If all target stat less than %

So now you should be able to do a chain If target's stun register < 100%

I have only tested these briefly, so I am counting on you to do some more testing for me! :)

EDIT: oops! I forgot that the board loves to mangle lines with &lt; and &gt; if you don't type them html-style
EDIT2: oops! and html style doesn't work either. Guess I have to spell them out longhand :P
Metal Slime
Send private message
 
 PostTue Aug 13, 2013 7:30 pm
Send private message Reply with quote
I have tested both "any" and "all" for target stat stun register < 100%, and it seems to work perfectly for any given scenario. Thanks so much for this feature! Hopefully some other more active members will get good use out of it as well.

While exiting, the "Test Game" window appeared to hang up. It showed a progress bar for cleaning up temp files, but the bar hung at zero, and when I changed windows, I could no longer get it to show that bar at all. It also claimed to be "Not Responding". Nevertheless, it must have still been working, because in the time it took me to type to this point, it finally DID close. But the frozen progress bar really didn't make it seem as though anything was happening (Windows 7, if that helps).

I've found another bug in this latest nightly. It seems that when choosing bitsets from a menu where the amount of bitsets continues off of the bottom of the screen, the bottom-most bitset is unviewable. However, the cursor CAN be moved down enough to select it, and turn it on/off. An easy way to notice this is to press PageDown when first entering a large bitset menu (I used both the Preference Bitsets in GenGameData and the Bitsets in AttackData to test this). The cursor will disappear. Pressing up will bring it into view at the bottom of the screen. Pressing down again will make it disappear. Pressing space (or right) while it is offscreen will turn on the bitset below the bottom of the screen, as is easily checked by scrolling further down.

Also, in one final question about these chains, I'm wondering what the bitset "Don't retarget if target is lost" means, and why it is with the chaining bitsets. At first I thought this meant that the chain would cease if the target died. But chains seem to cease if the target dies regardless of this bitset. Then I thought this meant that the attack would do nothing if the target died during the delay between choosing the attack, and the attack operating. But that kind of bitset has nothing to do with chains specifically, since a single attack could just have a long delay.
I am Srime
Liquid Metal King Slime
Send private message
 
 PostTue Aug 13, 2013 7:49 pm
Send private message Reply with quote
Oh, yeah, just yesterday TMC found a bug that causes "Test Game" to be broken in the nightly builds. I am sure he will figure out a workaround before long :)

Thanks for spotting the bitset editor bug. I will look into it.

The "Don't retarget if target is lost" bitset is indeed intended to cancel the attack if the target dies.

If I remember correctly, Whether or not the chained attack is allowed to re-target also depends on its target setting.

If it is "Focused" then the chain always uses the target of the attack it chained from, and cannot re-target, so I think if the second part of the chain has a target class like "Spread" or "Random Roulette" then it will be allowed to re-target if the first target dies.

...that being said, I haven't tested that feature in ages, so my memory might be rusty :)
Metal Slime
Send private message
 
 PostWed Aug 14, 2013 2:56 am
Send private message Reply with quote
As another 'update' to this issue, I could figure out what the final bitset was on the General GameData bitset list with the help of the F1 help, but on the bitsets for attacks, it appears that the F1 help file has not yet been updated to include that last couple of bitsets. Can anyone tell me quickly what the final bitset is for attacks (should be right under "Force victory" which is pretty self-explanatory)?
I am Srime
Super Slime
Send private message
 
 PostWed Aug 14, 2013 2:59 am
Send private message Reply with quote
Bob the Hamster wrote:
EDIT: oops! I forgot that the board loves to mangle lines with &lt; and &gt; if you don't type them html-style
EDIT2: oops! and html style doesn't work either. Guess I have to spell them out longhand :P


Check the box that says "Disable HTML in this post"

<><><<<>>><<><>><><>
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Display posts from previous: