thanks for your answer, just as I thought... too bad it is not possible =/
Ruby/RGSSx questions that don't deserve their own thread
RGSSx Script SupportHi everyone, I ran into a weird bug after customizing Scene_Map to my likings..
After numerous testing I came to the conclusion that whenever I use the call script command in the event editor and only apply one line into it, $game_system.map_interpreter.running? will not turn to false anymore.
You can imagine the outcome, I believe.
Command_355 in Interpreter 7 is not edited in any way.
For example:
$game_temp.show_hud = falseWill neglect input and the event in question from advancing from that point on. (My game does not freeze, as other event movement, screen and such still get their update.)
However:
value = false$game_temp.show_hud = valueWill work just fine, heck even:
$game_temp.show_hud = falsep($game_temp.show_hud)Works. What's even more weird, is that it only happens with false.
$game_temp.show_hud = trueWorks fine also!
It seems when I want to set a global variable to false in one line of code, that piece of script never ends.. (but wouldn't that result in a script hanging error?! - which it doesn't..)
Any help is appreciated!
After numerous testing I came to the conclusion that whenever I use the call script command in the event editor and only apply one line into it, $game_system.map_interpreter.running? will not turn to false anymore.
You can imagine the outcome, I believe.
Command_355 in Interpreter 7 is not edited in any way.
For example:
$game_temp.show_hud = falseWill neglect input and the event in question from advancing from that point on. (My game does not freeze, as other event movement, screen and such still get their update.)
However:
value = false$game_temp.show_hud = valueWill work just fine, heck even:
$game_temp.show_hud = falsep($game_temp.show_hud)Works. What's even more weird, is that it only happens with false.
$game_temp.show_hud = trueWorks fine also!
It seems when I want to set a global variable to false in one line of code, that piece of script never ends.. (but wouldn't that result in a script hanging error?! - which it doesn't..)
Any help is appreciated!
The behavior comes from an odd feature of the RPG Maker XP. If the last action of a script command results in false, it will trigger a one frame delay for the interpreter. In addition, if the command consists of a single line, it will get executed again after the pause.
There are a few result values that will also cause an error (like Color objects).
You could remove it by redefining command_355:
...or just ensure your script commands don't result in false.
There are a few result values that will also cause an error (like Color objects).
You could remove it by redefining command_355:
class Interpreter #-------------------------------------------------------------------------- # * Script #-------------------------------------------------------------------------- def command_355 # Set first line to script script = @list[@index].parameters[0] + "\n" # Add second line or after to script while @list[@index+1].code == 655 script << @list[@index+1].parameters[0] << "\n" @index += 1 end # Evaluation eval(script) return true endend
More question:
I want to force the living enemies to use a skill during their turn. Instead of using their normal moves in the database, I want them to force say Skill #45 to use.
How can I do it?
I want to force the living enemies to use a skill during their turn. Instead of using their normal moves in the database, I want them to force say Skill #45 to use.
How can I do it?
If you can't do it via the normal set-up, then you'd need to employ scripted solutions which allows for changing the enemy selection... IDK if there's a short fix for it, but you could try scripts like my Ruby Enemy Action selection for that
What are the enemy Hp and mp variables displayed as in game during a battle as in a enemy hp/mp bar. I tried the find them in the scripts and had no luck so far.
So far I tried
Enemy HP/MP
Actor HP
EHP
Actor_HP
It would be a big help if I could find this out exactly for the Troop HP/Mp displays during battles.
So far I tried
Enemy HP/MP
Actor HP
EHP
Actor_HP
It would be a big help if I could find this out exactly for the Troop HP/Mp displays during battles.
enemy_object.hp = current HP
enemy_object.mhp = max HP
enemy_object.hp_rate = the rate a normal HP bar would use
Replace hp with mp for getting the mp of the enemies.
enemy_object is a valid enemy reference, like $game_enemies[id] or $game_troop.members[index] .
enemy_object.mhp = max HP
enemy_object.hp_rate = the rate a normal HP bar would use
Replace hp with mp for getting the mp of the enemies.
enemy_object is a valid enemy reference, like $game_enemies[id] or $game_troop.members[index] .
@Sixth Nope bro still didnt change the icon in my enemy hud for hp/mp sadly.
Those are the correct variables used for sure, unless some script modified the HP/MP values drastically, but I don't think any script does that.
What do you want to do exactly? What icon you want to change? And what script are you using for enemy HUD? Your own script or a publicly released one?
If you want to display something which changes due to some conditions changing, you must use these conditions to determine what will be drawn and you will need to refresh the display of it every time these conditions change or else you won't see any difference visually.
If you want to modify an already released custom script, you might have a better chance to get an answer if you make a new topic for it and explain exactly what you want to do.
What do you want to do exactly? What icon you want to change? And what script are you using for enemy HUD? Your own script or a publicly released one?
If you want to display something which changes due to some conditions changing, you must use these conditions to determine what will be drawn and you will need to refresh the display of it every time these conditions change or else you won't see any difference visually.
If you want to modify an already released custom script, you might have a better chance to get an answer if you make a new topic for it and explain exactly what you want to do.
Thank you very much Another Fen, I thought it was something I did! That redefinement of yours works great.
@Sixth It is a custom one
here is a snippet
@target = $game_troop.alive_members[@target_id] draw_actor_name(@target,0,0,width = 100) draw_actor_hp(@target,150,0,width=90) draw_actor_mp(@target,250,0,width=90) draw_actor_icons(@target,350,0, width = 96)So I hope this helps.
and also what script and line could i move the battle log display window over to the right some?
(Where it says Celianna attacks.)
(removed)
here is a snippet
@target = $game_troop.alive_members[@target_id] draw_actor_name(@target,0,0,width = 100) draw_actor_hp(@target,150,0,width=90) draw_actor_mp(@target,250,0,width=90) draw_actor_icons(@target,350,0, width = 96)So I hope this helps.
and also what script and line could i move the battle log display window over to the right some?
(Where it says Celianna attacks.)
(removed)
If you need help getting a custom script to work, please start a new thread for it, and supply the whole custom script (a link to pastebin or something if it's a big script).
Is it possible to separate the face during text processing? I wanted to separate the face from the text box and show it somewhere else, but got no idea how to do so.
You would need to rewrite the message window to make the contents large enough (or attach another window) to show the face in a different location.
Start a new thread, using screenshots/mockups to show what you're attempting to do, and someone will be able to help you with it 🙂
Start a new thread, using screenshots/mockups to show what you're attempting to do, and someone will be able to help you with it 🙂
I was able to solve it thanks to reading the Lune Messaging one. Although I have another idea in mind that I can't get off. Remember that ItemCategory in Scene Item? I was wondering why when I change its height, the ItemList constricts with it. It follows the ItemList rather than separating itself from it. This is because I want the Item Categories to go Vertically (col_max is 1), and reposition the windows, but I was wondering why whenever I change the height it pushes the item list down.
@Milena
This line is found in Scene_Item:
wy = @category_window.y + @category_window.heightThis is the "formula" for the item window's Y position by default.
It's lines like these which made me overwrite almost everything in the default scenes when I worked on my menu engine. I have no idea who wrote those lines, but I hope that he/she will never get employed at Enterbrain again. -.-
This means that if you change the Y position of category window, the item list window's Y position will change too. Hard-code something for 'wy' in at that line, and the item list and category windows will not be connected anymore. That is, if you aren't using any other custom scripts which may alter that part.
Whenever you change a position or width/height related thing in a Window class, and you see some visual "anomalies" after, you can be sure that the reason for it can be found in the scene class, where the window is used.
This line is found in Scene_Item:
wy = @category_window.y + @category_window.heightThis is the "formula" for the item window's Y position by default.
It's lines like these which made me overwrite almost everything in the default scenes when I worked on my menu engine. I have no idea who wrote those lines, but I hope that he/she will never get employed at Enterbrain again. -.-
This means that if you change the Y position of category window, the item list window's Y position will change too. Hard-code something for 'wy' in at that line, and the item list and category windows will not be connected anymore. That is, if you aren't using any other custom scripts which may alter that part.
Whenever you change a position or width/height related thing in a Window class, and you see some visual "anomalies" after, you can be sure that the reason for it can be found in the scene class, where the window is used.
okay, I am facing a strange behaviour of objects with fix direction... like doors, chests, stones and so on.
even if I set them to fix direction in the event window, some events still change their direction for 2 or 3 frames which really bugs me! why is that so?
a friend of mine said "oh look, these are disco stones!" and laughed his ass off. ^^"
I made a gif to show you what I mean: GIF here!
how do I fix this behaviour?
or does it maybe have something to do with Victor's Pixel Movement Script?? I am not sure...
even if I set them to fix direction in the event window, some events still change their direction for 2 or 3 frames which really bugs me! why is that so?
a friend of mine said "oh look, these are disco stones!" and laughed his ass off. ^^"
I made a gif to show you what I mean: GIF here!
how do I fix this behaviour?
or does it maybe have something to do with Victor's Pixel Movement Script?? I am not sure...
Are they changing direction, or do you have stepping or walking animation turned on? If it's an event that you NEVER want to change the image, you need to turn on direction fix and turn off walking and stepping animation.
it seems that they change direction. but they shouldn't do that. direction fix is on, walking and stepping is off. the simplest way would be to edit the graphic that there is only one picture in it... but that doesn't seem right to me.
Show a screenshot of the event, and a screenshot of the image it's using for the sprite. At this stage, there is nothing to suggest it is a script support problem. If you think it might be a script you have installed, disable it and see if the issue stops.
Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/