Downloads containing charsNew.mut

Downloads
Name Author Game Mode Rating
TSF with JJ2+ Only: Characters Cranky Mutator N/A Download file

File preview

#pragma name "Additional Characters + Christmas Hats (by Cranky)"
#pragma require "charactersMin.j2a"
#pragma require "xmasHats.j2a"
#pragma require "xmasHats.asdat"

bool CHARS_ENABLED = true;
bool HATS_ENABLED = true;
//TO DO: backup normal normalBulletBehavior & normalBulletBehaviorPU for blaster like you did in lrsAwards.mut in case
//		 a j2as script or another mutator changes the blaster behavior.

/*
#pragma offer "smbjumpsuper.wav"
#pragma offer "smbjumpsmall.wav"
#pragma offer "sm64marioyahoo.wav"
#pragma offer "sm64marioyippee.wav"
#pragma offer "smbpipe.wav"
#pragma offer "sm64mariodoh.wav"
#pragma offer "sm64mariohaha.wav"
#pragma offer "sm64mariohoo.wav"
#pragma offer "sm64mariohoohoo.wav"
#pragma offer "smbpowerupappears.wav"
#pragma offer "smbpowerup.wav"
#pragma offer "sm64mariowaha.wav"
#pragma offer "sm64mariookeydokey.wav"
#pragma offer "smbmariodie.wav"

//Eva kiss
#pragma offer "sfx_38_0.wav";
#pragma offer "sfx_38_1.wav";
#pragma offer "sfx_38_2.wav";
#pragma offer "sfx_38_3.wav";

#pragma offer "sfx_22_62.wav";
#pragma offer "sfx_22_114.wav";
#pragma offer "sfx_92_0.wav";
#pragma offer "sfx_92_1.wav";
#pragma offer "sfx_92_2.wav";
#pragma offer "sfx_92_3.wav";
#pragma offer "sfx_92_4.wav";
#pragma offer "sfx_92_5.wav";
#pragma offer "sfx_92_6.wav";

#pragma offer "sfx_92_7.wav";
#pragma offer "sfx_92_8.wav";
#pragma offer "sfx_92_9.wav";
#pragma offer "sfx_92_10.wav";
#pragma offer "sfx_92_11.wav";
#pragma offer "sfx_92_12.wav";
#pragma offer "sfx_92_13.wav";
#pragma offer "sfx_92_14.wav";
#pragma offer "sfx_92_15.wav";
#pragma offer "sfx_92_16.wav";
#pragma offer "sfx_92_17.wav";
#pragma offer "sfx_92_18.wav";

#pragma offer "sfx_63_8_silent.wav";
#pragma offer "sfx_63_10_silent.wav";
#pragma offer "sfx_63_12_silent.wav";
#pragma offer "sfx_63_13_silent.wav";

#pragma offer "sfx_63_0.wav";
#pragma offer "sfx_63_1.wav";
#pragma offer "sfx_63_2.wav";
#pragma offer "sfx_63_3.wav";
#pragma offer "sfx_63_4.wav";
#pragma offer "sfx_63_5.wav";
#pragma offer "sfx_63_6.wav";
#pragma offer "sfx_63_7.wav";
#pragma offer "sfx_63_8.wav";
#pragma offer "sfx_63_9.wav";
#pragma offer "sfx_63_10.wav";
#pragma offer "sfx_63_11.wav";
#pragma offer "sfx_63_12.wav";
#pragma offer "sfx_63_13.wav";
#pragma offer "sfx_63_14.wav";
#pragma offer "sfx_63_15.wav";
#pragma offer "sfx_63_16.wav";
#pragma offer "sfx_63_17.wav";
#pragma offer "sfx_63_18.wav";
#pragma offer "Silent.wav";

#pragma offer "sonic_bumper.wav";
#pragma offer "sonic_chaos_emerald.wav";
#pragma offer "sonic_checkpoint.wav";
#pragma offer "sonic_extra_life.wav";
#pragma offer "sonic_jump.wav";
#pragma offer "sonic_modern_jump.wav";
#pragma offer "sonic_ring.wav";
#pragma offer "sonic_rings_drop.wav";
#pragma offer "sonic_sega.wav";
#pragma offer "sonic_slow.wav";
#pragma offer "sonic_spindash.wav";
#pragma offer "sonic_spring.wav";
#pragma offer "sonic_turbo_spin.wav";
#pragma offer "sonic_woo.wav";

#pragma offer "YOSHI_AUTOSCH1 [Hurt].wav";
#pragma offer "YOSHI_AUTOSCH2 [Hurt].wav";
#pragma offer "YOSHI_EATBIRD [MLEM].wav";
#pragma offer "YOSHI_HAHAHA.wav";
#pragma offer "YOSHI_HAHAHA2.wav";
#pragma offer "YOSHI_HAPPY [SuperCarrot].wav";
#pragma offer "YOSHI_HOHOHO1 [Hippo xD].wav";
#pragma offer "YOSHI_JUMP.wav";
#pragma offer "YOSHI_Jump_Another.wav";
#pragma offer "YOSHI_KARATE7 [FlutterJump].wav";
#pragma offer "YOSHI_KARATE8 [Angry].wav";
#pragma offer "YOSHI_OHOH [Happy Yoshi].wav";
#pragma offer "YOSHI_OOOH [Shield Hurt].wav";
#pragma offer "YOSHI_Owowowowow Death.wav";
#pragma offer "YOSHI_WOOHOO [Wow].wav";
#pragma offer "YOSHI_YAHOO [ButtStomp].wav";
#pragma offer "YOSHI_YAHOO2 [Spring].wav";

#pragma offer "TUNE_Spaz.wav";
#pragma offer "TUNE_Lori.wav";
#pragma offer "TUNE_SuperMario.wav";
#pragma offer "TUNE_SonicHedgehog.wav";
#pragma offer "TUNE_Devan.wav";
#pragma offer "TUNE_Yoshisaur.wav";
*/

