tModLoader [1.4.4] TerraGuardians - Terraria Companions Mod

New TerraGuardians mod hotfix is out.

Fluffles can no longer mount on her own shoulders.
Companions will now leave furniture when you ask them to lift you up.
The mod building info class now has more awareness of furnitures inside companion houses.
*- Currently, only a good number of furnitures are recognized by this.
Fluffles will now use the "correct haunting" behavior when she's not met yet.

Yeah... There's still lots more of bugs to fix.
I hope those bug fixes will at least let you guys enjoy your weekend.

Have fun :)
 
Another hotfix update is out.

This one changes how the game handles companion death, so it no longer relies on vanilla death scripts.
And also adds dyes support to TerraGuardians. Equip dyes on their body and their body will be dyed.
Equip dyes on their head, and their hat will be dyed.

It's now imposible for modders to set the maximum number of companion followers to negative number.
Defense rate should now affect TerraGuardian companions correctly.
Following companions will no longer cause monsters to despawn when they push them away.
Wrath will now get victims of their Body Slam subattack off their mounted companion.
TerraGuardian companions will now wear the correct types of hat on their head.
Changed the death script that will run when a companion dies.
=> This will avoid the game from saving whenever companions dies, and also avoid crashes related to map saving.
Companions should no longer run their behaviors when dead.
Pulling companions towards your character when they're pulled by the Zombie Guardian will no longer make it harmless.
=> Staring contest? Or did the zombie wanted someone to check their breath?
Companions can now display dyes equipped on them.
=> Their body dye will change based on dye set on their armor slot.
=> Their hat dye will change based on dye set on their head slot.
Companions that sit on other characters lap will now do so when trying to use a chair in use.
Added a hook to companion base infos, which allows setting which companion is that companion partner.
=> This hook actually is planned to be used for bed sharing, but still need testing.
Fixed companions bed placement issues.
=> Sadly, I noticed that Vladimir is unable to use beds for now. I will try fixing that issue.

Enjoy :3
 
New TerraGuardians Hotfix is out.
...Wait... There is something else in this log too...

Miscelaneous Equipment slots support added aswell.
8047229.765000001_image.png


You can now equip miscelaneous equipments on your companions. That also include Pets and Light Pets.
Right now, companions will only be able to use those. I will still need to implement use to the other 3 slots.

Increased a bit Alexander companion spawn rate, to see if he's more possible to be found.
SubAttack UpdateStatus hook will now run correctly when SubAttack is in use.
Fixed a bug where newly met companions had their default tactic set to Close Range, regardless of their tactic setting.
=> You will need to change their tactic manually in-game.
Added some more monster variants that will be accepted by hunt requests.
Fluffles will no longer try getting on the shoulder of players that are bond-merged with another companion.
Big companions like Vladimir can now use furnitures again, regardless of tiles colliding with their body when trying to.
Fixed companions sleeping positions.
Added unlock notification dialogues to Fluffles.
Terrarian companions can now level up skills too.
Companions will now better search for targets.
Companions will no longer be unable to attack if the max number of npcs is spawned in the world.
Zombie Guardian will no longer use potions when injured.
You are now able to try speaking with the Zombie Guardian again, after the fight.
Changed a few companion dialogue conditions, to trigger when you have a companion in your companions list.
Companions can now make use of miscelaneous equipment slots.
=> You'll probably make more use of the Pet and Light Pet slots, since they're the only ones with use currently.
Added a limit to extra spawns caused by companions, to avoid absurd situations.

I'm pretty sure that you're itching to see companions use mounts.
I have to say, I am too. But currently, I have to fix some placement issues
of companions in the mount.

There is no estimation of when that
might end up being a possibility. Might be a thing that will be implemented
in a few days, or a few months. Depends on wether I have success or
not fixing that issue.

Anyways, that's it for today's hotfix. It was supposed for me to launch part
of it Wednesday, but I really didn't wanted to do that at the time.

And since the bug fest has been reduced, I think I can return to working
on other mod features.

Well... That's it. Have fun with the mod.
And be sure to check out my game project hehe.

