Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Seox on March 16, 2009, 03:38:52 pm

Title: [RESOLVED] Moving the action window, and chaning the menu "exp" bar/ letter "E"
Post by: Seox on March 16, 2009, 03:38:52 pm
In which scripts are the "E" for experience and the bar that are in the menu system, ass well as the action window (Attack, skill, defend, item) located, and how do I edit the X/y Coords of it?

Anyone know where they would be (IF) in tankentai CBS?

Please and thank you ^_^
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Starrodkirby86 on March 16, 2009, 05:30:14 pm
All of these things should be in the Window scripts around, since that's where they record all the values and whatnot...To change coordinates might be in their respective scenes (Like the Battle scene blah and etc.). /assumption

If there's text exclusive to the CBS, then might as well show that script here...Or whatever. It depends on the scripter and how he used the default items. So please, show it to us...
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Seox on March 16, 2009, 08:43:42 pm
http://www.rpgrevolution.com/forums/index.php?showtopic=25504&st=0&start=0

That's the demo. There are a few scripts, all of which are too large ><

But I can't find the values in the script, or in game. I'm looking to move the command menu from mid screen to the bottom right, where the fourth actor's HP/SP were.

And in the menu, I have custom HP/SP/EXP bars. However, the "E" and the default exp bar are in the way, so it looks REALLY choppy ><
i searched those scripts. A good idea, but I couldn't find anything. May just be my lack of prowess there.
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Reno-s--Joker on March 17, 2009, 02:03:56 am
This should be easy enough. :P
I'll get back to you later if someone doesn't beat me to it. :scared:
:D
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Seox on March 17, 2009, 08:07:31 am
Quote from: Reno-s--Joker on March 17, 2009, 02:03:56 am
This should be easy enough. :P
I'll get back to you later if someone doesn't beat me to it. :scared:
:D


Thank you, very much ^_^

And PS: Reno are teh awesome. Caddle prod FTW
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: shdwlink1993 on March 17, 2009, 03:30:22 pm
1) The E for Experience is located in Window_Base, on line 204.

Spoiler: ShowHide
  def draw_actor_exp(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 24, 32, "E")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  end


2) The Actor Command Window is created in Sideview 2, on line 37.

Spoiler: ShowHide
  def create_viewport
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @active_battler_window = Window_NameCommand.new(@active_battler, 240, 64)
    @active_battler_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    @spriteset = Spriteset_Battle.new
    @wait_count, @escape_ratio = 0, 50
  end

To change the X value, you'd add a script call right next to this line, so it'd look something like this:
    @actor_command_window.x = whatever
    @actor_command_window.y = 160


Sorry Reno... :P
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Seox on March 17, 2009, 04:01:25 pm
How do I remove the experience bar that goes WITH the "E"?

Lastly, do THIS?
Spoiler: ShowHide
def create_viewport
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
   
    @actor_command_window.x=   (X COORDINATES)   <<<<< EDITED HERE, ADDED NEW LINE

    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @active_battler_window = Window_NameCommand.new(@active_battler, 240, 64)
    @active_battler_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    @spriteset = Spriteset_Battle.new
    @wait_count, @escape_ratio = 0, 50
  end


And I'd just set the "y coords" under X to whatever. Screw with those values to move the combat window?
EDIT: Ok, just did the above. That didn't work. No ERROR, but didn't move the window at all. I have managed to make the window stretch further to the right, by adjusting the first argument in the line before the Y value one...you know,
Spoiler: ShowHide
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
However, that's not what I wanna do at all. I just need to be able to set coordinates to make the battle window appear on an open spot at the bottom right, in the same window as my party,and their HP/MP.


The "E" is fixed, though, and it looks MUCH better...thanks a lot ^_^


Sorry for all the questions.

Thanks a CRAPTON for deciphering all that for me ^_^
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Reno-s--Joker on March 18, 2009, 06:12:26 am
LOL. <3 shdw did a better job than I would've anyways. :xD:

You're doing all the right things about trying to move the battle window. However, the problem is usually in some other script telling it to do another thing. Do a Ctrl+Shift+F for this:
@actor_command_window.x

... and all the culprits will show up. Notice that they all say
@actor_command_window.x = 240

There are only three locations where this happens, so changing them in each shouldn't be too much trouble. ;)

To remove the exp bar, I'm pretty sure it's safe to delete this:
Code from "HP and MP Meters": ShowHide
  alias draw_actor_exp_bar_n01 draw_actor_exp
  def draw_actor_exp(actor, x, y)
    bar_y = y + (Font.default_size * 2 /3)
    @skin = RPG::Cache.windowskin(EXP_METER)
    @width  = @skin.width
    @height = @skin.height / 3
    src_rect = Rect.new(0, 0, @width, @height)
    self.contents.blt(x , bar_y, @skin, src_rect)   
    @line   = (actor.now_exp == actor.next_exp ? 2 : 1)
    @amount = (actor.next_exp == 0 ? 0 : 100 * actor.now_exp / actor.next_exp)
    src_rect2 = Rect.new(0, @line * @height, @width * @amount / 100, @height)
    draw_actor_exp_bar_n01(actor, x, y)
  end

from the HP and MP Meter's script, seeing as it's aliased.

