Serious Sam Fusion 2017 (beta)

Serious Sam Fusion 2017 (beta)

Not enough ratings
Special Hard Difficulty
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
316.670 KB
15 Apr @ 12:59pm
21 Apr @ 12:58pm
6 Change Notes ( view )

Subscribe to download
Special Hard Difficulty

Description
About Mod

This mod adjusts «Hard difficulty» to be extremely hard. All monsters may deal critical damage based on chance.

A message is displayed in the top left corner of the monitor when a player dies.

By default, if the player has at least 1 armour, the chance is halved. Some monsters simply execute one-hit K.O. because it made sense to do so...

Splitscreen co-op does work, networked game on localhost works. I have not tested networked game via internet.

The required mod «Player Gibbing» is not actually required, it is optional!

Note: Does not include TF2 text as the preview image may imply.

Bugs

Message displayed in corner doesn't scale well in splitscreen co-op mode.

Message displayed in corner assumes player killed themselves if they are gibbed after dying wihtout being gibbed.

Big Reptiloids cannot actually "kick" you, although it is possible with Turbo cheat. Huge Reptiloids do not have this issue. This is a problem with the original game.

Mod Compatibility, Technical Info

This mod is not compatible with any other mod that handles player's damage with ReceiveDamage event!!!

This mod works on SSHD TFE, SSHD TSE and SS3. For custom game titles (gtitle), you must manually copy one of the PXCrit.lua files listed below into the same folder for the modded game.

This mod adds various files:

/Content/SeriousSam3/Scripts/CustomWorldScripts/PXCrit.lua
/Content/SeriousSamHD/Scripts/CustomWorldScripts/PXCrit.lua
/Content/SeriousSamHD_TSE/Scripts/CustomWorldScripts/PXCrit.lua
/Content/Shared/Scripts/PXCritCommon.lua
/Content/Shared/Presets/TextEffects/ConsoleMessageShadow.tfx
/Content/Shared/Presets/TextEffects/ConsoleMessageSolid_Blue.tfx
/Content/Shared/Presets/TextEffects/ConsoleMessageSolid_Cyan.tfx
/Content/Shared/Presets/TextEffects/ConsoleMessageSolid_Green.tfx
/Content/Shared/Presets/TextEffects/ConsoleMessageSolid_Red.tfx
/Content/Shared/Presets/TextEffects/ConsoleMessageSolid_White.tfx
/Content/SeriousSamHD_TSE/Levels/Z9_Test

Test Level

In addition, a test level is packaged, which can only be accessed in the Editor:
(Make sure to press Alt-G and then hit OK to bake the lightmaps!)

/Content/SeriousSamHD_TSE/Levels/Z9_Test/01_Bug.wld

Enable/Disable Mod at Run Time

Here is an example of how to configure the mod at run time:
local G_PlayerMain_Original = worldGlobals.G_PlayerMain;

local DisableMod = function()
conWarningF("Now disabling mod!\n");

G_PlayerMain_Original = worldGlobals.G_PlayerMain;
worldGlobals.G_PlayerMain = nil;
SignalEvent("EVENT_G_PLAYERMAIN_STOP");
end

local EnableMod = function()
local difficulty;
local playerlist;
local i;

conWarningF("Now enabling mod!\n");

--[[ Allow newly spawned players to be attached to the fucntion. ]]

worldGlobals.G_PlayerMain = G_PlayerMain_Original;

--[[ Attach the function to every player that has already spawned. ]]

difficulty = worldGlobals.worldInfo:GetGameDifficulty();
if (difficulty:sub(1, 1) == 'H')
then
playerlist = worldInfo:GetAllPlayersInRange(worldInfo, 1e6);
for i = 1, #playerlist
do
RunAsync(function() worldGlobals.G_PlayerMain(playerlist[i]); end);
end
end
end

DisableMod();
Wait(Delay(5));

EnableMod();

The default behaviour of worldGlobals.G_PlayerSpawn is to not do anything if worldGlobals.G_PlayerMain is nil.

Event "EVENT_G_PLAYERMAIN_STOP" exits RunHandled function called by worldGlobals.G_PlayerMain.

Global Definitions

Adjustments can be made during gameplay.
For an example, read one of the added files in original games' Scripts/CustomWorldScripts folders.