Edit: Another hotfix. This one fixes a freeze that the game has, when you try speaking
to a companion with the UI Zoom at 200%.

Irene's Tombstone will no longer have a chance of spawning in the world if you disable mod companions.
Fixed a freeze that happened when you tried to speak with a companion while having 200% UI Zoom.

Now you have no reasons to be anti social hahaha.
Please don't hate me for this.
 
Last edited:
And another hotfix is out.
Your game will be less like Project Zomboid during nights when having multiple companions with you,
since the counter of npcs spawned will now work again as intended.

The same is also valid for town npc checking, so having a town on the ground is no longer as deadly.
You can now check the skill progress of the Terrarian companions.
Fixed issue where having companions following your character made npcs spawn rate go wild.

There we go. Now should be less dangerous to have companions on your group now, heh.

Enjoy :)
 
New TerraGuardians Mod Update is out!

This update brings a few hotfixes, and partial translation support.

Translation Support
1707191553647.png


Partial translation support implemented to the mod.
The mod will now be able to have localization for other regions on a number of
interfaces, and also companion infos.

Currently, there's only one translation on the mod, for Portuguese Brazil, which is
partially done (I used it for testing).
There is still more to be added as translation support to the mod, and I really have
no idea of how I'll implement other localizations.

If anyone feels interested in adding other regions localization to the mod, feel free
to contact me.

As of now, the only companion with translation support is Rococo. Due to having lots
of companions in the mod right now, and porting their dialogues taking some time,
might take some time until all companions have actual localization implemented.

Other systems like Skills, Request infos and Sub Attacks will need translation support too.

Now, this information here is for modders, so feel free to skip if you're not making
a custom companion.
I tried to make it easy for implementing companion translations, so you don't need to
write a wall of text just to get a translation key.

Before I begin, this update will not break your companions dialogues. I made the
localization optional, so do it if you feel like it. And if you feel like it, I added methods
to do it.

The objects "Companion" and "CompanionBase" have the method "GetTranslation", which
you need to supply a key to the translation, which will be taken from the companion translation
session, and also some handy variants of that method, whose are made to aid when adding custom
translation to the game.

In your localization file, you need to add the following lines:
Code:
Companion: {

}
That will hold the translation for companions.
Lets say that you want to add translation for a companion named Strawberry,
you need to add another code inside "Companion" box for it:

Code:
Companion: {
    Strawberry: {
   
    }
}
And inside Strawberry, you can add the translation keys for whatever you need from
the companion.

Lets say that you want the description of the companion to be acquired from the translation,
you can add that to the localization file:

Code:
Companion: {
    Strawberry: {
        description: Looks like the best person to have a fruitful conversation.
    }
}
And call it on the companion Description info, by using "GetTranslation("description");", being
"description" the key of the companion localization.

Do check out later Gaomon Follower Mod source to see how that's implemented in practice, in case
you didn't got what I said.

In case you still have questions, do ask me.

Nemesis will no longer have a chance to appear when mod companions are disabled.
Vladimir will now, again, be given as a free reward for playing the mod around Terraria's birthday date.
Added support to Thorium and Calamity Weapon Damages.
=> Companions will recognize them as one of the styles of combat companions can use.
Genderless characters will have their name shown as a light gray color when mentioned.
Implemented some localization support to the mod.
=> That includes a number of interfaces, and partial companions translation support.
=> This will take some time before full support is added.

That's about it for today's update. I hope you enjoy your gameplay.
As for me, I better get ready for ear pulls in case I botched translation.
 
Last edited:
New TerraGuardians Mod update is out!

Sorry for the delay, but I needed to make sure some quality of life changes were implemented.
As for other mod incompatibility issues, I will still need to tackle on those issues.

More Translation Support

Implemented some more translation support to the mod. Alex and Alexander companions gained full support to localization.
I couldn't manage to work on the other localization supports due to issues that kept me away from working on that.
Hopefully I'll get into adding more support soon.

Also, Simplified Chinese translation has been added. Thank Philip for the contribution.
Do notice that I don't know chinese, so if you see any issue with the translation, do let me know.
And also do show me what is wrong.


