2026-02-22 20:09:01 +01:00

82 lines
4.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 ships 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<Guid> or List<Point16> in a ModSystem to track active machines (extractors, assemblers).
- Heartbeat Loop: Run automation logic in PostUpdateWorld every 1020 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).
- Drill Containment Unit need to be integrated as it come very nicely into the mods as a post moonlord mount
Item: {
EmiliasWand: {
DisplayName: Emilias Wand
Tooltip: What is this ?
```
"Where did you find this ?!(never used ?)"
```
}
Spacesuit: {
DisplayName: Spacesuit
Tooltip: PowerFull Suit !!
```
"Are you ready for Space ?"
```
}
Spacesurf: {
DisplayName: Spacesurf
Tooltip: A nice Device !
```
"Surfing with the aliens !!"
```
}
}
Things to do : use no autoload : https://github.com/JavidPack/AllTheWalls good ref
REF:
https://github.com/tModLoader/tModLoader/wiki/Open-Source-Mods
https://github.com/tModLoader/tModLoader/blob/stable/ExampleMod/Content/Items/Weapons/ExampleSpecificAmmoGun.cs#L82
https://github.com/pathofyggdrasil-stack/tModLoader/blob/1.4.4/ExampleMod/ExampleMod.ModCalls.cs
https://github.com/tModLoader/tModLoader/wiki/Basic-Projectile#animationmultiple-frames
https://github.com/tModLoader/tModLoader/wiki/Useful-Resources
FK someone already made a mods, but not really the direction i wanted to go to, i will try to make my mod work with the other one