xboxscene.org forums

Author Topic: Colour Pack Randomization For Skin  (Read 187 times)

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Colour Pack Randomization For Skin
« on: January 11, 2004, 05:41:00 PM »

CODE

;Colour pack changer
;All code created by ub312g0d

:Begin
;setting colour codes
SET red "E70000"
SET purple "C000E7"
SET orange "DC8000"
SET green "17EB00"
SET blue "007ADF"
SET aqua "00CDCE"
SET yellow "F0F100"
SET colour="E70000"

;open and writing counter to an external file to keep after reboot
OPENREAD count C:/skins/Crystal/count.txt
READFILELN count
OPENWRITE count C:/skins/Crystal/count.txt
ADD counter 1
WRITEFILE count %counter%
CLOSEFILE count

;checking counter
IF counter=1 goto cred
IF counter=2 goto cpurple
IF counter=3 goto corange
IF counter=4 goto cgreen
IF counter=5 goto cblue
IF counter=6 goto caqua
IF counter=7 goto cyellow
IF counter=8 goto reset

;setting proper colours as per the if statement
:cred
colour=%red%
SET image="red"
quit

:cpurple
colour=%purple%
SET image="purple"
quit

:corange
colour=%orange%
SET image="orange"
quit

:cgreen
colour=%green%
SET image="green"
quit

:cblue
colour=%blue%
SET image="blue"
quit

:caqua
colour=%aqua%
SET image="aqua"
quit

:cyellow
colour=%yellow%
SET image="yellow"
quit

:reset
OPENREAD count C:/skins/Crystal/count.txt
READFILELN count
OPENWRITE count C:/skins/Crystal/count.txt
set counter=0
WRITEFILE count %counter%
CLOSEFILE count
goto begin

quit
Logged

STARKES

  • Archived User
  • Newbie
  • *
  • Posts: 8
Colour Pack Randomization For Skin
« Reply #1 on: January 11, 2004, 05:46:00 PM »

If i wasnt so busy with your sister i would help you out dude. congrats on the skin though.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Colour Pack Randomization For Skin
« Reply #2 on: January 11, 2004, 05:47:00 PM »

Well, I plan on adding a lot of options for running scripts in MXM. Tying them to skins was one thing I wanted to do...

As I firm up the "Plug-n-play" standard, I'll impliment it into the "WIP"
Logged

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Colour Pack Randomization For Skin
« Reply #3 on: January 11, 2004, 06:07:00 PM »

so no then I'll assume? Cuz that sucks hardcore, This would have made the script much more ub312, randomization comming soon too? cuz in that case I'll have to overhaul the code as well, but it would be shorter, and self contained. Damn, soo many features I cant play with without a wip.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Colour Pack Randomization For Skin
« Reply #4 on: January 11, 2004, 06:25:00 PM »

QUOTE (ub312g0d @ Jan 11 2004, 10:07 PM)
so no then I'll assume? Cuz that sucks hardcore, This would have made the script much more ub312, randomization comming soon too? cuz in that case I'll have to overhaul the code as well, but it would be shorter, and self contained. Damn, soo many features I cant play with without a wip.

??

Plug-n-play isn't in yet, but I've been writing the white paper for it, to firm up a good standard before implementing it.

As for "WIP" - erm, I thought you were already aboard.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Colour Pack Randomization For Skin
« Reply #5 on: January 11, 2004, 07:48:00 PM »

dry.gif
It selects randomly from a list of files.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Colour Pack Randomization For Skin
« Reply #6 on: January 11, 2004, 07:50:00 PM »

QUOTE (STARKES @ Jan 11 2004, 10:46 PM)
If i wasnt so busy with your sister i would help you out dude. congrats on the skin though.

 blink.gif
?
Logged

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Colour Pack Randomization For Skin
« Reply #7 on: January 11, 2004, 08:12:00 PM »

lol, inside jokes, he's one of my friends irl.  I also want the text to change colour at the same thime though. Is this still possible, as per the reason I made this script for real, I just put the other stuff for the images in after I finished it.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Colour Pack Randomization For Skin
« Reply #8 on: January 11, 2004, 09:02:00 PM »

You don't need any = signs in SET.
And I don't think text colors can be set through scripts.

You can, however, keep a bunch of skin xml files and keep changing them through a script.
Logged

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Colour Pack Randomization For Skin
« Reply #9 on: January 11, 2004, 09:31:00 PM »

that sounds cool...how exactly would I integrate that?
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Colour Pack Randomization For Skin
« Reply #10 on: January 11, 2004, 09:35:00 PM »

wink.gif

Nothing too fancy, just an autoexec script node in the skin xml that will 'append' (as discussed before) to the global autoexec script.
Logged

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Colour Pack Randomization For Skin
« Reply #11 on: January 11, 2004, 09:45:00 PM »

ok, but if the image was changed randomly, woujld it still be possible to know what is and match the colour with this method? It sounds like you want to force the autoexec.xml to rename files in the skin so that only 1 at a time is mxm_skin.xml.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Colour Pack Randomization For Skin
« Reply #12 on: January 11, 2004, 09:50:00 PM »

It's not possible to find out, but you can do this:

At startup, rename a random xml to MXM_skin.xml, and rename the corresponding image.

Using random resource only works if you only want random pics
Logged

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Colour Pack Randomization For Skin
« Reply #13 on: January 12, 2004, 11:53:00 AM »

ok now that I know what I want to do.. how exactly would I go about it? And If I added code to the autoexec, wouldnt it be stuck there even if a user wanted to remove the skin? Would that create an error afterwards?
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Colour Pack Randomization For Skin
« Reply #14 on: January 12, 2004, 12:21:00 PM »

CODE

SET num $rand$
MOD num 5
ADD num 1
DELETE pathmxm_skin.xml
DELETE pathmxm_skin.xml
COPY pathmxm_skin%num%.xml pathmxm_skin.xml


Same for pics.  This way it's gonna put a random one each time you run the skin.
Logged