[XP] RPG Maker XP Online System (RMX-OS)

Started by Blizzard, June 20, 2009, 11:52:23 am

Previous topic - Next topic

Blizzard

The Global Switches and Variables server extension intercepts the initial loading sequence and doesn't let it finish until the switch and variable data is sent back to the client. The client plugin expects the extension to send data and doesn't finish the loading until it gets the data. That's why it kept freezing.

To fix the graphic bug, try increasing the Z coordinates of the windows in the CMS.
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.

ojp2010

Alright I get it now, the more I think about it I don't know if I had the Extension for the Global switch and variable in the extensions folder or not, prolly why is wasn't working. Anyways, thanks for the help with the CMS I will try when I get home from work today to see if I can get it to work. Also is there a way to get the chat box to be on the top left hand side of the screen instead of the bottom left? I have the HUD at the bottom and it sort looking odds when you first load into the game that they are overlaping. Thank you again.

Blizzard

Find where Frame_Chat is created and change the x coordinate to 0.
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.

Wizered67

I think I'm on the right track, but how do you add a message to the chatbox?

Blizzard

What do you mean? You type in a message in the chat input box.
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.


Trider250

If I wanted to display the users level to everyone in their username? would it be easily possible?
here is an example:

Trider250 [lvl 3]
Blizzard [lvl 58]
etc.

Like I know I would have to find the lvl variable
but where is the area in the script that the username is displayed?

ojp2010

Is there a way to disable other direct keys when typing is on. To better explain would be I am using direct hotkeys to call scene, I have a help screen 'H' calls the scene. When I press 'F6' and start typing if I press 'H' it calls the help scene. So I am wanting that once you hit F6 all controls disable so that you can type without calling scenes.

Blizzard

The next version of the Blizz-ABS Controller will have that problem fixed.

@Trider250: I think that takes away the fun in the game. I played once an MMO a few years ago and it was fun to dress up with noob equipment and kill off PKers when they attacked me or the noobs around me that were grinding EXP. In fact it was hilarious. I couldn't have done that if my level was displayed above my head all the time. D:
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.

[Luke]

Okay, I'm trying to make a plugin for Scene_Waypoints script...
#==============================================================================
#   Diablo 2 Waypoints
#   by arevulopapo
#   Feb 9th 2007
#
#
#   To call the Waypoint scene use the "Call script" event command:
#   $scene = Scene_Waypoint.new(parameter)
#   where 'parameter' is the index of the waypoint you're using.
#
#   If you want to activate a waypoint without "touching" it
#   call a script like this:
#   $game_system.waypoints_active << index
#   where 'index' is the index of the waypoint you want to activate.
#
#   See the comments in the Game_System section (right below)
#   for informations on how to customize.
#
#==============================================================================
class Game_System
  #--------------------------------------------------------------------------
  attr_accessor :waypoints
  attr_accessor :waypoints_active
  attr_accessor :waypoint_sound
  #--------------------------------------------------------------------------
  alias game_system_initialize initialize
  #--------------------------------------------------------------------------
  def initialize
    #--------------------------------------------------------------------------
    # Here you can change the sound played while teleporting
    #--------------------------------------------------------------------------
    @waypoint_sound = "Audio/SE/020-Teleport03"
    #--------------------------------------------------------------------------
    @waypoints = []
    #--------------------------------------------------------------------------
    # Here you add new waypoints. The formula is like this
    # ["Name", map_id, player_x, player_y]
    #--------------------------------------------------------------------------
    @waypoints << ["Drasgora", 5, 143, 76] # This is the first waypoint. Its index is 0
    @waypoints << ["Admin Hideout", 4, 13, 14] # This is the second waypoint. Its index is 1
    @waypoints << ["Train Ground", 14, 24, 18] # 2, monster testing zone
    #--------------------------------------------------------------------------
    @waypoints_active = []
    game_system_initialize
  end
  #--------------------------------------------------------------------------
end
#==============================================================================
#==============================================================================
class Window_Waypoint_Name < Window_Base
  #--------------------------------------------------------------------------
  def initialize(waypoint_name)
    super(0,0,320,64)
    self.contents = Bitmap.new(288,32)
    self.back_opacity = 160
    @waypoint_name = waypoint_name
  refresh
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_text(0,0,288,32,@waypoint_name.to_s,1)
  end
  #--------------------------------------------------------------------------
end
#==============================================================================
#==============================================================================
class Window_Waypoint_List < Window_Selectable
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 320, 416)
    self.back_opacity = 160
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @item_max = $game_system.waypoints.size
    self.contents = Bitmap.new(288, @item_max * 32)
    for i in 0..@item_max - 1
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  def draw_item(index)
    x = 0
    y = (index) * 32
    if $game_system.waypoints_active.include?(index)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    self.contents.draw_text(x, y, 288, 32, $game_system.waypoints[index][0].to_s, 1)
  end
  #--------------------------------------------------------------------------
