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
554
Reaction score
229
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,522
Reaction score
14,255
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,162
Reaction score
822
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,162
Reaction score
822
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 Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,586
Latest member
Usagiis
Top