tModLoader Wormholes (and also Scroll of Town Portal)

Discussion in 'Released' started by hamstar, Dec 16, 2016.

  1. hamstar

    hamstar Steampunker

    Note: Requires Mod Helpers


    This mod populates the underground with random pairs of wormhole portals. Wormholes allow two-way fast travel between remote locations of the world. Be warned: There's no telling where you might end up!

    As an added bonus, I've included a craftable Scroll of Town Portal; a familiar staple for ARPG fans eager to expedite tedious caving sessions.

    1. [​IMG] Scroll of Town Portal (5x) - A personal (client-only) one-time-use wormhole to your spawn from where you stand.
      1. Recall/Wormhole Potion (1x)
      2. Book (1x)
      3. Mana Crystal (1x)
    2. [​IMG] Chaos Bomb (25x) - Explosives that scatter blocks at random and relocate wormholes (1 in 5 chance). Also destroys town portals.
      1. Recall/Wormhole Potion (1x)
      2. Bouncy Bomb (5x)
      3. Amethyst (1x)
      4. Topaz (1x)
      5. Sapphire (1x)
      6. Emerald (1x)
      7. Ruby (1x)
      8. Diamond (1x)
      9. Amber (1x)

    Additional Information

    Configuration options found in 'Documents/My Games/Terraria/ModLoader/Mod Configs/Wormholes Config.json'.

    Source code available. API now available.

    Note for mod authors: Mods can freely adjust config settings via. weak reference, but they are not automatically saved to file.


    Requires tModLoader (0.10). Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.

    • Fixed issue with wormholes spilling past edge of minimap.
    • Updated for MHv4
    • Minor update for MH PacketProtocol tweak
    • Updated to Mod Helpers v2.0.2
    • Restructured Mod override
    • Restructured ModPlayer class a bit
    • Updated player code
    • Added MP player load bug failsafe
    • Refactored config file usage conventions
    • Refactored debug mode settings
    • Refactored API form
    • Refactored net code to use PacketProtocol
    • Added config settings to adjust Chaos Bomb recipe input and output
    • Altered Chaos Bomb recipe to use 5 Bouncy Bombs, and produce 25 Chaos Bombs
    • Rebalanced town portal scroll recipe (now produces 3 scrolls, also craftable with spell tomes)
    • Fixed premature minimap displays of wormholes
    • Added mod icon
    • Added support for Hamstar Helpers v1.2.0 issue report
    • Refactored net protocol
    • Minor refactoring
    • Fixed crash bug
    • Refactored class visibility
    • Added API
    • Fixed natural wormholes relocating improperly via Chaos Bomb hits
    • Fixed portals not zooming properly
    • Fixed wormhole relocation in single player via Chaos Bomb
    • Ensured town portal (not general wormhole) closure via Chaos Bomb (no random chance)
    • Fixed Chaos Bomb issues.
    • Fixed portals not zooming correctly.
    • Fixed initial placement of wormholes appearing over obstructed terrain (hopefully for good)
    • Restored debug config settings and added a wormholes force-reset setting
    • Updated for TML 0.10
    • Offloaded utility/helper code to Hamstar's Helpers mod (now a dependency)
    • Numerous fixes and tweaks
    • Added debug config option
    • Removed old config (Wormholes 1.3.12.json)
    • Prevented wormholes from generating before terrain
    • Improved wormhole colors
    • Removed misplaced 'Losing Is Fun' code chunk affecting magic mirrors
    • Added Chaos Bombs; re-randomizes existing wormholes
    • Set town portals to persist with saves
    • Add config option to disable wormholes (only town portals exist)
    • Fixed camera mode failing to render wormholes
    • Set town portals to be craftable from recall potions
    • Add particle effects to wormholes
    • Reduced wormhole light radius + increased sound
    • Moved config file to Mod Config
    • Wormhole Potions and Recall Potions can be crafted into one another with their respective herbs.
    • Town Portal Scroll craftable with a mana crystal instead of purification powder.
    • Fixed multiplayer bug.
    • Fixed added config settings not being added with version updates.
    • Reduced wormhole sound volume and added config setting to adjust it.
    • Fixed entrapment glitch and improved code.
    • Fixed wormholes drifting on world save.
    • Lowered default wormholes per world.
    • Note: Wormholes are refreshed with this version. A new config file is used.
    • Town portal expire crash fix.
    • Fixed portals sometimes failing to generate correctly on a given world.
    • Fixed portal collision box alignment issue.
    • Changed portal to render directly to the screen instead of by way of a Dust particle (should fix glitching and layering).
    • Added town portal opening animation.
    • Town portals now expire after 1 hour.
    • Exposed classes for DLL reference use. No gameplay changes.
    • Improved wormhole animation.
    • Added a brief wormhole exit debuff (chaos state + distortion).
    • Assorted fixes and tweaks.
    • Fixed minimap display problem.
    • Tweaked portal graphic.
    • Fixed settings not getting conveyed to clients.
    • Prevented portals from spawning in lava or dungeon.
    • Added failsafes against portal glitching.
    • Fixed multiplayer. Hopefully.


    Last edited: Feb 21, 2019
  2. Fantolette

    Fantolette Skeletron Prime

    This is awesome ... and i haven't even downloaded it yet !
  3. Digiel

    Digiel Terrarian

    Very good!!! Friend your mode is disabled in multiplayer could you fix this?
    I'm putting together a pack and it always gets disabled, and the server does not open with it.
  4. hamstar

    hamstar Steampunker

    I need some special arrangements to test multiplayer functionality. Gimme some time.
    Last edited: Dec 16, 2016
  5. Digiel

    Digiel Terrarian

    Thank you xD
  6. smeagolheart

    smeagolheart Terrarian

    It'd be great if these could lead to like a very small map like a portal to another world. Like the cow level in Diablo. Or a portal to corruption area on a crimson world or something
    Quethed, Dakota Spine and hamstar like this.
  7. hamstar

    hamstar Steampunker

    Fixed multiplayer.

    Edit: This links to an old version. Use the download link up top.

    Attached Files:

    Last edited: Jan 30, 2017
  8. Digiel

    Digiel Terrarian

  9. PyroZ

    PyroZ Terrarian

    I don't really get it what does this mods does.. What actually that item does?
  10. Omegatani

    Omegatani Terrarian

    At various points on the map there will be large floating portals linking two places. Just hop in one to be teleported to the other.

    Hamstar, can the portals be generated inside the temple / etc? Is it completely random, so that the portals could generate in the middle of a lava pit or something?
  11. sadisticnerd

    sadisticnerd Terrarian

    Well, I have found a bug but I'm not too sure how hard it is to fix it, but by some reason, when I quit the world, I reloaded it without mods by accident, and quickly realized my mistake. I quit the game, then entered in the world again with mods on....and the wormholes are fully functional, except they're invisible. I used the town portal scroll too, and the player-created wormhole is invisible as well.
  12. hamstar

    hamstar Steampunker

    I didn't do much to ensure safety with them, except that they specifically cannot spawn inside the temple. I'll probably block lava pits and the dungeon as well.

    I have been unable to replicate this. I'll work on a version to add some failsafes against this, but other than that, I can only guess at the problem. Any additional information would help.

    Edit: New version:

    Attached Files:

    Last edited: Dec 17, 2016
  13. Digiel

    Digiel Terrarian

    When do I create portals as I do to disable portals afterwards? I created 2 in the spawn point and another farther but I can not change the place of the spawn point, only I can change the second portal made never the first place.
  14. Omegatani

    Omegatani Terrarian

    Yeah, blocking the dungeon would be nice. Don't want to make a new world only to dive in and wind up getting a Dungeon Guardian to the face. Can they spawn on floating islands? That would be cool if they did... or high in midair in space -- risk with the wormholes ;)
  15. sadisticnerd

    sadisticnerd Terrarian

    alright, thanks for the reply. By some reason, the problem inverted for me now, as now the wormholes are visible on the 'main' screen but not in the minimap.
    (Yes, I was too lazy to change the name of the pic made by snipping tool)

    Attached Files:

  16. hamstar

    hamstar Steampunker

    Fixed. Sorry about that.

    Attached Files:

  17. Ninjastarz

    Ninjastarz Terrarian

    Hey I'm really liking the mod so far but I would suggest having a short cooldown (like 2-5 seconds) after you use a wormhole as it can be pretty annoying when you have to jump to avoid lava or something straight away and just end up flicking between the portals
    hamstar likes this.
  18. Lunatic Lobbyist

    Lunatic Lobbyist The Destroyer

    Three ideas I immediately had after trying the mod:

    1. Wormholes by definition contain large amounts of high radiation and are generally very dangerous and may have very unpredictable consequences. The idea is to have some sort of penalty for using wormholes. At the very least, some sort of long cool-down that doesn't allow you to use them too often.

    More in-depth, I'd love to see actual penalties for using a wormhole within that cool-down, or maybe even a random dice roll of penalties the first time you go in one. A reduction of health would be an easy one. Random negative status debuffs could introduce another layer of complexity and risk to using them -- shadowflame, electrified, obstructed, ichor, blackout, moon bite, or any other effects would make wormholes far more dangerous as well as interesting to experience imo.

    2. If these are to be called "wormholes", I believe they shouldn't be so static and reliable. Rather than be static, is it possible to make the random wormholes dynamically appear and disappear at times (whether they be specific increments of time or at random moments)? I'd love to see a version of this where you come across wormholes that may not be around the next time you come back to that location, along with finding new wormholes in places they weren't previously. After all, wormholes tend to suddenly appear and collapse.

    3. Allow for the chance for mobs to appear coming out of the wormholes. I don't know that it's even possible to program mobs from the area on the other side of the wormhole to appear in places they wouldn't otherwise, but that would be incredibly immersive. But, that's likely more trouble to program than its worth. Far more feasible, there could be unique mobs hopping out when you get near them, from "the void" or what have you. They could be vanilla enemies depending on which bosses you've defeated (such as a corrupted bunny), or completely new enemies that look like abominations from another world. Either way, seeing other npc's coming out of the wormholes would truly add another layer of uniqueness to the mod.

    Regardless, wonderful job on this mod -- loving what it adds so far!
    Last edited: Dec 18, 2016
    Quethed and hamstar like this.
  19. Le tromp du Jawa

    Le tromp du Jawa Eye of Cthulhu

    Sad that there is no version for old tmodloader nor a warning for the version
  20. hamstar

    hamstar Steampunker

    Improved wormhole animation, added a brief exit debuff (chaos state + distortion), assorted fixes and tweaks.

    Edit: New version exposes classes for DLL reference use. No gameplay changes.

    Attached Files:

    Last edited: Dec 19, 2016
    Lunatic Lobbyist likes this.