Page 1 of 1

Spitter data prototype tint inconsistency

Posted: Sun Jan 15, 2023 5:20 pm
by lovely_santa
Hi,

While modding the spitter, I came across a small inconsistency:
The spitter attack results in a fire splash that adds a sticker to the player (to slow them down).

The way the enemy prototype data is set up, each size of spitter (and worm) have a separate acid stream, each stream has its own (corresponding sized) acid splash. Again, each acid splash has its own (corresponding sized) acid sticker.

The generation of the prototype data itself is generalized in a function for the stream, splash and sticker.
The tints are also generalized on their own, so it can be added as a parameter to the generalized functions.

base/prototypes/entity/spitter-projectiles.lua defines general tints for the stream, splash and sticker.

Further down the same file, the tints are further split up for each sized stream, splash and sticker.

The functions for the acid_stream and the acid_splash_fire are correctly using the parameter data.tint, to make those parts tinted correctly, however the acid_sticker does not use the data.tint parameter, it uses a hardcoded value instead. Furthermore, the hardcoded value is not the same as the specified parameter mentioned earlier.

Solution:
  1. Change the acid_sticker function to use data.tint rather than the hardcoded value.
  2. Change the acid_sticker generic tint to the (currently used) hardcoded value:

    Code: Select all

    sticker_tint = {r = 0.714, g = 0.669, b = 0.291, a = 0.745}, -- #b6aa4abe
The aforementioned solution will have no difference before/after, but this makes the posibility to generate differently tinted stickers using the base game provided function.

Re: Spitter data prototype tint inconsistency

Posted: Wed Mar 27, 2024 7:13 pm
by boskid
This is minor enough and possibly mod breaking enough that i decided to fix this for 2.0.