Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Sylphe

1
Resources / Creation of MIDI musics
May 27, 2015, 07:10:58 pm
Hello I was wondering if anyone here knows exactly how to easily (or not xd) make cool custom MIDI musics as BGM in RMXP ^^
Or create MIDI based on another music ^^
2
Hey hey the subject is clear :D I want to make an animation (ex: heal) pop on the Title Screen on a specific location, do you know a way to do it without adding modules or something ? :3
I don't know if we can make an animation pop on something that's not necessarily a character/battler :/

and congratulations again KK20
3
Hello I have a particular request about devlopment in C, precisely in image processing, doing a median filter :S
Make a median filter is not very hard (you have your zone around the pixel you're checking then you fix this pixel to the middle value into your zone),
but making a median filter over multiple images at a time is more complicated.
The way I have to process is :
I have some pictures showing a man or two walking occasionally in an area. (pictures have identical size and background)
I have to check, for each pixel, then for each picture, the middle value of that pixel througout all pictures...

The problem is that I must keep for each pixel those values : x, y, picture_number, value.
With a 2D matrix I can keep x,y,value  but it will be rewrited from a picture to another :/
Do you think it is worth it / obligatory to create a 3D matrix instead of 2D in C ? (I have around 800 pictures to process)
Or maybe did you already do something similar and know how to do? ^^

EDIT:  fixed I just had to inverse loops
4
 :ninja: Hey guys ! (xD some will be like "Not "Hey guys" !! WHERE DYOU BEEN ALL THE TIME" well I'm sorry I had a lot to do with school etc and changing computer didn't help,  but I never give up with rmxp héhé  :P)

So I'm back here to share a bit of my work and get your opinion about it  :-*

In a project I have I just noticed my charac wasn't very very charming, see :
Spoiler: ShowHide




Well I was searching for something simple but custmized and stylish x) I wanted to change clothes first.
So I began creating a charac with Chara Maker XP :
Spoiler: ShowHide




Then I just fused both and made a little pixel modifictions to have something custom... and finally I have this charac as my main :
Spoiler: ShowHide




And before doing it jumping, running etc (like I did with first charac) I wanted to know what you think of the final character ? Didn't I do mistakes with pixels/color that you would change ? Do you see some modifications that would fit adding to the charac ?

Any suggestion and opinion is welcome :)

(I also need some glittering things for the "spelling" move charset, I call for your experience and resources if you have something just like the gllitters around tinker bell that could fit a charac lol)
EDIT : found it
Spoiler: ShowHide



héhé
5
RMXP Script Database / [XP] Buddy List for RMX-OS
August 01, 2014, 10:15:07 pm
Buddy List for RMX-OS
Authors: Sylphe
Version: 1.0
Type: RMX-OS Plugin
Key Term: RMX-OS Plugin



Introduction
If you're planning to do an online game, cooperation is one of the most important thing.
And to cooperate you will need buddies, buddies that you will want to easily add or remove
with less than 5 inputs on your keyboard.
Here is what you certainly seek


Features


  • Display all your buddies on a simple window list

  • Let you add buddies with an onmap players checking window

  • Let you invite a buddy in your party or in your guild when selecting him in buddy list

  • Let you remove your buddy from the list (but beware of RMX-OS removing offline buddy bug)




Screenshots

Spoiler: ShowHide




Demo

None.


Script

