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

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

Previous topic - Next topic

Blizzard

Sure. Just make a server extension that make the CHT protocol command send a message to all users. Or just edit the default RMX-OS script Client#handle to send it to everybody instead of just the players on the map. Just check the interpretation of CHT.
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.

G_G

Not sure if this did it, waiting for my friend to get on so he can test it with me but I replaced the send_to_map in Client.rb on line 70 with send_to_all.

Blizzard

That was exactly the line I was thinking of. It should do the trick. You gotta love how extensible and easily edited my scripts are. <3
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.

G_G

So I tried modifying your visual equipment to work without the ABS. And for the most part it worked in a normal project. However all I see are a bunch of naked people running around. Heres the code, anything particular I did wrong?
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Visual Equipment for Blizz-ABS by Blizzard
# Version: 1.0b
# Type: Blizz-ABS Add-on
# Date: 1.2.2010
# Date v1.0b: 29.4.2010
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#  This script is to be distributed under the same terms and conditions like
#  the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
#   This script must be placed below Blizz-ABS and requires Blizz-ABS v2.57 or
#   higher to work properly. It will display equipment on the map. All sprites
#   are placed in the Graphics/Characters folder. Also keep in mind that using
#   this script can cause additional lag due to additional sprite display.
#   
#   
# Configuration:
#   
#   EXCLUDE_WEAPONS - weapons that should not be drawn
#   EXCLUDE_ARMORS  - armors that should not be drawn
#   DRAW_ORDER      - drawing order from first to last sprite (0 for weapon;
#                     1, 2, 3 and 4 for armor kinds)
#   PREFIX_WEAPON   - prefix for each spriteset file for weapons (can include
#                     a full path)
#   PREFIX_ARMOR    - prefix for each spriteset file for armors (can include
#                     a full path)
#   ACTOR_UNIQUE    - allows separate equipment files for every single actor
#   
#   
# Notes:
#   
#   - The default file naming convention is:
#     
#       WPREFIX + WID          - weapon files
#       APREFIX + AID          - armor files
#       WPREFIX + WID + SUFFIX - weapon action files
#       APREFIX + AID + SUFFIX - armor action files
#     
#       WPREFIX - by default "Equipment/w", but it can be changed
#       APREFIX - by default "Equipment/a", but it can be changed
#       WID     - weapon ID
#       AID     - armor ID
#       SUFFIX  - action suffix (i.e. _atk1, _skl, etc.)
#     
#     examples:
#       
#       Equipment/w3.png      - weapon ID 3
#       Equipment/a41.png     - armor ID 41
#       Equipment/w1_atk1.png - weapon ID 1, attack type 1
#       Equipment/a76_skl.png - armor ID 1, skill use
#     
#     If you are using the ACTOR_UNIQUE option, then the naming convention are:
#     
#       WPREFIX + BID + SEPARATOR + WID          - weapon files
#       APREFIX + BID + SEPARATOR + AID          - armor files
#       WPREFIX + BID + SEPARATOR + WID + SUFFIX - weapon action files
#       APREFIX + BID + SEPARATOR + AID + SUFFIX - armor action files
#       
#       BID       - actor ID
#       SEPARATOR - the character _ (underscore)
#     
#     examples:
#       
#       Equipment/w4_2.png      - actor ID 4, weapon ID 2
#       Equipment/a1_22.png     - actor ID 1, armor ID 22
#       Equipment/w77_7_def.png - actor ID 77, weapon ID 7, defending
#       Equipment/a3_8_atk5.png - actor ID 3, armor ID 8, attack type 5
#     
#     The default prefixes can be changed in the configuration, but the other
#     parts are fixed.
#     
#   - If you are not using the ACTOR_UNIQUE option and Blizz-ABS's action
#     animation frames other than the default, you have to adjust the action
#     animation frames. In this case all actors will use the same equipment
#     files for display and the files' frame number has to match the animation
#     frames number for every actor which also means that all actors need to
#     have the same number of action sprites for the various actions. i.e. All
#     actors have to have the same number of frames for attack type 1, the same
#     number of frames for attack type 2, the same number of frames for skill
#     use, the same number of frames for defending, etc.
#     
#   - Keep in mind that the dimensions of the spriteset and the equipment
#     sprite should match. i.e. If the actor spriteset is 192x192 pixels, then
#     the equipment for that sprite has to be 192x192 pixels as well. If you
#     have actors that use different spritesets among each other
#     
#   - You can disable / enable Visual Equipment for specific characters by
#     using a Call Script event command with the following code:
#       
#       $game_actors[ID].visual_equipment = true/false
#       $game_party.actors[POS].visual_equipment = true/false
#     
#     ID  - the actor's ID in the database
#     POS - the actor's position in the party (STARTS FROM 0, not 1!)
#     
#   - You can disable / enable Visual Equipment globally by using a Call Script
#     event command with the following code:
#       
#       $game_system.visual_equipment = true/false
#     
#   
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG
 
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # START Configuration
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

  EXCLUDE_WEAPONS = []
  EXCLUDE_ARMORS = []
  DRAW_ORDER = [2, 3, 4, 1, 0]
  PREFIX_WEAPON = 'w'
  PREFIX_ARMOR = 'a'
  ACTOR_UNIQUE = false
 
  def self.equipment_offset(character_name)
    case character_name
    #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    # START Equipment Sprite Offset
    #   
    #   Here you can define the equipment Y offset in pixels. This can be used
    #   to adjust the equipment sprites' position for smaller or tall
    #   character spritesets. Configure which spritesets have an offset:
    #   
    #     when NAME then return OFFSET
    #   
    #   NAME   - spriteset name
    #   OFFSET - offset in pixels
    #   
    #   Make sure you don't mispell the filenames.
    #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when '011-Lancer03' then return -1
    #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    # END Equipment Sprite Offset
    #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    end
    return 0
  end

  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # END Configuration
  #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  $blizzabs_visual_equipment = 1.01
 
