From 9f4b2542cfc0fab2596983571bb0e36e6a239f93 Mon Sep 17 00:00:00 2001 From: patience Date: Sun, 12 Apr 2026 21:39:16 +0100 Subject: [PATCH] Initial commit --- Effects/transitions.fx | 369 +++++++++++++++++++++++++++++++++ Effects/transitions.xnb | Bin 0 -> 24712 bytes Localization/en-US.hjson | 6 + Properties/launchSettings.json | 16 ++ TransitionPlayer.cs | 79 +++++++ TransitionsConfig.cs | 23 ++ build.txt | 4 + description.txt | 19 ++ description_workshop.txt | 23 ++ en-US.hjson | 20 ++ icon.png | Bin 0 -> 781 bytes icon.png~ | Bin 0 -> 501 bytes icon21.png | Bin 0 -> 781 bytes icon_small.png | Bin 0 -> 261 bytes icon_small.png~ | Bin 0 -> 259 bytes smoothDeathTransitions.cs | 23 ++ smoothDeathTransitions.csproj | 16 ++ 17 files changed, 598 insertions(+) create mode 100755 Effects/transitions.fx create mode 100644 Effects/transitions.xnb create mode 100644 Localization/en-US.hjson create mode 100644 Properties/launchSettings.json create mode 100644 TransitionPlayer.cs create mode 100644 TransitionsConfig.cs create mode 100644 build.txt create mode 100644 description.txt create mode 100644 description_workshop.txt create mode 100644 en-US.hjson create mode 100644 icon.png create mode 100644 icon.png~ create mode 100644 icon21.png create mode 100644 icon_small.png create mode 100644 icon_small.png~ create mode 100644 smoothDeathTransitions.cs create mode 100644 smoothDeathTransitions.csproj diff --git a/Effects/transitions.fx b/Effects/transitions.fx new file mode 100755 index 0000000..0e846b7 --- /dev/null +++ b/Effects/transitions.fx @@ -0,0 +1,369 @@ +#ifdef GL_ES +precision mediump float; +#endif + +sampler uImage0 : register(s0); +uniform float2 uResolution; +uniform float uTime; +float uProgress; + +#define PI 3.14159 + +// Note: to whomever reads this trying to work out shaders, do NOT bundle them in one file like I have here. This is just an experiment. + +float mod(float x, float y){ + float z = x; + return z%y; +} + +float4 lines(float2 st : TEXCOORD0) : COLOR0 { + float time=uProgress*.06 + .5*PI; + float2 ce = float2(.5,.5); + + float2 ef = st; + ef.x=ef.x-0.3*mod(ef.y,0.2) + 0.2*ceil(5.*ef.y); + + float4 tex=tex2D(uImage0, st); + float4 gl_FragColor=float4(0,0,0,0); + float3 color = float3(0,0,0); + //float3 notcolor = float3(0,1,0); + float3 notcolor = tex.xyz; + + if(sin(time*1.+1.5*PI)>0.){ + if(ef.x-1.st.x){gl_FragColor.r=1.;} + return gl_FragColor; +} + +float clam(float x, float minimum, float maximum){ + if(x>maximum){return maximum;} + if(x.29 && i<.31)){use=pink;} + float step1=smooth(0.,1.,time-i); + //float step1=time-i; + //float step2=time-i-1.; + float step2=smooth(0.,1.,time-1.-i); + if(abs(st.y-.1-2.*i)<.1 && st.x50)st.y+=2.; + st.y-=1.-1.0*cos(0.01*uProgress*PI); + + st=(st-ce)/(6.0-clam(7.*sin(0.01*uProgress*PI+0.3), 0., 5.5))+ce; + + //st = (st-ce)*(1.0/(time*0.1)) + ce; + //st.y+=sin(time/30.)*0.15; + + float3 color = float3(0,0,0); + + if ( + st.y>ce.y + && abs(st.x-ce.x) < clam(.4*cos((ce.y-st.y)*PI), 0.0, 1.0) + && st.y>0. && st.y<1. + || st.y0 + && abs(st.y-ce.y)+.5*te<.2 + ){newt=colorNew;} + + } + return newt; +} + +float4 starry(float2 st : TEXCOORD0) : COLOR0 { + // int BURST = 1; // Remind me to figure out how to compile things ps_3_0 PROPERLY (without modder's toolkit) so I can increase this a bunch. + float2 ce = float2(.5,.5); + float fP = uProgress; + //float time = abs(sin(uProgress*0.5/PI)); + //float2 st = gl_FragCoord.xy/u_resolution.xy; + + float3 color2=float3(0,0,0); + float3 color =tex2D(uImage0, st).rgb; + + if(fP>50){ + fP-=50; + color2=color; + color=float3(0,0,0); + } + float time = fP*0.07; + + float2 ef = st; + ef=(ef-ce)/time + ce; + ef = rotate(ef,PI); + color=star(ef,color,color2); + + /*float separation = 1./(float(BURST)+1.); + for(int i=0;iabs(.2*sin(st.y*PI+.5*PI)))color=tex2D(uImage0, ef).rgb; + + return float4(color,1.); +} + +float4 columns_sudden_angled(float2 st : TEXCOORD0) : COLOR0 { + float BURST=9.; + float time=(uProgress+50.)/(10.*PI); + float2 ce = float2(.5,.5); + + float3 color2=tex2D(uImage0, st).rgb; + float3 color=float3(0,0,0); + st = rotate(st, 0.25*PI); + + float ttime = ceil(time/(PI*2.) - .2)*PI*2.; + + float segment=ceil(BURST*(st.x+ttime))/BURST; + st.y-=.4*sin(4.3*segment); + + float pause = abs(st.y-ce.y)+.3; + + if( + .8*pausetime*0.02)return color2; + return color; +} + +float4 doors(float2 st : TEXCOORD0) : COLOR0 { + float time=uProgress*0.01*PI; + float2 ce = float2(.5,.5); + + float4 color2=tex2D(uImage0, st); + float4 color=float4(0,0,0,0); + + if(.5-abs(st.x-ce.x)>0.5*sin(time))return color2; + return color; +} + +technique Technique1 +{ + pass Lines {PixelShader = compile ps_2_0 lines();} + pass Prideful {PixelShader = compile ps_2_0 prideful();} + pass Loving {PixelShader = compile ps_2_0 heart();} + pass Rising {PixelShader = compile ps_2_0 uparrow();} + pass Falling {PixelShader = compile ps_2_0 downarrow();} + pass Starry {PixelShader = compile ps_2_0 starry();} + pass Winding {PixelShader = compile ps_2_0 columns_ordered();} + pass Jaws {PixelShader = compile ps_2_0 columns_sudden();} + pass Flooding {PixelShader = compile ps_2_0 water();} + pass Wonder {PixelShader = compile ps_2_0 wonder();} + pass Collapse {PixelShader = compile ps_2_0 columns_sudden_angled();} + pass Circle {PixelShader = compile ps_2_0 circle();} + pass Doors {PixelShader = compile ps_2_0 doors();} +} \ No newline at end of file diff --git a/Effects/transitions.xnb b/Effects/transitions.xnb new file mode 100644 index 0000000000000000000000000000000000000000..9c2a38dc02d8f3c4dea5f484c248ac0bd1413f29 GIT binary patch literal 24712 zcmeHPZ;V~nQ9o~YZLj~N>joDb+ojtYgQ<+WaqW^ooqdT@HzrGPY;R*wq-1M9Crj45 zX8({h1@u;Jkt-oc)mCx?RBxpq1qVeNB&Y$C^#?v+DHRswOG!T%>3u673^J^9E3&#oz*e=>y9S4zJ;d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s7UsG`9rDyUCi!jre*x+Pf?)sv literal 0 HcmV?d00001 diff --git a/Localization/en-US.hjson b/Localization/en-US.hjson new file mode 100644 index 0000000..d776b3a --- /dev/null +++ b/Localization/en-US.hjson @@ -0,0 +1,6 @@ +PridefulHallowTooltip: Made it for a friend a while ago; might as well include it here as well! +DefaultTransitionTooltip: + ''' + Determines which shader plays when none are available for your current location, + or anywhere when the Use Biome Specific Transitions config is disabled. + ''' diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..494048a --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,16 @@ +{ + "profiles": { + "Terraria": { + "commandName": "Executable", + "executablePath": "$(DotNetName)", + "commandLineArgs": "$(tMLPath)", + "workingDirectory": "$(tMLSteamPath)" + }, + "TerrariaServer": { + "commandName": "Executable", + "executablePath": "$(DotNetName)", + "commandLineArgs": "$(tMLServerPath)", + "workingDirectory": "$(tMLSteamPath)" + } + } +} \ No newline at end of file diff --git a/TransitionPlayer.cs b/TransitionPlayer.cs new file mode 100644 index 0000000..273aa22 --- /dev/null +++ b/TransitionPlayer.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using Terraria; +using Terraria.DataStructures; +using Terraria.Graphics.Effects; +using Terraria.ID; +using Terraria.ModLoader; + +namespace smoothDeathTransitions { + public class TransitionPlayer : ModPlayer { + + /*public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource) + { + Player.respawnTimer=150; // For testing + }*/ + + public string GetBiomeSpecificTransitions(){ + // This code is going to suck. + if (ModLoader.TryGetMod("CalamityMod", out Mod CalamityMod)){ + if((bool)CalamityMod.Call("GetInZone", Player, "SunkenSea") + || (bool)CalamityMod.Call("GetInZone", Player, "Abyss") + || (bool)CalamityMod.Call("GetInZone", Player, "SulphurousSea")) return "Flooding"; + if((bool)CalamityMod.Call("GetInZone", Player, "AstralInfection"))return "Winding"; + } + if(ModLoader.TryGetMod("TheConfectionRebirth", out Mod ConfectionMod) && ConfectionMod.TryFind("ConfectionBiome",out ModBiome ConfectionBiome)){ + if(Player.InModBiome(ConfectionBiome)){ + if(ModContent.GetInstance().PridefulHallow)return "Prideful"; + return "Wonder"; + } + } + + if(Player.ZoneShimmer)return "Starry"; + if(Player.ZoneDungeon || Player.ZoneLihzhardTemple)return "Doors"; + if(Player.ZoneJungle)return "Collapse"; + if(Player.ZoneCorrupt)return "Winding"; + if(Player.ZoneCrimson)return "Jaws"; + if(Player.ZoneHallow){ + if(ModContent.GetInstance().PridefulHallow)return "Prideful"; + return "Loving"; + } + if(Player.ZoneSnow)return "Wonder"; + if(Player.ZoneBeach)return "Flooding"; + if(Player.ZoneSkyHeight)return "Rising"; + if(Player.ZoneNormalUnderground || Player.ZoneNormalCaverns)return "Circle"; + if(Player.ZoneUnderworldHeight)return "Falling"; + return ModContent.GetInstance().DefaultTransition; + } + + public int transitionTicker = 0; + public int transitionTime = 200; + public string transitionChosen; + + public override void PreUpdate() + { + // Check if appropriate conditions + if(Main.netMode != NetmodeID.Server){ + // Check if the time is nigh + if(transitionTicker==0 && Player.dead && Player.respawnTimer().UseBiomeSpecificTransitions){transitionChosen=GetBiomeSpecificTransitions();} + else{transitionChosen=ModContent.GetInstance().DefaultTransition;} + if(!Filters.Scene[transitionChosen].IsActive()){ + Filters.Scene.Activate(transitionChosen, Player.Center).GetShader(); + } + } + + if(transitionTicker>0){ + --transitionTicker; + float progress = ((float)(transitionTime-transitionTicker)/(float)transitionTime)*100f; // 0-100% + Filters.Scene[transitionChosen].GetShader().UseProgress(progress); + if(transitionTicker==0){ + Filters.Scene[transitionChosen].Deactivate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/TransitionsConfig.cs b/TransitionsConfig.cs new file mode 100644 index 0000000..5182482 --- /dev/null +++ b/TransitionsConfig.cs @@ -0,0 +1,23 @@ +using System.ComponentModel; +using Terraria.ModLoader.Config; + +namespace smoothDeathTransitions +{ + public class TransitionsConfig : ModConfig + { + public override ConfigScope Mode => ConfigScope.ClientSide; + + [DefaultValue(true)] + public bool UseBiomeSpecificTransitions; + + [DefaultValue(false)] + [TooltipKey("$PridefulHallowTooltip")] + public bool PridefulHallow; + + [DefaultValue("Lines")] + [TooltipKey("$DefaultTransitionTooltip")] + [DrawTicks] + [OptionStrings(["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Collapse", "Circle", "Doors", "Prideful"])] + public string DefaultTransition; + } +} \ No newline at end of file diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..ea3a413 --- /dev/null +++ b/build.txt @@ -0,0 +1,4 @@ +displayName = Smooth Death Transitions +author = Emerald Quartz +side = Client +version = 2.0.0 \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..ee4b002 --- /dev/null +++ b/description.txt @@ -0,0 +1,19 @@ +Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side, does not alter gameplay. Open-source, if you'd like a shader-specific example mod. + +Currently available transitions: +- Lines - staggered vertical sweep. Default if biome-specific transitions are disabled. +- Loving - heart boxes in the screen and exits down. Edits pending. +- Rising and Falling - twin upwards and downwards sweeps inspired by their equivalents in Celeste. +- Starry - expanding 5-pointed star. +- Winding - a sort of unzipping-like thing. +- Jaws - series of erratic vertical bars. +- Flooding - waves envelop the screen briefly. +- Wonder - a swirly shading inspired by Rayman Legends. +- Collapse - jagged diagonal letterboxing. +- Circle - simple closing-in circle. +- Doors - two-sided shut and open. +- Prideful - trans flag sweep that optionally replaces the Hallow's ordinary transition. + +Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition. + +Successor of the Celeste Death Transition mod, which was a two-hour project I made after getting bored one evening. This one has marginally more thought put into it. diff --git a/description_workshop.txt b/description_workshop.txt new file mode 100644 index 0000000..75ff8ae --- /dev/null +++ b/description_workshop.txt @@ -0,0 +1,23 @@ +[h1]Smooth Death Transitions[/h1] + +Updates the traditional death screen with smooth transition shaders when you respawn. Fully client-side, does not alter gameplay. Open-source, if you'd like a shader-specific example mod. + +Currently available transitions: +[list] + [*][b]Lines[/b] - staggered vertical sweep. Default if biome-specific transitions are disabled. + [*][b]Loving[/b] - heart boxes in the screen and exits down. Edits pending. + [*][b]Rising[/b] and [b]Falling[/b] - twin upwards and downwards sweeps inspired by their equivalents in Celeste. + [*][b]Starry[/b] - expanding 5-pointed star. + [*][b]Winding[/b] - a sort of unzipping-like thing. + [*][b]Jaws[/b] - series of erratic vertical bars. + [*][b]Flooding[/b] - waves envelop the screen briefly. + [*][b]Wonder[/b] - a swirly shading inspired by Rayman Legends. + [*][b]Collapse[/b] - jagged diagonal letterboxing. + [*][b]Circle[/b] - simple closing-in circle. + [*][b]Doors[/b] - two-sided shut and open. + [*][b]Prideful[/b] - trans flag sweep that optionally replaces the Hallow's ordinary transition. +[/list] + +Explicitly supports Calamity and Confection Rebaked, but all content mods should be fine; it'll just use the default transition. + +Successor of the [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3443385596]Celeste Death Transition[/url] mod, which was a short project I made after getting bored one evening. This one has marginally more thought put into it. \ No newline at end of file diff --git a/en-US.hjson b/en-US.hjson new file mode 100644 index 0000000..dc0af88 --- /dev/null +++ b/en-US.hjson @@ -0,0 +1,20 @@ +Mods: { + smoothDeathTransitions: { + Configs: { + TransitionsConfig: { + PridefulHallow: { + Tooltip: "" + Label: Prideful Hallow + } + + UseBiomeSpecificTransitions: { + Tooltip: "" + Label: Use Biome Specific Transitions + } + + DisplayName: Transitions Config + DefaultTransition.Label: Default Transition + } + } + } +} diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c4349571422edbd25f99fbc32ab5d5850ec37c50 GIT binary patch literal 781 zcmV+o1M>WdP);v?h@1PN;F(giH74n(Z9(MAwU^90tm zRu+OF*jokLfI`ZM1Yf{ju#Vh@S-8EN-ucfZbMY7CBHTZ>`|ZCoyC<$udpn*q_*I&~ z*XM`Rtdv$#kRq@uKfOFZxQ|!2_wL%>T6fpoPRCvQ!=by5Uf)vz!uzc9mG&2HpY$`2 zL+`jp2Ns3-(|wWTz=P9xrt|jp&orJ>`xxE0>-x|;Ihu0X+@S+CM%CxQaITB45B1J0t5+waX7H>WV@KmsH{kN_yB0|^i$0Lsl(;kr~`z7GVQXa0SlQvcM$jNitom@Fb7Vlx1( zo{13hZEds~$v1N#=)6o0T-3=$b*Z}II-Z@SAv?>&K*8gSv{>j5E}1Nia`n=l zWap=n>>Yk9XsH4BJQ_AiTK7<%FYct1t81+yLIF|MP;kqDxrekC+rrH%Pt>VWx84-a zRuxwTw6t{_F0<|f=kB9`F^2-8NtnS>uP8ASj-5*tL>I>zbPux1`|C9mt9q;B!L?Bk z{xil<&r53(w>g-Q6u`31WkFH^sWttRYy;@4?nc2V6fEml);F0}Vi%GHNB zq2TN|rtxeBU?Jdc?(TKEYDFssnA3DFt)14wjfg2IJ5W}@*?BqgD5}f2{EZ(KDKRH>R!Z00000NkvXXu0mjf=z8Kt literal 0 HcmV?d00001 diff --git a/icon21.png b/icon21.png new file mode 100644 index 0000000000000000000000000000000000000000..c4349571422edbd25f99fbc32ab5d5850ec37c50 GIT binary patch literal 781 zcmV+o1M>WdP);v?h@1PN;F(giH74n(Z9(MAwU^90tm zRu+OF*jokLfI`ZM1Yf{ju#Vh@S-8EN-ucfZbMY7CBHTZ>`|ZCoyC<$udpn*q_*I&~ z*XM`Rtdv$#kRq@uKfOFZxQ|!2_wL%>T6fpoPRCvQ!=by5Uf)vz!uzc9mG&2HpY$`2 zL+`jp2Ns3-(|wWTz=P9xrt|jp&orJ>`xxE0>-x|;Ihu0X+@S+CM%CxQaITB45B1J0t5+waX7H>WV@KmsH{kN_yB0|^i$0Lsl(;kr~`z7GVQXa0SlQvcM$jNitom@Fb7Vlx1( zo{13hZEds~$v1N#=)6o0T-3=$b*Z}II-Z@S0P^S>oX~B!Ff0C#V*~-JwdxtTe~fb~OuXfnH$nboFyt I=akR{06lzc@&Et; literal 0 HcmV?d00001 diff --git a/icon_small.png~ b/icon_small.png~ new file mode 100644 index 0000000000000000000000000000000000000000..159ddaeadc069c1e55a22e4d713416784f2d63f8 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3oCO|{#S9GGf*{OTpAtV2D7e+r z#WBRg`{}eqz6J%3)~%)2_^zhruDkKZv})SU1-~w<3IC~B(DGrszSx14#x;`KJad~@ zzB|6VF*r(C&+u;y+q$-V^Gv&aF)=g$bjIzI znIY=C_OC(l)qTsiGWzU4Zlrh0|-$cVYe=Rt^8l02N*nE{an^L HB{Ts5x87^F literal 0 HcmV?d00001 diff --git a/smoothDeathTransitions.cs b/smoothDeathTransitions.cs new file mode 100644 index 0000000..286d3aa --- /dev/null +++ b/smoothDeathTransitions.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Graphics.Effects; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace smoothDeathTransitions +{ + public class SmoothDeathTransitions : Mod + { + public string[] transitionsAvailable = ["Lines", "Loving", "Rising", "Falling", "Starry", "Winding", "Jaws", "Flooding", "Wonder", "Prideful", "Collapse", "Circle", "Doors"]; + public override void Load(){ + if(Main.netMode != NetmodeID.Server){ + Asset screenRef = Assets.Request("Effects/transitions"); + for(int i=0;i + + + + + + + + + + + + + + + \ No newline at end of file