You will have to change RMXOS OnlineAwareness line 126 (if you don't have my onmap players window)
Just add the extra lines of this code :

    when /\A\/onmap\Z/
           names = self.map_players.values.map {|player| player = player.username}
HERE ==>     $onmap_players = names
HERE ==>     $onmap_player_need_refresh = true


You will also have to change 3 lines in RMX-OS script (near line 1300, within 'add_message' method)
The last 2 "HERE" lines are optionnal but if you don't want messages to appear in the chat, add them.
Spoiler: ShowHide


# add username to message
           if action
             message = "* #{username} #{message}"
           else
             message = "#{username}: #{message}"
           end
         end
HERE ==>          #stanley's add !! Storing id
HERE ==>        else
HERE ==>          register_request_id(message)
       end
     end
     
HERE ==>if $delete_buddy != true
       # slice the text if necessary
       slices = bitmap.slice_text(message, RMXOS::Options::CHATBOX_WIDTH - 40)
       bitmap.dispose
       # add each text slice to chat display
       slices.each {|slice| $game_temp.chat_messages.push(
           RMXOS::ChatMessage.new(slice, color))
       }
       # if exceeding log size
       if $game_temp.chat_messages.size > RMXOS::Data::ChatLineEntries
         # remove a few messages from before
         i = $game_temp.chat_messages.size
         lines = RMXOS::Data::ChatLineEntries
         $game_temp.chat_messages = $game_temp.chat_messages[i - lines, lines]
       end
       # chat box needs refreshing
       $game_temp.chat_refresh = 0 if !$game_temp.chat_refresh
       $game_temp.chat_refresh += slices.size
HERE ==> end
   end



Here is the Scene code, put it as the Blizzard's order script say :  http://forum.chaos-project.com/index.php/topic,23.0.html
Scene: ShowHide

=begin
#==============================================================================
# ■ Buddy List for RMX-OS
#------------------------------------------------------------------------------
#  By Stan ;) (AKA Sylphe)
#  1.0
#  02/08/2014
#------------------------------------------------------------------------------

 Show a window that displays buddies and let you add your buddies graphically

           Includes:
           ~ Check if your buddies are onlines or offlines
           ~ Icons displayed whether your buddy is online or offline
           ~ Possibility to :
                           ADD A BUDDY (checking players on same map)
                           REMOVE A BUDDY
                           INVITE BUDDY TO YOUR GROUP
                           INVITE BUDDY TO YOUR GUILD
           ~ If you can't invite a player in guild/group/buddy list,
             alert you with a window explaining WHY you can't invite the player.

********************************************************************************
*                         I N S T R U C T I O N S                              *
********************************************************************************
You will have to change RMXOS Script line 1300

Just add the extra lines of this code :
(it's within "add_message" method)
________________________________________________________________________________
# add username to message
           if action
             message = "* #{username} #{message}"
           else
             message = "#{username}: #{message}"
           end
         end
HERE ==>          #stanley's add !! Storing id
HERE ==>        else
HERE ==>          register_request_id(message)
       end
     end
     
HERE ==>if $delete_buddy != true
       # slice the text if necessary
       slices = bitmap.slice_text(message, RMXOS::Options::CHATBOX_WIDTH - 40)
       bitmap.dispose
       # add each text slice to chat display
       slices.each {|slice| $game_temp.chat_messages.push(
           RMXOS::ChatMessage.new(slice, color))
       }
       # if exceeding log size
       if $game_temp.chat_messages.size > RMXOS::Data::ChatLineEntries
         # remove a few messages from before
         i = $game_temp.chat_messages.size
         lines = RMXOS::Data::ChatLineEntries
         $game_temp.chat_messages = $game_temp.chat_messages[i - lines, lines]
       end
       # chat box needs refreshing
       $game_temp.chat_refresh = 0 if !$game_temp.chat_refresh
       $game_temp.chat_refresh += slices.size
HERE ==> end
   end
________________________________________________________________________________

====== ! If you don't already have my onmap_players window ! ===================
You will also have to change RMXOS OnlineAwareness line 126
Just add the extra lines of this code :

    when /\A\/onmap\Z/
           names = self.map_players.values.map {|player| player = player.username}
HERE ==>     $onmap_players = names
HERE ==>     $onmap_player_need_refresh = true
================================================================================

Then You can call the scene with :
$scene = Scene_BuddyList.new
anywhere you want. (in a script call event or in your menu)

----------  
-Controls-
----------
Enter, down, up.
Nothing more.

----------
-Graphics-
----------
WINDOWSKIN
 In configuration, explained below.
ICONS
 Idem
WINDOW'S SIZE
 In methods initialize, at the beginning of all windows, you can change the "super(x,y,width,height)" method  
BITMAP COLOR
 Red for offline
 Green for online
 You can change those colors near line 253 in draw_buddy method.
------------
-Compatibility-
------------
Work with RMXOS modified and RMXOS OnlineAwareness modified.
You will also need RMX-OS controller for BlizzABS if you want the group feature.

---------------
-Configuration-
---------------
Below
================================================================================
Credits:
Sylphe -> Making this script
Blizzard -> Doing RMX-OS and RMX-OS OnlineAwareness and RMX-OS controller for BlizzABS
================================================================================

# ExitScene :           Where you will go when pressing B
# PageTurnSound :       The sound played when you turn page (not featured yet)

             Commands
# FirstCommands :       Buddy list and Add a buddy
# BuddyCommands :       What you can do with your buddy
# OfflineBuddyCommands :What you can do when your buddy isn't connected

             Confirmation when removing a buddy
# Yes_No :              Well all is in the name (confirmation when you want to remove buddy)
# AreYouSure :          Idem

# Windowskin :          The windowskin of all this script windows

   Note that if you set icons parameters to '', no icon will be displayed
# OnlineIcon :          Icon to be displayed near name when buddy is online
# OfflineIcon :         Icon to be displayed near name when buddy is offline
# OnMapIcon :           Icon to be displayed near name when adding a buddy
               
# BitmapColor :         Whether the background of your buddy name if colored or not

             Messages for the informations windows
(Note that errors messages are defined in RMX-OS Script and RMX-OS controller for BlizzABS)
# PartyInvite :         What will be displayed when you invite your buddy in party
# GuildInvite :         What will be displayed when you invite your buddy in guild
# BuddyInvite :         What will be displayed when you invite a player to be your buddy
# NoPlayerSelected :    What will be displayed when you selected nil in onmap_player window
#==============================================================================
=end

   
#==============================================================================
##################### BEGIN CONFIGURATION ###############################
# =============================================================================


module BuddyData
 # Where you should go once exiting the scene
 ExitScene         = Scene_Menu.new(0)
 
 # First commands, in order : Buddy list, Add a buddy, Quit
 FirstCommands = ["Liste d'amis","Ajouter ami", "Retour"]
 
 # When entering SHIFT you can switch pages and it will produce the sound below (NOT FEATURED YET)
 #  change "005-System05"with the name of your SE music File
 PageTurnSound     = RPG::AudioFile.new("005-System05", 80)
 
 # in the order : Add group, add guild, remove, quit
 BuddyCommands  = ['Inviter Groupe', 'Inviter Guilde', 'Supprimer', 'Retour']
 
 # "remove" , "quit" this will be displayed when selecting an offline buddy
 OfflineBuddyCommands = ['Supprimer', 'Retour']
 
 # "add a buddy"
 NoBuddyCommands = ['Ajouter un ami']
 
 # "yes" , "no"
 Yes_No = ['Oui', 'Non']
 
 #windowskin of all windows in the scene
 Windowskin = "Thunder Rain.png"
 
 # For the confirmation window "Are you sure ?"
 AreYouSure = "Vous êtes sûr ?"
 
 # Icons displayed in buddy list, near name if the player is online or offline
 # IF YOU DON'T WANT ICON JUST PUT '' (ex: OnlineIcon = '')
 OnlineIcon = RPG::Cache.icon("elm_light")
 OfflineIcon = RPG::Cache.icon("elm_darkness")
 OnMapIcon = ''
 
 # Change if you want your buddy list names to have colored background
 # (Though, used with Online/Offine icons may give the player too much informations )
 BitmapColor = false
 
 # What will be displayed when inviting in party / guild / buddylist
 PartyInvite = "Vous avez invité PLAYER dans votre groupe"
 GuildInvite = "Vous avez invité PLAYER dans votre guilde"
 BuddyInvite = "Vous avez invité PLAYER à devenir votre ami"
 
 #What will be displayed if you selected the void ('No player selected by default')
 NoPlayerSelected = "Aucun joueur sélectionné"
 
end

#==============================================================================
##################### END CONFIGURATION ###############################
# =============================================================================



class Window_BuddyList < Window_Selectable
 
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 #well it's unnecessary
 
 #--------------------------------------------------------------------------
 # ● Initialisation
 #--------------------------------------------------------------------------
 def initialize(buddyList)
   #online players
   @players = $network.players.values.map {|player| player = player.username}
   @buddyList = buddyList
   @item_max = buddyList.size
   # Change here if you don't like the window size
   # x, y , width, height
   super(100, 100, 200, 250)  
       #(x , y , largeur, hauteur)
   bitmap = Bitmap.new(width - 32, height - 32)
   bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /(3 ** 2))
   bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
   Color.new(0, 0, 0, 20))
   self.contents = bitmap
   self.opacity=125
   self.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   
   refresh
   self.index = 0
  end
 
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
  if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   
   @data = []
   for buddy in @buddyList
     if buddy != nil
       @data.push(buddy)
     end
   end
   # If item count is not 0, make a bit map and draw all items
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_buddy(i)
     end
   end
   
  end
 
 #--------------------------------------------------------------------------
 # * Draw Buddy
 #     index : buddy number
 #--------------------------------------------------------------------------
 def draw_buddy(index)
   item = @data[index]
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width - 32, 32)
   if BuddyData::BitmapColor
     @players.include?(item) ? self.contents.fill_rect(rect, Color.new(0, 200, 0, 100)) : self.contents.fill_rect(rect, Color.new(200, 0, 0, 100))
   else
     self.contents.fill_rect(rect, Color.new(255, 0, 0, 0))
   end
   if BuddyData::OfflineIcon != '' and BuddyData::OnlineIcon != ''
     bitmap = @players.include?(item) ? BuddyData::OnlineIcon : BuddyData::OfflineIcon
     opacity = @players.include?(item) ? 255 : 128
     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   end
   self.contents.draw_text(x + 28, y, 212, 32, item, 0)
 end
 
   # -- pour cacher la fenêtre
  def hide_fen
   self.contents.clear
  end
 
 def show_fen
   refresh
 end
 