I haven't tried these mods myself, so I'd be happy to help you if there's anything wrong with them. ^-^

And no need to apologise for questions either. They make me vaguely useful around here. :D
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Seox on March 18, 2009, 10:35:24 am
Quote from: Reno-s--Joker on March 18, 2009, 06:12:26 am
LOL. <3 shdw did a better job than I would've anyways. :xD:

You're doing all the right things about trying to move the battle window. However, the problem is usually in some other script telling it to do another thing. Do a Ctrl+Shift+F for this:
@actor_command_window.x

... and all the culprits will show up. Notice that they all say
@actor_command_window.x = 240

There are only three locations where this happens, so changing them in each shouldn't be too much trouble. ;)

To remove the exp bar, I'm pretty sure it's safe to delete this:
Code from "HP and MP Meters": ShowHide
  alias draw_actor_exp_bar_n01 draw_actor_exp
  def draw_actor_exp(actor, x, y)
    bar_y = y + (Font.default_size * 2 /3)
    @skin = RPG::Cache.windowskin(EXP_METER)
    @width  = @skin.width
    @height = @skin.height / 3
    src_rect = Rect.new(0, 0, @width, @height)
    self.contents.blt(x , bar_y, @skin, src_rect)   
    @line   = (actor.now_exp == actor.next_exp ? 2 : 1)
    @amount = (actor.next_exp == 0 ? 0 : 100 * actor.now_exp / actor.next_exp)
    src_rect2 = Rect.new(0, @line * @height, @width * @amount / 100, @height)
    draw_actor_exp_bar_n01(actor, x, y)
  end

from the HP and MP Meter's script, seeing as it's aliased.

I haven't tried these mods myself, so I'd be happy to help you if there's anything wrong with them. ^-^

And no need to apologise for questions either. They make me vaguely useful around here. :D



XD, Thanks a lot ^_^. Trying it now.

EDIT: Ok, that's working perfectly (Actor command windows). I didn't know about CTRL SHIFT F...nice, XD ^_^. However, when I move the window, the small window with the name just above it does not move...any ideas?

---------------
Seox Iwleto              <<<<< That one
---------------
Attack
Skill
Item
Defend

EDIT: Screenie. The action window thing works perfectly, as you can see. Look at the name, though ><

Spoiler: ShowHide
(http://img18.imageshack.us/img18/9360/baro.th.png) (http://img18.imageshack.us/my.php?image=baro.png)


The EXP thingity worked, though unfortunatel now my custom bar has no label. Therefore, how is a player to know that it is indeed an EXP and not a cheezit meter?


*powers up both Reno and shdw*
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Reno-s--Joker on March 19, 2009, 12:09:12 am
Lol, Ctrl+Shift+F is my best friend. <3
To fix the location of that window, do a Ctrl+Shift+F of this:
@active_battler_window = Window_NameCommand.new(@active_battler, 240, 64)

It's in Sideview 2 in the def create_viewport thing again.
The last two numbers are the x and y co-ords respectively - change those to move the window. ;)

... I must admit I'm not 100% sure what you mean about the exp though. I hope it's not too much to ask for a screenshot...? >.<

Thanks for the power up. <3
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Seox on March 19, 2009, 01:31:00 pm
Ok, the name thing worked. Screenie is HERE:
Spoiler: ShowHide
(http://img6.imageshack.us/img6/7904/ughjghj.th.png) (http://img6.imageshack.us/my.php?image=ughjghj.png)
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Starrodkirby86 on March 19, 2009, 05:42:00 pm
I would have edited your code and grabbed the image out of there or something...Or just edited the post overall...But then I realized what the whole bbcode was:

[spoiler][url=http://www.imagehosting.com/][img][/img][/url][/spoiler]

Gee whiz, please put the image in there. :P
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Reno-s--Joker on March 20, 2009, 03:53:04 am
I tried removing the bar just then and the "E" label remained in mine... What 'custom bar' are you using? Perhaps its script is overwriting something...? :???:
If not, it may have been something you did to change the letter "E" in an earlier edit. But I doubt it. D:

[Thanks Kirby :P]
Title: Re: Moving the action window, and chaning the menu "exp" bar and letter "E"
Post by: Seox on March 20, 2009, 12:30:09 pm
Quote from: Reno-s--Joker on March 20, 2009, 03:53:04 am
I tried removing the bar just then and the "E" label remained in mine... What 'custom bar' are you using? Perhaps its script is overwriting something...? :???:
If not, it may have been something you did to change the letter "E" in an earlier edit. But I doubt it. D:

[Thanks Kirby :P]


The "E" and the bar were removed already.
Shdw found the "E", and I just deleted the HP/SP/EXP bar script that you'd reminded me of, which fixed that. So now my custom bar is showing just fine, like in the screenshot. Only this time, I want something up there that fits right over the bar.

>< DUH. *Runs to go back to edit "Experience" Where "E" was!

It might not fit though.

EDIT: BAM. Resolved.

Thanks, everyone ^_^
Title: Re: [RESOLVED] Moving the action window, and chaning the menu "exp" bar/ letter "E"
Post by: Reno-s--Joker on March 20, 2009, 06:56:23 pm
:D Sweet! Happy to be of any use. ^-^