• 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.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

tModLoader TerraGuardians - Terrarian Companions

Nakano15

Duke Fishron
And update a new update is successfully out.
Guardians now restores breath while underwater, if they have water breathing effects.
Hours and minutes added to the buff counter from the guardian status interface.
Buffs are now saved with the guardian.
Rococo and Blue gained max health nerf.
Implemented some more detailed death messages to the game.
The Guardians will now try to automatically eat food in their inventory when they don't have the well fed buff.
The request of the currently summoned guardian will be shown above the other guardians requests.
There will be a chance of the Guardian giving you a quest that requires it to be following you while doing It's objective.
Possibly fixed a bug related to wave events like the Pumpkin Moon.
You can now check the guardian Accuracy on the equipment window.
Fixed a bug related to player position when controlling the guardian. The player will no longer be taking ghost damage from the sand while on top of it.
The guardian following you will now keep being pulled by the chain while your character is mounted on a mine cart.
The game will now try to spawn monsters for the guardian in the guardian position if the guardian is far away from the player, otherwise the monster will spawn based on the player position.
Provocation Badge drop rate reduced severelly.
Talk quests now includes more dialogue.
Guardians will now auto drink alchoolic stuff like Ale, if there is some in his inventory.
Guardians will also gain friendship points if they eat food or drink alchoolic items a certain number of times. Keep food stacked.
Using the Jump bottles no longer instantly triggers the rocket boots, but...
Guardian skills implemented, they will level up the skills based on actions related to them.
Leveling up the skills increases some attributes from the Guardian, so It will get tougher or better at some things.
It gets harder to level up all skills based on the level of all skills.
The guardians will now try to keep up when following you.
You will be unable to select or change the currently in use item of the Guardian from their inventory, instead of the entire inventory row.
You can now move items from the Guardian inventory to your inventory by shift clicking it. But can't do vice versa.
You can now allow your Guardian to pick up items. But this needs further testing, so expect to eventually find a bug (and report them, if you spot them).
Your guardians will no longer keep buffs post-morthem.
You can now make use of the requests button even if you have no guardian summoned.
You no longer land safelly when your guardian dies from fall damage while mounted.
Skills! Now the guardians has Skills, but differently from many games you may have passed though, those skills are kind of passives, whose level up as your guardian does something related to it. The guardians will gain an extra status boost from leveling up those skills, but the status boost is kind of minimal, so they wont get underpowered or overpowered for grinding them. I don't recommend you to try "grinding" those skills, though, because not only that would be tedious, but you may also end up breaking part of that guardian gameplay style by accident.

Now your Guardians can also eat food or drink alchoolic stuff if those are in their inventory, and the effect isn't active. As they keep using it when necessary, your relationship with them will improve, for caring about their well being.

I've also fixed some issues with the looting ability of them, so due to that, I've been able to allow you to toggle if your guardians can loot items or not. If you set that on, they will not only be able to pick up the items, but also try getting items near them, so if you have problems with overcrowded inventory, like me, It's a good idea to have those guys help you with the loot.

The guardians will also be able to follow you, without acting like a car accelerating on the wrong mach (or something). It feels more like as if they are following you. Also, you no longer will be unharmed if your guardian dies from fall damage while mounted on it.

Well, as for the current mod development discussion...

I guess I'll implement a Mana system for the Guardians, since I didn't had any other idea of how the guardian magic weapon could work. But on other hand, I'm thinking about a "prefference" toggle option for the guardian to make use of when picking which attack to use, so:
If the guardian weapon prefference is about using magic attack instead of ranged, the guardian will try using magic attack until the mana runs out, then It will try using ranged attack, until the mana is filled and it can use magic attack again. The same could also happen if the ranged attack has prefference on the magic. But that lead me into thinking... Wait a moment... What if your guardian has several bullets? You will less likelly see the guardian using the magic weapon... Even more since the guardians can use ranged weapons without ammo cost. Looks like I'll have to give some more thought about this.

As for the guardians that are in your village, I plan on tweaking their idle behavior, because staying in their house during the day must be really boring. I wonder what kind of activities they could do...

Well, more thinking for me. Enjoy the update.
Be sure to share a photo of your buddy guardian if possible.
 

Nakano15

Duke Fishron
What? Wasn't expecting this?
Your guardian will no longer ignore you and try chasing nearest loot when you are mounted on it.
Guardians will now attempt to get hearts and mana crystals from the floor when they feel that It's necessary to.
While mounted on the Guardian, items on the floor will be pulled toward you.
Nerfed the accuracy percentage given by skills.
Buffed Athletics skill leveling.
You can now change the item in the inventory slot whose the guardian is selecting for usage.
You can no longer move nothing with shift click on your guardian inventory.
I've changed the Travelling request in the following things:
Now It speficies that you need to have the guardian summoned to do the objective.
Changed It's text, and It will no longer tell you how many steps more you need to take to complete. Instead, a message will appear telling you when you finished it.
Now it will also count the distance travelled if the guardian is mounted on you.
Reduced the vertical distance necessary for your guardian to be pulled to your position.
Fixed a collision issue the guardian had when moving in the direction of a certain slope.
Increased the chance of acquiring Life Crystals from guardian requests.
Your guardians can now make use of thrown weapons.
Thrown weapons will inflict ranged based damage, and will be treated as one on the guardian ai.
That doesn't means that is a good idea to give grenades to your guardian.
Your guardian will no longer get a block rate boost from the Endurance skill without having any block point.
Block rate and Dodge rate acquired from skills have been nerfed.
Fixed some problems related to Blue's legs.
This patch fixes an issue that was plaguing the mod since before launch, where the guardian kept being pushed one tile backward when moving in the direction of a slope, when moving to the right. If I had noticed earlier that I used the wrong width variable on that collision checking, that issue wouldn't even be in the mod at all.

Also, I discovered what was wrong with Blue's sprites, her legs were a pixel away from her body, each leg, each a different pixel of distance, the left leg being a pixel to the left, and the right leg being a pixel to the right. I've fixed that problem, and as a result, Blue no longer has... Advantage. Her sprite now looks a lot like Rococo's sprite, but of course, with the obviously visible changes.

I've also readjusted some skills effects, because their bonuses were absurd, having an about 150 Ballistic Blue caused her to have 100% of accuracy. Now It'll be somewhat slower for the accuracy to increase, but not impossible.

I've increased the chance of acquiring Life Crystals from Guardian requests aswell, because It's kind of painful having to search through the world for life crystals. Let's do the math:
Your newly created character needs 15 Life Crystals to reach 400 Max Life, and so does your Guardians, whose are 3, If you acquire 15 Life Crystals for the Guardians and yourself, then you'll need: 15 * 4 = 60 Life Crystals. Wonder searching through the world to find Life Crystals? Beside, maybe I could try to reimplement something that a season of N Terraria had, where the Life Crystals could spawn on the world as you play, maybe that could work for the Guardians dillema (and maybe even make some pots spawn too).

The Block rate acquisition from skills has been set so you can only gain it if your Guardian previously had Block rate, so your guardian needs a shield to be able to gain Block rate.

Well, that's all, folks!
 

Nakano15

