Author Topic: [XP] Online Players Window for RMX-OS  (Read 6613 times)

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
[XP] Online Players Window for RMX-OS
« on: July 31, 2014, 07:55:37 PM »
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

(click to show/hide)


Demo

None.

Script

You will have to change RMXOS OnlineAwareness line 126
Just add the extra lines of this code :
Code: [Select]
    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
(click to show/hide)



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)
« Last Edit: August 02, 2014, 11:11:44 PM by Sylphe »
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #1 on: July 31, 2014, 08:07:19 PM »
Lol, this has been requested so many times. I'm glad someone finally made it xD
also, add this at the bottom for the scene_map stuff
(click to show/hide)

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #2 on: July 31, 2014, 08:50:41 PM »
Yeah I was wondering why anyone didn't post windows scripts for RMX OS ^^ I'm also doing a graphical buddy list but there are some annoying things causing troubles
Thank you for the enhancement I added it :) and now I think I understood how aliases works ^^
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 328
  • LV: 2
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #3 on: July 31, 2014, 08:52:36 PM »
Great to see people adding things to rmx-os ;)

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #4 on: July 31, 2014, 09:41:58 PM »
rmx-os is something great I hope the general bugs like the ones you mentionned will be fixes one day
Maybe I ! Will fix it 8-| haha
but for now I'm a noob
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Online Players Window for RMX-OS
« Reply #5 on: July 31, 2014, 10:18:14 PM »
You shouldn't actually call refresh every frame, but only when the player list changes.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 328
  • LV: 2
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #6 on: July 31, 2014, 11:02:13 PM »
what do i change here guys?

Code: [Select]
   # ici change le WINDOWSKIN selon ce que tu veux
   self.windowskin = RPG::Cache.windowskin(BuddyData:windowskin)
   refresh
  end

I use a different window skin to standard rmxp

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #7 on: July 31, 2014, 11:12:19 PM »
You shouldn't actually call refresh every frame, but only when the player list changes.
Do I have to move some codes from refresh method to scene_map ?
(I think about the timer)