#pragma require "charsNyanrush.asc"
#include "charsNyanrush.asc"

#include "mixSharedVisibility.asc"
#pragma require "mixSharedVisibility.asc"
#include "DialogueBox.asc"
#pragma require "DialogueBox.asc"
#include "charsNewCore.asc"
#pragma require "charsNewCore.asc"
#include "charsMonsters.asc"
#pragma require "charsMonsters.asc"
#include "xmasAccessories.asc"
#pragma require "xmasAccessories.asc"
#include "xmasHatCoordinates.asc"
#pragma require "xmasHatCoordinates.asc"
#include "xmasScarfCoordinates.asc"
#pragma require "xmasScarfCoordinates.asc"
#include "xmasGlassesCoordinates.asc"
#pragma require "xmasGlassesCoordinates.asc"
bool combinedXmasHatOffsetsSynced = false;
void CombinedSyncXmasHatOffsets()
{
	if(!CHARS_ENABLED || !HATS_ENABLED || !CharsNew::doneSetup || CharsNew::chars.length == 0) return;
	if(combinedXmasHatOffsetsSynced) return;
	if(int(CharsNew::chars.length) > XmasHats::characterSlotCount)
	{
		XmasHats::resizePositionArrays(int(CharsNew::chars.length));
		XmasHats::readAllCategoryFiles();
	}
	combinedXmasHatOffsetsSynced = true;
}

void onLevelLoad()
{
	CharsNyanRush::onLevelLoad();

	if(CHARS_ENABLED) CharsNew::onLevelLoad();
	if(MONSTERS_ON) CharsMonsters::onLevelLoad();
	if(HATS_ENABLED) XmasHats::onLevelLoad();
	CombinedSyncXmasHatOffsets();
}

void onMain()
{
	// State first: character/monster/hat renderers can suppress themselves
	// before the Nyan Cat is drawn over the top at the end of this hook.
	CharsNyanRush::onMainUpdate();

	if(CHARS_ENABLED) CharsNew::onMain();
	if(MONSTERS_ON) CharsMonsters::onMain();
	if(HATS_ENABLED) XmasHats::onMain();

	// Final visual priority: Nyan Cat is the top-most player rendering.
	CharsNyanRush::onMainDraw();
}

