Oblivion/Skyrim-esque Follower NPCs

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
User avatar
4nt
Posts: 20
Joined: Sun Oct 13, 2019 6:47 am
Location: Earth (duh C:)

Oblivion/Skyrim-esque Follower NPCs

Post by 4nt »

IDK how difficult this would be to script, implement and troubleshoot (on a scale of 1-10, i imagine this is at least an 8 in practice), but it'd be absolutely amazing if someone could manage to pull this off and make a mod that allows scriptable NPC followers to be possible in Daggerfall Unity.




At the very least, it'd need to be a mod that'd allow for other lower-level modders to come in, make their own compatible scripts that run dependent on the NPC Follower mod, and implement their own custom follower NPCs into the game.


The custom scripts that people could make would need to account for parameters such as...
  • stat parameters
  • primary, major, minor, misc. skills
  • spell lists
  • advantages
  • disadvantages
  • weapons
  • equipment
  • character sprites
Furthermore, the NPCs would obviously need to be able to help you in combat in order to defeat or pacify enemy mobs (whether its with melee weapons, magic, archery, etiquette, etc.), know when to stop attacking whenever a certain mob surrenders and offers an extension into a quest (like, I've had an enemy mob before inform me in one of my dungeon crawling quests that I've been tricked by an orc disguised as a human villager via illusion magic and it gave me an option to choose their side and betray the person who initially gave me the dungeon crawling quest; a follower NPC would need to know to stop attacking an enemy mob if something like that happened and i choose to accept their offer), follow the player wherever they go (whether its in a town, the overworld, in dungeons, inside houses, etc.), spawn after instances of entering/exiting structures and after instances of fast traveling, etc.

NPC Followers should also probably have their own health and mana bar GUI too that's visible above their character sprite. That way, you can know when to heal them if they're getting low of health, or you can rest in order to restore their mana. Normally i'd also suggest giving them a stamina bar, but i don't exactly like the idea of an NPC follower dying out of nowhere from exhaustion, so I'd maybe suggest that as a toggle feature in the base mod. Assigning roles for custom NPCs (stuff like healer, tank, dps, etc.) should also probably be a toggle feature in the NPC Follower Mod itself if it isn't going to be an assigned parameter in the custom scripts.

On top of all that (like, as a bonus in case the modder really feels like going above and beyond when making this), it'd be cool if the parameters for the NPC Follower Mod could allow for modders to be able to write backstories and other custom dialog which can be viewed in-game through the implementation of a Follower NPC dialog menu, similar to most town NPCs in Daggerfall. It'd also be fun if the max amount of followers you could bring with you didn't have to just be 1. There's a mod i use on Skyrim that allows me to have up to 3 followers with me at a time, and it's made dungeon crawling so much fun in that game. Something like that would really suit a game like Daggerfall where the dungeons are big and the combat can be hard as balls.


(All this stuff would need to be handled by the parent mod)




Anyways, i hope that even if this idea doesn't get picked up entirely, this post ends up inspiring some people to make some more cool mods that everyone can enjoy! I absolutely love the ideas and mods that other people have come up with so far on this site. :mrgreen:

User avatar
King of Worms
Posts: 4753
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Oblivion/Skyrim-esque Follower NPCs

Post by King of Worms »

Companions is what the game needs, its too big and lonely.

I can imagine a very basic solution, like the companion being a pacified enemy. He does not attack you but attacks enemies. Plus he follows you. From there it could build up.

Set the agression level (passive, agressive)
Set preffered weapon or range (bows, magic, weapons)
Follow/wait
Use companion inventory
Equip, clothing

And indeed after that add a depth to the relationship

Background
Companion quests etc..


Plus

Non human companions. So you can tame a tiger, bear. Or summon other beasts...

Its such a huge area to work on. And I believe it will be fun and rewarding system for the content creators and players as well.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Oblivion/Skyrim-esque Follower NPCs

Post by Ralzar »

After installing the Archeologist mod I actually often experience a light version of this.

As an example: I travel through the wilderness. I run into a knight. He gets passified by Etiquette. I decide to rest.
During the night, an orc ambushes me, but my new knight firend protects me and we kill him together.

I've uesed Etiquette pacified human mobs a bunch since I installed this mod and have been thinking "if only I could get them to follow me."

All you would really need would be for the AI to try to get close to you but not attack. ANd to make them hostile to everything that is hostile to the player.


This could be used for other stuff, like a necromancer build that summons skeletons, ghosts and zombies.
Or a nature wizard who summons wild animals.
Or an animal companion for a ranger type. Being able to have your own pet bear or tiger would be awsome :D Or pet rat? :P

Edit: haha, me an KoW posted basically the same thing at the same time.

User avatar
4nt
Posts: 20
Joined: Sun Oct 13, 2019 6:47 am
Location: Earth (duh C:)

Re: Oblivion/Skyrim-esque Follower NPCs

Post by 4nt »

Writing this as an addendum to my OP