end

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#
#               Window displaying 'Are you sure ?"
#
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
class Confirm_Window < Window_Base
 def initialize
   super(400, 280, 200, 70)
   bitmap = Bitmap.new(width - 32, height - 32)
  bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /
         (3 ** 2))
  bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
       Color.new(0, 0, 0, 20))
  self.contents = bitmap
  self.opacity=200
  self.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
  refresh
 end

 def refresh
   self.contents.clear
   self.contents.font.color= Color.new(255, 255, 255, 255)
   w = contents.text_size("Sylph is the Wind Goddess :").width
   self.contents.draw_text(0, 0, w, 32, BuddyData::AreYouSure, 1)
 end
 
end

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#
#               Window displaying Error Infos
#
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
class Info_Window < Window_Base
 
 attr_accessor :info     # the info that we will display
 attr_accessor :badnews  # will change the color of the text
 
 def initialize
   @info = ''
   super(260, 200, 320, 70)
   bitmap = Bitmap.new(width - 32, height - 32)
  bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /
         (3 ** 2))
  bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
       Color.new(0, 0, 0, 20))
  self.contents = bitmap
  self.opacity=200
  self.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
  refresh
 end

 def refresh
   self.contents.clear
   badnews ? self.contents.font.color= Color.new(255, 0, 0, 255) : self.contents.font.color= Color.new(0, 255, 0, 255)
   w = contents.text_size("Sylph is the uniq Wind Goddess, but she died...").width
   self.contents.draw_text(0, 0, w, 32,@info, 1)
 end
 
end

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#          
#                 Window displaying all onmap players
#
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#

