[Open Assets] Blendcolor - More Color Choices!

This content may be freely modified and/or maintained by anyone.
Status
Not open for further replies.

Prisima

Member
This script adds the ability to blend two color choices together.

blendcolor is the command to change the color blended into your base color. Both the numeric color values and their word equivalent are supported. You can also use:
  • "blendcolor supersonic"
  • "blendcolor supertails"
  • "blendcolor superknux" to have the flashing colors of those characters, respectively, and
  • "blendcolor off" to disable it.
You can have up to 3 blendcolors by using the blendcolor, blendcolor2, and blendcolor3 commands.

The only colors you can use in CTF are white, silver, grey, and black as to not mask your team color and confuse everyone.

Example:
Code:
color blue
blendcolor red
This gives you purple.
The blendamount command changes the strength of the blendcolor, from 1 to 9 (1 being 10% strength, and 9 being 90% strength).

Example:
Code:
blendamount 5
This changes your blendcolor strength to 50% (default).
You can have up to 3 blendamounts by using the blendamount, blendamount2, and blendamount3 commands.

There are also shorthand commands: bc, bc2, and bc3 are the 3 blendcolor commands respectively, and ba, ba2, and ba3 are the 3 blendamount commands.


Note: This has been reported to not work in OpenGL.
Note: This now works in OpenGL as of Version 1.4.


Changelog:
Code:
Version 1.6 - Super Update
*You can now have up to 3 blendcolors. Support for non-green resolutions and splitscreen HUD fixes were added.

Version 1.5 - Even bigger update
*Blendcolor now supports the HUD in Vanilla gametypes! Thanks to Hatninja, for his score code was used as a template. Also, new "blendamount" feature added.

Version 1.4 - Big Update
*OpenGL is now supported!
*Gravity flip and scale are now supported!

Version 1.3
*Now supports all gametypes!

Version 1.2
* Fixed a bug where your blendcolor aura would stay in place at the last place you died if you respawned too quickly, and a bug where you can't have your blendcolor after switching a level until you died.

Version 1.1
* Fixed a bug where changing your blendcolor would affect all other players in the game.

Version 1.0
* Initial release. Have fun!

Credits:
  • Big thanks to LJ Sonic for optimizing the code and providing advice, suggestions, and extensive help!
  • Thanks to Potatosack and Penzer the Hedgegod for bug reporting!

Screenshot:
InfatuatedGratefulEft.gif
 

Attachments

  • blendcolor.lua
    11.8 KB · Views: 807
Last edited:
I can't say anything about the performance overhead since it's essentially impossible to make SRB2 lag on my computer, but this script works as intended (and is also pretty damn cool!)

Welcome to Releases!
 
Error from opengl

You Should have mentioned how it doesn't work in opengl. Other than that it's perfect!
 
Last edited:
Right, i myself found an issue, too.
The issue i noticed was that, if one person decided to do this himself on a server(Specify IP for the win), the other person(/people?) seem to change, too.
EDIT: Also, disconnecting from a server and rejoining makes you find a blendcolor "aura" of you that still stays.
Double Edit: Oh god purple + blendcolor tan looks atrocious.
 
Last edited:
Right, i myself found an issue, too.
The issue i noticed was that, if one person decided to do this himself on a server(Specify IP for the win), the other person(/people?) seem to change, too.

The reason why is because once again people don't realise "for player in players.iterate" iterates through all players in the game. :)

But yeah, Prisima, the function you made for COM_AddCommand already provides a variable "player" to get the player who called the command. By doing "for player in players.iterate" you affect everyone in the game simultaneously, regardless of who used the command in the console.

That aside, the actual idea behind this script is rather clever IMO, great work!
 
Last edited:
You Should have mentioned how it doesn't work in opengl. Other than that it's perfect!

Uhh, no. I tested the script in OpenGL and it works perfectly fine. GL is my primary renderer to begin with.
 
Thanks for the support everyone! The blendcolor-changing bug reported by NotablyPrettyCrazy and solved by Monster Iestyn has been fixed in Version 1.1.
 
Right, found a few more issues, and verified an issue that i edited out of the original post.
Respawning before your death sprite goes through the ground = A ghost of the blendcolor "aura" stays.
DC-ing, or Synching out of a server = Yet another ghost of the blendcolor stays around.
And a bit more clarification, maybe, on the OGL/Software stuff, the lua seemed to be working at first in Software, but when the other guy and i got to the next map, it broke, and the blendcolors didn't apply. Switched back to MAP01, didn't work, but then the other person suicided, and got his blendcolor back, when i suicided, so did i.
But in OGL, be it Win or DD, it didn't work at even the start, and suiciding doesn't seem to work. But the "Ghosts" can still appear. And Wolfy claims that this does work in OGL, so i have no idea what could be going on there.
 
Actually, A_OverlayThink has a workaround for OpenGL, and while it isn't perfect, it is a built in version of the code you have for overlaying.
 
Innovation at its best. Great work :)

---------- Post added at 06:28 PM ---------- Previous post was at 06:11 PM ----------

Do you think you could adjust it so that it works in any mode?
 
Innovation at its best. Great work :)

---------- Post added at 06:28 PM ---------- Previous post was at 06:11 PM ----------

Do you think you could adjust it so that it works in any mode?

Updated to Version 1.3, now supports all gametypes.
 
Yiss

Was waiting for this bugfix. By the way, awesome script! I'm probably not the only one who's wasted an hour playing with the various color combinations (Cyan+White and Dark red+Blue are some of my favorites)

...

right?
 
Well, that was... interesting.

Honestly, I was most shocked by the fact that it works with MD2 Models.

How about that.

EDIT: In case people are having trouble with MD2 Models, set "GR_MD2 2", or "GR_MD2 OLD" in console.
 
Last edited:
I've modified the code for this to appear behind the shields as well as work with my modified version of Secondcolor.
H5hLPQ6.png

Settings used:
color grey
blendcolor silver
secondcolor teal

As you can see, secondcolor isn't effected by blendcolor, and both are behind the shield.
 
Version 1.5 has been released! Blendcolor is now HUD compatible, and you can change your blendcolor strength.

srb20014.png


This is likely the last release until 2.2, when it will support all of the new colors.
 
Last edited:
Version 1.6 has been released. It includes a few HUD fixes in addition to the ability to have up to 3 blendcolors.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top