<aside> ⚠️ Warning: Before considering this material, you should already have experience with DECORATE and ACS.

</aside>

Because Mega Man 8-Bit Deathmatch has customizable team colors, special care has to be taken when creating new translations based off of the user’s team colors or when trying to make props which are team colored.

This page will detail some of the common use cases when interacting with MM8BDM’s team color system.

Team Colored Projectiles


Team colored projectiles are fairly straight forward to set up. In general, any actor that inherits from [BasicProjectile](<https://mm8bdm.notion.site/BasicProjectile-4723f2cdaaf5462496f1f941ebea9b1a>), [BasicFastProjectile](<https://mm8bdm.notion.site/BasicFastProjectile-46b999123b704437822c07226eff796d>), [BasicBouncer](<https://mm8bdm.notion.site/BasicBouncer-b8de71dd16414f7f9a447e749b22d0a2>), [BasicExplosion](<https://mm8bdm.notion.site/BasicExplosion-85dc080ade894bfab476f85977952985>), or [BasicGraphicEffect](<https://mm8bdm.notion.site/BasicGraphicEffect-95b89f4ad02f4057bda090d8aa1b70fb>) already have the mechanisms to have team colors already supported. The only caveat is to make sure that actors inheriting from [BasicGraphicEffect](<https://mm8bdm.notion.site/BasicGraphicEffect-95b89f4ad02f4057bda090d8aa1b70fb>) use the SpawnFrame state instead of Spawn, otherwise that actor will fail to get team colors.

Below is a simpler Crash Bomb which illustrates this inheritance.

actor SimpleCrashBomb : BasicProjectile
{
	DamageType "CrashBomb"
	Obituary "$OB_CRASHBOMB"
	damage (0)
	speed 40
	Radius 6
	Height 6

	States
	{
		Spawn:
			CRAS A 1
			loop
		Death:
			CRAS A 0 A_PlaySound("weapons/mm2/crasbombexplode")
			CRAS A 0 A_SpawnItemEx("SimpleCrashBombExplode", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION)
			TNT1 AAAA 9 A_Explode(24,64,0)
			stop
	}
}

actor SimpleCrashBombExplode : BasicGraphicEffect
{
	+FORCEXYBILLBOARD
	+BRIGHT

	States
	{
		SpawnFrame:
			CRAS KKLMNNOPQQRSTTVWKKLMNNOPQQRSTTVW 1
			stop
	}
}

<aside> 💡 Note that you may see a custom A_SpawnItemEX flag, SXF_WEPFXCOLOR, used throughout Mega Man 8-Bit Deathmatch. This custom flag is simply an alias for SXF_TRANSFERTRANSLATION, meaning it is more or less functionally equivalent.

</aside>

In the example above, the SXF_TRANSFERTRANSLATION flag of [A_SpawnItemEX](<https://zdoom.org/wiki/A_SpawnItemEx>) is used, but it should be noted that there’s important rules regarding how it can be used with the translations given for team colored projectiles. The translation applied is only applied on the client-side, meaning that only the client knows that that translation has been set for the actor.

What this means in practice is that any actor that does not have the +CLIENTSIDEONLY flag set cannot transfer a translation to another actor that does not have the +CLIENTSIDEONLY flag set. Any actor, however, can transfer a projectile team color translation to another actor that is set with the +CLIENTSIDEONLY flag (such as actors inheriting from [BasicGraphicEffect](<https://mm8bdm.notion.site/BasicGraphicEffect-95b89f4ad02f4057bda090d8aa1b70fb>)).

However, you must still take care, because if the server-side actor does not receive the translation in time due to missed packets on the user’s end, the client-side actor may not receive the transferred translation. This is the reason that our client-side FX actors (actors inherited from [BasicGraphicEffect](<https://mm8bdm.notion.site/BasicGraphicEffect-95b89f4ad02f4057bda090d8aa1b70fb>)) are designed to obtain the team colored translation themselves also.

<aside> 🚨 Warning! Because this deals with client-side and server-side aspects, you should always test this online for confirmation testing! Just spin up a local server and connect to it locally. It helps to catch easily avoidable errors!

</aside>

You can also add the following properties to actors receiving team colors to customize how the team colors look if needed.

Team Color Translations


It will often times be useful to be able to create your own, new translation based off of the user’s current team colors. However, without the use of MM8BDM’s systems, there is no good way to guarantee when team colors are changed and when to remake your own translations.

However, with our systems, we have a function in DTADD.acs called [RegisterTeamColorDef](<https://mm8bdm.notion.site/RegisterTeamColorDef-7284a305a4f7418baeea34362aad0fdb>) which will allow you to specify a script which should be called whenever team colors are adjusted.