class Onmap_Selectable < Window_Selectable
 def initialize
   #we check which players are on same map
   $network.check_normal_commands('/onmap')
   # Change here if you don't like the window size
   # x, y , width, height
   super(400, 100, 200, 250)  
       #(x , y , largeur, hauteur)
   bitmap = Bitmap.new(width - 32, height - 32)
   bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /(3 ** 2))
   bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
   Color.new(0, 0, 0, 20))
   self.contents = bitmap
   self.opacity=125
   self.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   
   refresh
   self.index = 0
 end
 
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   
   @data = []
   for player in $onmap_players
     if player != nil
       @data.push(player)
     end
   end
   # If item count is not 0, make a bit map and draw all items
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_player(i)
     end
   end
   
 end
 
 #--------------------------------------------------------------------------
 # * Draw Onmap players
 #     index : player index
 #--------------------------------------------------------------------------
 def draw_player(index)
   item = @data[index]
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width - 32, 32)
   self.contents.fill_rect(rect, Color.new(255, 0, 0, 0))
   if BuddyData::OnMapIcon != ''
     bitmap = BuddyData::OnMapIcon
     opacity = 255
     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   end
   self.contents.draw_text(x + 28, y, 212, 32, item, 0)
 end
 
end

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#                                                                              #
#                         The actual buddy scene ! ! !                         #
#                                                                              #
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
class Scene_BuddyList

 def main
   # get the players online
   @players = $network.players.values.map {|player| player = player.username}
   
   #Creates the windows
   
   # selectable of the players onmap
   @onmap_selectable = Onmap_Selectable.new
   @onmap_selectable.visible = false
   @onmap_selectable.active = false
   
   # The buddy list
   @Buddys_list = Window_BuddyList.new($network.buddies)
   @Buddys_list.visible = false
   @Buddys_list.active = false
   
   # Window to display infos
   @info_window = Info_Window.new
   @info_window.z = 99999
   @info_window.visible = false
   
   #=============== FIRST WINDOW -> ADD A BUDDY AND CHECK BUDDY LIST =================
   @first_window = Window_Command.new(192,BuddyData::FirstCommands)
   @first_window.x, @first_window.y = 300 - @first_window.width/2, 240 - @first_window.height/2
   @first_window.z = 21000
   @first_window.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   #---------------- Transparent -------
   @first_window.opacity = 255
   
   #=============== WINDOWS FOR REMOVING BUDDY CONFIRMATION =================
   # Window that display "Are you sure ?"
   @confirm_title_window = Confirm_Window.new
   @confirm_title_window.visible = false
   @yes_no_window = Window_Command.new(192, BuddyData::Yes_No)
   @yes_no_window.x, @yes_no_window.y = 400, 360
   @yes_no_window.z = 21000
   @yes_no_window.visible = false
   @yes_no_window.active = false
   @yes_no_window.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   #@buddys_info = Window_BuddysInfo.new(@buddys_list.buddy)
   
   #=============== WINDOW FOR BUDDY ONLINE COMMANDS =================
   @window  = Window_Command.new(192, BuddyData::BuddyCommands)
   @window.x, @window.y = 400 - @window.width/2, 240 - @window.height/2
   @window.z = 21000
   @window.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   #---------------- Transparent -------
   @window.opacity = 100
   @window.active = false
   @window.visible = false
   
   #=============== WINDOW FOR BUDDY OFFLINE COMMANDS =================
   @window2  = Window_Command.new(192, BuddyData::OfflineBuddyCommands)
   @window2.x, @window2.y = 400 - @window2.width/2, 240 - @Buddys_list.height/2
   @window2.z = 21000
   @window2.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   #---------------- Transparent -------
   @window2.opacity = 100
   @window2.active = false
   @window2.visible = false
   
     #=============== WINDOW FOR ADD BUDDY COMMANDS =================
   @window3  = Window_Command.new(192, BuddyData::NoBuddyCommands)
   @window3.x, @window3.y = 400 - @window3.width/2, 240 - @window3.height/2
   @window3.z = 21000
   @window3.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
   #---------------- Transparent -------
   @window3.opacity = 100
   @window3.active = false
   @window3.visible = false
   
   $game_temp.in_battle = true
   @hud     = Hud.new  if BlizzABS::Config::HUD_ENABLED && $game_system.hud
   @hotkeys = Hotkey_Assignment.new if
   BlizzABS::Config::HOTKEYS && $game_system.hotkeys
       
   # Show sprite in background
    @map = Spriteset_Map.new
    Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @map.dispose unless @map.nil?
   @Buddys_list.dispose
   @confirm_title_window.dispose
   @yes_no_window.dispose
   @onmap_selectable.dispose
   @info_window.dispose
   @first_window.dispose
   @window.dispose
   @window2.dispose
   @window3.dispose
 end
 
 ###############################################
 # On update le tout...
 ##############################################
 def update
   $network.listen
   if $delete_buddy
     $network.command_yes($network.last_request_id)
     $network.buddies.delete_at(@Buddys_list.index)
     $delete_buddy = false
     @Buddys_list.refresh
     $network.save
   end
   @window3.update
   @window2.update
   @window.update
   @first_window.update
   @info_window.update
   @onmap_selectable.update
   @confirm_title_window.update
   @yes_no_window.update
   @Buddys_list.update
   @map.update unless @map.nil?
   update_controls
 end
 
 ####################################################
 # On vérifie sur quelle touche on appuie
 ###################################################
  def update_controls
   
    # ================= SI ON APPUIE SUR B ===================
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     # If first window visible, exit scene
     if @first_window.active
       $game_temp.in_battle = false
       $scene = BuddyData::ExitScene
     # If buddy list displayed, return to first window
     elsif @Buddys_list.active
        @Buddys_list.active = false
        @Buddys_list.visible = false
        @first_window.visible = @first_window.active = true
     #If Buddy commands are displayed, return to Buddy list
     elsif @window.active || @window2.active || @window3.active
       @window.visible = @window2.visible = @window3.visible = false
       @window.active = @window2.active = @window3.active = false
       @Buddys_list.active = true
     # If confirm/onmap players windows are displayed, we return to command
     # Or to First window
     elsif @yes_no_window.active || @onmap_selectable.active
       @yes_no_window.visible = @onmap_selectable.visible =  false
       @yes_no_window.active = @onmap_selectable.active = false
       @confirm_title_window.visible = @info_window.visible = false
       if @window.visible
         @window.active = true
       elsif @window2.visible
         @window2.active = true
       elsif @window3.visible
         @window3.active = true
       elsif  @first_window.visible
         @first_window.active = true
       end
     # If infos are displayed we return to the last displayed window
     elsif @info_window.visible
       @info_window.visible = false
       if @window.visible
         @window.active = true
       elsif @window2.visible
         @window2.active = true
       elsif @onmap_selectable.visible
         @onmap_selectable.active = true
       elsif @first_window.visible
         @first_window.active = true
       end
     end
     #================ SI ON APPUIE SUR C ====================
   elsif Input.trigger?(Input::C)
     if @first_window.active
       case @first_window.index
         when 0 # Buddy List
           @first_window.active = false
           @first_window.visible = false
           @Buddys_list.refresh
           @Buddys_list.active = @Buddys_list.visible = true
         when 1 # Add a Buddy
           @first_window.active = false
           @onmap_selectable.refresh
           @onmap_selectable.visible = true
           @onmap_selectable.active = true
         when 2 # Quit
           # Play cancel SE
           $game_system.se_play($data_system.cancel_se)
           $game_temp.in_battle = false
           $scene = BuddyData::ExitScene
       end
     #Works only if Buddy commands aren't displayed
     elsif @Buddys_list.active and $network.buddies[@Buddys_list.index] != nil
       # if player is online
       if @players.include?($network.buddies[@Buddys_list.index])
         $game_system.se_play($data_system.decision_se)
         @window.visible = true
         @window.active = true
         @window.refresh
         @window.contents.font.color = Color.new(100,0,200,150)
         @Buddys_list.active = false
       # if player is offline
       else
         $game_system.se_play($data_system.decision_se)
         @window2.visible = true
         @window2.active = true
         @window2.refresh
         @window2.contents.font.color = Color.new(100,0,200,150)
         @Buddys_list.active = false
       end
     # If we choosed a connected Buddy !
     elsif @window.active
       case @window.index
          when 0          # Invite Party
           
            # IF IN PARTY AND NOT LEADER
            if $network.in_party? and $network.party.include?($network.buddies[@Buddys_list.index])
               @window.active = false
               # Play buzzer SE
               $game_system.se_play($data_system.buzzer_se)
               @info_window.info = RMXOS::Data::PartyAlreadyMember
               @info_window.badnews = true
               @info_window.refresh
               @info_window.visible = true
               # IF IN BUDDY ALREADY IN PARTY
             elsif $network.in_party? and !$network.partyleader?
               @window.active = false
               # Play buzzer SE
               $game_system.se_play($data_system.buzzer_se)
               @info_window.info = RMXOS::Data::PartyNotLeader
               @info_window.badnews = true
               @info_window.refresh
               @info_window.visible = true
             else
               @window.active = false
               # Play decision SE
               $game_system.se_play($data_system.decision_se)
               @info_window.info = text = BuddyData::PartyInvite.sub('PLAYER') {$network.buddies[@Buddys_list.index]}
               @info_window.badnews = false
               @info_window.refresh
               @info_window.visible = true
               $network.command_party_invite($network.buddies[@Buddys_list.index])
             end
         when 1           # Invite Guild
           # CHECK LEADER ACTION
           if !$network.check_guildleader_action
             # IF NOT IN GUILD
             if !$network.in_guild?
               @window.active = false
               # Play buzzer SE
               $game_system.se_play($data_system.buzzer_se)
               @info_window.info = RMXOS::Data::GuildNone
               @info_window.badnews = true
               @info_window.refresh
               @info_window.visible = true
               # IF NOT LEADER OF THE GUILD
             else
               @window.active = false
               # Play buzzer SE
               $game_system.se_play($data_system.buzzer_se)
               @info_window.info = RMXOS::Data::GuildNotLeader
               @info_window.badnews = true
               @info_window.refresh
               @info_window.visible = true
             end
           # WE INVITE
           else
             @window.active = false
               # Play decision SE
               $game_system.se_play($data_system.decision_se)
               @info_window.info = text = BuddyData::GuildInvite.sub('PLAYER') {$network.buddies[@Buddys_list.index]}
               @info_window.badnews = false
               @info_window.refresh
               @info_window.visible = true
             $network.command_guild_invite($network.buddies[@Buddys_list.index])
           end
         when 2          # Remove
           # Play decision SE
           $game_system.se_play($data_system.decision_se)
           @confirm_title_window.refresh
           @confirm_title_window.visible = true
           @yes_no_window.visible = true
           @yes_no_window.active = true
           @window.active = false
         when 3            # Return
           $game_system.se_play($data_system.cancel_se)
           @window.visible = false
           @window.active = false
           @Buddys_list.active = true
         end
     # If we choosed a disconnected Buddy !
     elsif @window2.active
        case @window2.index
          when 0           # Supprimer
           # Play decision SE
           $game_system.se_play($data_system.decision_se)
           @confirm_title_window.refresh
           @confirm_title_window.visible = true
           @yes_no_window.visible = true
           @yes_no_window.active = true
           @window2.active = false
          when 1            # Retour
           $game_system.se_play($data_system.cancel_se)
           @window2.visible = false
           @window2.active = false
           @Buddys_list.active = true
         end
         
       # if we requested a confirmation-needed thing
       elsif @yes_no_window.active
         case @yes_no_window.index
           when 0         # OUI
             $game_system.se_play($data_system.decision_se)
             # on fais la requete de suppression
             $network.command_buddy_remove($network.buddies[@Buddys_list.index])
             $delete_buddy = true
             @yes_no_window.active = false
             @yes_no_window.visible = false
             @confirm_title_window.visible = false
             @Buddys_list.refresh
             if @window2.visible
               @window2.visible = false
             else
               @window.visible = false
             end
             @Buddys_list.refresh
           when 1       # NON
             $game_system.se_play($data_system.cancel_se)
             @yes_no_window.visible = false
             @yes_no_window.active = false
             @confirm_title_window.visible = false
             if @window2.visible
               @window2.active = true
             else
               @window.active = true
             end
             
           end
         #If we selected no player
         elsif @window3.active
           $network.check_normal_commands('/onmap')
           @onmap_selectable.refresh
           @onmap_selectable.visible = true
           @onmap_selectable.active = true
           @window3.active = false
         # If we requested to add a player, we display all onmap players
         elsif @onmap_selectable.active
           # Si le joueur est déjà dans la liste d'amis
           if $network.buddies.include?($onmap_players[@onmap_selectable.index])
             @onmap_selectable.active = false
             # Play buzzer SE
             $game_system.se_play($data_system.buzzer_se)
             @info_window.info = RMXOS::Data::BuddyAlreadyInList
             @info_window.badnews = true
             @info_window.refresh
             @info_window.visible = true
           # Sinon, si aucun joueur n'a été sélectionné
           elsif $onmap_players[@onmap_selectable.index] == nil
             @onmap_selectable.active = false
             # Play buzzer SE
             $game_system.se_play($data_system.buzzer_se)
             @info_window.info = BuddyData::NoPlayerSelected
             @info_window.badnews = true
             @info_window.refresh
             @info_window.visible = true
             
           # Sinon on l'ajoute à la liste
           else
             
             $network.command_buddy_add($onmap_players[@onmap_selectable.index])
             @onmap_selectable.active = false
             # Play decision SE
             $game_system.se_play($data_system.decision_se)
             @info_window.info = BuddyData::BuddyInvite.sub('PLAYER') {$onmap_players[@onmap_selectable.index]}
             @info_window.badnews = false
             @info_window.refresh
             @info_window.visible = true
           end
           # If other infos are displayed
         elsif @info_window.visible
           @info_window.visible = false
           if @window.visible
             @window.active = true
             @window.refresh
           elsif @onmap_selectable.visible
             @onmap_selectable.refresh
             @onmap_selectable.active = true
             
           end
           
         else
           @Buddys_list.active = false
           @window3.visible = true
           @window3.active = true
           @window3.refresh
     end
     
   elsif Input.trigger?(Input::SHIFT) # and !@Buddy_info.visible
     $game_system.se_play(BuddyData::PageTurnSound)
     #@Buddys_title.next_page
     #@Buddys_list.next_page
   end
 end
 