If anyone is interested in adding more localization support, do reach me out and I may help with that, and turn that available
once the mod updates.

Pathfinding Tweaks
I improved the pathfinding and AI of companions a bit more. Now they should less likelly get stuck trying to find their way
towards their target.

Also, implemented a new custom door checking system, one which has companions also check for open doors they pass through, and
close it once they passed through it. That door system will only work if the door is placed next to any player housing wall, so don't
worry about companions closing doors when you're exploring the dungeon or something.

The changes aren't only related to idle and follower behavior though. I also added some extra AI script to make the companions
avoid touching the Wall of Flesh while in the fights. Yes, that's right! You no longer feed the Wall of Flesh when you bring companions
with you.


New Combat Tactic: Stick Close
The Stick Close combat tactic will make the companions with that tactic set always stay close to your character.
Even if they're targetting a monster, they will refuse to stay away from your character.
That tactic might be handy depending on what you're doing.


Shared Unlimited Time Tile Buffs
Using furnitures like the Bewitching Table and Ammo Box will now apply the buff to all companions you have following you.
Do notice that it will apply the buff to all companions FOLLOWING YOU. So if you add in another companion later on your
group, you will need to get the buffs again for it to apply on them.


Implemented Send Item To Interface
1709602445727.png


To make it handier to manage companions inventory and sending items to them, I added a interface that
allows you to place items on their slot, and that item will be sent directly to the companion inventory.

That will be handy whenever you want to restock ammo, or send potions to them, or dump some trash.
If the item you placed on the slot disappears, that means it was successfully sent to the companion inventory.


New Companion AI Settings
1709602572383.png

Now you can tell a companion to take the loot you discard (send to the trash can), and also tell them to auto
sell items when their inventory is full.

I also added a new behavior where you can tell companions to focus attacking what you attack, so whenever
an attack you do hits something, the companion will stop doing whatever they are doing, and focus attack on
that same target.

There is also a new function you can make use of, which was only for debugging, but now is a feature in the mod.
Holding Shift and then Right Clicking on the ground, will make the leader companion walk to the place the mouse was
at (if it's possible to reach).
You can use that to tell a companion to go somewhere dangerous, or check for hostiles somewhere.

The Return of the Friendship Heart
Those who played the mod on 1.3 version probably misses the friendship change heart that appeared on the
companions head.
This piece of interface has officially returned this update, so you'll now see in real time when friendship progress
changes on your companion.

Another change that has been done, is that friendship progress from having a companion follow you will now happen
regardless of their friendship level, when before, companion needed to have friendship level 1 or above for them to
get friendship progress by travelling.


Changelog
Companions will now get increased movement speed when using movement increasing accessories.
Potion Sickness and Mana Sickness will no longer count towards valid buff potions companions can use.
=> Oops.
Added Chinese translation to the mod.
=> Thank Philip for that.
=> There's no way I can check the authenticity of the translation, by the way, so do let me know if you see any issue.
Tweaked companions pathfinding, to make them a bit more cautious.
=> I will still need to work on that more.
Added translation support to Alex, Alexander.
Hats will no longer be drawn on companions when they're KO'd.
Hunter Potion now can let you see TerraGuardians around.
=> Will show them as Red if they're hostile, or Green if they're not.
You can no longer quick mount companions when they're executing other behavior.
Fixed slope auto climbing speed of companions.
Added some CompanionBase hooks to allow modders to set wether certain inventory, armors or misc armor slots shouldn't be modified by the player.
Malisha's face should now fit her model.
Companion town npcs will now check if their house is valid before respawning.
Fixed a bug where companion player masking could cause some companions to instantly respawn when shouldn't.
Using tiles like Bewitching Table and Ammo Boxes, which gives a buff that lasts until death of re-entering world, will now apply the same buff for companions following you.
Implemented the Stick Close Combat Tactic:
=> Stick Close will make the companion stay very close to your character, even in combat.
Added a interface which allows you to send items to companions by placing it on their slot:
=> That interface will only appear when managing chests, checking a npc shop or with inventory opened, but no companion selected on the buttons under it.
=> Placing an item in the slot of the corresponding companon head, will send it directly to their inventory, if there is space in it.
Companions will now try to avoid being too close to the Wall of Flesh.
Holding shift and right clicking on the ground will make the leading companion try walking to that place.
The friendship progress change display has been reimplemented on the mod.
=> Now you can see the friendship level progress change in real time, when that happens.
Your companions can now gain friendship progress through travelling with you while at Friendship Level 0.
The Shotgun weapon will now work correctly on companions.
Added support to the Onyx Blaster weapon.
Changed how companions recognize, open and close doors.
=> Companions will now also check for opened doors they pass through when at house buildings. And will auto close them after leaving.
=> Companions will only auto close doors that are in player built houses (Has walls on either side or inside the door).
Companions will no longer visit on awful moments, like blood moon and invasions.
Malisha's tail will now correctly be shaded with the body.

So... I haven't been receiving donations for quite a while, so I moved the donation and stuff info higher on the mod description.
If you feel like supporting the modder, donating helps a lot, even more since I have a lot of work ahead of me with the mod.

Easter is coming end of March, right? I wonder if I could prepare a Easter companion until then. Might be a good way of practicing
deadline, but we'll see.

Anyways, if you want to check out stuffs I do, check out Guild Management Game Project, and do let me know what you think.
That would be handy.

Have fun :)

