1. For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
    Dismiss Notice

tModLoader TerraGuardians - Terrarian Companions

Discussion in 'Released' started by Nakano15, Jul 31, 2019.

  1. Nakano15

    Nakano15 Official Terrarian

    I guess the Dryad forgot to mention something... - Guideo Kojiwa

    Meet the TerraGuardian, your own Terraria companion. They are creatures that can aid you in a number of ways, in combat, storage and other things.
    If you have played N Terraria mod with Npplayers, you will notice that they will function like them, but in my opnion, the TerraGuardians system is way
    better than the npplayers system.

    That one is Rococo, currently he's the only TerraGuardian you can have, that giant raccoon is good at both melee and ranged combat, aswell as have a good resistence to attacks.
    Once you start playing with the mod, you'll notice that he will show up next to your character, be sure to be good to him.

    By the way, the TerraGuardians aren't made using Projectiles, NPCs or Player character, their system has been built from the ground, and they work in paralel, but attached to a player character, so currently they need a player to actually exist, of course that may be changed in the future, even more if more TerraGuardians be implemented in the game.

    There are some things you need to be aware of before trying the mod:
    1. They have their own equips and items (and their sprites are ugly), they currently wont use any other player item, other than the Life Crystal and Life Fruit, whose increases it's max health. In the future I may add the possibility of them wearing player weapons.
    2. They get hurt, they may drown, get hurt by lava, and receive fall damage. Beside part of that, depends on the Guardian.
    3. You can change it's combat tactics, changing how it will behave in combat, or what it will do.
    4. They have a friendship level, It may be increased by completting their requests, or by travelling while it is following you.
    5. As you rise the friendship level, you may be allowed to give it new combat tactics, or the Guardian may allow you to do something new, like for example, mount on it's shoulder.
    6. Doing It's requests gives rewards.
    7. Do not leave it battling monsters while afk. I warned you.
    8. The Guardian is disabled on multiplayer. Currently there is no multiplayer script and stuff for the Guardian, so to avoid making a ghost attack monsters, It has been disabled. But in the future I may add support to multiplayer to the mod.
    9. For some reason, It's inventory and equipment windows does not show item descriptions, when the mouse is over, but nothing stops you from moving the item to your inventory and then check it's description.
    10. There are only Melee and Ranged weapons currently for the Guardian to use, and It's equipments goes up to Molten.
    11. Looting ability toggle has been disabled, because currently It is bugged. It will be coming in the future, though.
    12. Their collision hitbox is about the same size as the player hit box, so don't feel like having to install a tall gate so it can follow you anywhere. Also, It can open and close doors. :D

    If you want to try the mod, you can get it here:
    MEGA - https://mega.nz/#F!poJxRCID!ldkV2wZ_gAVB2jAnKezxsg

    Just install it on My Documents\My Games\Terraria\ModLoader\Mods, and also enable it once tModLoader opens.
    Be sure to report any bugs you find with the mod. And also to give ideas to improve the mod.

    I recommend you to try the mod with a new character, since It's gears currently doesn't go past Hellstone.

    If you want some more info, check out the post bellow. If not, enjoy the mod.

    Last edited: Aug 14, 2019 at 8:35 PM
  2. Nakano15

    Nakano15 Official Terrarian

    I made this because some mechanics in the game aren't obvious to find, unless you are really curious.

    Holding Right Mouse Button opens the Guardian order menu. While holding the right mouse button, move it in the direction of the command you want to give, and then release when the command turns yellow. Beware, the orders position will change depending on the number of orders you can give, you'll notice that if the Guardian has just used a potion.

    There is a 2P system implemented in the game, but I'm unable to test if it works because I have no controller. You don't need to talk to a woman at the church and ask for 2P Battles to unlock it, you just need to press Start on the controller while in-game, and pray that it works, since as I mentioned before, I couldn't test it.

    Some of the guardian abilities and possibilities comes from leveling up their Friendship level, do their requests in time to gain friendship points, the mod will tell you what you got once you reached the necessary friendship level.

    The Guardian requests gives you interesting loot, even more if you don't like cooking or fishing for crates.

    Inventory window info:

    1. The button with a face looking like Rococo is the Guardian selection interface.
    2. The button with a bag is the Guardian inventory interface.
    3. The button of the chest currently does nothing, but in the future, the Guardian will allow you to use a secondary private inventory.
    4. The button that looks like a brain (or a liver, depends on what you see), has flags and switches to toggle it's behaviors, so you can create the perfect TerraGuardian for your situation.
    5. The button of a cat with an interrogation is the request interface, not only it shows your current friendship level and progress, but the Guardian request will show there when disponible.
    Place weapons on one of the first 10 Guardian Inventory slots, so It will use them in combat. The same is also valid for off-hand items.

    The Guardians will not use potions made for the player, you need to craft their own potion. The potion generally requires you to have 5 of the healing item of It's grade.

    If you value mobility while mounted, I recommend you to turn off the "May use melee attack when mounted" option from the Guardian, If It's weapon is a heavy weapon.

    The Guardian will be healed aswell if you restore your health at the Nurse. They will also be healed from hearts if you pickup one while injured.

    Well, if you are checking this, then you probably want to see my thoughts about this project, or want to help with ideas and stuff. If not, then I recommend you to skip this.

    Currently, I'm thinking about the way you recruit those TerraGuardians, they shouldn't just be summoned by using an item or something, even more since would be more interesting if there were an actual requirement for them to spawn, like happens to Terraria npcs.
    I thought about having to make a house for them and they spawn and move to it once their requirement is met, but would be kind of weird to see two of the same TerraGuardian in the same world, one being the npc, and the other your companion. But is the best alternative I have at the moment.

    Also, I'll allow people to create their own TerraGuardians for the mod, but currently the only way they can be implemented is by launching a new version of the mod, but If I update the mod as soon as a new TerraGuardian comes out, I guess that wont be a problem. Before you think of trying to help create a new TerraGuardian, I recommend you to play with it, so you know how it works. Check out the Spoiler bellow for more information.

    First of all, you need to know of a few facts.
    1. Terraria sprites are scaled 2 times, so before sending me the spritesheet of your Guardian sprite, make your sprite editor scale the sprite to be twice bigger.
    2. XNA has a limitation of 2048x2048 pixels on the sprite of a texture, but for some reason, tModLoader only allows up to 2000x2000. In case your spritesheet goes above 2000 pixels wide, make the exceeding frames go to a lower column, the mod will handle the rest.
    3. The guardians faces to the right.
    Now that you know the facts, I may now give you some info on how the spriting of TerraGuardians will work:
    First of all, they don't need to be giant humanoids, you may make them anyway you want, but I recommend you to try
    making a shading method similar to the one I use, because would be less weird.

    Their body is divided in three sprite parts: The body, includding the head; The Left arm and the Right arm. Those parts
    will be animated individually, depending on the occasion, beside in the future I may need to split some of them (ex:. body and legs).

    The frames should go horizontally, instead of vertically, like Terraria does, but if the sprite exceeds 2000 pixels wide, make the exceeding pixels go to a lower column, as I said above.

    Currently, the frame order and count is:
    Frame 0: Stopped
    Frame 1~8: Walking
    Frame 9: Jumping
    Frame 10~12: Heavy Item Swing (Ex:. Using a Two Handed Sword, from upper left to lower right swing)
    Frame 13~15: Unnarmed Attack (Currently unused, maybe in the future It will be changed, you may leave empty for now)
    Frame 16~18: Item Use sprite (Ex:. Drinking potion, from 16, from upper to lower)
    Frame 19: Crouching
    Frame 20: Crouching Attack Animation (Arm to the upper left of the character)
    Frame 21: Crouching Attack Animation (Arm to the upper right of the character)
    Frame 22: Crouching Attack Animation (Arm to the lower right of the character)

    That's it for the spriting part, now let's talk about it's characteristics.
    Each Guardian have their own attributes and status, that's when you may give your input on their status.
    The status list is as follow, using Rococo's status as base:
    Ps:. Time related attributes are per frame, and each Terraria second is equal to 60 frames.
    //Notice, do not make abusive status, not only I'll lose time trying to make the Guardian status fair, but also wont be fun to have an overpowered creature following you.
    Mass = 0.5f; //Gravity strength upon the Guardian
    MaxSpeed = 4.5f; //Default max run speed
    Acceleration = 0.1f; //Acceleration speed
    SlowDown = 0.3f; //Deceleration when no movement key is pressed, or when trying to move to an oposite direction of the move speed
    MaxJumpHeight = 15; //The height of the jump when It is holding the jump command
    JumpSpeed = 7.08f; //The speed of the jump
    InitialMHP = 800; //Base max health, without life crystal or life fruit
    LifeCrystalHPBonus = 80; //Max health gained upon using life crystal (stacks up to 15)
    LifeFruitHPBonus = 25; //Max health gained by using Life Fruit (stacks up to 20)
    MaxBreath = 200; //Max lung capacity before starts drowning (Terrarian like)
    BreathCooldown = 7; //Cooldown before losing breath (Terrarian like)
    MaxHorizontalFrames = 20; //The number of horizontal frames your Guardian sprite has. It's very important, since the drawing system uses this to avoid bugs.
    BlockRate = 0; //Basic block rate. Do not abuse
    DodgeRate = 0; //Basic dodge rate. Do not abuse
    HurtSound = ""; //Place here the name of a creature or item that has the sound you want to be it's hurt sound.
    DeadSound = ""; //Same as above, but for when the Guardian is defeated.
    Age = 15; //How old the Guardian is at start (up coming feature)
    CallUnlockLevel = 0; //The friendship level that allows you to call the Guardian. (Setting this to something else than 0, requires you to build relationship before it can help you)
    LootingUnlockLevel = 3; //Friendship level before it can start looting items. (Currently, looting is disabled, It still needs to be debugged.)
    MountUnlockLevel = 5; //Friendship level before the Guardian can allow you to mount on it.
    StopMindingAFK = 7; //Friendship level where the Guardian will no longer mind about you leaving it fighting monsters while afk.
    ControlUnlockLevel = 10; //Friendship Level where the Guardian will allow you to take control of it's actions. (Or just play as the Guardian)
    FriendshipBondUnlockLevel = 12; //Friendship Level where the Guardian will receive a status boost based on the player status.
    LavaImmune = false; //Auto explicative
    UnderwaterBreathing = false; //Same as above
    //Insert here other characteristics your Guardian can have. Like flight or something.
    And to finish, I recommend you to add a requirement for it to spawn, for example: Defeat Skeletron.
    Beside not being obligated to do so, It wont be cool if all Guardians in the game has the same chance of appearing even if you just begun playing the game, right?

    After you've done all that, send those informations through a private message on my profile, here in this forums. Do try to zip it first before sending, by the way, It's better than sending loose files.

    Happy spriting.
    Last edited: Aug 14, 2019 at 5:53 PM
  3. direwolf420

    direwolf420 Terrarian

    I really like where this is going!

    If you need help with coding and specifically multiplayer, you can hit me up on the official tmodloader discord (same name as here on the forums) (send me a friend request)
    Last edited: Jul 31, 2019
    Nakano15 likes this.
  4. Nakano15

    Nakano15 Official Terrarian

    I'll try, beside multiplayer-side, I'll reeeeeeeeeeeally need help.
  5. DoktorDare

    DoktorDare Golem

    Fully operational companions sounds awesome.
    I'd be happy just with a Light Pet or something that had its own storage, but having the companion able to carry you around is cool, does it work like a mount where you can control where you're going?
  6. Nakano15

    Nakano15 Official Terrarian

    Yes, but if you use the mount mode, which is unlocked after a few friendship levels. Nothing stops it from attacking, but if you want to keep mobility, better set It's combat tactic to only use ranged attacks when mounted.
    DoktorDare likes this.
  7. Nakano15

    Nakano15 Official Terrarian

    I launched a while ago a new update for the mod, the changes are the following:
    Don't get scared about the version number, you didn't missed 11 updates... Since the mod launch time, I mean.
    A good number of vanilla Terraria accessories will give their bonus to Guardians, aswell as give them new abilities, like for example the Honeycomb with the bee swarm counter attack, and the Hermes Boots allowing them to run way faster if they were running for quite some time.

    Some accessories right now doesn't apply their effects, though, like It's the case of the Cloud in a Bottle like accessories, there isn't double jump script for that, and much less for stacked jumping.

    But on other hand, if you hate your companions falling to their death, you can give them a Horseshoe, and possibly a Water Walking boots to avoid lava and drowning.

    Other than adding the other accessory effects (whose are already recognized by the mod, just need to add their function scripts), I'll see about allowing them to use player weapons, I guess I could scale the player weapons used by them to twice the size, or at least for big guardians.

    Anyway, enjoy the new update. And good accessory hunting.
  8. Gameraiders101

    Gameraiders101 Terrarian

    I saw the Giant Racoon and I was immediately interested. Video coming soon
    Demariosphere, Nakano15 and Guzzlord like this.
  9. Guzzlord

    Guzzlord Eater of Worlds

    Nice, looks interesting thus far!
  10. Nakano15

    Nakano15 Official Terrarian

    There's more creatures planned for the future of the mod, but a Giant Raccoon is still the best.
    And that's not even the project's 100%, beside I'll still have to work on the rest of the percents of the project :/.
  11. Nakano15

    Nakano15 Official Terrarian

    Update Launched. Any of you guys missed when I used to say that?
    • Fixed the fall damage death message when player dies while mounted.
    • The Guardian will no longer try to follow or teleport to a dead player.
    • Added two new combat tactics: "Move in front of the player" and "Avoid Combat"
    • The TerraGuardian will now be knocked away when it's defeated, even if It's with immunity to knockback.
    • Reduced the amount of materials used to craft most Guardian weapons and accessories.
    • The mod will now update the Guardian status everytime it gets day or night in the game, so accessories like the Sun Stone effects can work on them.
    • A number of Guardian weapons gained sounds specific to their type.
    • Your Guardians can now use One Handed swords (player swords if you preffer). Their effects may not work, though.
    • Your Guardian gains a fall protection when teleporting to your position.
    • The Guardian will no longer stop seeking targets when some blocks under or above you, now will only priorize following you when a number of blocks to the left or right.
    • The Guardian Inventory interface will now be closed if you have other inventory interfaces opened. (Ex:. Chest)
    • Guardians now climb slopes and 1 tile tall blocks.
    • Players held items will now try to follow the Guardian when the player is mounted.
    • Made the Guardian equipment slots more... Apropriate...
    • Your Guardian will now teleport when you do, if you are mounted on it and try to use a teleportation item.
    • The Inventory Interface buttons will no longer move when one of them is selected.
    • The Guardian can now duck, It's hitbox will have lower height by doing so, and will be able to attack low ground creatures.
    • The Guardians no longer can jump in the air when hit by enemies.
    • Your Guardian will now restore health when you use the Nurse to heal yourself.
    • Guardians can now activate pressure plates.
    • The Guardian will now try looking for targets in a bigger range, If it just were hurt.
    • Your Guardian can now use the Off-Hand item: Iron Shield. Beside It's the only shield they can use currently. Just leave it on one of the first 10 guardian inventory slots.
    I got to say, that's a hell of a big change log. Beside the fact that the guardian will now be able to step up slopes and 1 tile tall blocks, one handed melee weapons are in... Partially. I fear about trying to add their effects, because due to the way Terraria loads them before use, It will cause a crash in the game, unless either the player uses some item that causes that effect to spawn, or something else causes it to spawn. Terraria surelly is reserved about loading It's own content, beside I don't know if tModLoader bypassed that little issue.

    Another interesting change is the fact that now your companion can wear The Shield, yes, I mean The Shield, because It's the only shield in the game, aswell as the only offhand item in the game. The shield will introduce to the mod something that your TerraGuardian didn't had use for, and that is Blocking an attack, there is now a rate that the Guardian will attempt to block an attack, nullifying completelly the damage. That might be interesting if you use an accessory that gives your Guardian cover ability. Yes, Cover is already in the mod and you can acquire by an accessory, good luck finding it out.

    As for the future plans, currently I'm thinking about how you can find and recruit new TerraGuardians, but first, I need to create a new one. Two players (Thanks UltiDaniel and DoctorMcDerp) gave an idea of making a Chimera (or Eldricht Horror as they said), which is a creature that has body parts of 3 different creatures in it, that's a good idea, but currently I'm dried out of ideas of creatures to mix with, so until I find out, I'll try making a female wolf TerraGuardian, as the second guardian you can have. Once I have the second guardian ready, I can try to make the list of guardians the player will use in the game.

    Also, I've been talking about the fact of increasing the number of accessory slots from the Guardians from 5 to 10, TheWorfer27 and The_Viking gave their inputs about that, and I thought about making it 7 accessory slots, plus 3 on expert mode. What do you think of this idea?

    And I'm kind of glad that even though on hardmode my Guardian is with outdated equipment (Full Demon set, Flamberge and The Stinger as equipments and weapons), It's being able to deal really well with the dangers of the hardmode, but I'll have to add the next ranking equipments anytime soon. I'm thinking about skipping the Cobalt~Titan sets and make the next set be Hallowed, then go to Chlorophyte, and end with Luminite set.

    Well, those are my thoughts, if you want to give your input about it, or has better ideas about something, feel free to discuss.

    Gameraiders101 likes this.
  12. Gameraiders101

    Gameraiders101 Terrarian

    A Minotaur with a Minecraft Mooshroom Palette 0_0
    Demariosphere likes this.
  13. Nakano15

    Nakano15 Official Terrarian

    Not really a good idea, I don't want to get mixed into problems with Mojang and Microsoft.
  14. Gameraiders101

    Gameraiders101 Terrarian

    I don't think it works that way lol
  15. Spirit42

    Spirit42 Terrarian

    By the power of public domain you may be able to create the mooshroom Minotaur without any interference from Mojang why do you think there are Terraria mods that have Minecraft content.
  16. Nakano15

    Nakano15 Official Terrarian

    There are Terraria mods with Minecraft content?
  17. Spirit42

    Spirit42 Terrarian

    Yeah I've seen mods and with gold and diamond Minecraft swords. There is also Minecraft mod with Terraria content in it.
  18. Nakano15

    Nakano15 Official Terrarian

    Then I may try to add a Minooshroom guardian in the future. But right now I have to work on the systems and stuff.
    Gameraiders101 likes this.
  19. Nakano15

    Nakano15 Official Terrarian

    If you're interessed in creating your own TerraGuardian on the mod, check out the post bellow this mod thread topic, It has informations on how you can do so.

    Also, If it is confusing he hell out of you, tell me so too, because I'm better at scripting, not telling how things works.


    By the way, don't you think that I didn't found out that exploit of the teleporting while mounted, It's days are COUNTED!!!
  20. Nakano15

    Nakano15 Official Terrarian

    A new update is out. Here what it brings.
    Added an interface which allows you to manage, summon and dismiss your Guardians.
    Your Guardians now ages as you play, but that wont affect it's performance the older they get.
    Don't get too impressed when checking the time they spent with you, the time is in Terrarian time, so a second is equal to a minute in-game.
    Guardians now gets 5% of the sum of all the player attack status, summed to all it's attack styles. Only available after a certain friendship level.
    They also gains 20% of the defense value of the player as a bonus.
    Changed how the teleportation while mounted works, to attempt fixing a bug.
    The Guardian will now try again to use healing potions in combat.
    There's a 2P mode in the game, but I couldn't test it. If you want to try it, plug a controller on your pc and try pressing Start, while having a Guardian active. The controller player possibly will have control of the Guardian.
    The following accessory effects now works:
    7 seconds Lava Immunity, several cloud effects, Werewolf and Merfolk, Sun and Moon buffs, Reduced healing cooldown, damage reduction from Frozen turtle shell, immunity time increase.
    You no longer can ride with your TerraGuardian out of the world bounds.
    Added a quick commands menu for the TerraGuardians, which is accessible by holding Right Mouse Button.
    You can now give the Guardian an order to wait in some place.
    Hermes Boots like accessories now plays their sounds correctly when the Guardian has an accessory like that equipped.
    Added a proper health regeneration system to the Guardians.
    Accessories that increases health regen now has it's effects working on the Guardians.
    Fixed some bugs related to the player mounted on the Guardian.
    The second TerraGuardian is still being sketched, I'm working on her sprites sometimes, trying to give her different personality and physical compared with Rococo.
    By the way, I'm still trying to think how I'll make new guardians recruitable, so you can build relationship with new Guardians before you are able to ask them to follow you. Rococo will still be acquireable on the early game, though.

    Well, that's all. Enjoy.