worldGlobals.A_MESSAGE_TEXTEFFECT_SOLID_RES; --[[ = LoadResource("/Content/.../*.tfx"); ]] worldGlobals.A_MESSAGE_TEXTEFFECT_SHADOW_RES; --[[ = LoadResource("/Content/.../*.tfx"); ]]

--[[ -- worldGlobals.G_DamageCalculation -- -- Calculate damage based on fetched data: -- p - Player. -- actor - Actor that hit the player. -- damage - Damage received by game's defaults. -- chance - (From worldGlobals table.) Chance to multiply damage. -- multiply - (From worldGlobals table.) Multiplier. -- flatadd - (From worldGlobals table.) Flat addition. -- -- Implemented behaviour: -- If player p has armour, chance value is cut in half. -- Default formula: FinalDamage = Damage * Multiply + FlatAdd, if random Chance - FinalDamage = Damage * 1 + FlatAdd, if not random Chance -- -- Return: -- [1] - Actual hit amount based on these parameters. -- [2] - Should the hit be handled? (Write false to discard the hit.) --]] worldGlobals.G_DamageCalculation = function(p, actor, damage, chance, multiply, flatadd) local r; local finalhit; r = mthFloorF(mthAbsF(mthRndL()))%255; finalhit = damage; if (p:GetArmor() > 0) then chance = chance/2; end if (r < chance) then finalhit = finalhit*multiply; end finalhit = finalhit+flatadd; return finalhit, true; end

--[[ -- worldGlobals.G_PlayerMain -- -- Continously listen for ReceiveDamage event and call worldGlobals.G_DamageCalculation for new value calculations. -- Stop listening when the player dies or "EVENT_G_PLAYERMAIN_STOP" event is signaled. --]] local worldGlobals.G_PlayerMain = function(p);

--[[ -- worldGlobals.A_ATTACK -- -- Define actors' attacks... -- -- Format: -- ["ActorName"] = -- { -- ["DamageType1"] = { chance, multiply, flatadd }, -- ["DamageType2"] = { chance, multiply, flatadd }, -- ... -- } -- -- If in-game the actor is not found in the table, we default to "__anyone_else__". -- If the damage type is not found in the appropraite ActorName table, we default to ActorName's "__anything_else__", -- if that doesn't exist, then we look at "__anything_else__" inside "__anyone_else__". -- -- Note: Chance is generated in [0, 255] interval. --]] worldGlobals.A_ATTACK = { ["__anyone_else__"] = { ["__anything_else__"] = { 32, 2, 0 }, ["Kicking"] = { 32, 5, 0 }, ["Piercing"] = { 32, 5, 0 }, }, ["Arachnoid_Soldier"] = { ["Kicking"] = { 0, 1, 1e6 }, ["Punch"] = { 0, 1, 1e6 }, ["Bullet"] = { 32, 50, 4 }, }, ["Gnaar"] = { ["__anything_else__"] = { 32, 5, 6 }, }, ["GnaarFemale_Flying"] = { ["__anything_else__"] = { 191, 20, 12 }, }, --[[ ... ]] }

--[[ -- worldGlobals.A_IBEATYOUMESSAGE -- -- Message when the specific actor kills the player. -- Format, special values and functionality is same as A_ATTACK. -- -- Sandwhale is a special case and doesn't have a character class. This actor is parsed in worldGlobals.G_PlayerMain. -- For indexing A_IBEATYOUMESSAGE, "Sandwhale" should be used. -- -- Special sequences: -- &s - Player's name -- &p - Player's name (possessive) -- &c - Inflictor's name -- &w - Inflictor's name («Name» field in World Editor) --]] worldGlobals.A_IBEATYOUMESSAGE = { ["__anyone_else__"] = { ["__anything_else__"] = "&c was the end of &s.", }, ["__self__"] = { ["__anything_else__"] = "&s killed himself.", ["Explosion"] = "&s blew himself up.", ["Piercing"] = "&s bisected himself.", }, ["__world__"] = { ["__anything_else__"] = "&s was erased from the world.", }, ["ExotechLarva"] = { ["Explosion"] = "Exotech Larva reduced &s to pulp.", }, ["Werebull"] = { ["Punch"] = "&s was gored upon a Werebull.", ["Kicking"] = "Werebull trampled &p to paste!", }, --[[ ... ]] }
1 Comments
F_DAML 1 May @ 2:33pm 
Fun mod :D