Jump to content


Photo

Colour Pack Randomization For Skin


  • Please log in to reply
14 replies to this topic

#1 ub312g0d

ub312g0d

    X-S X-perience

  • Members
  • PipPip
  • 323 posts
  • Location:Near toronto
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 01:41 AM

I just made this and havent had a chance to test it out yet, it will include count.txt. that file will start off with just "SET count=0". That will make sense after you have looked it over. Can this be placed directly in my mxm_skin.xml file? also, If I made the skin look for variables( in this case image and colour) and put them as the background img source and the selection colour respectively, would it work? ty guys. Oh ya, the goal is to have the skin switch colours every boot.
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

Edited by ub312g0d, 12 January 2004 - 01:42 AM.


#2 STARKES

STARKES

    X-S Member

  • Members
  • Pip
  • 82 posts
  • Xbox Version:v1.0

Posted 12 January 2004 - 01:46 AM

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

#3 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 01:47 AM

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"

#4 ub312g0d

ub312g0d

    X-S X-perience

  • Members
  • PipPip
  • 323 posts
  • Location:Near toronto
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 02:07 AM

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.

#5 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 02:25 AM

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.

#6 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 January 2004 - 03:48 AM

Random resources is in already dry.gif
It selects randomly from a list of files.

#7 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 January 2004 - 03:50 AM

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
?

#8 ub312g0d

ub312g0d

    X-S X-perience

  • Members
  • PipPip
  • 323 posts
  • Location:Near toronto
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 04:12 AM

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.

#9 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 January 2004 - 05:02 AM

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.

#10 ub312g0d

ub312g0d

    X-S X-perience

  • Members
  • PipPip
  • 323 posts
  • Location:Near toronto
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 05:31 AM

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

#11 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 January 2004 - 05:35 AM

I could do that, but it wouldn't be overly useful without autoexec addons defined through skins (listening bj?) 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.

#12 ub312g0d

ub312g0d

    X-S X-perience

  • Members
  • PipPip
  • 323 posts
  • Location:Near toronto
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 05:45 AM

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.

#13 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 January 2004 - 05:50 AM

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

#14 ub312g0d

ub312g0d

    X-S X-perience

  • Members
  • PipPip
  • 323 posts
  • Location:Near toronto
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 12 January 2004 - 07:53 PM

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?

#15 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 January 2004 - 08:21 PM

That's why I suggested each skin have an autoexec script tag, so it removes itself with the skin.

Here's the code (not perfect syntax tho)
Assuming you have 5 xml's/pics


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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users