Edit: Hotfix launched:
Added measures to prevent mod companions from spawning in the world even with mod companions disabled.
Fixed issue where companions would still remain dead after respawning.
Implemented body layer textures for TerraGuardian Companions.
=> This will be handy for drawing different body part dyes on companions.
=> Only Rococo has support to this right now.

Now your companions can die in peace.

Have fun :3
 
Last edited:
A New Hotfix for TerraGuardians Mod has been launched.

Fixed Rococo's body layers drawing. It should be drawing correctly now.
The Hunter Potion no longer affects followers and met companions.

Have fun :3

Edit: And another hotfix.
Fixed a issue where companions wouldn't have their characters be set as npcs in the world, and would cause duplicate of them to appear if you call them to join your group.
 
Last edited:
This mod is pretty cool, Good job! But how exactly does the friendship system work? ie: How many hearts/friendship to make say... Brutus agree to be my "Buddy" (I dont know what that does yet and i do not wish to be fully spoiled yet!) is it like... 15? 20? 4279? OH! and how would one obtain a sub attack?
 
Friendship progress increases in a number of ways:
It increases by interacting with companions some times, doing their requests, and bringing them with you on your quests.

There are different friendship level requirements for a companion to be okay with being assigned to be your Buddy.
The level is about 10 if I remember well. Do notice that if you assign a companion as Buddy, that companion will
always be summoned on that character, you will be unable to dismiss it, and wont be able to assign other companion
as buddy. So choose wiselly.

Subattack is a system that currently is only used by Leona. Most other companions doesn't have subattack yet.
 
New TerraGuardians Mod update is out!

After quite some time without any new update, this mod finally got a new one.
This one brings back 3 companions to the mod, but also brings the requirement of a
mod library. Follow up this changelog for info on what changed.

3 Rearrivals
Say hello again to:
Minerva
Cow Guardian.png
Minerva: "*Hello... Are you here to ask for food..?*"
Minerva returns, and with a new menu of food she can offer you.
Just like in 1.3 version, you can ask her to give you some food she has made, and she will also share the same food
with your other companions.
Her recruitment method haven't changed yet so... Good luck getting her to settle on your village.

Liebre
Bunny Reaper Guardian.png
Liebre: "*I still seek to appease the souls of the Dungeon...*"

Liebre got some changes on how he works.
Now, the number of souls he needs to collect to be at his capacity has been lowered drastically,
so you don't need to act like a mmorpg and grind the hell out in order to send him to deliver the souls.

Also, the benefits for having him deliver stray souls have changed from random buffs to your party members,
to a worldwide buff that lasts for 24 hours. Yep, having him following you on your team can give great buffs.

Daphne
Sorry, she's still shy. But if you know how to summon her, that method will still work.
If you don't, help some companions, maybe they will give you a clue.

