Jump to content

An idea i created to make skyrim ai more realistic


SolitudeAeturnus

Recommended Posts

So i came up with this idea in early 2012 and wrote it down, haven't looked at it since then and decided i might aswell post it here, someone may get a kick out of it, be inspired/improve upon it or bring it to life, as you can see it draws alot of influence from the Sims games as i think in a way they have some of the best general ai i've seen.


alot of the things i wrote down aren't greatly explained or Coherent like adding the idea of traits specific to the npc (e.g. a rogue npc would be doing appropriate actions for a rogue), also note that this was just a small part of the idea i was planning on building on later by making it more elaborate and interesting.


one last thing, i think that if this is possible then maybe people could bring elaborate ai like this to great mods like frostfall where npcs react to the invading cold, and suffer the very same concequences the player does, i also know that for an idea like this to be possible it'd be extremely script heavy =(.


Citizen


Skyrim Bed find


Tired meter reaches full

find home bed

Path finding

sleep in bed

Leave bed when convienient



Skyrim food find


Food meter reaches full

how much food is left in home

if none buy food

if no money either work or steal food

Hunt for food

lower food meter after eating and add health




Hunting package


Decide if enough food

if for work and in hours

Decide if NPC has neccessary tools

move to hunting ground

Attack animal

Remove neccesary items from container



Rinse repeat



Either cook or move back to employer/buyer

Sell items to buyer

Remove items add coins






Cooking


Hunger meter

Does NPc have required items

Move to cooking pot

Cook food

Either eat food or sell food

If eat, remove hunger and add health






Brigand


Decide if neccesary equiptment is available

look for bandit area or hideout

Attack bandit

Take required items

Bring required items back to Commander/Employer

Remove items add gold






Getting tools


Decide if NPC has neccesary tools

Crafting

Buy tools






Crafting


Decide if neccesary tools are available

Does this NPC possess required materials

Move to Smelter and merge materials

Find Anvil and craft item

Improve item at grindstone in neccesary

Wear or sell required item.






Buy food package


out of food

make sure you have coins

choose nearest shop

Talk to Shop keeper

purchase food, remove money add food (depending on budget.)







Getting money (dependant on traits)


Out of money

Work for money

steal money

Sell items for money

store money or buy items



Drinking


Is NPC Thirsty or bored

Check the time (for alcohol.)

Find nearest legal drink source

move to drink source or buy drink

pick up item

move to table

drink




Drinking at the bar


What hour is it and is NPC bored

Move to bar

Talk to bartender

Remove gold add Alcohol

Move to Table Drink Alcohol (6 Sips then glass disapears.)

Interact with NPC

Pay Bard

Remove gold Bard sing song

Interact with NPC


"Talk to bartender

Remove gold add Alcohol

Move to Table Drink Alcohol (6 Sips then glass disapears.)"



Find Job


does NPC already have A job

Find nearest employer

walk to Employer

Talk to NPc

Add coins and contract (note)

Job Script added






Selling items


Check for sufficient items

Make sure items aren't neccesarities

Walk to selling spot

Look for buyers

exchange items for coins





Bored Mechanic


Things that decrease bored meter


Figthing (based on the amount of damage dealt and taken) or watching A fight (amount of time watching)

Drinking (amount of drinks and time spent)

Socializing (amount of people interacted with)

Working Extreme jobs (like hunting or briganding.)

Playing



Things that increase bored meter


Sleeping

Working (boring jobs.)

Talking with disliked people

Doing nothing

Eating






Hunger Mechanic


Things increasing hunger meter


Excercise (amount of stamina used up, every 10 stamina used up increases meter (base it off the amount of stamina used up not on the amount left over OR new stamina system.)

Drinking Alcohol

Losing Health

sleeping


Decreasing Hunger meter


Eating food

Drinking water

Health Potions







NEW STAMINA SYSTEM



Npcs start with around 100-200 stamina (or less or more depending on fitness.)

Actions only take up little Amounts of stamina


Power attacks around 3 stamina, standard attacks between 0.5-1.5 stamina

Sprinting around 0.25 stamina A second

Jumping 0.4 A second

You loose Around 0.017 Stamina for every second Awake

Eating makes you loose between 3-10 stamina (depending on portion size

Working makes you loose between 25-50 stamina

Drinking Alcohol makes you loose betwen 25-70 stamina (depending on amount.)

Crouching will increase your stamina loss from 0.017 to 0.035





While your stamina is over 85% you will gain around 1-5 stamina A second (depending on fitness.)

with 75% stamina it's decreased to 0.8-3.5 stamina A second

Below 50% it's decreased to 0.45-1.8 per second

at below 40% it's decreased to 0.15-0.40 Stamina per second

Below 30% it's not 0.09-0.13 per second

Below 10% You will pass out and gain 8 per second (For Gameplay reasons, use the "paralyze Effect")



While sleeping you'll gain 15% of you're stamina for each hour and A half (or 12% per hour.)

Drinking water will bring back between 10-18 stamina (not %)




-------------------------------------------------------------------------------------------


stamina perm set at 1-5


if 1


at full stamina decrease rate at 0.56

at 85% stamina decrease rate at 0.85-0.97

at 70% stamina decrease rate at 0.99-1.042

At 50% decrease rate at 1.15-1.35

at 40% decrease rate at 1.56-1.75

at 30% decrease rate at 1.96-2.34

at 10% player collapses for between 8-17 seconds (gaining 6 stamina A second)


USE PARALYZE SPELL


If anyone bothers with this stamina system i suggest creating 2 seperate stamina bars, one for current stamina

(Based off ATP system. maybe 2 minutes of inactivity recharges it to 98%, each time bar deteriorates max % reduced by 2 until npc/player rests), and another for overall stamina










Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...