[XP] Stormtronics CMS

Started by Blizzard, January 09, 2008, 04:00:35 pm

Previous topic - Next topic

Blizzard

Then rename it back to @equips_window and you will see very soon why I made that "mistake".

If you don't want to disable option 1, remove these two parts of code:

    elsif Input.trigger?(Input::C) && @command_window.index == 1
      $game_system.se_play($data_system.buzzer_se)


class Window_CMSCommand < Window_Command
 
  alias initialize_cmsmod_alias initialize
  def initialize(index, continue)
    initialize_cmsmod_alias(index, continue)
    self.disable_item(1)
  end
 
end
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

tyvm.. one more question, as you can see from my pic I don't have the save option in the menu, and when I delete the save file my summons, party switcher quest and bestiary get disabled. how can I change that.

Quote from: Blizzard on May 31, 2009, 10:42:04 am
Then rename it back to @equips_window and you will see very soon why I made that "mistake".


oohhh my bad XD

Blizzard

You need to change this part:

    @command_window.disable_item(6) if $game_system.save_disabled
    @command_window.disable_item(7) unless @command_window.continue
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

May 31, 2009, 11:21:59 am #223 Last Edit: May 31, 2009, 11:50:07 am by reaper72004
Quote from: Blizzard on May 31, 2009, 11:18:09 am
You need to change this part:

    @command_window.disable_item(6) if $game_system.save_disabled
   @command_window.disable_item(7) unless @command_window.continue



I commented all 6 of those lines and it still does it. ^^

I'm a pain huh.. :<_<:  Gave you a lvlup

Blizzard

Then the cause must be somewhere else. Try to find other lines that could be disabling something in the command window.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

Haha fixed.. amateur scripting on my part :^_^':

Spoiler: ShowHide

when 5
        if @command_window.continue  <------
          $game_system.se_play($data_system.decision_se)
          @scene = Scene_Summons.new
          Graphics.transition(0)
        else
          $game_system.se_play($data_system.buzzer_se)
        end       

Blizzard

Lol, copy-paste errors. I still get them. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

Question.. how do I make the end window's I created come up from the bottom like the options menu?

Blizzard

It's a bit complicated. You need an update for moving windows and you need to define how the windows should move. You also need a proper starting position for those windows.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

I'm assuming your meaning in the def update in scene main like the move_da_something then define it after the update.. and changing the y position in the window to where it's off screen so when it updates it move to the y position the the def move_da_blabla

If so I tried and failed lol.. will try again here in a bit gotta go take down a tent before this thunder storm moves in :<_<: .. got like 20 tree's down from the last storm we had  :O.o:

Blizzard

Yeah, that's pretty much the way it should work. Too bad I code this CMS 2 years ago. Today I could have made it MUCH better if I did it from scratch (even though this script most probably already exceeds most scripters in properly coding xD).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

 ;) I switched from mogs menu to your cause I got tired of looking at it and the comments where in Portuguese I think dunno lol, but I probably won't switch from yours mainly cause I like it and easy to edit for the most part. Anywho I got the tent down so I can get back to this.. started raining while I was taking it down lol.. If I run into prob's I'll probably post again. :P

Blizzard

Believe me, this can be scripted much better, more suitable for edits and more extensible. ;)
Too bad I lack the time to totally overwork it. :/
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz


Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

reaper72004

:) It's still brilliantly scripted either way.. anywho I got the end commands to move up XD but.. 'lol always a but' I can't do the same for the window_data that I had under it for some reason..

Calintz

I am actually looking into doing a great deal of work to this script to compliment some of the unique features in my game. Should be promising if things go as planned ...

