tModLoader [Calamity] Rogue Improvements

WVlad

Terrarian
c1.png

This mod focuses on improving rogue class experience in Calamity mod. It's original stealth mechanic is useless because standing still while fighting a boss is a death.

Generally this mod attempts to change your playstyle from blindly spamming attack to carefuly aim each shot.

So my changes are:
* Stealth regeneration doesn't depend on whether you are walking or standing so you are free to move as fast as you want and still able to do stealth strikes.
* Stealth dodge: in full stealth you are invulnerable to first projectile or enemy contact (also works immediately after stealth strike). The dodge reveals you from stealth. This is a compensation to not working agro mechanic which doesn't really do any noticeable effect in the original mod.
* Rogue stealth strike deal more damage. This is multiplied after defense.
* Rogue weapons damage rebalance, fixed too OP and too weak weapons.
* Crit calculation uses crit chance at the time when projectile is launched, before stealth consumption.

Each feature can be enabled or disabled. Source code is included.
You can install/uninstall this mod in your existing playthrough.
Multiplayer IS NOT SUPPORTED YET.

Additional features:
* Full Rage on respawn with Heart of Darkness in inventory or equipment slot (even vanity).
* SuperDummy has defence and DR set according to a world progression.
* Prints total damage dealed to dummies - usable to measure stealth strike damage.
* Reduce grinding: all treasure bags drop, legendary, defiled and rare drop chances are upped to 50%.
* Cheat: slow motion key, locks on 30 fps.

C#:
public static double? GetRogueWeaponDamageModifier(bool isStealthStrike, Item weapon)
{
    var config = ModContent.GetInstance<RogueConfig>();
    double multiplier = config.GlobalMultiplier;
 
    if (weapon.type == ModContent.ItemType<SylvanSlasher>())
        isStealthStrike = false;
 
    if (ModContent.GetInstance<RogueConfig>().RebalanceWeapons)
    {
        if (weapon.consumable)
            multiplier *= 1.5f;
        
        if (weapon.type == ModContent.ItemType<UtensilPoker>())
            return isStealthStrike ? multiplier * 0.4f : (multiplier * 0.7f);
        
        if (weapon.type == ModContent.ItemType<SylvanSlasher>())
            multiplier *= 0.6f;
        else if (weapon.type == ModContent.ItemType<DefectiveSphere>())
            multiplier /= 2f;
        else if (weapon.type == ModContent.ItemType<StarofDestruction>())
            multiplier /= 1.8f;
        else if (weapon.type == ModContent.ItemType<EpidemicShredder>() || weapon.type == ModContent.ItemType<HeavenfallenStardisk>())
            multiplier *= 1.75f;
        else if (weapon.type == ModContent.ItemType<MoltenAmputator>() && isStealthStrike)
            multiplier *= 2.5f;
        else if (weapon.type == ModContent.ItemType<ProfanedPartisan>())
            multiplier *= 2f;
        else if (weapon.type == ModContent.ItemType<BloodsoakedCrasher>() && isStealthStrike)
            multiplier /= 2f;
        else if (weapon.type == ModContent.ItemType<NightsGaze>() && isStealthStrike)
            multiplier /= 1.5f;
        else if (weapon.type == ModContent.ItemType<PhantasmalRuin>() && !isStealthStrike)
            multiplier /= 2f;
        else if (weapon.type == ModContent.ItemType<TimeBolt>())
            multiplier /= 2.7f;
    }
 
    if (isStealthStrike)
        multiplier *= config.StealthStrikeMultiplier;
 
    return multiplier;
}
 

Attachments

  • CalamityRogueImprovements.zip
    2.7 MB · Views: 957
Last edited:
I have not done much with calamity rogue class at all so I don't know if this is any good, though once I do some more calamity thing then I'll know.
If the changes look good once I have done a bit more rogue stuff, I will download this.
 
Update

This mod focuses on improving rogue class experience in Calamity mod. It's original stealth mechanic is useless because standing still while fighting a boss is a death.

