View previous topic :: View next topic |
Author |
Message |
Blacklight_Studios Guest
|
Posted: Tue Dec 14, 2010 10:40 am Post subject: Stat altering commands help |
|
|
Hey guys, more questions:
I'm trying to make a script that'll be used for both inns and other various NPCs to replenish HP and MP, but I'm not too sure how to use the related script commands, which the OHR Plotscript Dictionary doesn't really explain much on. Basically, my main concern is making sure that the script doesn't accidentally increase the max values.
Thanks in advance! |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Wed Dec 15, 2010 12:17 am Post subject: |
|
|
Unless you want to restore only HP or only MP, you can do this without any plotscripting. Check the text box conditionals for the line that says:
SHOP: Never do the following
restore Hp and Mp [select shop here]
Change the "never" to "always" and you're set. _________________
|
|
Back to top |
|
 |
Blacklight_Studios Guest
|
Posted: Wed Dec 15, 2010 7:41 am Post subject: |
|
|
Ah, ok. Then i could link it to a script to make it look like a sleep sequence... I'll try that. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Dec 15, 2010 10:41 pm Post subject: |
|
|
To restore a stat to maximum:
Code: | set hero stat(<who>, <stat>, get hero stat (<who>, <stat>, maximum stat), current stat) |
Where <who> is a hero slot number, eg. "leader" and <stat> is a stat number, eg. "stat: hp". maximum stat and current stat are constants.
You can't change the maximum values by setting the current values. What is it about the entry in the plotscripting dictionary that's confusing? Is it the constants for the who and stat arguments?
For more about changing stats, 'How do I increase the maximum of a stat with an item?' has lots of information. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Blacklight_Studios Expert of the third person...
Joined: 15 Dec 2010 Posts: 29
|
Posted: Fri Dec 17, 2010 7:36 am Post subject: |
|
|
Huh, I guess I just misunderstood the dictionary. the way it looked to me made me think that you would be able to exceed the maximum if you input it a certain way.... I dunno.
So I've got the text box set up, but now I'm having trouble with my script (go figure, lol). what i want it to do is fade the map out, then have the save menu open, then fade the map back. the issue I'm having specifically is with the save menu. it stays black even though I have a fade in command so show the menu. _________________ Current project progress:
Lost in the Dark(Primary Project): 1%
Kingdom Hearts Collaborative Project: 0.05%
-- |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Dec 17, 2010 8:04 am Post subject: |
|
|
Blacklight_Studios wrote: | Huh, I guess I just misunderstood the dictionary. the way it looked to me made me think that you would be able to exceed the maximum if you input it a certain way.... I dunno. |
It actually is possible to make the current value of a stat exceed the maximum, but that only lasts until the next battle.
Blacklight_Studios wrote: | So I've got the text box set up, but now I'm having trouble with my script (go figure, lol). what i want it to do is fade the map out, then have the save menu open, then fade the map back. the issue I'm having specifically is with the save menu. it stays black even though I have a fade in command so show the menu. |
Ah, unfortunately this is impossible right now.
Fades can only occur in the main game loop, which means that they can't happen on special screens like save, load, item, equip, spells.
I do need to figure out a way to add this ability in the future.
Right now the best you can do is to fade out, then show a black screen, then reset the palette, and show the save screen. |
|
Back to top |
|
 |
Blacklight_Studios Expert of the third person...
Joined: 15 Dec 2010 Posts: 29
|
Posted: Fri Dec 17, 2010 8:16 am Post subject: |
|
|
Ah, so that's what it is. Sounds like an idea for an edit to the engine.
Alright, I'll make the necessary changes, and hopefully it'll work now. _________________ Current project progress:
Lost in the Dark(Primary Project): 1%
Kingdom Hearts Collaborative Project: 0.05%
-- |
|
Back to top |
|
 |
|