House Colored Electric Bolts

Bug #896178 reported by Graion Dilach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
In Progress
Wishlist
Unassigned

Bug Description

Let Tesla Bolts be house-colored.

Revision history for this message
Graion Dilach (graiondilach) wrote :
Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: DCoder
Location: issue-1567-house-bolts, r1042
Commit contains DLL: Yes
Revision comment:
Related to issue #1567 - untested attempt to make Electric Bolts support House Color, loosely based on Graion's code. [Weapon]
IsElectricBolt=yes
Bolt.IsHouseColor=y/[n]
Bolt.ColorSpread= ; number, supposed to be between 0 and 255, defaults to 0

Since bolts use three colours, the first one is set to the House's Laser color, the second one is House's Laser Color + Color Spread on each R/G/B channel, the third one is Laser Color - Color Spread. No idea if that produces good looking colours, this is just something for Graion to play with.
Related to issue 1567 .
SVN: http://svn.renegadeprojects.com/Ares/1042

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: DCoder
Location: issue-1567-house-bolts, r1043
Commit contains DLL: Yes
Revision comment:
Related to issue #1567 - check owner unit and house before drawing the bolts.
Related to issue 1567 .
SVN: http://svn.renegadeprojects.com/Ares/1043

Revision history for this message
Graion Dilach (graiondilach) wrote :

Before anybody asks, I've tried to implement this on my own, but around my tenth try, DCoder said enough of that.

The idea was good, it even sounded a NO-ASM method... however as it turned out, only Bolts from VehicleTypes has Owner. And other types can't really get one.

Delayed.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

What Graion said. This feature is suspended for now, thanks again to crazy Westwood data structures.

Revision history for this message
Graion Dilach (graiondilach) wrote :

I couldn't sleep.

[04:22] I thought about HouseColorBolts.
[04:22] And I think I found a solution.
[04:23] keeping the owner in an extra field?
[04:23] Yeah.
[04:23] so it can't interfere with the original game?
[04:23] Yep.
[04:24] sounds good
[04:27] Alex, TBH, I thought about callng that extra field Bolt_HouseColor, creating an extra boolean called Bolt.UseLaserColor, if it's yes, use Owner->LaserColor, if no, use Owner->Color as Housecolor-base.

Revision history for this message
Graion Dilach (graiondilach) wrote :
Revision history for this message
Krozalid (krozalid) wrote :

Wow.

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: issue-1567-house-bolts, r1053
Commit contains DLL: Yes
Revision comment:
Related to issue #1567: Implemented Bolt.UseLaserColor (boolean). HouseColors should work will all TechnoTypes, not just with vehicles. If the house color bolt doesn't work for any reason, the game reverts to the paletted one. Graion's code.
SVN: http://svn.renegadeprojects.com/Ares/1053

Revision history for this message
Graion Dilach (graiondilach) wrote :

Break it, please!

Revision history for this message
Graion Dilach (graiondilach) wrote :

OK, Documentation: How this works.

Bolt.IsHouseColor=yes needed to activate this feature.
Bolt.ColorSpread defines the difference of the shading between 2 bolts. It is an integer, can be from 0 to 255.
Bolt.UseLaserColor is a development tool and I'm not sure if it should be kept. In a nutshell, it forces the game to use the house's laser color instead of the house's own color as the bolt's base color. The reason of this tag is that the game has a color as it's house (defined in the Colors list) and it has a derivate used only by the lasers of that house. (That is the reason why brown houses gets orange HouseLasers.)

Revision history for this message
Graion Dilach (graiondilach) wrote :

UseLaserColor is deprecated. Had no difference, it had no meaning to keep it.

ColorSpread 128 won't disable two colors and 129-255 won't read as -127--1 values.

Also refactored the recolorer algorithm to fix that turquoise line.

If the housecolor can't be obtained, game tries Bolt.Color before falling back to the paletted color.

EDIT: Use official version.

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: issue-1567-house-bolts, r1054
Commit contains DLL: Yes
Revision comment:
Related to issue #1567: Bugs fixed. Graion's code.
SVN: http://svn.renegadeprojects.com/Ares/1054

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

I dont think Bolt.ColorSpread have any effect, see image above.
Tesla color change color when it is mind controlled, more things to test...

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: issue-1567-house-bolts, r1057
Commit contains DLL: Yes
Revision comment:
Related to issue #1567: ColorSpread works again. Restored ColorSpread to work after a fault in previous revision. Graion's code.
SVN: http://svn.renegadeprojects.com/Ares/1057

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

ColorSpread works.
Tesla bolt change color when mindcontrolled and/or hijacked. Works with shrapnel.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Marking as resolved/fixed per Graion's request.

Revision history for this message
Graion Dilach (graiondilach) wrote :

To be honest... YRM have already reported this working. I guess this is mature enough to merge.

