Author Topic: Death with lose PM  (Read 8874 times)

cloudiar

  • *
  • Posts: 202
    • View Profile
Death with lose PM
« on: 2012-05-15 02:10:35 »
Hello friends!

Have a question in FF7 for add...I want a special condition in death's, in time of kill player automatically pm to 0, its really possible add this modify IA of player? I try change IA of Cloud with Wallmarket in death counter (uses for final attack) but can't apply effects :(


Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #1 on: 2012-05-15 12:40:46 »
Are you saying that you want to reduce the MP of dead players to 0? I can't understand your English.


The Counter:Death script might not work if your character has equipped other counter effects. A more reliable method is to use a preTurn script to check whether any entities have a death status, and then reduce their MP to nil. Not a very efficient method, but it will work.

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #2 on: 2012-05-15 13:05:15 »
Sorry for the bad English >.<

Yes, I want this effect, reduce MP to 0 after the character is already died.

You comment PreTurn script with condition in IA of player?
Please can you explain a method for adding it?

Thanks :)
« Last Edit: 2012-05-15 14:21:49 by cloudiar »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #3 on: 2012-05-16 00:20:31 »
Just use WallMarket to add a counter:preTurn method.

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #4 on: 2012-05-20 13:07:16 »
I try with this:

In red is the position of my changes

Not understand, where add "preTurn" function?
Not understand how write "preTurn" method.
Nothing is well in the example? >.<



nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #5 on: 2012-05-20 14:58:55 »
It's actually labeled as "Post-Attack" in that version. Terence Fergusson clued me into it being the wrong trigger.
Is that the latest version? I can't remember the last one I released.

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #6 on: 2012-05-21 19:52:14 »
So  preTurn is postAttack?
Should I move all data to PostAtack and test it? Or any other suggestions
Congratulations for your program, is very good
The version I use is 1.4.5
Have you plans to release a new version?

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #7 on: 2012-05-21 19:56:47 »
It's actually labeled as "Post-Attack" in that version. Terence Fergusson clued me into it being the wrong trigger.

But it executes before the attack, doesn't it?

If not, how does Diamond WEAPON's limit break vulnerability work?

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #8 on: 2012-05-21 20:24:27 »
But it executes before the attack, doesn't it?

If not, how does Diamond WEAPON's limit break vulnerability work?

It SHOULD read "Pre-Turn". "Post-Attack" is wrong.

Diamond WEAPON's vulnerability works by using that trigger to selectively turn off damage immunity if a limit command is used.

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #9 on: 2012-05-21 20:47:18 »
"It SHOULD read "Pre-Turn". "Post-Attack" is wrong."

Really not work?
So where to continue?

In original kernel of game open with wallmarket 1.4.5 and not see "Pre-Turn" always read "Post-Attack".

Thanks
« Last Edit: 2012-05-21 20:49:02 by cloudiar »

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #10 on: 2012-05-22 00:38:41 »
I try and have new method, but somes problems.

Post-attack only run in first attack...not functionally for "death" is for attack and never repeat the changes.


Only can see result later of death in "death counter", this result:



The problem is value "-" affect really "+", finally add +1 MP.

How can apply for value negative?
Second problem is final attack, this not run in case add codes to "death counter", can't apply special condition for jump to ending of "death counter" in this case?

Sorry for english and thanks.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #11 on: 2012-05-22 12:18:30 »
OK, here's where your issue falls apart, the timings of the scripts prevent what you're wanting to happen when it should.

Refer to this section of the wiki for a description of the scripts. It comes down to you want a character to "die" when they run out of MP. This won't happen immediately when you expect it to. Take a look at each of the timings:

Code: [Select]
0x00 Initialize every actor runs this at the beginning of the battle
0x02 Main every time the battle timer reaches full and only if enabled
0x04 General Counter every time script owner is the target of an action
0x06 Death Counter script owner's HP reach 0 and counters are allowed (very special cases prevent this, like Remove)
0x08 Physical Counter every time script owner is the target of an action that causes physical damage
0x0A Magical Counter every time script owner is the target of an action that causes magical damage
0x0C Battle End if the script owner's HP are greater than 0 at the end of the battle.
0x0E Pre-Action Setup everyone executes this before each action is taken.
0x10 Custom Event 1 never executes on its own
0x12 Custom Event 2 never executes on its own
0x14 Custom Event 3 never executes on its own
0x16 Custom Event 4 never executes on its own
0x18 Custom Event 5 never executes on its own
0x1A Custom Event 6 never executes on its own
0x1C Custom Event 7 never executes on its own
0x1E Custom Event 8 never executes on its own

What you want is a character to "drop dead" as soon as the MP reach 0. Well, the timings won't allow that. For an enemy it's an easy thing to slap a little snippet at the end of their main file that will reduce their HP to 0 if they don't have any MP left. Since playable characters don't use their Main scripts under most circumstances, that technique won't work for them. You can put it in Pre-Action Setup, but they'll be "alive" until someone performs some other action. Then their script will trigger, killing them.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #12 on: 2012-05-22 12:38:32 »
No, I think he wants to reduce MP to 0 on Death, not the other way around. At least, that's what I think.

Quote
Post-attack only run in first attack...not functionally for "death" is for attack and never repeat the changes

I'm not sure what you mean here. Post-attack scripts should execute whenever any action is taken.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #13 on: 2012-05-22 13:11:30 »
No, I think he wants to reduce MP to 0 on Death, not the other way around. At least, that's what I think.

You're right. I missed that post earlier.

Ignore what I said. :)