end

module RMXOS
 class Network
 #--------------------------------------------------------------------------
 # * Register Last Request ID
 #     message : the message of the request (sent by server)
 #--------------------------------------------------------------------------
 def register_request_id(message='')
     id = ''
     # stanley's add ! Je récupère l'id de la dernière requête (1er chiffre du message)
     # je récupère le premier caractère après le premier chiffre (pour 1A, 1B etc)
      if message.include?('ID: ')
         after_id = message.split('ID: ', 2)[1].split(//).first
       while after_id != ')' do
         id += after_id
         after_id = message.split(after_id, 2)[1].split(//).first
       end
       @last_request_id = id
     end
   end
   
 end
end





Instructions

See at the top of the code.
Also the french words/sentences can easily be changed in the config, each one is a parameter in the module and I explain their meaning very clearly but send me a message if you don't understand something.


Compatibility
Not compatible with bronies... Wait what



Credits and Thanks


  • Sylphe, for the script and explanations.

  • Blizzard, for RMX-OS, OnlineAwareness and RMX-OS controller for BlizzABS.




Author's Notes
If you delete a buddy who is not connected, you will be disconnected (bug from RMX-OS)
Please report any bugs or suggestions.
6
Onmap Players Window for RMX-OS
Authors: Sylphe
Version: 1.1
Type: RMX-OS Plugin
Key Term: RMX-OS Plugin



Introduction
If your game uses RMX OS you'll certainly want to have some windows here and there, but you're too lazy to do it :p so this will help you a bit.



Features


  • Display onmap players

  • System of pages where you can switch pages with P and O if more than 15 players

  • You can show/hide the window with one switch

  • You can turn this switch on/off with one RMX-OS chat command (/offmap)




Screenshots

Spoiler: ShowHide




Demo

None.


Script

You will have to change RMXOS OnlineAwareness line 126
Just add the extra lines of this code :

    when /\A\/onmap\Z/
           names = self.map_players.values.map {|player| player = player.username}
HERE ==>     $onmap_players = names
HERE ==>     $onmap_player_need_refresh = true


Here is the window code, put it as the Blizzard's order script say :  http://forum.chaos-project.com/index.php/topic,23.0.html
Window: ShowHide

=begin
================================================================================
Onmap Player Window for RMXOS                                     Version 1.0
Author: Sylphe                                                   [31/07/2014]
--------------------------------------------------------------------------------

 This script is a window displaying all characters on the same map of the actor.
 The limit of the window is 15 players, if there are more players, type P/O to
 See previous/next page of players
--------------------------------------------------------------------------------
[[ Version History ]]
1.0

********************************************************************************
*                         I N S T R U C T I O N S                              *
********************************************************************************
You will have to change RMXOS OnlineAwareness line 126
Just add the extra lines of this code :

    when /\A\/onmap\Z/
           names = self.map_players.values.map {|player| player = player.username}
HERE ==>     $onmap_players = names
HERE ==>     $onmap_player_need_refresh = true

Then You will have to add this window in a scene, just do like all other
windows in scenes ( .new, dispose, update, refresh)

----------  
-Controls-
----------
if player number exceed 15
P / O to change page (P = next Page, O = previous page)
you can change it at the end of this script, in class Scene_Map in the method update_controls

Use command /offmap on the rmx-os chat to show/hide this window

----------
-Graphics-
----------
WINDOWSKIN
 line 85 change the windowskin to what you want.
WINDOW'S SIZE
 line 174, 185 change the value 10 in 'self.heigt += 10' if you want the window
 to be smaller or bigger than usual when another player is displayed.
SPACE BEETWEEN NAMES
 line 117 change y+= 15 if you want more/less spaces beetween each player name
 
------------
-Compatibility-
------------
Only Work with RMXOS and RMXOS OnlineAwareness modified.

---------------
-Configuration-
---------------
TIMER
set line 204 the timer (255 by default). It is the time (in frame maybe)
the game will wait until asking the server who is on the same map
( And don't forget changing windowskin line 85 if you don't use my buddy list script )
SWITCH
Just below in the module you can change the switch you have to set to true or false
whether to hide or show this window.
================================================================================
Credits:
Sylphe -> Making this script
Blizzard -> Doing RMXOS and RMXOS OnlineAwareness
================================================================================
=end
module OnMapData
 # The switch to hide/show this window
 # note that you can manually change its switch by using /offmap command
 Switch = 210
end
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
# Window displaying onmap players
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
class Onmap_Window < Window_Base
 
 attr_accessor :page
 
 def initialize
   # store the last player number
   @ancient_player_number = 0
   
   #the actual window page
   @page = 0
   
   #The array that will store onmap players
   #(used in online awareness if you changed like in configuration)
   $onmap_players = []
   
   # flag that will be used to know if we must refresh
   $onmap_player_need_refresh = false
   
   # Change this if you want to replace the window
   # super (x, y, width, height)
   super(380, 140, 200, 60)
   
   bitmap = Bitmap.new(width - 32, height - 32)
   bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /
         (3 ** 2))
   bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
       Color.new(0, 0, 0, 20))
  self.contents = bitmap
  self.opacity=125
 
  # here change WINDOWSKIN like  
  # self.windowskin = RPG::Cache.windowskin("YourWindowskinFileName") without extension.
  self.windowskin = RPG::Cache.windowskin(BuddyData::Windowskin)
  refresh
 end

 
 def refresh
   self.contents.clear
   self.contents.font.color= Color.new(255, 255, 255, 255)
   @actual_player_number = 0
   y = 0
   # the first player we display
   @first_player = @page * 15
   
   w = contents.text_size("Sylph was the Wind Goddess").width    
   
   #if there are players on the map
   if $onmap_players[@first_player] != nil
     
       # We display them until 15
       for i in @first_player..($onmap_players.length-1)
         if @actual_player_number < 15
           
             # Si on a fait la requete on agrandi la fenetre si y a + de joueurs qu'avant
             @actual_player_number += 1
           if @actual_player_number > @ancient_player_number
               bigger
           end
           
           self.contents.draw_text(0, y, w, 24,$onmap_players[i],1)
           #CHANGE THIS IF THE SPACE BEETWEEN NAMES DOES NOT SUIT YOU
           y += 15
         end #if there are less than 15 players
         
       end # for every onmap player
       
     end # if player non null
     
     # If there are less players than before we reduce window
         difference = (@ancient_player_number - @actual_player_number)
         # if 'O' doesn't work, try decomment those lines
        # if @tropdmonde.length > 0
        #  difference -= (@tropdmonde[@page].length - 1)
        # end
         if difference > 0
           for i in 1..difference
             if i <= 15
               smaller
             end
           end
         end
       @ancient_player_number = @actual_player_number
 end # End of refresh
 
 
