Data Realms Fan Forums
http://45.55.195.193/

Palette in MOPixel Form
http://45.55.195.193/viewtopic.php?f=1&t=17296
Page 1 of 1

Author:  Kyred [ Sat Dec 05, 2009 11:07 am ]
Post subject:  Palette in MOPixel Form

Now that Grif has released his constructor, I feel okay with releasing this. This is a simple java program I wrote to create an MOPixel for each color in the palette. Who knows, someone might find their own use for this :P

The way it works is it reads in the data from palette.txt (generated by TLB's BMPToArray program), formats the data as MOPixels, and then spits them all out into MOPixelData.ini. All you have to do is copy this file over to your mod folder and add an include for it.

To use it, simply double click MOPixelMaker.jar and make sure palette.txt is in the same folder as the .jar file. However, I've already included an MOPixelData.ini, so that isn't necessary if you just want the .ini file.

Code:
//Sample generated MOPixel.  Base Pixel is also generated by the program.
AddAmmo = MOPixel
   CopyOf = Base Pixel
   PresetName = 32,8,56
   Color = Color
      R = 32
      G = 8
      B = 56


Each MOPixel's PresetName is the same as it's RGB colors, for easy referencing. Using these MOPixels, some lua scripting, and TLB's BMPToArray.exe (get it from Grif's constructor) you can draw anything in game.

I've also included the java source code, in case anyone is curious on how to write a program to do something like this. You'll need to find a java compiler, though, if you want to make your own program.

Attachments:
MOPixelMaker.rar [15.02 KiB]
Downloaded 201 times

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/