Permanent state script is not showing state icons.

FourthDimension

Villager
Member
Joined
Mar 31, 2019
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
This was originally a response to the following topic:
in which scripts were being used for permanent states not removed by KO, resting at inns, etc.

In it, the following script is linked:
http://www.himeworks.com/2013/03/10/permanent-states/


Hi everybody. I've just implemented the above script as one of my characters uses different 'stances' that emphasise different stats and unlock the use of different abilities in combat. I've done this by creating each one as a state, with commands that apply and remove the states as necessary. Each one has an icon to make it clear which stance is active. Without the script there was a huge bug whereby allowing him to be KO'd and then revived removed all stances and unlocked all abilities.

From what I can tell, the script has worked in that death and inns do not remove the states, but for some reason the state icons are not appearing next to the character in the menu whereas they were before I put the script in. Any idea why this may be? Is there something in the script that disables permastate icons? Or is it conflicting with something else in my scripts (I'm using Yanfly's battle engine)?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
540
Reaction score
219
First Language
english
Primarily Uses
RMMV
from reading the comments in that link the permastates being invisible is a known thing.
copy/paste hime said:
You would need to modify the status windows to include permastates, since permastates are separate from states.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,517
Reaction score
14,246
First Language
English
Primarily Uses
RMVXA

I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

FourthDimension

Villager
Member
Joined
Mar 31, 2019
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Hmmmmm. So I see. I wouldn't know how to go about that though. Presumably it would be a case of finding the line that draws the state icon in the default script(s) and adding a command to add the appropriate icons from the permastate script, but I can't see anything that leaps out in Hime's script that would reference a permastate icon, and I'm under no illusions that it would actually work anyway.

May have to look for something else unless anyone with more scripting know-how can see something that I can't?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,153
Reaction score
818
First Language
Hungarian
Primarily Uses
RMVXA
You could try this little snippet:
Code:
class Game_BattlerBase

  def state_icons
    icons = (states+permastates).collect {|state| state.icon_index }
    icons.delete(0)
    icons
  end

end
Disclaimer: I did not test this. At all. :D
 

FourthDimension

Villager
Member
Joined
Mar 31, 2019
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Hey thanks very much! Where would I put that? Would it go into the permastate module itself, and if so whereabouts?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,153
Reaction score
818
First Language
Hungarian
Primarily Uses
RMVXA
You should be able to put it in a new script slot anywhere below the default scripts but above the Main script slot.
 

FourthDimension

Villager
Member
Joined
Mar 31, 2019
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Thanks very much indeed! The icons are displaying perfectly now.
 

FourthDimension

Villager
Member
Joined
Mar 31, 2019
Messages
14
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Had some issues with the states last night but tested it today and everything is working perfectly.

Thanks Sixth for a great fix! I'll add you to the credits.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Once again working on a game I'm not sure I'm going to sell or even publish
That feel when you're awake past midnight and suddenly you're one year older :ninja:
I miss collaborations, but I don't know how to find someone to make face parts just to share them with others, and even though I don't like writing or music, I can't trust anyone with writing on my game because it has themes that are easy to mess up, and music needs a clear tone and scenes.
People donating to me for my upcoming birthday so I can pay my team a little. Such angels, I'm so happy. T uT I smile so much my face hurts. Good souls in this world.
Playing Ragnarok Online again is very nostalgic. The last time I played it was 20 years ago, when I was ten-twelve old.
My first mmorpg.^^

Forum statistics

Threads
105,571
Messages
1,014,723
Members
137,245
Latest member
dashstop
Top