Do we can retexture VVVVVV?

Started by Riki the crewmate, April 28, 2015, 09:09:43 PM

Previous topic - Next topic

Riki the crewmate

I'm trying to change the textures by going to C:/ and changing images from graphics. I really wanna make my viridian yellow, I tried to do it, But when i was almost done i saved everything launched VVVVVV, The images didn't change, How do we edit textures?

allison

Crewmates are automatically color corrected by the game engine (which is why there's only one set of character sprites).

Riki the crewmate

oh..

WHY TERRY WHY

:victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria: :victoria:HERE COME THE RANTERS!!!!!!!!!!!!!!!

Dav999

The only way would be to hexedit the game and change something in the scripts to changeplayercolour(yellow) (think of a jukebox terminal), if you know what you're doing, and it's very limited because you can only really make it temporary that way and if you increase the game size by even one character it stops working.

Maybe Viridian's color is in there too, but what complicates matters is that the color alternates all the time.

@Kreator

We could just get ShinyWolf to tell us how he made this: http://distractionware.com/forum/index.php?topic=1742.0

I'd like to play more levels with Verdigris

EDIT: *looks to the left of this post* Hmmm... that gives me an idea for a new texture pack... :vermillion:

allison

Quote from: @Kreator on April 29, 2015, 02:19:09 PM
We could just get ShinyWolf to tell us how he made this: http://distractionware.com/forum/index.php?topic=1742.0

I'd like to play more levels with Verdigris

EDIT: *looks to the left of this post* Hmmm... that gives me an idea for a new texture pack... :vermillion:
He made that with internal scripting. Modifying the scripts used in the main game is borderline impossible.

Terry

I don't think hexediting the game to change the actual colours would work; there's no one value to modify: it's a big messy function with lots of preset values.

What you COULD do is hexedit those values, if you can somehoe figure out where they are. But I wouldn't know where to start and it's probably not a good idea.

Anyway, here's the function where it happens:

void Graphics::setcol( int t, UtilityClass& help )
{
int temp;

//Setup predefinied colours as per our zany palette
switch(t)
{
//Player Normal
case 0:
ct.colour = getRGB(160- help.glow/2 - (fRandom()*20), 200- help.glow/2, 220 - help.glow);
break;
//Player Hurt
case 1:
ct.colour = getRGB(196 - (fRandom() * 64), 10, 10);
break;
//Enemies and stuff
case 2:
ct.colour = getRGB(225-(help.glow/2), 75, 30);
break;
case 3: //Trinket
if (!trinketcolset)
{
trinketr = 200 - (fRandom() * 64);
trinketg = 200 - (fRandom() * 128);
trinketb = 164 + (fRandom() * 60);
trinketcolset = true;
}
ct.colour = getRGB(trinketr, trinketg, trinketb);
break;
case 4: //Inactive savepoint
temp = (help.glow/2) + (fRandom() * 8);
ct.colour = getRGB(80 + temp, 80 + temp, 80 + temp);
break;
case 5: //Active savepoint
ct.colour = getRGB(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64));
break;
case 6: //Enemy : Red
ct.colour = getRGB(250 - help.glow/2, 60- help.glow/2, 60 - help.glow/2);
break;
case 7: //Enemy : Green
ct.colour = getRGB(100 - help.glow/2 - (fRandom()*30), 250 - help.glow/2, 100 - help.glow/2 - (fRandom()*30));
break;
case 8: //Enemy : Purple
ct.colour = getRGB(250 - help.glow/2, 20, 128 - help.glow/2 + (fRandom()*30));
break;
case 9: //Enemy : Yellow
ct.colour = getRGB(250 - help.glow/2, 250 - help.glow/2, 20);
break;
case 10: //Warp point (white)
ct.colour = getRGB(255 - (fRandom() * 64), 255 - (fRandom() * 64), 255 - (fRandom() * 64));
break;
case 11: //Enemy : Cyan
ct.colour = getRGB(20, 250 - help.glow/2, 250 - help.glow/2);
break;
case 12: //Enemy : Blue
ct.colour = getRGB(90- help.glow/2, 90 - help.glow/2, 250 - help.glow/2);
break;
//Crew Members
//green
case 13:
ct.colour = getRGB(120- help.glow/4 - (fRandom()*20), 220 - help.glow/4, 120- help.glow/4);
break;
//Yellow
case 14:
ct.colour = getRGB(220- help.glow/4 - (fRandom()*20), 210 - help.glow/4, 120- help.glow/4);
break;
//pink
case 15:
ct.colour = getRGB(255 - help.glow/8, 70 - help.glow/4, 70 - help.glow / 4);
break;
//Blue
case 16:
ct.colour = getRGB(75, 75, 255- help.glow/4 - (fRandom()*20));
break;


case 17: //Enemy : Orange
ct.colour = getRGB(250 - help.glow/2, 130 - help.glow/2, 20);
break;
case 18: //Enemy : Gray
ct.colour = getRGB(130- help.glow/2, 130 - help.glow/2, 130 - help.glow/2);
break;
case 19: //Enemy : Dark gray
ct.colour = getRGB(60- help.glow/8, 60 - help.glow/8, 60 - help.glow/8);
break;
//Purple
case 20:
ct.colour = getRGB(220 - help.glow / 4 - (fRandom() * 20), 120 - help.glow / 4, 210 - help.glow / 4);
break;

case 21: //Enemy : Light Gray
ct.colour = getRGB(180- help.glow/2, 180 - help.glow/2, 180 - help.glow/2);
break;
case 22: //Enemy : Indicator Gray
ct.colour = getRGB(230- help.glow/2, 230- help.glow/2, 230- help.glow/2);
break;
case 23: //Enemy : Indicator Gray
ct.colour = getRGB(255- help.glow/2 - (fRandom() * 40) , 255- help.glow/2 - (fRandom() * 40), 255- help.glow/2 - (fRandom() * 40));
break;

//Trophies
//cyan
case 30:
ct.colour = RGBf(160, 200, 220);
break;
//Purple
case 31:
ct.colour = RGBf(220, 120, 210);
break;
//Yellow
case 32:
ct.colour = RGBf(220, 210, 120);
break;
//red
case 33:
ct.colour = RGBf(255, 70, 70);
break;
//green
case 34:
ct.colour = RGBf(120, 220, 120);
break;
//Blue
case 35:
ct.colour = RGBf(75, 75, 255);
break;
//Gold
case 36:
ct.colour = getRGB(180, 120, 20);
break;
case 37: //Trinket
if (!trinketcolset)
{
trinketr = 200 - (fRandom() * 64);
trinketg = 200 - (fRandom() * 128);
trinketb = 164 + (fRandom() * 60);
trinketcolset = true;
}
ct.colour = RGBf(trinketr, trinketg, trinketb);
break;
//Silver
case 38:
ct.colour = RGBf(196, 196, 196);
break;
//Bronze
case 39:
ct.colour = RGBf(128, 64, 10);
break;
//Awesome
case 40: //Teleporter in action!
temp = fRandom() * 150;
if(temp<33)
{
ct.colour = RGBf(255 - (fRandom() * 64), 64 + (fRandom() * 64), 64 + (fRandom() * 64));
}
else if (temp < 66)
{
ct.colour = RGBf(64 + (fRandom() * 64), 255 - (fRandom() * 64), 64 + (fRandom() * 64));
}
else if (temp < 100)
{
ct.colour = RGBf(64 + (fRandom() * 64), 64 + (fRandom() * 64), 255 - (fRandom() * 64));
}
else
{
ct.colour = RGBf(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64));
}
break;

case 100: //Inactive Teleporter
temp = (help.glow/2) + (fRandom() * 8);
ct.colour = getRGB(42 + temp, 42 + temp, 42 + temp);
break;
case 101: //Active Teleporter
ct.colour = getRGB(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64));
break;
case 102: //Teleporter in action!
temp = fRandom() * 150;
if(temp<33)
{
ct.colour = getRGB(255 - (fRandom() * 64), 64 + (fRandom() * 64), 64 + (fRandom() * 64));
}
else if (temp < 66)
{
ct.colour = getRGB(64 + (fRandom() * 64), 255 - (fRandom() * 64), 64 + (fRandom() * 64));
}
else if (temp < 100)
{
ct.colour = getRGB(64 + (fRandom() * 64), 64 + (fRandom() * 64), 255 - (fRandom() * 64));
}
else
{
ct.colour = getRGB(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64));
}
break;

default:
ct.colour = 0xFFFFFF;
break;
}
//ct.color = endian_swap(ct.color);
}



moth 🦋

Oh my. I would love how to get THAT into the game.

onepamop_wl


@Kreator

You're one to talk, Mr. Thread-Bumping Master. Respect.

But on-topic: that level of ShinyWolf's was amazing, so I'm probably going to learn how to implement player color-changing for my future levels

Lollipop

Quote from: @Kreator on August 13, 2015, 03:37:55 PM
You're one to talk, Mr. Thread-Bumping Master. Respect.

But on-topic: that level of ShinyWolf's was amazing, so I'm probably going to learn how to implement player color-changing for my future levels

There was actually a bug with the level (Not a bug, but just something I found out about) If you die
in a room with a checkpoint (There actually were no rooms like that, I pressed R) The script didn't work and I stayed Viridian until I died in another room.

@Kreator

Yeah, resetting sounds like a thing that would cause problems with color-changing scripts