end

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
  attr_accessor :visual_equipment
 
  alias init_blizzabsve_later initialize
  def initialize
    init_blizzabsve_later
    @visual_equipment = true
  end
 
end

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor

  attr_accessor :visual_equipment
 
  alias init_blizzabsve_later initialize
  def initialize(actor_id)
    init_blizzabsve_later(actor_id)
    @visual_equipment = true
  end
 
  def weapons
    return (self.weapon_ids - BlizzCFG::EXCLUDE_WEAPONS - [0]) if defined?(G7_MS_MOD)
    return ([@weapon_id] - BlizzCFG::EXCLUDE_WEAPONS - [0])
  end
 
  def armors
    return (self.armor_ids - BlizzCFG::EXCLUDE_ARMORS - [0]) if defined?(G7_MS_MOD)
    return ([@armor1_id, @armor2_id, @armor3_id, @armor4_id] -
        BlizzCFG::EXCLUDE_ARMORS - [0])
  end
 
end

#==============================================================================
# Sprite_CharacterEquipment
#==============================================================================

class Sprite_CharacterEquipment < RPG::Sprite
 
  def initialize(viewport, character)
    super(viewport)
    @character = character
    update
  end
 
  def update
    super
    actor = $game_party.actors[0]
    weapons = actor.weapons
    armors = actor.armors
    if @weapons != weapons || @armors != armors ||
        @character_name != @character.character_name
      @weapons = weapons
      @armors = armors
      @character_name = @character.character_name
      self.create_bitmap
      @cw = self.bitmap.width / 4#@character.pattern_size
      @ch = bitmap.height / 4
      self.ox = @cw / 2
      self.oy = @ch
      self.src_rect.x = @character.pattern * @cw
      self.src_rect.width = @cw
    end
    self.visible = !@character.transparent
    sx = @character.pattern * @cw
    sy = (@character.direction - 2) / 2 * @ch
    self.src_rect.set(sx, sy, @cw, @ch)
    self.x = @character.screen_x
    self.y = @character.screen_y
    self.z = @character.screen_z(@ch)
    self.opacity = @character.opacity
    self.blend_type = @character.blend_type
    self.bush_depth = @character.bush_depth
  end
 
  def create_bitmap
    self.bitmap.dispose if self.bitmap != nil
    bitmap = RPG::Cache.character(@character_name, 0)
    self.bitmap = Bitmap.new(bitmap.width, bitmap.height)
    equipment = []
    a_id = (BlizzCFG::ACTOR_UNIQUE ? "#{@character.battler.id}_" : '')
    BlizzCFG::DRAW_ORDER.each {|index|
        if index == 0
          @weapons.each {|id|
              equipment.push("#{BlizzCFG::PREFIX_WEAPON}#{a_id}#{id}")}
        else
          @armors.each {|id|
              if $data_armors[id].kind == index - 1
                equipment.push("#{BlizzCFG::PREFIX_ARMOR}#{a_id}#{id}")
              end}
        end}
    sprite_name = ''#@character.character_name#.sub(
        #@character.character_name_org) {''}
    y = BlizzCFG.equipment_offset(@character.character_name)
    equipment.each {|name|
        b = RPG::Cache.character("#{name}#{sprite_name}", 0)
        self.bitmap.blt(0, y, b, Rect.new(0, 0, b.width, b.height))}
  end
 
end

#==============================================================================
# Control_Sprite_Character
#==============================================================================

class Sprite_Character
 
  alias update_blizzabsve_later update
  def update
    update_blizzabsve_later
    return if !@character.is_a?(Game_Player)
    actor = $game_party.actors[0]
    if $game_system.visual_equipment &&
        actor.visual_equipment &&
        (actor.weapons.size > 0 ||
        actor.armors.size > 0)
      if @equipment == nil
        @equipment = Sprite_CharacterEquipment.new(@viewport, @character)
      else
        @equipment.update
      end
    elsif @equipment != nil
      @equipment.dispose if !@equipment.disposed?
      @equipment = nil
    end
  end
 
  alias dispose_blizzabsve_later dispose
  def dispose
    dispose_blizzabsve_later
    @equipment.dispose unless @equipment == nil || @equipment.disposed?
    @equipment = nil
  end
 