white you just have to put here the windowskin you want to, it doesn't work if you just put
Code: [Select]
self.windowskin = RPG::Cache.windowskin('Yourwindowskin') ?
« Last Edit: July 31, 2014, 11:14:30 PM by Sylphe »
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline R5GAMER

  • Nobody?
  • Transcended Spirit
  • ***
  • Posts: 128
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #8 on: July 31, 2014, 11:41:38 PM »
Perfect! And Very thanks!
..........________
....'/,-Y"............."~-.
..l.Y.......................^.
./\............................_\
i.................... ___/"...."\
|.................../"...."\ .....o!
l..................].......o !__../
.\..._..._.........\..___./......"~\
..X...\/...\.....................___./
.(. \.___......_.....--~~".....~`-.           
....`.Z,--........./.....................\
.......\__....(......../.........._____)
...........\.........l......../---~~" /
............Y.......\................../
............|........"x_____.^
............|.....................\
............j.....................Y

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #9 on: July 31, 2014, 11:57:52 PM »
You welcome :D
Updated, the refresh performed only when checking server's datas
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Online Players Window for RMX-OS
« Reply #10 on: August 01, 2014, 12:08:16 AM »
You have a refresh flag there already as far as I can see.

Code: [Select]
if $onmap_player_need_refresh
  @onmap_window.refresh
  $onmap_player_need_refresh = false
end

Using a timer is unnecessary if you refresh it only when the data has changed.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #11 on: August 01, 2014, 01:42:04 AM »
I updated it =)
The timer is for checking the datas (sending /onmap manually). Once I receive the datas, I set the flag to true in onlineAwareness then I can run the refresh in the code you mentionned, in the scene_map update ^^
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline R5GAMER

  • Nobody?
  • Transcended Spirit
  • ***
  • Posts: 128
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #12 on: August 01, 2014, 08:37:54 AM »
I just tested with 16 players to see if there was a concern with touch p and o and see if the code do its job .. Unfortunately, there is an error ..

And I change :
Code: [Select]
def update_controls
    if Input.trigger?(Input::P)
       @page += 1
    elsif Iput.trigger?(Input::O)
       @page -= 1
     end
end

to :
Code: [Select]
def update_controls
   if Input.trigger?(Input::Key['P'])
       @page += 1
   elsif Input.trigger?(Input::Key['O'])
       @page -= 1
   end
end
« Last Edit: August 01, 2014, 08:50:02 AM by R5GAMER »
..........________
....'/,-Y"............."~-.
..l.Y.......................^.
./\............................_\
i.................... ___/"...."\
|.................../"...."\ .....o!
l..................].......o !__../
.\..._..._.........\..___./......"~\
..X...\/...\.....................___./
.(. \.___......_.....--~~".....~`-.           
....`.Z,--........./.....................\
.......\__....(......../.........._____)
...........\.........l......../---~~" /
............Y.......\................../
............|........"x_____.^
............|.....................\
............j.....................Y

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #13 on: August 01, 2014, 08:45:13 AM »
Try replacing 'o' and 'p' with a capitol 'O' and 'P'.

Offline R5GAMER

  • Nobody?
  • Transcended Spirit
  • ***
  • Posts: 128
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #14 on: August 01, 2014, 08:53:10 AM »
Try replacing 'o' and 'p' with a capitol 'O' and 'P'.

Yes, I just saw I was not careful .. lol
Another problem, I've put 20 players when the player clicks on P must do this several times until you get to another window .. By cons, once the other window and reached .. and that you click on O, its deletes all the names and adds in a few ..

MMMhhh.. I changed the timer in 1 and I noticed he responds immediately to the 'P' button but the button 'O' it does not respond ..
« Last Edit: August 01, 2014, 09:06:53 AM by R5GAMER »
..........________
....'/,-Y"............."~-.
..l.Y.......................^.
./\............................_\
i.................... ___/"...."\
|.................../"...."\ .....o!
l..................].......o !__../
.\..._..._.........\..___./......"~\
..X...\/...\.....................___./
.(. \.___......_.....--~~".....~`-.           
....`.Z,--........./.....................\
.......\__....(......../.........._____)
...........\.........l......../---~~" /
............Y.......\................../
............|........"x_____.^
............|.....................\
............j.....................Y

Offline whitespirits

  • Ethereal Devastator
  • ****
  • Posts: 328
  • LV: 2
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #15 on: August 01, 2014, 10:16:46 AM »
im getting an error :(

(click to show/hide)

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #16 on: August 01, 2014, 06:14:47 PM »
@R5GAMER ok thank you I'll see what I can do and I have an idea why it bugs (also clean your inbox when I send you a PM it says your inbox is full xd)
@whitespirit Are you sure you put the lines I mentionned for OnlineAwareness at the right place ? (it's near line 126 for me in online awareness)


EDIT : updated please try the new code with more than 15 players
« Last Edit: August 01, 2014, 07:06:11 PM by Sylphe »
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline R5GAMER

  • Nobody?
  • Transcended Spirit
  • ***
  • Posts: 128
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #17 on: August 01, 2014, 10:37:38 PM »
@R5GAMER ok thank you I'll see what I can do and I have an idea why it bugs (also clean your inbox when I send you a PM it says your inbox is full xd)
@whitespirit Are you sure you put the lines I mentionned for OnlineAwareness at the right place ? (it's near line 126 for me in online awareness)


EDIT : updated please try the new code with more than 15 players

I go test and I tell you!

An Error :
Code: [Select]
elsif Iput.trigger?(Input::Key['O'])
       @onmap_window.page -= 1
       @onmap_window.refresh
end

Remplace to :
Code: [Select]
elsif Input.trigger?(Input::Key['O'])
       @onmap_window.page -= 1
       @onmap_window.refresh
end

If you touch the button 'P' he can't no longer use the 'O' button ..
If you click on 'O' he appears other players but when repeatedly clicking on 'O' he displays an error.

« Last Edit: August 01, 2014, 10:50:04 PM by R5GAMER »
..........________
....'/,-Y"............."~-.
..l.Y.......................^.
./\............................_\
i.................... ___/"...."\
|.................../"...."\ .....o!
l..................].......o !__../
.\..._..._.........\..___./......"~\
..X...\/...\.....................___./
.(. \.___......_.....--~~".....~`-.           
....`.Z,--........./.....................\
.......\__....(......../.........._____)
...........\.........l......../---~~" /
............Y.......\................../
............|........"x_____.^
............|.....................\
............j.....................Y

Offline Sylphe

  • Transcended Spirit
  • ***
  • Posts: 119
  • LV: 3
  • Gender: Male
  • Huunngrryyyy *o*
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #18 on: August 02, 2014, 02:35:09 AM »
Ok thank you ! I updated, try again ! Lol
blindly follow his heart can lead to the loss
(click to show/hide)
Sylphe, descendant of Zoldik Family.
Quote from: TedBear
TRY KEEP UP

Offline R5GAMER

  • Nobody?
  • Transcended Spirit
  • ***
  • Posts: 128
  • LV: 0
  • Gender: Male
    • View Profile
Re: [XP] Online Players Window for RMX-OS
« Reply #19 on: August 02, 2014, 06:16:53 AM »
Ok thank you ! I updated, try again ! Lol

Always the same error .. :/
..........________
....'/,-Y"............."~-.
..l.Y.......................^.
./\............................_\
i.................... ___/"...."\
|.................../"...."\ .....o!
l..................].......o !__../
.\..._..._.........\..___./......"~\
..X...\/...\.....................___./
.(. \.___......_.....--~~".....~`-.           
....`.Z,--........./.....................\
.......\__....(......../.........._____)
...........\.........l......../---~~" /
............Y.......\................../
............|........"x_____.^
............|.....................\
............j.....................Y