Of course only if you thinks so.

Revision history for this message
Chanterier (speederyr) wrote :

Seems to work as intended.

Revision history for this message
Graion Dilach (graiondilach) wrote :

YRM, test http://yras.cncguild.net/Ares/HBCDLL.zip if it fixes the recon. If not then get the syncs and I'll need some help how to fix it.

Patch included.

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

Without using your new patch(using 1057), I can confirm that this tag does not cause RE and the color is displayed correctly for all players.
I told you that I couldn't confirm 100%, so you wasted your time on that patch.

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: issue-1567-house-bolts, r1088
Commit contains DLL: Yes
Revision comment:
Related to issue #1567: Newest patch integrated. Graion's code.
SVN: http://svn.renegadeprojects.com/Ares/1088

Revision history for this message
Graion Dilach (graiondilach) wrote :

Fixed white-line syndrone, tested.

Now it's ready for merge, I guess. YRM confirmed it oesn't cause recons... I'm happy.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Somebody would be that kind and check if this works with PF?

Meanwhile, I attached a Hooks.Bolt.cpp. If that's merged, Spread=-1 will return the two white lines (The sole reason for it is to prevent hearing that Gear Zero's bolts are nicer... we have both :P), if those two works then it's really really ready to be merged.

Sorry for pure CPP but I still work on my mother's PC.

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

Wait, you have not uploaded the patch that have effect with Spread=-1?
These patches you upload on cncguild are confusing.

Anyway, this does not work with PF(support beam only).

[NewSupport]
Range=100
MinimumRange=1
ROF=120
Report=
IsElectricBolt=yes
Bolt.IsHouseColor=yes
Warhead=NewSupportWH
Projectile=InvisibleHigh

[NewSupportWH]
Verses=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%

Revision history for this message
Graion Dilach (graiondilach) wrote :

Thanks for confirmation, just as I suspected.

Sorry for the confusion. I couldn't post up a binary because I did not have my PC with Ares stuff. But since I got the replacement today,I'll stop the confusion. :)

Revision history for this message
Graion Dilach (graiondilach) wrote :

OK, PF Supportweapons are supported. Also, if ColorSpread is set to -1, the bolt will be in LH_Mouse's style shown on http://ppmsite.com/forum/files/7335_415.png. (To prevent hearing that Gear Zero has nicer house bolt.)

http://yras.cncguild.net/Ares/HBCDLL.zip

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

Seems to be working now.

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: GraionDilach
Location: issue-1567-house-bolts, r1110
Commit contains DLL: Yes
Revision comment:
Related to issue 1567: Merged latest unofficial build. Actual code is unchanged.

Two effects are possible. A, I did it, B, I broke the SVN. I hope for the first.
Related to issue 1567 .
SVN: http://svn.renegadeprojects.com/Ares/1110

Revision history for this message
Rogan (pdrogan) wrote :

Bolt colors are working, especially the IsHouseColor tag

Bolt colors with value 0,0,0 revert to its default color.
Negative values are possible and you can turn bolts black with -255,-255,-255.

ColorSpread works on house colored bolts where I got house color, black, and white when it's set to 175, but not on manually-defined colored bolts.

Revision history for this message
Graion Dilach (graiondilach) wrote :

ColorSpread was never planned to work with Bolt.ColorX, it applies only to Bolt.IsHouseColor.

Thanks for confirmation.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Since no problems were popped up within a month since last update, I consider this one fixed.

Somebody with trunk merge permissions don't forget to integrate, until then, issue is closed.

Revision history for this message
Renegade (renegade) wrote :

Confirmed as fixed by mevitar.

Changed in ares:
status: Fix Released → Fix Committed
milestone: none → 0.2
Revision history for this message
Renegade (renegade) wrote :

Weird...I could've sworn I updated this the other way round...o_O

Changed in ares:
status: Fix Committed → Fix Released
Revision history for this message
Rogan (pdrogan) wrote :

Negative values no longer works in v02-mix1 and it is treated as 0,0,0. Any RGB value less than 5,5,5 (except things like 5,5,155), will also be treated as 0,0,0. Black can be achieved by setting it to 5,5,5.

Other than that, Bolt.IsHouseColor and Bolt.ColorSpread still works although both lack documentations.

Revision history for this message
Graion Dilach (graiondilach) wrote :

And nobody mentioned that if two countries use housebolts, then they switch colors with each other sometimes.

Good to know guys, v02 just got an update to circumvent that.

Changed in ares:
status: Fix Released → Fix Committed
Revision history for this message
Graion Dilach (graiondilach) wrote :

Fix caused more harm then good. Back to planning board, HCB is reaimed for 0.3.

Changed in ares:
milestone: 0.2 → 0.3
status: Fix Committed → In Progress
Changed in ares:
assignee: Graion Dilach (graiondilach) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.