# scale window and it's content
 def bigger
   self.height += 8
   bitmap = Bitmap.new(width - 32, height - 32)
  bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /
         (3 ** 2))
  bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
       Color.new(0, 0, 0, 20))
  self.contents = bitmap
end

 # reduce window and it's content
 def smaller
   self.height -= 8
   bitmap = Bitmap.new(width - 32, height - 32)
  bitmap.hue_change((3 - 1.5).sgn * (1.25 - 40 / 0.8) * 120 /
         (3 ** 2))
  bitmap.fill_rect(0, 0, bitmap.width, bitmap.height,
       Color.new(0, 0, 0, 20))
  self.contents = bitmap
end

end # End of my window


class Scene_Map  
 
 alias sylphe_opw_main main
 def main
   #the timer, change the condition in update
   @timer = 0
   @onmap_window = Onmap_Window.new
   sylphe_opw_main
   @onmap_window.dispose
 end
 
 alias sylphe_opw_update update
 def update
   
     @onmap_window.update
     # If we have too much persons, we check if player type P or O
     if $onmap_players.length > 15
       update_onmap_player_controls
     end
      # we check who is on the same map
     # Once we connect and once the timer match condition at the bottom
     if @timer == 0
       $network.check_normal_commands('/onmap')
     end
     if $onmap_player_need_refresh
       @onmap_window.refresh
       @onmap_window.refresh
       $onmap_player_need_refresh = false
     end
     @timer = @timer+1
     # CHANGE THIS TO CHANGE THE TIME UNTIL IT WILL CHECK SERVER DATAS
     #(255 = I dunno how many seconds, I would say 15)
     if @timer == 255
       @timer = 0
     end
   # If switch is activated
   if !$game_switches[OnMapData::Switch] and @onmap_window.visible
     @onmap_window.visible = false
   elsif $game_switches[OnMapData::Switch] and !@onmap_window.visible
     @onmap_window.visible = true
   end
   sylphe_opw_update
 end
 
  #we check if the input is P or O (works now)
