commit 49511f41097ec482783be612b3476e5a21668b07 Author: Emilia(SleepeeSoftware) Date: Sat Feb 21 11:22:03 2026 +0100 working nice diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..59fc676 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin/ +obj/ diff --git a/Content/Items/Accessories/Spacesuit.cs b/Content/Items/Accessories/Spacesuit.cs new file mode 100644 index 0000000..4db9aa8 --- /dev/null +++ b/Content/Items/Accessories/Spacesuit.cs @@ -0,0 +1,116 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + + +namespace Emiliasmod.Content.Items.Accessories +{ + public class Spacesuit : ModItem + { + + public static readonly int DefenseBonus = 8; + + //public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(); + + public override void SetDefaults() { + Item.width = 40; + Item.height = 40; + Item.accessory = true; + Item.rare = ItemRarityID.Red; + Item.value = Item.sellPrice(platinum: 1, gold: 35); + } + + public override void AddRecipes() { + Recipe recipe = CreateRecipe(); + recipe.AddTile(TileID.LunarMonolith); + recipe.AddIngredient(ItemID.TerrasparkBoots, 1); + recipe.AddIngredient(ItemID.CelestialShell, 1); + recipe.AddIngredient(ItemID.ArcticDivingGear, 1); + recipe.AddIngredient(ItemID.CharmofMyths, 1); + recipe.AddIngredient(ItemID.AnkhShield, 1); + recipe.AddCondition(Condition.DownedMoonLord); + recipe.Register(); + } + + public override void UpdateAccessory(Player player, bool hideVisual) { + player.rocketBoots = 4; + player.vanityRocketBoots = 4; + + player.waterWalk2 = true; + player.waterWalk = true; + player.iceSkate = true; + player.desertBoots = true; + player.fireWalk = true; + player.noFallDmg = true; + player.lavaRose = true; + player.lavaMax += 20 * 60; + + player.statDefense += DefenseBonus; + + player.arcticDivingGear = true; + //player.wereWolf = true; + player.accMerman = true; + + player.buffImmune[BuffID.BrokenArmor] = true; + player.buffImmune[BuffID.Bleeding] = true; + player.buffImmune[BuffID.Burning] = true; + player.buffImmune[BuffID.Chilled] = true; + player.buffImmune[BuffID.Confused] = true; + player.buffImmune[BuffID.Cursed] = true; + player.buffImmune[BuffID.Darkness] = true; + player.buffImmune[BuffID.Poisoned] = true; + player.buffImmune[BuffID.Silenced] = true; + player.buffImmune[BuffID.Slow] = true; + player.buffImmune[BuffID.Stoned] = true; + player.buffImmune[BuffID.Weak] = true; + player.noKnockback = true; + + player.lifeRegen += 4; + player.PotionDelayModifier -= 0.25f; + + player.GetDamage(DamageClass.Generic) += 10f; + player.GetAttackSpeed(DamageClass.Generic) += 10f; + player.GetCritChance(DamageClass.Generic) += 4f; + player.GetKnockback(DamageClass.Summon) += 0.5f; + player.blockRange += 1; + player.pickSpeed -= 0.15f; + + player.accRunSpeed = 6.75f; + player.runAcceleration = 2.0f; + player.moveSpeed += 0.25f; + + if (!hideVisual) { + player.CancelAllBootRunVisualEffects(); + } + //if (player.) + + player.GetModPlayer().SpacesuitStatBonusAccessory = true; + } + + } + + // Some movement effects are not suitable to be modified in ModItem.UpdateAccessory due to how the math is done. + // ModPlayer.PostUpdateRunSpeeds is suitable for these modifications. + public class SpacesuitStatBonusAccessoryPlayer : ModPlayer + { + public bool SpacesuitStatBonusAccessory = false; + + public override void ResetEffects() { + SpacesuitStatBonusAccessory = false; + } + + public override void PostUpdateRunSpeeds() { + //// We only want our additional changes to apply if ExampleStatBonusAccessory is equipped and not on a mount. + //if (Player.mount.Active || !SpacesuitStatBonusAccessory) { + // return; + //} + + // The following modifications are similar to Shadow Armor set bonus + //Player.canFloatInWater = true; + Player.runAcceleration *= 1.75f; + Player.maxRunSpeed *= 1.15f; + Player.accRunSpeed *= 1.15f; + Player.runSlowdown *= 1.75f; + } + } +} diff --git a/Content/Items/Accessories/Spacesuit.png b/Content/Items/Accessories/Spacesuit.png new file mode 100644 index 0000000..256e1ca Binary files /dev/null and b/Content/Items/Accessories/Spacesuit.png differ diff --git a/Content/Items/Accessories/Spacesurf.cs b/Content/Items/Accessories/Spacesurf.cs new file mode 100644 index 0000000..52dac81 --- /dev/null +++ b/Content/Items/Accessories/Spacesurf.cs @@ -0,0 +1,50 @@ +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Emiliasmod.Content.Items.Accessories +{ + [AutoloadEquip(EquipType.Wings)] + public class Spacesurf : ModItem + { + public override void SetStaticDefaults() { + ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(180, 14f, 4f, true); + } + + public override void SetDefaults() { + Item.width = 22; + Item.height = 20; + Item.value = Item.sellPrice(platinum: 1, gold: 35); + Item.rare = ItemRarityID.Red; + Item.accessory = true; + } + + public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, + ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { + ascentWhenFalling = 1.2f; // Falling glide speed + ascentWhenRising = 0.4f; // Rising speed + maxCanAscendMultiplier = 1f; + maxAscentMultiplier = 3f; + constantAscend = 0.135f; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.wingTimeMax = 100000000; + player.moveSpeed += 0.1f; + player.jumpSpeedBoost += 1.8f; + player.maxFallSpeed += 0.10f; + player.maxRunSpeed *= 1.75f; + player.wingAccRunSpeed += 0.75f; + } + public override void AddRecipes() { + Recipe recipe = CreateRecipe(); + recipe.AddCondition(Condition.DownedMoonLord); + recipe.AddIngredient(ItemID.CelestialSigil, 1); + recipe.AddIngredient(ItemID.MoonLordLegs, 1); + recipe.AddIngredient(ItemID.LongRainbowTrailWings, 1); + recipe.Register(); + } + } +} diff --git a/Content/Items/Accessories/Spacesurf.png b/Content/Items/Accessories/Spacesurf.png new file mode 100644 index 0000000..2641ee1 Binary files /dev/null and b/Content/Items/Accessories/Spacesurf.png differ diff --git a/Content/Items/Accessories/Spacesurf_Wings.png b/Content/Items/Accessories/Spacesurf_Wings.png new file mode 100644 index 0000000..2536fe3 Binary files /dev/null and b/Content/Items/Accessories/Spacesurf_Wings.png differ diff --git a/Content/Items/EmiliasWand.cs b/Content/Items/EmiliasWand.cs new file mode 100644 index 0000000..efcce08 --- /dev/null +++ b/Content/Items/EmiliasWand.cs @@ -0,0 +1,40 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + + +namespace Emiliasmod.Content.Items +{ + // This is a basic item template. + // Please see tModLoader's ExampleMod for every other example: + // https://github.com/tModLoader/tModLoader/tree/stable/ExampleMod + public class EmiliasWand : ModItem + { + // The Display Name and Tooltip of this item can be edited in the 'Localization/en-US_Mods.Emiliasmod.hjson' file. + public override void SetDefaults() + { + Item.damage = 300; + Item.DamageType = DamageClass.Melee; + Item.pick = 300; + Item.width = 40; + Item.height = 200; + Item.useTime = 10; + Item.useAnimation = 10; + Item.useStyle = ItemUseStyleID.Shoot; + Item.knockBack = 6; + Item.value = Item.buyPrice(platinum: 1); + Item.rare = ItemRarityID.Red; + //Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.useTurn = true; + } + + public override void AddRecipes() + { + Recipe recipe = CreateRecipe(); + recipe.AddIngredient(ItemID.DirtBlock, 10); + recipe.AddTile(TileID.WorkBenches); + recipe.Register(); + } + } +} diff --git a/Content/Items/EmiliasWand.png b/Content/Items/EmiliasWand.png new file mode 100644 index 0000000..b54922e Binary files /dev/null and b/Content/Items/EmiliasWand.png differ diff --git a/Emiliasmod.cs b/Emiliasmod.cs new file mode 100644 index 0000000..4281002 --- /dev/null +++ b/Emiliasmod.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria.ModLoader; + +namespace Emiliasmod +{ + // Please read https://github.com/tModLoader/tModLoader/wiki/Basic-tModLoader-Modding-Guide#mod-skeleton-contents for more information about the various files in a mod. + public class Emiliasmod : Mod + { + + } +} diff --git a/Emiliasmod.csproj b/Emiliasmod.csproj new file mode 100644 index 0000000..726c74f --- /dev/null +++ b/Emiliasmod.csproj @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Emiliasmod.sln b/Emiliasmod.sln new file mode 100644 index 0000000..a2d0602 --- /dev/null +++ b/Emiliasmod.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.2.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emiliasmod", "Emiliasmod.csproj", "{741ADC3D-2994-FB59-1BEE-0908CF33834F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {741ADC3D-2994-FB59-1BEE-0908CF33834F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {741ADC3D-2994-FB59-1BEE-0908CF33834F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {741ADC3D-2994-FB59-1BEE-0908CF33834F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {741ADC3D-2994-FB59-1BEE-0908CF33834F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {62AAAEF0-7CE9-4FA8-AD95-81047C2FCF75} + EndGlobalSection +EndGlobal diff --git a/Localization/en-US_Mods.Emiliasmod.hjson b/Localization/en-US_Mods.Emiliasmod.hjson new file mode 100644 index 0000000..0404156 --- /dev/null +++ b/Localization/en-US_Mods.Emiliasmod.hjson @@ -0,0 +1,18 @@ +# This file will automatically update with entries for new content after a build and reload. + +Items: { + EmiliasWand: { + DisplayName: Emilias Wand + Tooltip: Is it a Drill ? is it a Sword ? It's an Hitachi Magic Wand !! (never used ?) + } + + Spacesuit: { + DisplayName: Spacesuit + Tooltip: Are you ready for Space ? + } + + Spacesurf: { + DisplayName: Spacesurf + Tooltip: "" + } +} 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/README.md b/README.md new file mode 100644 index 0000000..d5eefb0 --- /dev/null +++ b/README.md @@ -0,0 +1,93 @@ +# Emilia's Mod + +___ + +### 1. Environment: Space & Subworlds + + - Subworld Library: Integrate this to handle the "Space" dimension without hitting the 163,840-tile height limit of the main world. + + - Physics Overrides: Create a ModSceneEffect or Subworld hook to set gravity = 0f and windSpeed = 0f. + + - Oxygen Logic: A ModPlayer timer that drains health if HasSpaceSuit == false while in the Space subworld. + +___ + +### 2. Ship Construction & The Launch Pad + + - The Anchor (Launch Pad): A ModTile that acts as the origin point (0,0) for your ship scan. + + - Integrity Scan: A method to check a 50×50 (or larger) area for "Hull" tiles (Luminite bricks, etc.) and at least one "Engine" tile. + + - Serialization: A CaptureShip() function that saves the TileType, WallType, and TileEntity data of the ship into a TagCompound. + + - Launch Animation: * Spawn a large Projectile with the ship’s sprite. + - Set ship tiles in the world to type = 0 (Air). + - Apply upward velocity to the projectile and trigger the subworld transfer once it hits the "top" of the screen. + +___ + +### 3. Pilot Mode (Top-Down Combat) + + - The Controller: A ModTile (Pilot Seat) that toggles IsPiloting = true. + + - Physics Hack: * In PreUpdateMovement, set Player.gravity = 0. + + - Apply Player.velocity *= 0.95f for linear drag. + + - Map WASD to 2D vector movement (Top-down style). + + - Visual Masking: Use PlayerDrawLayer to hide the player sprite and draw the Ship sprite rotated toward Main.MouseWorld. + + - Ship Systems: Implement a "Shield" variable in ModPlayer that recharges over time and absorbs damage before the player takes hits. + +### 4. Automation & Logistics + + - The Registry: A List or List in a ModSystem to track active machines (extractors, assemblers). + + - Heartbeat Loop: Run automation logic in PostUpdateWorld every 10–20 ticks to save CPU. + + - Push/Pull Logic: Instead of complex pipes, use a "Transferer" tile that checks for an IItemStorage (Chest or TileEntity) in the 4 cardinal directions and moves 1 item per tick. + + - Resource Nodes: Create "Asteroid" tiles in the subworld that can only be harvested by an automated LaserDrill TileEntity. + +### 5. Progression Flow (Post-Moon Lord) + + - Crafting: Combine Luminite and Moon Lord drops to create the Launch Pad and Ship Engines. + + - Assembly: Build the ship on the pad in the Main World. + + - Exploration: Launch to the Orbit Subworld to mine "Exotic Matter" from asteroids. + + - Automation: Use Exotic Matter to build the Star-Chart (Remote Teleporter) and auto-farms. + + - Expansion: Use the ship's Top-Down mode to fight "Star-Beast" bosses in Deep Space. + +### 6. Other Point + - Navigator (move in after moonlord) + - Physicist (move in after moonlord) + - Martian (move in after martian invasion, but access shop after moonlord) * hint about space travel + - Martian spaceship can drop ship part after moonlord + - Cleanse Reforge + - spacesuit (Terrarian upgrade + Mystical Conch + Diving gear) + - Alien Surf (Sigil + Celestial Starboard) + - Space Combat (Top Down Ship Control). + + + +Items: { + EmiliasWand: { + DisplayName: Emilias Wand + Tooltip: + ''' + Is it a Drill ? is it a Sword ? It's an Hitachi Magic Wand !! (never used ?) + ''' + } + Spacesuit: { + DisplayName: Spacesuit + Tooltip: + Are you ready for Space ? + ''' + Beam me up !!!! + ''' + } +} diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..102de6a --- /dev/null +++ b/build.txt @@ -0,0 +1,3 @@ +displayName = Emilia's Mod +author = EmiliaUwU +version = 0.1 \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..397c523 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +Have you ever dreamed to go into space, fight space battle and Vanquish Celestial Horror Beyond our Imagination !! diff --git a/description_workshop.txt b/description_workshop.txt new file mode 100644 index 0000000..89acee5 --- /dev/null +++ b/description_workshop.txt @@ -0,0 +1 @@ +This description will show up on the steam page, check out https://steamcommunity.com/comment/Guide/formattinghelp. \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..9e0cf81 Binary files /dev/null and b/icon.png differ diff --git a/icon_small.png b/icon_small.png new file mode 100644 index 0000000..3f173e4 Binary files /dev/null and b/icon_small.png differ