If that's the case, "Final Attack" will prevent this from ever happening. First of all because Final Attack paired with a Magic/Summon will require MP. Second because it overrides the Death Counter script. I think the only "solution" lies in modding the exe. I could do that on the PC, but I wouldn't know how to do this in the PS version.

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #14 on: 2012-05-22 13:18:03 »
"Post-attack only run in first attack...not functionally for "death" is for attack and never repeat the changes"



I confirmed, never repeat :(
And can't run for apply in "death", very bad.

NFITC1

I looking at the page, great info :)

Primarily only useful option "death counter", I try in Pre-Action Setup and is bad, only execute first attack and never repeat ...

Just hope with "death counter", sorry for English, I hope you understand somes:

With these codes the REAL problem is ignore"final attack", and apply value function for true value and for some reason its exchange value, only need change value "-".
I assure, the first run well, in momment of death really add "+1 MP" and later stopped command always, in case no change of character MP revived this "command" not run, but not it's really problem:

You new death without changes file in MP? Continue in 0
Your use ether or values ​​+ for mp? With changes file in MPAlways continue execution of method!
Can add ether out of battle and later in match you death and repeat function :)
I can see not affect enemys, not affect HP, think can't causes crash game.


The main problem is how in this command apply value "negative", the problem of final attack can see in future, in finally I can deleted in case not run >.<

PD: The case uses MP for "final attack"...Thinking the final solution for this is change (yes, very hard but possible) apply always 0 PM for use, yes, free, but number of uses is limited for level materia.

I have version PC.
« Last Edit: 2012-05-22 14:08:36 by cloudiar »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #15 on: 2012-05-22 16:07:26 »
@NFITC1:

You raise a good point - having death-flagged actors lose all MP is going to stop final attacks. So this isn't going to fly.

@Cloudiar:

Quote
I try in Pre-Action Setup and is bad, only execute first attack and never repeat ...

Are you certain about this? I'm not aware of any constraints about when these run. Exactly what did you run in the pre-action script?

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #16 on: 2012-05-22 18:16:10 »
In this case YES, only run first attack (MP+1) and later never run, include new battles

Method of use is in image:



Only need's help for how add condition for effect "negative" in image can see

self mp <-1 but never uses negative really is positive +1 :(

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #17 on: 2012-05-22 19:23:44 »
Only need's help for how add condition for effect "negative" in image can see

self mp <-1 but never uses negative really is positive +1 :(

It's not "Self.MP < -1", it's "Self.MP <- 1". I'm using "<-" as the assignment operator to differentiate it from the logical comparative operator "=" used in if statements like "If (Self.HP = 7777)".

So it's assigning Self.MP the value of positive 1, not negative 1. You can't assign negative numbers to these values. They're unsigned.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #18 on: 2012-05-22 20:09:24 »
In this case YES, only run first attack (MP+1) and later never run, include new battles

I'm sorry, but I don't understand what you're saying. Scripts shouldn't become 'disabled' after an initial run and not execute in later battles - battle executables and data aren't preserved between fights.

Also, that's not the code to put into a preTurn script if you want MP to be reduced on death only; you'd need a conditional to check that the script's owner had the death status, and do nothing if they were still alive. Try something like this:

Code: [Select]
00 2060
00 4000
80
70 [end of script]
10 2060
11 4100
80
60 00
90
73

Which reverses to:

Quote
If (Self.Status:Death) == true {
   Self.MP = 0
}
« Last Edit: 2012-05-22 22:53:15 by Bosola »

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #19 on: 2012-05-22 20:44:16 »
It's not "Self.MP < -1", it's "Self.MP <- 1". I'm using "<-" as the assignment operator to differentiate it from the logical comparative operator "=" used in if statements like "If (Self.HP = 7777)".

So it's assigning Self.MP the value of positive 1, not negative 1. You can't assign negative numbers to these values. They're unsigned.

Ugh, in this case impossible add this method in death counter?  T.T

 And bosola I add your codes and:



Can't see the

 If (Self.Status:Death) == true {
   Self.MP = 0
}

Only see in result if (Self. Status :Death)
                              Self. PhysDefense <-0 (FAAAAAAAAAAAIL)
                               SCRIPT END

What's happened?


Thanks for all

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #20 on: 2012-05-22 21:58:34 »
A typo on his part. Try 4140 as the Argument at 0x00D.

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #21 on: 2012-05-22 22:51:50 »
Absolutely crashed xDDD

Go in battle and moment of turn, BOOOOOM!

This method also can't run.

T.T

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Death with lose PM
« Reply #22 on: 2012-05-22 22:54:14 »
I made two typos. Firstly, the address for the MP. But secondly: the jump at 70 is supposed to point to the end of the script. That's why you didn't see the closing brace when you disassembled.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Death with lose PM
« Reply #23 on: 2012-05-22 23:50:57 »
I also don't think that script will run on a dead actor. And yeah, jumping to 0x002? Bosola. For shame! You should know better. :P

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Death with lose PM
« Reply #24 on: 2012-05-23 00:21:11 »
Hahahah, my friend understand well of IA and never think this run in "Post-attack", only possibility is "Death attack" or modify .exe, but....Think is very extreme edition, I have a version of PC NFITC1, but...The case is I never edit in hex (only for not asign attack in mega-all).

Not need for this momment exactly, but you can help me in this idea?

I send the msn for you in private (to direct contact), but repeat, only in case not much molesties >.>

Not problem for me deleted "final attack", need mp to 0 (% lose, but never original mode) in death! T.T

Thanks for all friends :)
« Last Edit: 2012-05-23 00:23:12 by cloudiar »