Duke Fishron
I have a feeling that you guys will hate me for this... I'm not talking about the fact that I launched a new update for the mod, that is aways good, you know. I'm talking about the patch note size...
Guardians now will not try chasing loot while you're mounted, for sure.
Guardians will no longer trigger the hermes boots effect when moving towards monsters when attempting melee combat.
The guardian inventory will no longer try to show information about empty slots.
Not only guardians have mana now, but they also can use Mana Crystals.
Looks like the guardian "prediction" of where the monster will go was bugged, fix coming with this update.
Guardians can now acquire items while the player is mounted, if they are allowed to keep those items. But first, It will be checked if the player can get it.
Reduced the health percentage needed for the guardians to seek Hearts from 75% to 50% of either player or guardian health or lower.
I've added an option that allows you to set your Guardian size to the player size, just go in their AI settings.
The Titan potion has an extra effect on your Guardian.
Increased the variable time for a new guardian request to pop up from 5~15 minutes, to 10~20 minutes.
Removed the messages that appears when starting to control the guardian.
You will now only receive notifications of skill level increase on your guardian for every 25 skill level increases, instead of 10.
Fixed Sardine's NPC head direction, now he'll look the direction he's facing on the minimap.
The guardians now move when the player is disabled for some reason (Petrified, Frozen...) while mounted.
Guardians can now use Spears and Boomerangs, and possibly other weapons too.
Spears are kind of functional right now, but they aren't being scaled.
Boomerangs have no cap on how many they will toss right now.
The Dryad now sells Rename Card, using it while having the guardian you want to change the name will reset It's name back to default, allowing you to change it again.
Guardians now has an AI to use magic weapons, but due to how simple it is, they will preffer to use it over going ranged or melee attacking.
Removed the friendship heart displayed on the request window, It wasn't showing the actual friendship level and progress of the guardians.
Fixed an item positioning issue for actions that needs the guardian to use both hands.
You will now gain more rewards based on the friendship level, when completting a guardian request.
Improved guardian item pulling range, when they can loot items.
Guardians are now affected by Confusion debuff.
Other mods status changes will no longer be affected by the guardian skill levels.
You can now equip a Dye on your guardian to change their body color and effect. I'm sure you'll make all your guardians have different or same dye colors, right?
I've changed the friendship bond effect to the following instead:
Your guardian will no longer receive a boost on all attack status based on a sum of all the player status stacked together, instead, the guardian will gain 5% damage bonus on all attack status.
Instead of gaining 20% of the player defense, will now gain only 5 defense points.
It's a friendship bond, so It means that now the player will be benefited from it too.
Your guardian is now able to move while swinging a heavy weapon, while It's in the air.
Fixed a situation that could end up causing crash when a guardian was hurt or shotting something.
Fixed a bug which results in Talk requests never happening.
I've made the following changes on the request system:
Removed a requirement of fishing up Salmon from the guardian requests, due to how annoying it is to fullfull, even more depending on the world size.
The quests asking to kill Giant Worms, both pre and pos hardmode will be considered as "rare monsters", so you need to kill less of those monsters to complete.
I increased the number of monsters of "normal type" you need to kill for hunt requests.
Added synonymous ids for the killed monster checking, so if you kill a variant of a monster, it counts too. There may be monsters missing, tell me if you find one not counting.
Guardians now has the chance of asking you to hunt, if you beat the requirement: Blood Crawler, Werewolf, Demon, Fire Imp, Hell Bat, Shark, Pink Jellifish, Harpy, Wyvern, Hornet, Piranha, Antlion, Lava Bat, Ice Tortoise, Wolf, Icy Merman, Several dungeon enemies.
Stacks of gems requested by the guardian were reduced. Instead of by default asking for 3 gems, they will start asking only 1, then progressivelly ask for more. (Gems doesn't grows on trees)
Guardians now asks you to collect critters, if you has a type of Bug Net on the inventory.
They also can ask you to collect one of the items necessary to craft the Ankh Shield, if you beat the requirement. You'll be well rewarded if you be able to complete it.
Your guardian now does idle walking around you if you stay afk for two minutes or more, and if your character isn't mounted on it.
Changed the number of days necessary to pass a year on Terraria from 365.25 days, to 32 days (4 full moon cicles). Your Guardians now takes less longer to have a birthday.
The game now tells if one or more of your guardians is having a birthday.
Your guardians will no longer try spamming potions on your dead body.
Large guardian items are now 120% bigger than normal at any moment, instead of being 150% bigger when attacking, and 120% bigger on other occasions.
Your guardian now levels up Acrobatic skill based on the velocity while in the air.
Your guardians will no longer try attacking targets hit by your summon attacks, if you have the option of the guardian attacking what you attack on.
Your guardian will no longer be harmed by harmless projectiles.
Give a Birthday Present to your guardian on it's birthday, and have a surprise. It can be bought from the Party Girl.
Now the guardian ages with the world, so using a Enchanted Sundial will make a day of life pass.
Stealth effect will no longer be under effect while mounted on your guardian and walking.
Added an spacing between the body equipments and accessory slots.
Monsters now correctly spawns near your currently summoned guardian, if you are far away from it. But the monsters spawned are based on the biome you are.
Guardians now will restore the correct amount of health due to heart pickups.
Hearts and Stars (aswell as their seasonal variants) now drops when your guardian is hurt or without mana.
Stars acquired by the guardian now recovers the correct amount of player health.
Several equipments effects now affects the guardian equipping it, but some of them doesn't have their own special effect working, for example: sets that spawns a projectile (Ex: Chlorophyte Set and Stardust Set), and others.
Oh boy, that's what I did in about 2 weeks on the mod, and I don't regret, because the result is exceptional. Now your guardians gains benefits from the armors you give them, or at least part of them, because there are some effects that are harder to replicate on the guardian, even more if involves a projectile that should be bound to it.

Guardians can now also use magic items, but due to how simplistic the AI is currently, they will priorize using the magic item until their mana is depleted, and then retry using it after the mana fills entirelly.

They can also have summons, but due to the fact that the guardians shares the player to set the ownership of the projectile, that means your summons and the guardian summons will clash to see who keeps them, so either you use summon, or the guardian uses summon.

Actually, the projectile ownership is an issue that will make me scratch hard my head trying to figure out, how to make the game distinguish both Guardian and Player summon ownership, since there are some game mechanics that are bound to them. But I'll try thinking more about how I'll solve that issue during the development of the mod, right now I need to focus my head on the fact that October is already opening it's door, and of course that menas I should try to make something special for Halloween, and possibly bump ahead part of the mod miniplot.

I also reduced the number of Terraria world days that needs to pass so your guardians grows old, since I doubt someone sane enough would way 365.25 in-game days for the guardian to grow old, now every 32 days they will grow a year old. I took the liberty of making so when It's their birthday and it's dawning, the game not only notifies you of the birthday, but also throws a party automatically for you. Since we are celebrating a birthday, you'll need gifts, you'll find the gift on the Party Girl store, you'll need to have the Guardian who's getting a year older and place the gift on his inventory, then enjoy the surprise.

You are asking why 32 days? Well, I took into account the fact that the only day passing measure of Terraria is the fact that the moon phase changes, so basically, a year in Terraria is equal to 4 moon cycles.

Enjoy the update. And have fun with the dyes, I'm sure you'll play a lot with them.
 

Nakano15

Duke Fishron
Guess what? Another TerraGuardians update.

Your guardian now gains 50% of defense on Expert Worlds.
Items looted by the guardian will now be shown as new on their inventory.
You can now favorite items in their inventory, by using the same way you do when favoriting your items. Favorited items wont be shift-clickable.
Radial order menu now works as intended.
If your guardian has friendship level 4 or more, and has any kind of teleporting item, like the Magic Mirror, in their inventory, you can give it the order of selling loot. Be sure to mark as favorite items you DON'T want it to sell. Items on the first 10 inventory rows will never be sold.
You can no longer give certain orders to the guardian, when it is actually taking some other action.
Your guardians will no longer try using using summoning items when you tell them to use buff potions.
Possibly fixed a bug that resulted into your character being immune to everything.
Sardine is now Male. I forgot to flip the switch before launch.
Not only you can now share your mount with your guardian due to a new command, but also the guardian will sit on your mount when it's being pulled to your direction, while you're mounted.
You can also tell them to dismount too.
Lava will inflict on the guardian the same damage as it inflicts on the player, but the damage will increase/decrease based on the guardian health.
Shift+Clicking items in your inventory, sending it to the trash can, while having your guardian inventory opened, will move the item from the trash can to their inventory, if there is an empty space. Item that was in the trash can before moving will be deleted for good.
Added an AI option where you can allow the guardian to pickup any item you place on the trash can.
I've changed the flag of making the guardian sitdown on the mount to do the following instead: When turned on, will make so if your guardian is being pulled to your position and your character is using a mount that isn't a minecart, the guardian will sitdown on your mount.
The mod now tells when your relationship with the guardian improves.
Changed the guardian aggroing script, now It will take into account the aggro given by some of the tanking sets.
The AI of making the guardian tank now makes it get 100 of aggro, so monster will still preffer to attack it when turned on.
Removed the message that appears when you try to mount a guardian, while It is away.
Dropped compatibility with TerrariaLeveled. It was broken, anyway.
Changed the melee AI of the guardians, includding the detection of when they are in the range of melee.
You can no longer make yourself impossible to attack or use items by controlling the guardian, and then use the command of lifting your character.
Guardians will now break thin ice depending on their fall speed equivalent to their size.
You can now use commands to make the guardian lift or throw your character while it is mounted, but your guardian will be forced to dismount if it is during the action usage.
Fixed the death message shown when the guardian dies due to an npc or more.
Made the ganking death message genderless.
Guardians now flies after you if they have wings and you are a few vertical distance above them.
While following you, they have infinite flight time.
Added two more dialogues to the Dryad.
Changed the magic weapon using AI of the guardian to decide to approach or retreat an enemy based on X difference, instead of overall distance.
Guardians will now try to swin to catch you up, if they are under water, has the ability to swim and they are under you.
The guardians will no longer show bubbles coming from their nose while with merfolk or waterbreathing buff active and underwater.
Guardians no longer swims on lava.
Using the Magic Mirror on the Guardian while controlling it will produce the following result:
If the player has a spawn point set in the world, the guardian will be teleported to the player spawn point.
In case the above does not work, and the guardian has a house in the world, the guardian will be telepoerted to It's house position.
If the above conditions fails, It will teleport to the spawn point in the world (The center on the surface).
Blocking an attack increases Endurance by 4 times the damage the guardian would receive.
Evading an attack increases Acrobatics by 4 times the damage the guardian would receive.
Endurance now increases twice as faster when the guardian is hurt. That does not affect the exp acquired from Blocking an attack.
Fixed wing position when on the minecart and the guardian is rotated.
Fixed also the wing scaling, now It's size will change with the guardian size.
Large guardians will now be a bit taller than you when using the option to set their size to yours.
6th Accessory slot. Unlockable only with a Demon Heart, and of course, only will enter in effect on Expert worlds.
Fixed the wings horizontal placement on the Guardians.
Fixed a bug with the mob killing requests. Now It will no longer be confused when checking if the monster killed is a variant.
Disabled the guardian AI of trying to duck before attacking a smaller enemy, until the code be reworked.
Chatting requests now gives you item reward.
Changed the AI option "May use Melee Attacks while mounted?" to "Use Heavy Melee Attacks while mounted?".
When set as on, your guardian will try to use light melee weapons whole your character is mounted on it, and the monsters are in It's melee range. If no light melee weapon is disponible, It will use ranged weapons instead.
The guardian will still try using Heavy Melee Weapons when they are mounted on your shoulder, or sitting down on your mount, since It wont hinder you.
Your guardian will no longer have mana deducted when using the Space Gun, while the Meteor Set is equipped.
Guardians that aren't following you wont consume ammo or item stacks while in combat.
Made the Javelin and Bone Javelin be recognized as Thrown weapon, not melee, when they are thrown.
Your guardian will no longer try to use magic weapons while not seeying the target they are attacking.
Added a Panic Mode for the guardian Charge AI.
The Panic Mode will make the guardian try to keep distance off the boss, and avoid using Heavy weapons when It is active.
Activates when the guardian has less than 25% health left.
The Dryad no longer gives you tips about how to find the guardians in order.
Added sound to the Potion Throwing action of the guardian.
Fixed a number of guardian dialogues.
Changed the conditions for a lot of guardian dialogues, too.
Guardians now has Birthday messages. But there is 50% chance that they will appear during their party.
The guardian dash will no longer be disabled when the guardian is in combat, and the player is mounted on it.
You will now only be able to craft Guardian potions on potion crafting stations (Bottles, Alchemy Station...).
Increased reward value given by completting the Critter collection request.
Greatly increased the reward value given by completting the Talisman collection request (Get Nazar, Get Bezoar, etc.).
Your guardian can no longer use Magic items while silenced, neither will try.
Removed gender from the death by lava message from the guardian.
Removed the messages telling that the house is not tall enough for the guardian, since on the automatic mode it may be an annoyance.
You can no longer make your guardian auto-run by making use of "Lift Player" and "Throw Player" orders.
Your character will now dismount from the mount when the guardian is using the "Lift Player" action.
Added Zacks, the newest guardian.
Now I over did myself, I had to add a self goal of adding a mini boss fight to get the newest guardian... Would've been easier If I didn't, but if I didn't, I wouldn't have made my first boss fight in Terraria. Yep, years of modding, now comes the first boss fight I've made. Just try not to mind It's third attack, I've ran out of ideas of ways the third attack could've been, then I implemented... That.

By the way, meet our newest guardian, Zacks.

Oh, sorry, he's a bit awkward about presenting himself to other people, so he wont show up yet on the forums, even more after what happened to him.
But one thing he asks you, will you leave him behind, too?

One thing you should be aware of, is to beware the ai command of allowing the guardian to loot items. If you are doing something that causes several items to fall on the floor, the game fps may lower depending on your hardware, based on the number of items on the floor. I will try to rework that looting system in the future, for now, remember to disable it when doing anything that involves several items on the floor, like hundreds of them.

Oh yeah, the radial order menu now works correctly, so now there will be no ghost commands on the list. Yay!

Well, enjoy the update. And also the grinding... For Life Crystals, Life Fruits, and equipments for your newest adventure partner.

And sorry if I forgot to talk about something that needed some speech here, but look at that patch note! How can I keep on mind everything I want to say about the changes?

Edit: Ps: People reads the patch notes, but nobody noticed I placed the wrong month on the link to the news. Oops.

Edit2: I did it again, I forgot to tell something important. Due to conectivity problems with my tModLoader version (probably because It's outdated), the mod isn't updated on the mod browser, so you have to install manually the update.

Currently I wont be going to install the new version, since I've seen people reporting that are having problems with it, so I'll wait before trying to do that.
 
Last edited:

ShadowTiger

Duke Fishron
This looks like such an amazing mod, Nakano! :D I'm unbelievably excited to try this mod out! It's going to revolutionalize the entire play-through! I'm currently on a Terraria fast until 1.4 comes out so I can appreciate it like it's a new game, or at least unfamiliar, so I'll have to wait until this is ported to a 1.4 version of tModLoader, but it's something I'm absolutely looking forward to with great excitement. <3

Best of luck on future updates! I can't wait to see how many amazing things you do with it! ^_^
 

Nakano15

Duke Fishron
Yep, another TerraGuardian update, but this one will not have a patch note.

This update adds another guardian, Nemesis, the Wraith.
Nemesis is literally a human like guardian, so making it use player armors, allows the armor to be seen worn by it.
Nemesis can come as Male or Female, the gender it comes with depends on your luck (or simply the rng).

Since this is a gift, If you enter the game until October 31th 2019, the character you enter the game with will get him right away.
If you manage to be late and try getting him after that date, you can still try to find him by killing Possessed Armors.

Also, pro tip, you can make them wear vanity gears by placing them on any slot in the first row of the inventory.

Enjoy!

Ps:. Thanks to Nemesis, I guess I have fixed a serious aiming issue the guardians were having.
 

Nakano15

Duke Fishron
So, do you like Nemesis? Then here are some fixes for it, alongside some other stuffs too.
Nemesis npc will now only spawn from Possessed Armors when you haven't met it yet.
Nemesis equipments will now be loaded when necessary.
A number of tweaks on a number of guardian dialogues.
The guardians will no longer ask you to defeat Hardmode Dungeon monsters before you have defeated Plantera.
Your guardian will now face enemies when using light or heavy swing attack weapons.
Your guardian will no longer try to jump tall tiles when being pushed to it, and not moving.
Increased the distance the guardian stays away from monsters when using magic weapons.
The Nemesis is no longer unknown to the mod, meaning It will be able to spawn by itself if you met it.
You will now be able to have 3 guardian requests active at a time.
Not only now your guardian will try picking your character up/reach your chraracter when you use the Mount command, but also added a mount and dismount animation (there is no animation if the guardian mounts on your shoulder).
Nerfed Zacks bonus defense rate from 20% to 10%.
Non human like Guardians like Rococo can have some head equipments shown as vanity gear.
Functions somewhat like how Nemesis handles his vanity gears. It will first try using the equipped item, then check if there is any equipment on the first inventory row.
The guardians will now try using a potion suitable for their current health state.
Added a mini tutorial for starters on the mod. I hope they mind to check the chat.
Of course, existing characters wont see the tutorial.
Guardians now starts with initial items.
Added new shields for your guardian to use.
The game is now aware of the biome around your Guardian follower.
Informational accessories effects on your currently summoned guardian inventory or equipment will now be displayed on your hud, if the guardian is near you.
Large guardians will no longer show death messages suggesting that was attacked by multiple npcs, when being defeated by only one.
Fixed a bug where if a guardian dies while attacking with a spear, your character would be useless until it revives.
Guardians will now only attack monsters if their aim is locked on them.
Your guardian will now be placed on your character position, when you tell it to get off your mount.
Added a little hitbox height discount when the guardian is sitting on your mount. That will reduce the chances of suffocation when travelling through the desert, by using the Basilisk mount.
AFK Abuse counter were removed from the mod, but the guardian gained another behavior to take action when the player is afk while in combat.
Before: Being afk while near the guardian, leaving it do the combat alone for 3 minutes, resulted in it taking a mischevious behavior, picking up your character and ramming on the monsters.
Now: There will be no change of behavior during the time passed afk, but if the guardian gets knocked out after 3 minutes afk, It will be automatically dismissed.
That does not happen if you have enough friendship to make the guardian no longer mind you going afk.
You may be wondering: "Why did you remove AFK abuse, that will make people abuse of the guardians even more.". Then I answer: It was stupid.
I've completelly removed that, and instead made the guardian go away if you let it die after some time while afk, like as If It was saying something very insulting to the player. In the future I may add a better afk penalty system, but for now, that will stay.

Ever since I saw Rococo defending my character from the Twins, I've been wondering about the possibility of adding buddy interactions the player could have with the guardian, to make things cooler, but right now the only idea I got was of adding a healing spell book for the player to use and heal the guardian.
I'm sure It will be fun if one helps the other, or plays with the other.

Since the mod has stepped ahead in the development compared to early posts, I guess I can now allow people to create their own guardians to the mod. Currently I'm trying to think how I could do that without having to send me the guardian infos and sprites and then come on a future update, possibly I'll make use of ids and the mod name, but for now, let's make use of the first alternative.

I'll post somewhere what you need to do to create your own guardian in the mod.

Until then, see ya next time.

Edit:. Oops, I forgot. Happy Halloween guys. Be sure to show prints of the looks of your characters and your nemesis.
 

Fishy Snake

Terrarian
I’m extremely happy and appreciative to see the NPPlayers system come back, and I like how you implemented it. I’m very satisfied with it so far, and thank you for bringing it back and onto tModLoader.

Unfortunately, I’m experiencing game crashing/freezing a lot with it (I’m very, very early in my playthrough, and the game is most often crashing shortly after I boot my world back up). I’m pretty sure it’s this mod since I’ve disabled it and played with all of the other mods I was already playing with, and the game didn’t crash nearly as often. I’m going to try playing with a smaller game window to see if it lessens, but that’s really inconvenient when I want to see more of the area. I’m not sure if this is widely known or if others are even experiencing it as much as I am, but I wanted to bring it to your attention.
As a side note, I am playing with a few other large mods (the Ori one, Calamity and its music, Overhaul, for example).
 

Nakano15

Duke Fishron
Does the mod shows any kind of error window when it crashes?
Also, what were you (or the guardian) doing when the freezes/crashes were happening?
 

Fishy Snake

Terrarian
There’s no error window; the game just freezes completely.

also, I removed everything from my guardians’ inventories and made them not collect loot, and the game stopped crashing for now. I think it has something to do with the inventory system.
As some side notes:
- Terraria is the only major program I’m running
- Frame skip doesn’t matter
- Quality doesn’t matter
- Game crashed more frequently underground (but did often crash on the surface at times as well)
- Not sure if weapons cause any possibility of it, but boomerangs, swords, amethyst staff, wand of sparking, bow and arrows, enchanted sword, starfury, and arkhalis for sure did not freeze the game when the guardians used them.

Also forgive me for using “freeze/crash” interchangeably; in my situation, they’re basically the same result of ending my current game. I’m just not getting error messages.
 

Nakano15

Duke Fishron
The loot system is still giving problems? I did some changes to it on the currently under development version, but I dunno if will make the mod cause less problems related to item looting. Also, having items on their inventory probably wont cause problems, since they don't check it every frame.

Oh, just to sum up. The mod currently has an issue that causes it to use way more physical memory than necessary, that issue will be fixed on the next update, but I dunno if I'll be able to launch the newest TerraGuardian with that update.
 

Fishy Snake

Terrarian
Fixes are probably better before content. But yeah, after disabling looting, my guardians aren’t freezing my game anymore.

And thanks once again for making awesome mods and keeping NPPlayers alive!
 

Nakano15

Duke Fishron
Guys, this update is bigger than you think.
Guardians now holds the torches correctly.
Immortal npcs no longer gets hurt by the guardian backfire damage.
Fixed a hand confusion that happened sometimes to the guardian, when holding off hand items.
The guardian will now try throwing the best potion as possible on you, when you are hurt.
Nerfed the Wooden Greathammer damage.
  • Damage went from 19 to 12.
Your guardian is no longer defenseless when you're dead, and it's far away from you.
Armor Wraith sounds have been changed to be more like a "Wraith", instead of a "Player".
Guardians mounted on your character shoulder, or sitting on your mount will have the left arm and leg be shown in front of the player.
  • There will be a few moments where some animations will have part of the mount or the player body passes through the guardian body, can't really do anything about that right now, without breaking the sprites. (Ex:. Ufo Mount)
Items used by the guardian will no longer get scale changes.
The guardian will now follow the height offset caused by the mount animation, alongside the player riding it, when sitting on the mount.
I don't know how, but item tooltips are being showing correctly on the guardian inventory.
Your guardian will no longer spam that it's inventory is full.
Guardians now correctly rotates with the player when mounted on the player mount, or mounted on the player while in a mount.
Your guardian will no longer spazm it's wings while mounted and trying to jump.
Guardians using wings and using magic weapons will now try to fly closer to the target they want to attack, if they are far higher than them.
Using the Mount order will now make your guardian dismount from your mount, if it is.
Rococo gained a review on a number of his dialogues.
Zacks sprite of when sitting on your mount's right (left) arm has gained a revamp. Now his right arm is shown holding your character to not fall off the mount.
Nemesis now is shown holding your character with his left (right) arm when sitting on your character mount. Good thing that It doesn't uses the right arm, neither can see it.
Removed a clunky system I had implemented because didn't got at the time how mod file works, now the mod takes way less physical memory to run.
Your guardian will now take arm range in consideration when checking if can attack an enemy.
  • The arm range currently is the one of a normal swing.
Rocket boots no longer will have hard times making your guardian go higher.
Cloud accessories no works partially as intended, effects still to come.
If a Guardian uses the Throw Potion action, and the target is currently with potion sickness:
  • Instead of giving an extra healing, the player will instead complain about being hit by the potion.
  • The damage displayed after being hit by the potion is just an effect for humoristic purpose.
If your guardian is teleported to your character position while being pulled by the chain, will now make it teleport with it's aim too.
Did a change on how the mod checks the level of the guardians outside your party, when using NExperience mod.
  • You will need the mod at version 1.3.1 or higher to make use of the changes.
  • Their level will be set to the level of the strongest player in the world.
  • If there is an npc stronger than that player, the level will be set to the one of that npc.
Your guardian item collection range has been improved. It will no longer be a sacrifice for it to loot items, or even need to duck to get it.
Sardine's Bounty Quests are in.
  • After talking to Sardine about it, and placing a sign at his house, he will place requests to kill tough monsters that appears on certain places of the world.
  • Those bounties will reward players who completes it with a good sum of coins and some items, includding angler rare accessories.
  • Placing an Announcement Box on his house will tell you a brief information about the bounty, like name, location it appears and it's most important rewards.
Guardian sitting on your mount will now aid you on looting items.
You no longer need to have the guardian summoned to give it a present. Just talk it in it's house with a present in the inventory.
Reduced the length of Blue's arm on the end of the light vertical swing animation.
Changed Rococo's ducking attack animation. It's no longer a copy/paste of the heavy swing animation.
Your guardian will no longer jump to a horizontal direction if it has dodged an attack while having knockback immunity accessory.
The Guardian selection window now shows the mod the guardian originates from.
Other mods can now add their own custom guardians to the mod.
  • This system needs some further testing to see if it works 100%, so be sure to backup your saves even if you don't use custom guardians.
Oh boy, so many changes, where do I begin? Oh, from the beggining. *Just kidding*
But first, a word from our sponsor:

"Sardine: Hey you, do you know how boring it is to stay at home? There is literally not much to do, or any excitement and fight. That's why I decided to open a Bounty Hunting office on my house, I'll try sharing with you the bounties I receive, and in the end we share the lucre, even If I do not participate the fight.

Are you interessed? Just place any sign at my home, and I'll place there informations about the bounty."


Yes, I added a Bounty Hunting quest system to the mod, once they surge, they will tell where the monster will spawn, and you must cause a true mayhem at It's home to lure out the "evil things doer" guy. Those bounty targets are stronger versions of normal monsters, so fight them with care.

I've been able to fix the Guardian drawing issues, aswell as adding a "foreground" layer to their sprites, that will be mostly effective when the guardian is sitting on your character mount, or in some cases when mounted on It's shoulder.

Another change you should notice, is that now anyone who can create a mod can create It's own custom guardians. Lorewise, "Due to the veil of the Ether Realm thinning, Guardians from other worlds are able to access Terrarians world.". The veil thinning part of the plot brings that as a good part, the bad part may be coming in a future update.
I will need some time to write a guide on how to do that, but until then... Well... Just wait. Also due to that, Version 35 will take some time before it changes to 36, because I'll start using the other numbers in the dots to set as the mod version, because If I change the first number, mods using that mod as a refference will be broken, so that means anyone who made a TerraGuardian for the mod would be unable to play with it, due to the version change of the mod.

The TerraGuardian npcs also got a change in their leveling rules on NExperience mod, the rules are in the patch note, at least now they wont be extremelly weak based on the game mode you're playing.

And sadly, the newest Guardian, Alex, isn't coming in this update, I need to finish a few things for him, like his dialogues, a few balancing fixes, plus add the recruitment method of him before I launch. That may be coming in the next weeks, but for now, he's not acquireable yet.

Well, enjoy the update.
 

Nakano15

Duke Fishron
Creating your Custom Guardian

If you are interessed into creating your custom guardian, go ahead on this post, beside you'll need to know how to create a tModLoader mod, aswell as how to call references from other mods. If you aren't interessed, you may skip this post completelly, unless you want to know some mod stuffs or whatever.

First of all, you need to know this:
  1. The Guardians should be saved inside a folder named Creatures, then have a folder with It's name. The name in the folder must be the same name of the Guardian in the game code, since that's how the mod will load the Guardian sprites. Ex:. If I create a guardian named Potato, It must be inside "Creatures/Potato" folder.
  2. The guardians have currently 5 body part sprites:
    1. head: It's the head sprite that appears to the left of It's health bar.
    2. body: Is the sprite of the body parts of it, not counting the arms. So you draw the head sprite, the body and the legs here.
    3. body_front: Currently is useful only for the animation of the guardian sitting, so you can make It's front leg be shown in front of the mount, for example.
    4. left_arm and right_arm: The respective arms. Being that the left_arm is drawn in front.
  3. The Left and Right sprites are inverted in order, take note of that, or remember Terraria's sun movement direction.
  4. The Guardian Hitbox rectangle is based on the lower central part of the sprite, so make your character sprite be horizontally in the center, but the feet to the bottom of the sprite.
  5. The orientation of the spritesheet is horizontal, and must not pass 2000 pixels (For some reason XNA glitches out even if didn't passed 2400 pixels). In case the width passes 2000, send the other frames to a lower row.
  6. In case you are confused, check how the guardian sprites are made when you make tModLoader extract the mod.
Once you took note of that, let's begin.

First, you must extract the mod dll, If you know how, skip this step and go do that right now. Open tModLoader, then go to the Mods session, click the TerraGuardian ? icon, then click Extract, the mod loader will extract some of the mod files.
Once It's completed, click the Open Mods button, on the address bar of the explorer, click on the folder before the folder you are right now, then go to Mod Reader, and open "giantsummon" folder.
In there, there is the dll "giantsummon.XNA.dll", add it as refference on your script editting program.

With your mod folder created (tModLoader itself has a function to easily create a mod, at Mod Sources), add the mod dll as reference on your code editor, then add a reference to it on the build.txt file (you may create a weakReference for that, I'll tell why bellow), If you already didn't do that on the above step.
Then add to the top of the script file "using giantsummon;". That will allow you to make use of many of the mod functions.

The mod reference will be used as a flag to know if the mod has been loaded or not. You'll need that before you can even try to add TerraGuardian related scripts.
In case your mod isn't about adding just more TerraGuardian characters, create a new script file for it. Before calling the methods with the TerraGuardian mod scripts, check if the mod is loaded, or else It can cause conflicts if people aren't using the mod.

Create somewhere in the code file, a method that will be used for your mod Guardian Database, that method must have an int argument, for the mod id, and a GuardianBase argument, for the basic guardian infos you'll set.
Ex:
C#:
public static void GuardianDB(int ID, GuardianBase guardian)
{

}
On the Load() method of your mod, add a script to make tModLoader load TerraGuardians mod, with the code "ModLoader.GetMod("giantsummon")" and set it's value to a Mod Variable.
Ex:
TerraGuardianMod = ModLoader.GetMod("giantsummon"); //TerraGuardianMod is a Mod type variable
Add an if bellow it, add an if to check if the variable isn't null, then add to it "MainMod.AddGuardianList(this, *Add here the method you created for your guardian database*);".
Ex:
C#:
if(TerraGuardianMod != null)
{
    MainMod.AddGuardianList(this, GuardianDB);
}
The first part is done. Once done with the spriting part, let's do the Database creation part.
For the spriting part, you may get ideas on what sprites you can do on your characters, or how you can sprite it (beside at that I'm a bad teacher) by checking the also extracted guardian sprites.

The id will be used for the mod to know which Guardian you want to call, so you can use a switch to separate the guardian entries.
Ex:
C#:
public static void GuardianDB(int id, GuardianBase guardian)
{
switch(id)
{
    case 0:
    {
        guardian.name = "I'm someone";
    }
    break;

    case 1:
    {
        guardian.name = "I'm someone else";
    }
    break;
}
}
I added parenthesis between the cases, so in case you need to make use of variables inside the guardian entry, you may create another of it on the other cases, to avoid compiling errors.

I'll add here a table of variables you can use to customize your guardian.
VariableDescriptionExample
NameGives the base name of the guardian. Used for loading It's sprites too.Name = "Rococo";
DescriptionGives a brief description about it. You may add a bit of lore too.Description = "Likes potatoes.";
MaleControls the gender of the guardian. This option not only reflects the character, but also may have a use in the future. Here is to place the character gender, not It's orientation.Male = true;
WidthHitbox width of the Guardian.Width = 32;
HeightHitbox height of the Guardian. It's also used to tell if a housing is of suitable size for the guardian.Height = 48;
DuckingHeightThe hitbox height when the guardian is ducking.DuckingHeight = 42;
SpriteWidthThe width of each sprite frame.SpriteWidth = 48;
SpriteHeightThe height of each sprite frame.SpriteHeight = 48;
FramesInRowsPlace here how many frames are in a row.FramesInRows = 20;
InitialMHPThe initial max health your guardian has.InitialMHP = 100; (Player Default)
LifeCrystalHPBonusThe health increase per life crystal used (up to 15 life crystals can be used)LifeCrystalHPBonus = 20; (Player Default)
LifeFruitHPBonusThe health increase per life fruit used (up to 20 life fruits can be used)LifeFruitHPBonus = 5; (Player Default)
MaxBreathThe max breath count before the guardian starts drowning.MaxBreath = 200; (Player Default)
BreathCooldownThe cooldown in frames before the breath is depleted.BreathCooldown = 7; (Player Default)
MassThe gravity strength on the guardian.Mass = 0.3; (Player Default)
MaxSpeedThe default max run speed.MaxSpeed = 3.9f; (Player Default)
AccelerationThe acceleration walk speed.Acceleration = 0.12f; (Player Default)
SlowDownThe deceleration speed when stopping walk.SlowDown = 0.52f; (Player Default)
MaxJumpHeightThis controls the jump time when the jump control is held.MaxJumpHeight = 17; (Player Default)
JumpSpeedThe jump speed when.JumpSpeed = 6.15f; (Player Default)
AccuracyControls the shotting base accuracy. Place the value in decimal.Accuracy = 0.5f; (50% accuracy)
BlockRateInitial block rate the guardian has.BlockRate = 0; (Place the value as percentage)
DodgeRateInitial dodge rate the guardian has.DodgeRate = 0; (Also place the value as percentage)
MountBurdenPercentageSpeed penalty when either your character is mounting the guardian, or the guardian is mounted on your character, or the guardian is sitting on your mountMountBurdenPercentage = 0.05f; (Place the value as decimal.)
SizeChanges the size of the guardian. The only actual change to this is the fact that Large guardians can get stacked damage if multiple enemies are stacked on them.Size = GuardianBase.GuardianSize.Medium; (Player Default)
AgeControls the initial age of the guardian.Age = 17;
DontUseRightHandThis flag controls if the guardian will or not use the right hand. (Useful if your companion is player sprite based)DontUseRightHand = false;
DontUseHeavyWeaponsDisallows guardians to use heavy weapons, like the Two Handed Sword.DontUseHeavyWeapons = false;
WearPlayerArmorsDisplays the armors the guardian has equipped or in the inventory first row. (Do not use if your guardian sprite isn't player based)WearPlayerArmors = false;
CanChangeGenderThe only use is to randomly set the companion as either Male or Female when the player acquires it, but currently there is no possibility of adding sprite difference between genders. (This option isn't good if the character isn't generic or vague. (Example: Rococo, Blue...))CanChangeGender = false;
IsPlayerModelBasedSet this as true if you used a Player model as base to create it. The same can also be valid for town npcs.IsPlayerModelBased = false;
IsTerraGuardianThis will have use in the future, the mod doesn't limits the companions you can have to only be TerraGuardians, so set this as false if you add something else, like a town npc, as a companion.IsTerraGuardian = true;
CanDuckIf the guardian can duck while holding the down control. (If there is no ducking animation, set as false)CanDuck = true;
ReverseMountWhen set as true, the guardian will mount on your character back, instead.ReverseMount = false;
DrinksBeverageSet as true if the guardian can drink alcoholic stuffs. (For ethical reasons, set as false if the character is a kid. If you want)DrinksBeverage = true;
HurtSoundSets the sound played when the guardian is hurt.HurtSound = new SoundData(Terraria.ID.SoundID.DD2_KoboldHurt);
DeadSoundSets the sound played when the guardian is knocked out.DeadSound = new SoundData(Terraria.ID.SoundID.DD2_KoboldDeath);




It's not really necessary to place all those codes on your guardian info, but depending on your guardian uses, there is a good amount of options you can use.

Animation Configuration

Now is time to configure the animations.
The codes bellow will control the animation frame ids.
Code:
StandingFrame = 0; //Controls the animation played when the guardian is stopped.
WalkingFrames = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }; //Place the id of the walking animation frames of the guardian
PlayerMountedArmAnimation = 9; //If your player mounts on your guardian shoulders and needs the support of the left (right) arm, set this value to the animation frame. (setting as -1, or not adding a value, will pick the Jump animation frame)
JumpFrame = 9; //Animation frame played when the guardian is jumping.
HeavySwingFrames = new int[] { 10, 11, 12 }; //Animation frames when the guardian is swinging a heavy weapon. Must have 3 frames.
ItemUseFrames = new int[] { 16, 17, 18, 19 }; //Animation frames when the guardian is swinging an item. Must have 4 frames. Think of the Terrarian attack animation, starting from Upper left, going to Lower Right.
DuckingFrame = 20; //The animation frame when the guardian is ducking.
DuckingSwingFrames = new int[] { 21, 22, 12 }; //The item use animation when the guardian is ducking, the setup is like the one of the attack with heavy weapons.
SittingFrame = 23; //The animation frame played when the guardian is either sitting on your shoulder, or sitting on your character mount.
The variable "WalkAnimationFrameTime" is a float variable that controls the duration time of the walk animation frames. Each frame will have this value as a set duration, but If you don't place any value to this variable, It will set the frames duration to the following:
WalkAnimationFrameTime = 32f / WalkAnimationFramesLength;

Before configuring the animation frames, I'll talk about the some toys from the animation point object you can use to ease the frame setup:
DefaultCoordinate = This point variable sets the default coordinate the mod will get when there is no coordinate setup for a frame.
DefaultCoordinate2x = This variable does the same thing as the above variable, but automatically multiplies the coordinate you set by 2. This is useful if the final sprite is scaled by 2 times the size, so you don't need to scale the sprite, or spend part of your time to do some basic multiplication.
AddFramePoint = Adds a coordinate position to a certain frame, this will be useful for setting the action point of the animation frame, like the item position in the hand.
AddFramePoint2x = The same as above, but it multiplies the coordinate position by 2.

Well, now for the setup of the guardian animations:
LeftHandPoints = Handles the action point of the left (right) hand. Set this to the center of the guardian hand for the item use position, for example.
RightHandPoints = The same as above, but for the right (left) hand. This hand mostly controls offhand items, or handles the guardian item usage when the player is mounted on It's shoulder.
MountShoulderPoints = Controls the shoulder position of the guardian, when the player is mounted on the guardian. Set this frame to the place where the player legs will be.
SittingPoint = This is a point variable, and the frame of refference comes from SittingFrame variable. Set here the point at which the guardian will be sitting on the mount (Ex:. Under the pelvis).
WingPosition = Sets the center point where the wing will be placed on the Guardian.

Dialogue Configuration

There are default dialogues that are set for the Guardian, so they do have at least one thing to say, but It's always good to add their own dialogues, for making them more interesting than the npcs in Skyrim.

GreetText -> is a string array that allows you to set the messages shown when the player has just met the guardian.
Ex: GreetText = new string[] { "Hello.", "Nice to meet you."};

NormalMessage -> This array controls the normal chatting of the guardian, when you talk to It's npc. It needs a ConditionalMessage declaration to set the message, aswell as the condition for the message to be shown.
Ex:.
Code:
NormalMessages = new ConditionalMessage[] { new ConditionalMessage("It's day!", delegate(TerraGuardian g, Player p) { return Main.dayTime; }),
new ConditionalMessage("It's night!", delegate(TerraGuardian g, Player p) { return !Main.dayTime; })};
HomelessMessage -> Shows messages when the guardian has no home.

TalkMessages -> Holds the messages shown when you complete a Talk request. You may use this to hold some secrets or more plot related infos from that character.

BirthdayMessages -> Contains the messages displayed on the guardian birthday. use PlayerMod.HasGuardianBeenGifted method to check if the player has given a gift to the guardian, and IsGuardianBirthday to check If is It's birthday.

Getting my newly created Guardian.

It would be way too simple to say "Simply use PlayerMod.AddPlayerGuardian", but there are some precautions to be checked when handling guardians.
Beside the ModID sometimes has the default value set as "", If you don't set it to the name of your mod (the Name of the mod, not the DisplayName), the mod will assume you are talking about the TerraGuardians mod guardians, so that may end up causing the game to commit mistakes, and certainly not giving you what you want. So be sure to set the ModID to the name of your mod, or just use the method that requires you to set the Mod variable value, so you can just refference the main file of your mod.

Another thing you need to beware of, spawning an incorrect guardian id, or removing a mod that adds a certain guardians to the modloader will not remove the guardian entry from the characters having it. Their data will still be saved in your character, aswell as the data reffering to the guardian being or not met. They will be displayed on the list as "Unknown", and be shown with a generic sprite, and will be unable to be called. Currently there is no way of removing guardians from mod you no longer wants, or mistakenly acquired, so avoid stacking too many companions. Test new guardians on disposable characters, in case something you don't expect to happen end up happen.

The last thing, there is no limit on how many guardians can spawn on the world, so if you create an npc for each guardian, the world may end up being flooded by them, potentially affecting the performance. You should not worry much about this right now, because I'm researching ways of limiting the guardian spawning, but this is just to tell you of the potential problem it will bring.

Enough safety talk. So, as I said above, depending on the use or acquisition method of your guardian, you can simply use PlayerMod.AddPlayerGuardian on the character, so that guardian is added to the player. But in case you want to elaborate things a bit more, what about adding an npc for the guardian?

Differently from tModLoader npc creation, I had to do a variant of the ModNPC to allow you to have Guardians on your built houses.
Once you create the skeleton of your guardian npc script, replace the ModNPC, for GuardianNPC.GuardianNPCPrefab.

Add a constructor to that method, and set It's parameter to the id of the guardian, and the name of the mod.
Ex:
Code:
public class WolfGuardian : GuardianNPC.GuardianNPCPrefab
{
    public WolfGuardian()
        : base(1, "modname")
    {

    }
}
You don't really need to do anything else, the Guardian npcs are even recognized as town npcs, so they will try moving to the town. But I recommend adding [AutoloadHead] above the class, and setting a head sprite for the guardian (If you will reuse the guardian head sprite, copy it to the npc list position, and flip the sprite horizontally). It works the same as a modded npc.

The second button of the TerraGuardian npc most likelly has no use, so you may change it. But you'll need to do the following codes to make it work.
Code:
        public override void SetChatButtons(ref string button, ref string button2)
        {
            base.SetChatButtons(ref button, ref button2); //Set the default guardian button texts.
            button2 = "Text"; //Set the text of the second button.
        }

        public override void OnChatButtonClicked(bool firstButton, ref bool shop)
        {
            if (!firstButton)
            {
                //Do second button code
            }
            else
            {
                base.OnChatButtonClicked(true, ref shop); //If the first button (Request related button) is clicked, call the GuardianNPC version of it.
            }
        }
That's all, folks! Be sure to send me questions if you get stuck at some step, or if the tutorial is too confusing.

I'll post here a list of useful methods you can call related to TerraGuardians.
MethodDescription
PlayerMod.AddPlayerGuardianGives a TerraGuardian to the player. Returns true if It is successfully added.
PlayerMod.PlayerHasGuardianReturns true if the player has the specified TerraGuardian.
PlayerMod.PlayerHasGuardianSummonedReturns true if the player has the specified TerraGuardian currently summoned. (useful if you want a guardian npc to talk directly to another guardian)
PlayerMod.GetPlayerActiveRequestsGets the number of active requests the player has. (The player can have up to 3)
PlayerMod.GetPlayerSummonedGuardianGets the informations of the TerraGuardian. Beware, it also gets information of the TerraGuardian even If there isn't any summoned.
PlayerMod.GetPlayerGuardianGets the information data of a specific TerraGuardian in the player guardian list. Beware, It adds the TerraGuardian to the player if It doesn't exists.
PlayerMod.IsGuardianBirthdayIf the guardian exists, checks if It's birthday is happening. (It is unrealted to the party, but more like year increasing)
PlayerMod.HasGuardianBeenGiftedChecks if the player has given a gift to the guardian. Very useful If you want to add a dialogue to it asking what you'll give it as a gift.
NpcMod.GetGuardianNPCGets the position of the guardian npc. Returns -1 if there isn't any npc for that guardian. (Beware, this will cause a crash if not used with care, check the npc id before trying to get it)
NpcMod.HasGuardianNPCTells if the guardian npc exists. Useful if you want to make npcs talk about a certain guardian.
NpcMod.GetGuardianNPCNameGets the name of the Guardian npc. This can be useful only on multiplayer. If It gets support.
NpcMod.AddGuardianMetAdding a guardian entry here, will allow the guardian npc to spawn normally when there is a house disponible.
NpcMod.HasMetGuardianTells if the guardian has actually been met. (Meaning that the npc can spawn normally)


You can also configure which of the guardian actions/interactions can be unlocked when, It's completelly optional, since If you don't set it up, It will use their default value.
The values of those settings must be set to the friendship level it unlocks.
The following are the friendship grades, they may end up having an impact in the future.
KnownLevel = 2; //Level of the first friendship rank
FriendsLevel = 5; //Second friendship rank
BestFriendLevel = 12; //Third friendship rank
BestFriendForeverLevel = 18; //Fourth friendship rank
BuddiesForLife = 25; //Fifth friendship rank

//The abilities unlock levels, makes the features/actions possible if the guardian passes that friendship level.
//If you want to disable a skill, set the value to 255.
CallUnlockLevel = 0; //Allows you to call the guardian to follow you
LootingUnlockLevel = 3; //Allows you to set the guardian to pick up items on the floor
MaySellYourLoot = 4; //Allows you to give an order to make the guardian teleport away and sell the items on It's inventory, then return to you
MountUnlockLevel = 5; //Allows you to mount on the guardian.
StopMindingAFK = 7; //The guardian will no longer leave you If It dies when afk.
MountDamageReductionLevel = 9; //Reduces the damage the player is received when mounted on the guardian
ControlUnlockLevel = 10; //Allows you to take control of the guardian.
FriendshipBondUnlockLevel = 12; //Gives a status buff to the player and the guardian.
FallDamageReductionLevel = 15; //Reduces the damage you and your guardian receives when falling from high places.

In case you are a man/woman of action, just check out the code for Rococo's dialogue.

Enjoy.

Edit1: Added settings that uses the friendship level.
 
Last edited:

fireman7100

Plantera
Nice mod you have here Nakano. While playing it, I noticed that all of the enemies rapidly regain health. Is that a bug or feature? I didn't read it anywhere so i am assuming it's a bug.
 

Nakano15

Duke Fishron
Oh boy, I guess I forgot to add an extra conditional check. The modifier of life regen for bounty target should only affect the bounty target. Hahaha.
The bug will be fixed on the next update. Meanwhile... Enjoy the extra difficulty.

Edit:. Oops, I forgot to post this on the guide of creating a custom guardian, beside It's not really related to creating a guardian, will allow one to create their specific items.
The Guardian specific items functions differently from the player weapons, one of the things you notice is that, obviously, only your guardians can use it.

To create a heavy weapon, you must begin the process of making a custom item on the mod, but instead of "ModItem", you have to replace for "giantsummon.Items.GuardianItemPrefab", that is a modified version of the mod item for guardian specific items.

You just need to create the item normally, but pay attention to the new fields It brings, and fill them in depending on the use.
CodeDescription
ItemOriginThis field is very important when making a weapon or held item for your guardian. This will be the point where the guardian will hold the item, that's why their weapons don't follow the design of Terrarian weapons, but they still are able to hold it.
ShotSpawnPositionThis point variable defines the position where the shot will come from, when using this weapon. Extremelly useful for items that shots stuffs, you know.
ProjectileFallRateTo help the guardian AI, fill this with a value if the projectile the weapon shots falls a number of pixels per frame. Wooden Arrows, for example, falls by 8 pixels per frame, so set that as the value If your weapon uses arrows.
ItemStatusScriptThis delegate handles the special effects the item will give to the guardian when equipped. If you want the item to give an extra effect to the guardian, like max health, increased damage and stuff, place the code here.
handPick which hand the guardian will preffer using this item with. Each value is self explanatory, just remember that left is right, and right is left.
HeavyHeavy items changes the function of the item on the guardian. Weapons will use a different animation when the guardian swings it. Armors will drop a bit the movement speed when the guardian is wearing it.
ShieldTells if the item is a shield. Also makes the Block rate make sense.
OffHandItemTells if the item is a offhand item, currently there is no code for telling what happens when your guardian holds an item offhand.
BlockRateIncreases the block rate of the guardian, It wont really work if your guardian isn't using a shield.
Have fun.
 
Last edited:

Nakano15

Duke Fishron
New TerraGuardian update came. Alex arrives.
Changed a suffix from a bounty target from the Hallow.
You can now control which guardians will be spawned on your world.
You can have up to 10 guardian npcs in your world.​
If you set them to go home, they will move away after some time, if there is no player near it.​
Making a guardian npc stop spawning on the world will not stop you from calling it to help you.​
Nemesis left (right) arm now changes animation when using an item while sitting on your mount.
The guardians will now gain a boost of status on NExperience mod, they will have the status points for their scaled level distributed between all status demi-equally.
Blind and Blackout debuffs now hurts your guardian Accuracy.
Fixed a potential error when the bounty target would be about to spawn.
Guardians no longer jumps when dodging an attack while using a knockback immunity accessory.
Guardians using full Beetle Shell set will no longer be overpowered tanks.
You can now ask guardians that has a magic mirror in their inventory to teleport you to town.
The mod will no longer show a message on the chat when changing the guardian combat behavior.
Life Regeneration modifier for bounty target will only be under effect to the bounty target, not all monsters in the world.
Increased the delay before a bounty monster with life regeneration modifier regenerates health.
Your guardians can no longer "eat" tiles and wall items.
Acrobatics now increases only based on guardian vertical speed now.
When the guardian gains a level up in a skill, the mod will now tell the highest level achieved for that skill.
The Dungeon Guardian will no longer receive counter damage from the guardian.
Fixed a problem which caused the guardian to misbehave when on the right border of the world (and possibly on the lower border too).
Wall jump added to Guardians.
Added Guardian wing position configuration.
You can configure it on your custom guardians by using "WingPosition" object.​
New TerraGuardian added: Alex.
You'll need a new world to find him. But doesn't means you wont be able to have him at your town after meeting him, just need to have him summoned at least once.​
The guardian skill leveling now has individual progress for each skill.
Well, new update out, and this update brings in Alex, the newest TerraGuardian.

GiantDogGuardian1.png

The only thing he used to do was guard her old partner day and night, until you arrived.
Beside you wont be able to make him stop missing her, you can at least bring him on your adventures, or leave him on your village to play with your town citizens, includding other TerraGuardians.

This is the first TerraGuardian implemented that isn't actually biped, so you can see how important this guy is to the project right now.

Another thing I should talk about, is the fact that now there is a limit of 10 TerraGuardians you can have living on your world. I added this limit for the case this mod ends up getting a lot of guardians (something I don't really think may end up happening) and things get a bit out of hand about overpopulation. Any guardian you have met, you can set on the guardian selection window If they can move in to your world, or if they should go home. That wont influence if you will or not be able to call the guardian to help you on your quest, and by default, newly met guardians will try to move in to your world.

The last thing I'll talk about right now, is about the individual skill leveling on the guardian. The method used on previous updates was the most challenging one to level up, because the maximum exp of the skills was shared, so the max exp was a crazy math based on the total level of all guardian skills. The problem with that system, is that skills like Athletics and Acrobatics would end up being hindered after some time, since combat skills, most likelly the attack skills, would be higher leveled than previously mentioned skills, causing problems on leveling it up.

I kind of think that It may be influenced by the fact I'm using a leveling mod, but that's a question of testing anyway on how individual skill leveling will impact on the gameplay. If you disliked the new skill leveling system, be sure to give me a feedback, I may do changes to it, or just revert to the old system on a future update.

Now talking about something I want to do... Would you guys mind if on multiplayer you can have only up to 100 players online? The question seems silly, but I have something reserved for those other player characters, maybe that will make the TerraGuardians following the player work better on some systems.

Give me a word about that, and see you guys on the next... Post. Because I'm not sure if the next time you guys will read anything from me will be on a future update.
 
Last edited:

Fishy Snake

Terrarian
For some reason, the new updates have broken my game. I can move my own character, and my guardian moves too, but everything else is frozen. Projectiles and particles are frozen in place forever, some weapons and tools don't work, items aren't being magnetized like normal, and no enemies are spawning at all. I spawned in some enemies and bosses with CheatSheet, and they're completely frozen, too.
And I overwrote my previous version with this update, so I can't go back to the old version.

1575240102505.png
 

Attachments

Fishy Snake

Terrarian
For some reason, the new updates have broken my game. I can move my own character, and my guardian moves too, but everything else is frozen. Projectiles and particles are frozen in place forever, some weapons and tools don't work, items aren't being magnetized like normal, and no enemies are spawning at all. I spawned in some enemies and bosses with CheatSheet, and they're completely frozen, too.
And I overwrote my previous version with this update, so I can't go back to the old version.

View attachment 230668
Update: I started a new character and world and disabled CalamityMod and Overhaul. This world seems to be working properly so far.
 
Top Bottom