end
#==============================================================================
#==============================================================================
class Scene_Waypoint
  #--------------------------------------------------------------------------
  def initialize(waypoint)
    @waypoint = waypoint
    $game_system.waypoints_active << @waypoint unless $game_system.waypoints_active.include?(@waypoint)
  end
  #--------------------------------------------------------------------------
  def main
    @spriteset = Spriteset_Map.new
    @name_window = Window_Waypoint_Name.new($game_system.waypoints[@waypoint][0])
    @list = Window_Waypoint_List.new
    if $game_player.screen_x < 320
      @name_window.x = 320
      @list.x = 320
    end
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @spriteset.dispose
    @name_window.dispose
    @list.dispose
  end
  #--------------------------------------------------------------------------
  def update
    @list.update
    if Input.trigger?(Input::C)
      if $game_system.waypoints_active.include?(@list.index)
        Audio.se_play($game_system.waypoint_sound)
        $game_screen.start_flash(Color.new(255,255,255,160), 5)
        $game_map.setup($game_system.waypoints[@list.index][1])
        $game_player.moveto($game_system.waypoints[@list.index][2], $game_system.waypoints[@list.index][3])
        $game_player.straighten
        $game_map.update
        $game_map.autoplay
        $scene = Scene_Map.new
        Graphics.transition(20)
      else
        $game_system.se_play($data_system.buzzer_se)
      end
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    end
  end
  #--------------------------------------------------------------------------
end


Script works fine, nut doesn;t save visited waypoints.
The variable which saves visited waypoints is $game_system.waypoints_active, so I thought it will be enough to make this plugin for RMX-OS:
module RMXOS
  module Options
    SAVE_DATA[Game_System].push('@waypoints_active')
  end
end

Of course the plugin is BELOW RMX-OS script.
Unfortunately, it raises an error whenever I call Scene_Waypoint...
Script 'Waypoints'line 107: NoMethodError occured.
undefined method 'include?' for nil:NilClass

Looks like I screwed something up.

Blizzard

Quote from: Blizzard on August 26, 2010, 05:03:37 pm
Consider the database as your save data. If you add or remove scripts, the ones that say that they will corrupt save data will corrupt your database and you need to empty it. You could say that the save data from the accounts that were created before you removed the scripts aren't compatible with the game anymore. It will either stay in the loading screen or it will enter the game but behave in a weird way immediately or later and probably cause a crash eventually.
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.

nathmatt

im trying to make a controller for my Battle Dome script but my problem is i can't get it to send the information to the other clients im using this in the script

Spoiler: ShowHide
alias check_game_battle_dome check_game
def check_game(message)
  case message
  when /\ABC(.+)\t(.+)\t(.+)\t(.+)\t(.+)\t(.+)/
    if !self.party.include?($1) && @map_players.has_key?(get_user_id($1))
      @events.push($game_map.events[$2.to_i])
      $game_map.events.detete($2.to_i)
    elsif @map_players.has_key?(get_user_id($1))
      @battle_starter = get_user_id($1)
       $game_map.events[$2.to_i].location = $3.to_i,$4.to_i,$5.to_i,$6.to_i
    end
    return true
  end
  return check_game_battle_dome(message)
end
 
def send_battle_callers_data(event_id,m,x,y,d)
   self.send("BC#{@user_name}/t#{event_id},/t#{m}/t#{x},/t#{y},/t#{d}")
end
   
def get_user_id(user)
  @players.each{|player|
   if player.username == user
     return player.user_id
   end}
end


and this in the extension

Spoiler: ShowHide
def self.client_update(client)
  case client.message
  when /\ABC(.+)\t(.+)\t(.+)\t(.+)\t(.+)\t(.+)/
    return true
  end
return false
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Look, you'll have to figure this one out on your own. There's lots of things involved and I can't really see anything that is right with that extension. For beginners, there are no variables @players or @map_players or @user_name for that matter. I don't even know why this hasn't crashed your server yet. The extension probably died during runtime without you even noticing.
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.

nathmatt

September 04, 2010, 10:20:22 am #873 Last Edit: September 04, 2010, 10:26:45 am by nathmatt
that was the only thing i really changed in the skeleton besides the name on the extension

edit:  i was doing everything client side so i was trying to just tell the server to send the message
edit2:i have that in the RMXOS::Network class where those variables are defined but i cant get it to send the message that's really all im asking i can fix the rest when i get the message to be sent
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Ah, alright. I thought that one was serverside.

You should be able to send that message. Turn on message logging on the server and check if the message arrived. If you sent it, it WILL arrive (unless the connection breaks down). So if the message is not arriving on the server, the error is somewhere else. Probably that Network::send you used is never called.
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.

nathmatt

ok the log says its being sent so it has to be on my client side thx at least i know the message is being sent i will play around with it to see what im messing up on the client
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Billy

My 'RMX-OS Manual' doesn't work. Whenever I open it says 'Navigation to the webpage was cancelled'  :( Could someone maybe send me a copy that works, or paste it onto a WordPad or Notepad document...or maybe get mine to work?

Would appreciate your help a lot :D

bradhawk

@billy
Quote from: Blizzard
Author's Notes

If you have problems opening the .chm manual file, please read this article: http://blogs.technet.com/seanearp/archive/2007/05/28/can-t-read-chm-compiled-help-on-vista-xp-2003.aspx
The solution is at the bottom, you don't need to read the whole article.



well, blizzy .. im looking for new update for the controller :D

Billy

September 06, 2010, 04:16:28 pm #878 Last Edit: September 06, 2010, 06:41:20 pm by Billy
Thanks bradhawk, feel stupid for missing that  :shy:

**EDIT**
I've got everything running (I think) but when I try to log in i get a message saying "Server did not respond."
Sorry for all the questions but I just want to know what i'm doing wrong. My server status is Online, and i have the database set up.

P.S; If I try logging in after getting that message I get an error message saying;

Script '(RMX-OS) Script' line 2285: Errno::ECONNABORTED occurred.
An established connection was aborted by the software in your host machine.

ojp2010

You need to register a new log in name if you are logging in for the first time.