Jump to content
Melosx

MSX - Windowskin 128 Color v1.0

Recommended Posts

MSX - Windowskin 128 Color v1.0

Melosx

 

Introduction

With this script you can use a windowskin with 128 colors.

 

How to Use

Place the script under Material and above Main. You need the following Windowskin.

 

Windowskin

334urs2.png

 

Script

 

 

#==============================================================================
# ** Windowskin 128 Color v1.0
#==============================================================================
# Author: Melosx
# Release Date: 10/04/2012 => v1.0
#==============================================================================
# * Instructions
# -----------------------------------
# Place the script under Material and above Main.
#
#==============================================================================
# * Description
# -----------------------------------
# With this script you can use a windowskin with 128 colors.
# You can add new color code following the instruction in the Color Zone.
#
#==============================================================================

class Window_Base < Window

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|COLOR ZONE|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
#
# To add new color follow this template:
#
#		   def COLOR_NAME; text_color(ID); end
#
# ID is a number from 0 to 127 and it is the place of the color in the
# windowskin.
#
#----------------------------ADD HERE YOUR COLORS-----------------------------#
 def msx_color; text_color(32); end; # <- My favourite color ^.^

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-==--=-=-|END|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#

 def text_color(n)
windowskin.get_pixel(64 + (n % 16) * 4, 96 + (n / 16) * 4)
 end

end

 

 

 

Credit and Thanks

- Melosx

Edited by Melosx
  • Like 3

Share this post


Link to post
Share on other sites

So.. What's color 128 actually?.. black or something?..

 

Thanks anyways.. seems to be pretty nice little scriptlet :)

Share this post


Link to post
Share on other sites

In a normal windowskin you have only 32 color squares... Now you can use 128 color squares... The index of the color is 0->127... if you put 128 you have an error...

Share this post


Link to post
Share on other sites

I just came up with an updated version of your script above and called it Windowskin 512 and I will post it here since it is relevant.

Script:

 

 

#==============================================================================
# ** Windowskin 512 Color v1.0
#==============================================================================
# Author: kramlat
# Release Date: 23/08/2012 => v1.0
# Based on MSX Windowskin 128 Color
# Original Author: Melosx
#==============================================================================
# * Instructions
# -----------------------------------
# Place the script under Material and above Main.
#
#==============================================================================
# * Description
# -----------------------------------
# With this script you can use a windowskin with 128 colors.
# You can add new color code following the instruction in the Color Zone.
#
#==============================================================================
class Window_Base < Window
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|COLOR ZONE|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
#
# To add new color follow this template:
#
#				  def COLOR_NAME; text_color(ID); end
#
# ID is a number from 0 to 127 and it is the place of the color in the
# windowskin.
#
#----------------------------ADD HERE YOUR COLORS-----------------------------#
 def msx_color; text_color(32); end; # <- Msx's favourite color ^.^
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-==--=-=-|END|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
 def text_color(n)
	windowskin.get_pixel(64 + (n % 32) * 2, 96 + (n / 32) * 2)
 end
end

 

 

and here we have a 512 color windowskin template (needed for above script):

post-13184-0-21870600-1343056712_thumb.png

 

Oh and 2,048 color windowskins are possible too (but you cannot go beyond that point without resizing the image and causing problems potentially), I will add that script and template image as well:

script:

 

 

#==============================================================================
# ** Windowskin 2,048 Color v1.0
#==============================================================================
# Author: kramlat
# Release Date: 23/08/2012 => v1.0
# Based on MSX Windowskin 128 Color
# Original Author: Melosx
#==============================================================================
# * Instructions
# -----------------------------------
# Place the script under Material and above Main.
#
#==============================================================================
# * Description
# -----------------------------------
# With this script you can use a windowskin with 128 colors.
# You can add new color code following the instruction in the Color Zone.
#
#==============================================================================

class Window_Base < Window

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-|COLOR ZONE|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
#
# To add new color follow this template:
#
#				  def COLOR_NAME; text_color(ID); end
#
# ID is a number from 0 to 127 and it is the place of the color in the
# windowskin.
#
#----------------------------ADD HERE YOUR COLORS-----------------------------#
 def msx_color; text_color(32); end; # <- Msx's favourite color ^.^

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-==--=-=-|END|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#

 def text_color(n)
	windowskin.get_pixel(64 + (n % 64), 96 + (n / 64))
 end

end

 

 

and the template:

post-13184-0-22691900-1343056251_thumb.png

 

Just so you know, these new skin formats do not use the generic order of colors like normal skins do but a system style palette like that of 16 bit consoles so you will likely have to change the colors in the Window_Base class to make them look right. Change them to whatever you wish, or wait until I add equivilents for WS512 and WS2048 by WS32 and WS128 code.

Edited by kramlat

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted