Hiding actors parameters with a string?

Status
Not open for further replies.

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
199
First Language
Portuguese
Primarily Uses
RMVXA
So I came across this post by Tsukihime, but what really grabbed my attention was this:



Someone in the comments asked him how it was done, but he only said that he used a script to do so.
Is there a way to do that to all the parameters, but only for one specific actor?

I'm also using Yanfly Status Menu alongside a BlackMorning addon, so I'm not sure if editing the default will affect the status menu
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,186
Reaction score
1,162
First Language
Spanish
Primarily Uses
RMVXA
one way I can think of, is overwriting the creation routine of that section, instead of going for (all actors in the party) go for [actorX, actorY, actorZ, actorN, etc.]
and then, call the actor that needs to be covered, to your own creation function.

or, grab the whole lot, pop the actor in question, do the modified lot, and then the actor, instead of manually creating the lot.
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
199
First Language
Portuguese
Primarily Uses
RMVXA
I'm sorry, I don't have any script knowledge... Where can I edit how it is displayed?
I tried editing Window_Base in a clean project but it didn't change anything

 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,446
Reaction score
6,260
First Language
Indonesian
Primarily Uses
RMVXA
because actor_id was never been defined. Try this condition (a kinda weird syntax, but it should work)
Code:
actor.actor.id
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,186
Reaction score
1,162
First Language
Spanish
Primarily Uses
RMVXA
Code:
def draw_actor_level(actor,x,y)
change_color(xxx)
draw_text(xxxx)
change_color(xxxx)
 case actor.actor_id
  when 1
    draw_text(variant)
  else
   draw_text(regular)
 end
end
I was actually referring to the function calling that one, the parent one, where you'd loop through each actor and call this function.
this solution would always work like this, even in situations where you don't want it.
you should try altering the menu that contains the call to this function, not this function itself.
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
199
First Language
Portuguese
Primarily Uses
RMVXA
It worked for the main menu, but when I tried editing the text in both YEA Status and BM Status Addon it gives off this error:




The main menu I'm using is also BlackMorning's, so I think the problem is mostly in the Status main script, not in the addon...
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,186
Reaction score
1,162
First Language
Spanish
Primarily Uses
RMVXA
Code:
@actor.actor_id
not
Code:
actor.actor.id
@variable, means a global variable, defined elsewhere, that all separate functions can access.
in this case, THE actor that the main loop is working with, which is pulled from the party.
do read the help files, for information on how to work with variables.
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
199
First Language
Portuguese
Primarily Uses
RMVXA
I thought that since the main menu didn't need the @, the status wouldn't need it too. Guess I was wrong :dizzy:

Thanks for the help!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,696
Reaction score
3,008
First Language
Tagalog
Primarily Uses
RMVXA
@gstv - actually @ means its an instance variable of that class.. You can normally only access them inside the class and its children, and holds its value per instance of the class. Unless ofc you make a method inside that class that returns their value or use the general instance variable method of the object Class.

Global variables are the ones with $ in their names...

@Ebanyle - it didn't use an @ on the menu base method because the method takes a parameter called "actor".

Code:
 def draw_actor_level(actor,x,y)
Your other method on the other hand didnt have that parameter because it already has the actor saved in the @actor variable.
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,186
Reaction score
1,162
First Language
Spanish
Primarily Uses
RMVXA
I don't remember the structure right now, but I believe the "actor" in the menu responds to a local function named "actor" that itself returns an actor from the party.
@actor, is a variable named actor, that is altered locally or externally.

always use the search and global search tool, when you don't know what a variable name is referring to.
it might refer to a parent object's function that is not visible in the local script, but is declared elsewhere, and the local script can access by inheritance.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,114
Reaction score
11,464
First Language
English
Primarily Uses
RMVXA
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Finally did a test of sorts for the opening of my game... ... including this shot here.
My current status!?
It might be... QUAKE!!! :o
At least that was true several hours ago. :p
Quexp wrote on Shaz's profile.
I absolutely love your profile/pic! :kaoluv:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)

Forum statistics

Threads
100,686
Messages
978,416
Members
132,310
Latest member
hnhat
Top