BTW:
Please ... Blizzard ... :(

reaper72004

June 02, 2009, 06:03:18 pm #237 Last Edit: June 02, 2009, 06:30:26 pm by reaper72004
Okie can you tell me what I'm doing wrong here's the super of window_data
Spoiler: ShowHide
super(0, 0, 640, 280)
   self.y, self.z, self.opacity = 524, 2999, 255


and here's the def update and def moves
Spoiler: ShowHide
def update
   @status_windows.each {|win| win.update(@actor_index)}
   @target_windows.each {|win| win.update(@target_index)}
   @info_window.update
   unless @status_windows[0].x < 0 || @status_windows[0].dir != 0 ||
       @target_windows[0] != nil && @target_windows[0].dir != 0
     @command_window.update
     [@help_window, @equips_window, @item_choose_window, @sort_window,
     @skill_window, @left_window, @right_window, @playerstatus_window,
     @options_window, @end_window].each {|win| win.update if win != nil}
   end
   move_da_main if @status_windows[0].x < 0
   move_da_selection if @status_windows[0].dir != 0
   move_da_targeting if @target_windows[0] != nil && @target_windows[0].dir != 0
   move_da_status if @playerstatus_window != nil && @playerstatus_window.y > 0
   move_da_equip if @left_window != nil && @left_window.x > 0
   move_da_skill if @skill_window != nil && @skill_window.x < 256
   move_da_target if @target_windows[0] != nil && @target_windows[0].x < 0
   move_da_items if @item_choose_window != nil && @item_choose_window.y < 0
   move_da_sort if @sort_window != nil && @sort_window.y < 64
   move_da_equipment if @equips_window != nil && @equips_window.y < 64
   move_da_options if @options_window != nil && @options_window.y > 0
   move_da_end if @end_window != nil && @end_window.y > 0
   move_da_endd if @window_data != nil && @windos_data.y > 64
   if @moved
     @moved = false
     return
   end
   
   
   if @command_window.active
     update_command
   elsif @status_windows[0].active
     update_status
   elsif @item_choose_window != nil
     if @item_choose_window.active
       items_refresh
       update_items_choose
     elsif @sort_window != nil && @sort_window.active
       update_sort
     elsif @items_window1 != nil && @items_window1.active
       @items_window1.update
       update_item
     elsif @items_window2 != nil && @items_window2.active
       @items_window2.update
       update_item
     elsif @equips_window != nil
       update_equipment
     elsif @target_windows[0] != nil && @target_windows[0].active
       update_item_target
     end
   elsif @skill_window != nil && @skill_window.active
     update_skill
   elsif @target_windows[0] != nil && @target_windows[0].active
     update_skill_target
   elsif @right_window != nil
     if @right_window.active
       update_right_equip
     elsif @item_window != nil && @item_window.active
       @item_window.update
       update_eitem
     end
   elsif @playerstatus_window != nil && @playerstatus_window.active
     update_playerstatus
   elsif @options_window != nil && @options_window.active
     update_options
   elsif @end_window != nil
     update_end
   elsif @window_data != nil
     update_endd
   end
 end
 
 def move_windows(wins, border, mdiff, lead, xy, acc = false)
   if acc
     diff = [[((xy ? lead.x : lead.y)-border).abs, mdiff].min, 1].max
   else
     diff = [[((xy ? lead.x : lead.y)-border).abs/2, mdiff].min, 1].max
   end
   wins[0].each {|win| win.x += diff if win != nil}
   wins[1].each {|win| win.x -= diff if win != nil}
   wins[2].each {|win| win.y += diff if win != nil}
   wins[3].each {|win| win.y -= diff if win != nil}
   @moved = true
 end
 
 def move_da_main
   lead = @status_windows[0]
   x_plus = @status_windows
   x_minus = [@command_window]
   y_minus = [@info_window]
   move_windows([x_plus, x_minus, [], y_minus], 0, 128, lead, true)
 end
 
 def move_da_outro
   @flag = true
   lead = @status_windows[0]
   x_plus = [@command_window]
   x_minus = @status_windows + @target_windows + [@skill_window, @help_window]
   y_plus = [@info_window]
   y_minus = [@item_choose_window, @items_window1, @equips_window, @items_window2, @help_window]
   move_windows([x_plus, x_minus, y_plus, y_minus], 0, 128, lead, true, true)
 end
 
 def move_da_selection(lead = @status_windows[@actor_index])
   if lead.dir == 1
     move_windows([[], [], [], @status_windows], 360, 32, lead, false)
   else
     move_windows([[], [], @status_windows, []], 0, 32, lead, false)
   end
 end
 
 def move_da_targeting(lead = @target_windows[@target_index])
   if lead.dir == 1
     move_windows([[], [], [], @target_windows], 376, 32, lead, false)
   else
     move_windows([[], [], @target_windows, []], 64, 32, lead, false)
   end
 end
 
 def move_da_sort(win = @sort_window)
   move_windows([[], [], [win], []], 64, 32, win, false)
 end
 
 def move_da_status(win = @playerstatus_window)
   move_windows([[], [], [], [win]], 0, 64, win, false)
 end

 def move_da_equip(win = @left_window)
   x_minus = [@left_window, @right_window, @help_window] + @item_windows
   move_windows([[], x_minus, [], []], 0, 64, win, true)
 end  
   
 def move_da_skill(win = @skill_window)
   x_plus = [@skill_window, @help_window]
   move_windows([x_plus, [], [], []], 256, 64, win, true)
 end
 
 def move_da_target(win = @target_windows[0])
   move_windows([@target_windows, [], [], []], 0, 32, win, true)
 end
 
 def move_da_items(win = @item_choose_window)
   y_plus = [@item_choose_window, @items_window1, @items_window2, @help_window]
   move_windows([[], [], y_plus, []], 0, 64, win, false)
 end
 
 def move_da_equipment(win = @equips_window)
   y_plus = [@equips_window, @help_window]
   move_windows([[], [], y_plus, []], 64, 64, win, false)
 end
 
 def move_da_options(win = @options_window)
   move_windows([[], [], [], [win]], 0, 64, win, false)
 end
 
 def move_da_end(win = @end_window)
   move_windows([[], [], [], [win]], 0, 64, win, false)
 end
 
 def move_da_endd(win = @window_data)
   move_windows([[], [], [], [win]], 0, 64, win, false)
 end


I need the window data to display right under the end menu, so end menu is at 0,0 and i need window_data at 0,64


woot nvm I got it XD

legacyblade

You've revamped bABS a lot, why not revamp the CMS? That would mean I could revamp my addons for it ^_~

G_G

And maybe include in add on that displays your summons status or something.