So my changes are:
* Stealth regeneration doesn't depend on whether you are walking or standing so you are free to move as fast as you want and still able to do stealth strikes. This motivates you to play without weapon spam in a rogue-ish way and enables you to use stealth strikes while fighting bosses.
* Receiving damage from any enemy contact or projectile reveals you from full stealth.
* Upon receiving a damage while in full stealth you dodge it and become revealed. This is a compensation to not working agro mechanic which doesn't really do any noticeable effect in the original mod - so instead it helps you to dodge.
* Also enables you to jump out of stealth with stealth strike without receiving damage during that (for short period).
* Rogue weapons deal 25% less damage to npc in normal mode but x3 damage as stealth strike. A good motivation to play stealthy.
* Crit calculation is fixed to remember crit chance at the time when projectile was created (the original mod uses actual chance which may be way lower at the time it's checked). But I didn't change it for non-stealth attacks to keep things balanced.
* Superdummy now has defence stat set according to a world progress (original defence = 0).

Generally this mod attempts to change your playstyle from blindly spamming attack to carefuly choosing where and when is better to shoot.

Multiplayer IS NOT SUPPORTED YET.
 
Last edited:
See topic header for the full description.
Changes:
* Rogue weapons deal 50% less damage to npc in normal mode but x2 damage as stealth strike. A good motivation to play stealthy. This is multiplied after defense so result is the same for projectiles that hit multiple times per shot vs projectiles that hit one time but with greater damage.
* Crit calculation is fixed to remember crit chance at the time when projectile was created (the original mod uses actual chance which may be way lower at the time it's checked).
 
Last edited:
This mod focuses on improving rogue class experience in Calamity mod. It's original stealth mechanic is useless because standing still while fighting a boss is a death.

So my changes are:
* Stealth regeneration doesn't depend on whether you are walking or standing so you are free to move as fast as you want and still able to do stealth strikes. This motivates you to play without weapon spam in a rogue-ish way and enables you to use stealth strikes while fighting bosses.
* Receiving damage from any enemy contact or projectile reveals you from full stealth.
* Upon receiving a damage while in full stealth you dodge it and become revealed. This is a compensation to not working agro mechanic which doesn't really do any noticeable effect in the original mod - so instead it helps you to dodge.
* Also enables you to jump out of stealth with stealth strike without receiving damage during that (for short period).
* Rogue weapons deal 50% less damage to npc in normal mode but x2 damage as stealth strike. A good motivation to play stealthy. This is multiplied after defense so result is the same for projectiles that hit multiple times per shot vs projectiles that hit one time but with greater damage.
* Crit calculation is fixed to remember crit chance at the time when projectile was created (the original mod uses actual chance which may be way lower at the time it's checked).
* Superdummy now has defence stat set according to a world progress (original defence = 0).

Generally this mod attempts to change your playstyle from blindly spamming attack to carefuly choosing where and when is better to shoot.


Multiplayer IS NOT SUPPORTED YET.

You can install/uninstall this mod in your existing playthrough.
Can you please add a config to enable/disable different features? (love the mod BTW)
(EDIT: You should probably also make this thread your mod's homepage)
 
It's interesting to see a mod that heavily improves the Rouge class from the popular mod. I've very much appreciated the changes that the Rouge class is supposed to do and I'll definitely give this one a try. I've supported this mod :D <3
 
Update

* Weapons rebalance through mid Hardmode till Post-Providence (here is where I am playing now). Fixes too OP and too weak weapons.
* Superdummies correctly work with weapons that take into account enemy max hp
* More configuration options
* Look at the config screenshot to see other new features
 
Last edited:
It seems like this mod in combination with my other mods caused a massive increase in damage. Like, really massive. six digits, on a weapon with a listed damage rating of 10(+3). Summons, extra effects, practically everything did more damage. It may have something to do with a weird interaction between this and Even More Modifiers. To be fair though, that mod is ancient at this point.

"_ColoredDamageTypes",
"AlchemistNPC",
"Antisocial",
"AutoReroll",
"AutoTrash",
"Bags",
"BannerBonanza",
"BetterBuffs",
"BetterNightSky",
"BossChecklist",
"CalamityMod",
"CalamityModMusic",
"CampfireBuffs",
"Census",
"chadsfurni",
"ChromasMod",
"ClamExtraMusic",
"DisableCorruptionSpread",
"EDAT",
"Fargowiltas",
"FargowiltasSouls",
"FasterPickaxes",
"Fishing3",
"FullHPWhenRespawn",
"GadgetGalore",
"GoodProLib",
"InvTweaks",
"ItemChecklist",
"JPANsBagsOfHoldingMod",
"LansSimpleHealthbar",
"Loot",
"MagicStorage",
"MaxStackExtra",
"MountFix",
"OmniSwing",
"PlatformHelper",
"RecipeBrowser",
"ReducedGrinding",
"ShorterRespawn",
"StarHell",
"TerrarianBizzareAdventure",
"ThoriamityConvergence",
"ThoriumMod",
"VeinMiner",
"VipixToolBox",
"WebmilioCommons",
"Widgets",
"WingSlot",
"Wireless",
"WMITF",
"WolfHeroMod",
"XItemStats"
 
I've been enjoying this mod for a little bit now, it's pretty fun, although i've noticed that the mod seems to behave rather badly or wierdly with other mods. What i've noticed so far is the non-functionality of the hook of discord's teleportation from WeaponOut, the crashes when opening any menu from Luiafk's, the bad interactions with even more modifiers, and it also seems to affect Intrinsics. Other than that, when i used it on a lightly modded environment, it behaved nicely.
 
I love this mod so far, would it be possible to get it to work better with Intrinsics? As it stands it seems to disable the ability to create the intrinsic contract currently. If I disable your mod I can create and apply the intrinsic and it seems to stick while your mod is active, but creating it doesn't work while both are running.
 
Yep, there could be mod conflicts. I'm more into Cities Skylines now so I'm not sure when I continue developing this. If you are interested feel free to extract this mod (source is included) and fix it yourself.
 
Thanks for the reply! I checked the code and it looks like this is happening due to the heartofdarkness respawn method in your RoguePlayer.cs

It is checking to see if the game is paused, and since I don't use autopause normally, it wasn't. If I turn on the autopause and then drop the item onto the contract, it works. Wanted to post this in case anyone else playing with Intrinsics ran into this issue. Thanks again WVlad!
 
I am also having the issue where the game crashes if a luiafk menu is opened.

This is the error I get

[16:33:27] [1/FATAL] [Terraria]: Main engine crash
System.InvalidOperationException: Begin cannot be called again until End has been successfully called.
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformMatrix)
at Terraria.Main.RenderWater()
at DMD<Terraria.Main::DoDraw>(Main , GameTime )
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame_()

CalamityMod
CalamityModMusic
MorePotions
AlchemistNPCLite
AutoReroll
AutoTrash
BannerBonanza
BaseLibrary
BetterBuffs
BetterTaxes
BossChecklist
BuildPlanner
CalamityAddon
CalamityRogueImprovements
Census
chadsfurni
ClamExtraMusic
FluidLibrary
ContainerLibrary
CrystiliumMod
DisableCorruptionSpread
Fargowiltas
FargowiltasSouls
Fishing3
FKBossHealthBar
GadgetBox
GoldensMisc
HamstarHelpers
HelpfulNPCs
imkSushisMod
ImprovedPillars
JoostMod
LansUnlimitedBuffSlots
Luiafk
MagicStorage
NoMoreTombs
PortableStorage
PotionCharms
RecipeBrowser
ShopExpander
ShorterRespawn
SolutionsMod
SummonersAssociation
UniverseOfBows
UniverseOfSwordsMod
UsefulItems
UsefulNPCs
VanillaTweaks
VeinMiner
VipixToolBox
WeaponOut
WheresMyItems
WingSlot
Wireless
WMITF
WorldGenPreviewer
ZLegendarys

Removing this mod removes the crash. Is there a way I can fix this?
 
I am also having the issue where the game crashes if a luiafk menu is opened.
This error is not strictly related to my mod. According to my experience it can happen when you quit to main menu, reload mods and continue playing. The cause might be that some mods don't correctly unload their textures. The workaround usually is: restart game executable if you need to reload mods.
 
Thanks for the reply! I checked the code and it looks like this is happening due to the heartofdarkness respawn method in your RoguePlayer.cs

It is checking to see if the game is paused, and since I don't use autopause normally, it wasn't. If I turn on the autopause and then drop the item onto the contract, it works. Wanted to post this in case anyone else playing with Intrinsics ran into this issue. Thanks again WVlad!
Could you check if there is anything exception-like in the logs when it breaks?
 
Yeah, the error I found is below, that's what pointed me to using it while paused once I figured out what the postupdate portion was checking. I've also included a copy of my client log for you. 2

[14:21:32] [1/ERROR] [Terraria]: System.MissingFieldException: Field not found: 'CalamityMod.CalPlayer.CalamityPlayer.stressMax'.
at CalamityRogueImprovements.RoguePlayer.PostUpdate()
at Terraria.ModLoader.PlayerHooks.PostUpdate(Player player)
at Terraria.Player.Update(Int32 i)
at Terraria.WorldGen.FinishPlayWorld()
at System.Action.Invoke()
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
[14:21:32] [1/WARN] [tML]: Silently Caught Exception:
System.MissingFieldException: Field not found: 'CalamityMod.CalPlayer.CalamityPlayer.stressMax'.
at CalamityRogueImprovements.RoguePlayer.PostUpdate()
at Terraria.ModLoader.PlayerHooks.PostUpdate(Player player)
at Terraria.Player.Update(Int32 i)
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame_()
at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)
at Terraria.WindowsLaunch.Main(String[] args)
 

Attachments

  • client.log
    46.6 KB · Views: 199
Back
Top Bottom