New Library Requirement
The mod now requires N Terraria Utilities mod to run.
The reason for that, is because the quest system from the mod moved to it, but also to better
manage the interface across my mods.
Mods that make use of the quest system, will need to update the mod code not only to require
N Terraria Utilities, but also to change the quest script objects.
Check out the bellow information on how to:

Updating Mod Quests for Modders

This is only useful for modders who made use of the mod quest system. If you didn't,
feel free to skip this part.

I think that the only thing you'll need to do is add nterrautils mod as a requirement, since
TerraGuardians mod QuestBase and QuestData systems are actually a altered version of
NTerraUtils QuestBase and QuestDatas. That means that simply adding the mod requirement
might work.
As for the QuestContainer, you will need to reference nterrautils and use that mod's QuestContainer,
since TerraGuardians mod no longer has a QuestContainer object.

New Request Changes
Implemented two request types with their own request objectives, that can be given by companions:
Invasion Request: Monsters of a specific type will begin spawning while the request is active, until that specific request is completed.
That can also include rare monsters like Corrupt and Vicious Bunnies as objective.
Item Gathering Request: Companions might ask you to collect specific types of items. Bring those items to them to complete the request
(obviously, the items asked for will be consumed upon completing).
Also added support to modability of requests and their rewards.
This info can be found on the changelog:

=> For changing Request types to receive, use RequestContainer.GetRequest to get a request by its id and mod id.
=> => Change the value of "AllowTakingRequest" to false, and that request will never be offered.
=> => Check if the returned Boolean value is true before trying that.
=> For Request Rewards, you can access directly the reward list.
=> => Due to the way it's made, you need to look for the rewards by item id if you want to remove.
=> => Use "AddPossibleReward" from "RequestReward" to add custom reward. That method was available before the update, by the way.

Change Log

Alexander will no longer keep trying to sleuth someone when knocked out.
Chinese translation updated.
Changed companion hitbox update script to fix an issue with Metroid Mod.
Minerva Rearrives.
=> She got some changes on her menu.
Added to CompanionData the CustomUpdate() method hook.
=> That hook will be called whenever the companion is in the player companion list, and their data updates.
Daphne Rearrives.
Modders can now change which requests and rewards could be acquired on the mod.
=> For changing Request types to receive, use RequestContainer.GetRequest to get a request by its id and mod id.
=> => Change the value of "AllowTakingRequest" to false, and that request will never be offered.
=> => Check if the returned Boolean value is true before trying that.
=> For Request Rewards, you can access directly the reward list.
=> => Due to the way it's made, you need to look for the rewards by item id if you want to remove.
=> => Use "AddPossibleReward" from "RequestReward" to add custom reward. That method was available before the update, by the way.
Some hunt requests will now count other monsters as the request target monster.
Fixed issue where Buddy Mode interface wasn't scaling correctly.
Companions inventory interface will no longer show up when checking a mannequin or hat rack.
Changed how request rewards are given:
=> Past Friendship level 7, now the reward grades are ascending.
=> Then:
=> => Starting from Friendship level 7, it was impossible to get no extra item as request reward.
=> Now:
=> => The minimum chance for getting no extra reward from level 7 and ahead is 1%, and the chance lowers with friendship level.
Added new request types:
=> Invasion type requests.
=> => Those request types will have a number of monster spawn around your character, until all the monsters are defeated.
=> Item Gathering type requests.
=> => Those requests will ask you to collect certain items that can be found on the game world.
Fixed friendship heart positioning depending on UI scale.
Asking a companion to lift your character while they're mounted on your character shoulder no longer cause you to take flight.
Fixed a crash that would happen with Wrath when he used Body Slam of Doom and had no target to chase.
Liebre Rearrives.
You can now see tips about Wrath when asking Luna about rumours.

That's about it for this update.
Do let me know if you bump into issues.

Have fun :)

Edit: Hotfix Change Log:
Fixed a interface crash that could cause due to companions equipping Spore Sac.

Enjoy :3
 
Last edited:
Back
Top Bottom