void onPlayer(jjPLAYER@ play)
{
	if(CHARS_ENABLED) CharsNew::onPlayer(play);
	if(MONSTERS_ON) CharsMonsters::onPlayer(play);
	if(HATS_ENABLED && !(MONSTERS_ON && CharsMonsters::ShouldSuppressHats(play.playerID))) XmasHats::onPlayer(play);
}

void onPlayerInput(jjPLAYER@ play)
{
	if(MONSTERS_ON && CharsMonsters::IsActive(play.playerID))
	{
		CharsMonsters::onPlayerInput(play);
		return;
	}
	if(CHARS_ENABLED) CharsNew::onPlayerInput(play);
	if(MONSTERS_ON) CharsMonsters::onPlayerInput(play);
}

void onReceive(jjSTREAM &in packet, int fromClientID)
{
	// Each module receives an unconsumed copy of the original packet.
	jjSTREAM nyanBackup = packet;
	jjSTREAM monsterBackup = packet;
	jjSTREAM hatsBackup = packet;

	CharsNyanRush::onReceive(nyanBackup, fromClientID);
	if(CHARS_ENABLED) CharsNew::onReceive(packet, fromClientID);
	if(MONSTERS_ON) CharsMonsters::onReceive(monsterBackup, fromClientID);
	if(HATS_ENABLED) XmasHats::onReceive(hatsBackup, fromClientID);
}

bool onLocalChat(string &in text, CHAT::Type chatType)
{
	bool suppress = CharsNyanRush::onLocalChat(text, chatType);
	if(MONSTERS_ON && !suppress) suppress = CharsMonsters::onLocalChat(text, chatType);
	if(CHARS_ENABLED && !suppress) suppress = CharsNew::onLocalChat(text, chatType);
	if(HATS_ENABLED && !suppress) suppress = XmasHats::onLocalChat(text, chatType);
	return suppress;
}

void onChat(int clientID, string &in text, CHAT::Type chatType)
{
	if(CHARS_ENABLED) CharsNew::onChat(clientID, text, chatType);
}

void onPlayerDraw(jjPLAYERDRAW& p)
{
	// Do not return early for a monster: Nyan Rush must still be able to hide
	// the native player sprite/name when its visual state is active.
	if(MONSTERS_ON && CharsMonsters::IsActive(p.player.playerID))
	{
		CharsMonsters::onPlayerDraw(p);
	}
	else
	{
		if(CHARS_ENABLED) CharsNew::onPlayerDraw(p);
		if(MONSTERS_ON) CharsMonsters::onPlayerDraw(p);
	}

	// Last writer wins for the native player visual.
	CharsNyanRush::onPlayerDraw(p);
}

void onRoast(jjPLAYER@ victim, jjPLAYER@ killer)
{
	if(CHARS_ENABLED) CharsNew::onRoast(victim, killer);
}

bool onDrawLives(jjPLAYER@ player, jjCANVAS@ canvas)
{
	if(CHARS_ENABLED) return CharsNew::onDrawLives(player, canvas);
	return false;
}

bool onDrawAmmo(jjPLAYER@ player, jjCANVAS@ canvas)
{
	if(CHARS_ENABLED) return CharsNew::onDrawAmmo(player, canvas);
	return false;
}

bool onDrawScore(jjPLAYER@ player, jjCANVAS@ canvas)
{
	if(MONSTERS_ON && CharsMonsters::ShouldSuppressHats(player.playerID)) return false;
	if(HATS_ENABLED) return XmasHats::onDrawScore(player, canvas);
	return false;
}

void onDrawLayer4(jjPLAYER@ player, jjCANVAS@ canvas)
{
	if(CHARS_ENABLED) CharsNew::onDrawLayer4(player, canvas);
}

// Xmas hat character slots: 1 Jazz, 2 Spaz, 3 Lori, 4 Frog, 5 Bird, 6 Bird2,
// 7 Lori1 (1.23 Lori replacement), 8 Mario, 9 Sonic, 10 Tails, 11 JJ1,
// 12 Devan, 13 Yoshi, 14 Witch, 27 Eva.
// xmasHats.asdat: index, position (x,y), rotation (x,y), character