end

Blizzard

You might be missing an alias here or there, IDK. Maybe the equipment sprite never gets create or you didn't turn it actually on. *points to the last class in the VE script*
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.

G_G

Well its getting created on myself. I see myself wearing armor but all other connected clients aren't wearing their armor. In fact I think I know what the problem is possibly.

Blizzard

I think that some IDs are not transmitted over the network. Maybe fixing up the exchange variables will do.
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.

RoseSkye

Question:
If a player edits the rmxp data clientside will it show up server-side? Like someone makes armor and weapons max stats and fiddles around with event commands and such.

Blizzard

Yes. The client sends the data if it changes.
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.

RoseSkye

Theres nothing that can be done serverside to ban those who alter values clientside?

Blizzard

Not really, no. RMX-OS is a client-side processor which is not the best choice for strict security.
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.

KoenLemmen

Hi people,

I am new here on the forums.
I've got one question about this GREAT script!
Is it possible to post your game on your server (a site NOT your own PC) and run it with your PC off.
PM me pleas. I need to find a way to run my online game without keeping my pc on the hole time!  :wacko:

Koen

PS Maybe I typ bad English I am dutch.  8)
Koen Lemmen

Information:
Spoiler: ShowHide
PS I am dutch. So I could make some typ faults. 8)

More info: :P

Hello I am Koen,
I come from the Netherlands,
and I am still living there.
I playing many games.

Here is a list with favorites:
Saint Row 2
Red Alert 1, 2 and 3
WarRock
AA3

I like making sites and games.
I'm always making my games with RPG Maker XP.
Sometimes I do work with Visual C++ and Adobe Photo shop.

2 years ago I made internet radio. Thats one of my hobby's. Because I like music.

Still questions about me? You can mail me. gamekoen@hotmail.nl or follow me on twitter. www.twitter.com/KoenLemmen.
Greets Koen

Spoiler: ShowHide

Wizered67

I released my game for some testing and I noticed this error in the server.
Spoiler: ShowHide


I'm not sure what is causing it yet, but I can look into that. I thought I should mention that I just started using a new database, but I'm pretty sure I did everything that needed to be done. Basicallly, do you know what might be the cause. I can probably take it from there and test some stuff myself.

Blizzard

That's weird. I'm not sure what's causing it. It seems to me as if a client has gotten an invalid user ID.
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.

Rajaat99

I had to uninstall and reinstall everything, as I screwed something up and didn't know what. The first time I installed I had zero problems, but now I have a problem. Help please?
Spoiler: ShowHide
You are not alone among strangers, a way has been chosen.

Blizzard

I think you accidentally messed up the scripts. Redownload the RMX-OS scripts and you should be fine.
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.

Rajaat99

Quote from: Blizzard on March 27, 2011, 12:09:54 pm
I think you accidentally messed up the scripts. Redownload the RMX-OS scripts and you should be fine.

I don't know what I did, but it works now. Thank you Blizzard.
You are not alone among strangers, a way has been chosen.

doghusky

Okay, it's work good except when me and someone else are testing the game and i stay on the map and they zone. When they zone I get this error:
Mon Mar 28 07:15:48 Atlantic Daylight Time 2011:
undefined method `each_index' for nil:NilClass
(RMX-OS) Script:2383:in `rmxos_deserialize'
(RMX-OS) Script:2056:in `load_game'
(RMX-OS) Script:2052:in `each'
(RMX-OS) Script:2052:in `load_game'
(RMX-OS) Script:2046:in `each'
(RMX-OS) Script:2046:in `load_game'
(RMX-OS) Script:1062:in `check_loading'
(RMX-OS) Script:848:in `listen'
(RMX-OS) Script:844:in `each'
(RMX-OS) Script:844:in `listen'
(RMX-OS) Script:5999:in `update'
(RMX-OS) Script:5255:in `main'
(RMX-OS) Script:5252:in `loop'
(RMX-OS) Script:5257:in `main'
-<:::RMX-OS Main:::>-:46


the scripts I have are:
(RMX-OS) Options
(RMX-OS) Script

Global Switches and Variables

Blizz-ABS Script 2.84 Part 1
Blizz-ABS Script 2.84 Part 2
Blizz-ABS Script 2.84 Part 3
EXP in HUD for Blizz-ABS

Blizz-ABS Controller


nathmatt

ok im having issues sending hash data but every time i go to receive the data i get a syntax error im doing it the same way you do the trade items

extension
when /\AGCD\Z/ 
  data = @data.inspect.gsub(' '){''}.gsub('{'){''}.gsub('}'){''}.gsub('='){''}
  client.send("SCD#{data}")
end


receive data
when /\ASCD(.+)/ # Data
  data = $1.gsub('>') {'=>'}
  $data = eval("{#{data}}")
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

What kind of data are you sending? I only send integers and nothing else. Both keys and values are all integers. If you are trying to send strings, you have make sure that strings are enclosed in ".
I also use = as the key->value identifier. If any of your strings is using that, it will mess up your data.
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.