def update_onmap_player_controls
   
   if Input.trigger?(Input::Key['P'])
     if ((@onmap_window.page*15)+15) < $onmap_players.length
        @onmap_window.page += 1
        @onmap_window.refresh
        @onmap_window.refresh
      else
        $game_system.se_play($data_system.buzzer_se)
      end
    elsif Input.trigger?(Input::Key['O'])
     if @onmap_window.page > 0
        @onmap_window.page -= 1
        @onmap_window.refresh
        @onmap_window.refresh
      else
        $game_system.se_play($data_system.buzzer_se)
     end
    end
   
end
 
end # end of Class Scene_Map

module RMXOS

 #============================================================================
 # module Documentation
 #============================================================================
 
 module Documentation
   PARAMETERS['offmap']    = 'none'
   DESCRIPTIONS['offmap']  = 'Show/Hide the window displaying all onmap players.'
   
 end
 
 #============================================================================
 # Network
 #============================================================================
 
class Network
    alias check_normal_commands_onmap_window_alias check_normal_commands
   def check_normal_commands(message)
     case message
     when /\A\/offmap\Z/
       $game_switches[OnMapData::Switch] = !$game_switches[OnMapData::Switch]
       return true
     end
     return check_normal_commands_onmap_window_alias(message)
   end
 
 end