Given how large Daggerfall is as well, perhaps the parent mod should also probably come pre-packed with some followers that you can alter through their own scripts or outright remove from the mod if you wish, as well as some sellswords and the like generated by the parent mod in every town settlement in the game that you could hire for assistance to compensate for how spread out the pre-packed NPCs might be. As for where the pre-packed NPCs that come with the initial mod should probably be found, I'd suggest both towns (primarily inns within said town) and outside of dungeons related to the main quest line to ensure that there's a good likelihood that they'll be found.

As for custom NPCs made by other modders, their locations should be for the mod authors to decide (meaning there will probably need to be another parameter that determines which region and location in said region they should spawn in).

The follower NPCs should also probably have their names written above their character sprites as well, just like their life and mana bars (even if they aren't in your party), to ensure that you don't miss them when you enter a town and find them inside a tavern and the like. Otherwise, they'd be pretty easy for players to miss.
Last edited by 4nt on Thu Oct 31, 2019 5:36 pm, edited 1 time in total.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Oblivion/Skyrim-esque Follower NPCs

Post by Ralzar »

The natural place to hire NPCs to follow you would be the Fighters Guild. So, if possible, the best solution would be that the NPC at the entrance who has no function was changed to a shop for followers. In most Fighter Guilds he's even a guy with a money bag, so it looks right.

Image

User avatar
4nt
Posts: 20
Joined: Sun Oct 13, 2019 6:47 am
Location: Earth (duh C:)

Re: Oblivion/Skyrim-esque Follower NPCs

Post by 4nt »

Aye, that'd be a really good spot to hire mercenary sellswords. Maybe inside of temples, you could also hire generic mages that could help you as well.

And perhaps you could use some of those locations to place some custom NPCs as well since the authors would know that people would most likely be going there to hire sellswords and the like in the first place, making them more likely to be found.

Any other locales for other typical classes? For example, I'm not too sure where you'd place potential rangers and archers for hire.

User avatar
King of Worms
Posts: 4753
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Oblivion/Skyrim-esque Follower NPCs

Post by King of Worms »

Quite standard place to hire thr companions are the inns

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Oblivion/Skyrim-esque Follower NPCs

Post by Ralzar »

King of Worms wrote: Fri Nov 01, 2019 12:02 pm Quite standard place to hire thr companions are the inns
True, all the wannabe d&d heroes allways meet in a tavern :D

l3lessed
Posts: 1409
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Oblivion/Skyrim-esque Follower NPCs

Post by l3lessed »

Who ever gets to this, look into the the enemymoter script and the enemysenses script.

Here is the specific routine that decides where enemies move based on what data the enemysenses script is sending. This could be reworked to provide a switch for initiating a new getdestination switch that would tell a pacified enemy/follower to follow a player, just as an enemy does when they detect the player as an enemy.

Code: Select all

void GetDestination()
        {
            CharacterController targetController = senses.Target.GetComponent<CharacterController>();
            // If detouring around an obstacle or fall, use the detour position
            if (avoidObstaclesTimer > 0)
            {
                destination = detourDestination;
            }
            // Otherwise, try to get to the combat target if there is a clear path to it
            else if (ClearPathToPosition(senses.PredictedTargetPos, (destination - transform.position).magnitude) || (senses.TargetInSight && (hasBowAttack || entity.CurrentMagicka > 0)))
            {
                destination = senses.PredictedTargetPos;
                // Flying enemies and slaughterfish aim for target face
                if (flies || IsLevitating || (swims && mobile.Summary.Enemy.ID == (int)MonsterCareers.Slaughterfish))
                    destination.y += targetController.height * 0.5f;

                searchMult = 0;
            }
            // Otherwise, search for target based on its last known position and direction
            else
            {
                Vector3 searchPosition = senses.LastKnownTargetPos + (senses.LastPositionDiff.normalized * searchMult);
                if (searchMult <= 10 && (searchPosition - transform.position).magnitude <= stopDistance)
                    searchMult++;

                destination = searchPosition;
            }

            if (avoidObstaclesTimer <= 0 && !flies && !IsLevitating && !swims && senses.Target)
            {
                // Ground enemies target at their own height
                // Otherwise, short enemies' vector can aim up towards the target, which could interfere with distance-to-target calculations.
                float deltaHeight = (targetController.height - originalHeight) / 2;
                destination.y -= deltaHeight;
            }
        }
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Oblivion/Skyrim-esque Follower NPCs

Post by Ralzar »

What I think would be a "easy" way to do this.

Make the follower a quest.

You talk to the hiring NPC, like the FG guys I posted above.

He gives you a list of avaialble classes. These are actually quests called Warrior, Barbarian, Archer etc that uses the exisitng quest selection window.
(Alternatively, he just gives you a random companion quest.)

The quest starts with the quest attempting to withdraw the requisite amount of gold from you.

The quest spawns a humanoid mob of the specified class, he is aggressive towards all enemy categories and runs a script that makes him try to approach you.

The quest allways checks if the follower mob is in existence. If not, it spawns the mob again. This solves entering/leaving dungeons/houses and fast travling.

Once the quest times out, you get a text popup describing the follower leaving and the follower mob despawns.
Alternatively, if the follower dies, you get a popup describing it and the quest ends.


(This could also be done without AI script change. The quest simply respawns the mob every time it is too far away or on a timer. Then just auto-pacify the mob. It will not attack all humanoid enemies though.)

Post Reply