SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Lua

Reply
 
Thread Tools
Blendcolor - More Color Choices! Details »»
Blendcolor - More Color Choices!
Version: 1.6, by Prisima (*audible scribbling noises*) Prisima is offline
Developer Last Online: Nov 2017

Category: Version: SRB2 Rating: (5 votes - 4.40 average)
Released: 02-08-2016 Last Update: Never Installs: 0
Scripts Re-Useable Content

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:
Spoiler:

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:
Spoiler:

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:

Download Now

File Type: lua blendcolor.lua (11.8 KB, 117 views)

Supporters / CoAuthors

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 02-08-2016   #2
Wolfy
wolfs
Developer
 
Wolfy's Avatar
Default

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!
__________________
Quote:
[23:56:36] <SM-MaxX> prisma illya is a gift to this impure earth and a shining beacon for all anime
Wolfy is offline   Reply With Quote
Old 02-09-2016   #3
Bright Tailz
A.K.A CommandoEclipse
 
Bright Tailz's Avatar
Default Error from opengl

You Should have mentioned how it doesn't work in opengl. Other than that it's perfect!
__________________
Quote:
<MotorRoach> I'll post what is actually a legitimate 2.2 leak, and everyone will think I'm joking

Last edited by Bright Tailz; 02-09-2016 at 12:27 AM.
Bright Tailz is offline   Reply With Quote
Old 02-09-2016   #4
NotablyPrettyCrazy
Fool or Clown?
 
NotablyPrettyCrazy's Avatar
Default

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.
__________________
Quote:
<SpectrumMK2> I though we are making a tower?
<[ME]> Apparently the tower is a conga line now

Last edited by NotablyPrettyCrazy; 02-09-2016 at 01:38 AM.
NotablyPrettyCrazy is offline   Reply With Quote
Old 02-09-2016   #5
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Quote:
Originally Posted by NotablyPrettyCrazy View Post
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!
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.

Last edited by Monster Iestyn; 02-09-2016 at 01:42 AM.
Monster Iestyn is offline   Reply With Quote
Old 02-09-2016   #6
Wolfy
wolfs
Developer
 
Wolfy's Avatar
Default

Quote:
Originally Posted by Bright Tailz View Post
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.
__________________
Quote:
[23:56:36] <SM-MaxX> prisma illya is a gift to this impure earth and a shining beacon for all anime
Wolfy is offline   Reply With Quote
Old 02-09-2016   #7
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Thanks for the support everyone! The blendcolor-changing bug reported by NotablyPrettyCrazy and solved by Monster Iestyn has been fixed in Version 1.1.
Prisima is offline   Reply With Quote
Old 02-09-2016   #8
NotablyPrettyCrazy
Fool or Clown?
 
NotablyPrettyCrazy's Avatar
Default

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.
__________________
Quote:
<SpectrumMK2> I though we are making a tower?
<[ME]> Apparently the tower is a conga line now
NotablyPrettyCrazy is offline   Reply With Quote
Old 02-09-2016   #9
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Both bugs fixed in the newly released Version 1.2, except for the OpenGL one. This script relies on DispOffset, a feature not currently supported in OpenGL. You can read about it here: https://mb.srb2.org/showthread.php?t=3980
Prisima is offline   Reply With Quote
Old 02-09-2016   #10
frozenLake
 
frozenLake's Avatar
Default

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.
frozenLake is offline   Reply With Quote
Old 02-09-2016   #11
MK.exe
Lazy, Lazy and lazy?
 
MK.exe's Avatar
Default

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?
__________________
Done:
Hit a 180 Rail shot
First person to have a map in releases with Slopes
MK.exe is offline   Reply With Quote
Old 02-12-2016   #12
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Quote:
Originally Posted by MK.exe View Post
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.
Prisima is offline   Reply With Quote
Old 02-12-2016   #13
MK.exe
Lazy, Lazy and lazy?
 
MK.exe's Avatar
Default

Awesome, Thanks Prisima
__________________
Done:
Hit a 180 Rail shot
First person to have a map in releases with Slopes
MK.exe is offline   Reply With Quote
Old 04-02-2016   #14
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Big update to Version 1.4 fixes some bugs and supports OpenGL. Go check it out!
Prisima is offline   Reply With Quote
Old 04-03-2016   #15
Potatosack
funyn menme
 
Potatosack's Avatar
Default

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?
Potatosack is offline   Reply With Quote
Old 04-03-2016   #16
frozenLake
 
frozenLake's Avatar
Default

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 by frozenLake; 04-03-2016 at 01:37 PM.
frozenLake is offline   Reply With Quote
Old 09-10-2016   #17
Demnyx Onyxwing
Wishes to change his name
 
Demnyx Onyxwing's Avatar
Default

I've modified the code for this to appear behind the shields as well as work with my modified version of Secondcolor.
Spoiler: Image

Settings used:
color grey
blendcolor silver
secondcolor teal

As you can see, secondcolor isn't effected by blendcolor, and both are behind the shield.
Demnyx Onyxwing is offline   Reply With Quote
Old 10-11-2016   #18
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Version 1.5 has been released! Blendcolor is now HUD compatible, and you can change your blendcolor strength.



This is likely the last release until 2.2, when it will support all of the new colors.

Last edited by Prisima; 10-11-2016 at 03:13 AM.
Prisima is offline   Reply With Quote
Old 10-11-2016   #19
MK.exe
Lazy, Lazy and lazy?
 
MK.exe's Avatar
Default

Blend amount! Nice now i can be flashing super very faintly!
__________________
Done:
Hit a 180 Rail shot
First person to have a map in releases with Slopes
MK.exe is offline   Reply With Quote
Old 4 Weeks Ago   #20
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Version 1.6 has been released. It includes a few HUD fixes in addition to the ability to have up to 3 blendcolors.
Prisima is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:24 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.