end





Instructions

See at the top of the code.


Compatibility
Not compatible with radically Window_Base or RMXOS modifying scripts


Credits and Thanks


  • Sylphe, for the script.

  • Blizzard, for RMXOS and OnlineAwareness.




Author's Notes
It was made for R5GAMER but I tought anyone could want this ^^ so here is the release
Please report any bugs or suggestions.
( the feature with more than 15 players may bug I didn't test it because I don't have 15 players in my project)
7
Script Requests / World Map
July 02, 2014, 07:07:10 pm
Hellooooo I have a dumb script request ! It's not even a script I search it's maybe piece of code I don't know, well look :

I have a worldmap where I want my players to check towns only. I don't want them to move freely on the map,so when they press LEFT or DOWN they can set their position to the town on the LEFT or on the BOTTOM of their actual position and show a little animated light on the town they select.
Yes it is event-making possible.. But very long, if I have about 20 places to handle it would be the chaos to do it.
So I think it is scripting possible... Doing something like this : each town is a selectable item stored in an array, and when we press an arrow key we move from item to item in the array(and on the map the player is teleported to the item's position . And when we are on one item the description of the associated town is shown on top (Like Window_Help) . So each item has its position and its description.

Is it possible to do ? If so, do you have some pieces of codes that could help me do this - like how to teleport in a script or how to check the position or even how to show something animated where the actor is - ? (Or if you don't mind to do it, thinking other people could find it usefull, it would be great too)
8
Hellooooo everyone it's the annoying Sylphe who is requesting some small edits because of his bad experiences :(

Hum first of all, I made this running sprite :
Spoiler: ShowHide
Credits if you Use (I made this sprite in normal stance and attacking -bad- and jumping and defending if you desire and his name is Sylphe ! )
well and I want someone to modify it ... I want my sprite to be more like this :
Spoiler: ShowHide
 

just small ameliorations would be very appreciated :)


Then I have this image made by Foreverzer0 :
Spoiler: ShowHide
 

I really like it, and I would like the same effect with "Stanland Madness" typed instead of "Advanced demo title"...

I think that's it ^^ and if you have a script, compatible with BlizzABS, that limit the running time with a jauge bar... I'll love you if you give it to me ! :D