2020-08-02 05:24:29 -04:00
# NPCs Go Home #
2020-08-25 03:25:33 -04:00
2020-10-04 02:44:53 -04:00
A no-longer-lightweight fork of [OEA's Lightweight Lua Scheduling ](https://www.nexusmods.com/morrowind/mods/48584 ) version 1.1 (I implemented most of the changes from 1.2 though)
2020-08-02 05:24:29 -04:00
## Things I've Added, Changed or Fixed ##
2020-10-04 02:44:53 -04:00
### The "Big" Stuff ###
- NPC "homes"
- Outside NPCs who have homes (local cell that contains their name, i.e.: NPC Fargoth and cell "Seyda Neen, Fargoth's House") are currently paired with the inside cell of their home
- Other NPCs are configurably paired with local public houses (Inns, temples, and guildhalls of their faction)
- Option to move NPCs into their home rather than disable them
2020-10-04 04:14:48 -04:00
- Working on a better variety of positions in cells
2020-10-04 02:44:53 -04:00
- Moved NPCs persist on save/load
### Other Stuff ###
2020-10-04 04:14:48 -04:00
- Timer for updating everything, configurable interval
- Disabled NPCs are reenabled even if the option to disable NPCs is off
2020-08-25 03:25:33 -04:00
- Silt Striders and pack guars are disabled as well
- Inclement weather toggle removed, in favour of dropdown with "None" option
2020-10-04 02:44:53 -04:00
- Travel agents, their silt striders, and configured races/classes optionally stay in inclement weather
2020-08-25 03:25:33 -04:00
- When locking doors, cells that contain NPCs of any class on the ignore list are left alone
2020-10-04 04:42:53 -04:00
- Cells that are >= 67% (configurable) one faction will be public, if that faction is on the ignore list
- Cells of player joined factions are also public
2020-08-25 03:25:33 -04:00
- Additionally, NPCs in those cells can still be interacted with
- Cells with no NPCs are not locked
- Ignore list now supports NPC class and faction. Any interior cell with an NPC of
ignored class or faction will not be locked, or have its NPCS disabled.
2020-08-02 05:24:29 -04:00
2020-10-04 04:27:06 -04:00
### Debug / Devel Stuff ###
- data/positions.lua contains positions used for NPC placement in homes and public houses
- it's tedious work, so I haven't done many, so I've added debug some debug keybinds to help:
- ctrl + c prints to mwse.log position data sorta properly formatted for positions.lua
- alt + c prints to mwse.log all the current runtime data, found in common.runtimeData
- includes: public houses and homes found for NPCs: cells that NPCs will be moved to, needing position data
2020-08-02 05:24:29 -04:00
## WIP ##
2020-10-04 02:44:53 -04:00
- Currently NPCs without a home are moved into local cells with matching faction, or a random public cell
2020-08-25 03:25:33 -04:00
- NPCs are classed based on the worth of their equipped items, and inventory
- NPC worth is a table of: equipped items worth, inventory items worth, barter
gold and if a merchant with a cell, the worth of items in containers in that
cell that the NPC sells is added, and the total of all calculated values
- Public houses are classed based on the worth of NPCs in the cell
2020-08-16 20:10:14 -04:00
## TODO ##
2020-10-04 04:14:48 -04:00
- Move non-faction NPCs who don't have homes to temples or inns based on their "worth"
- Pick temple for the poorest NPCs, or classed inns based on NPC/inn "worth"
2020-08-24 02:54:58 -04:00
## Known issues ##
2020-10-04 02:44:53 -04:00
- ~~If NPCs in a town are moved, and the player moves far away from that town before they're moved back, then
saves and reloads, those NPCs will probably stay moved.~~ should be fixed
2020-10-04 04:14:48 -04:00
- It's probably one big bowl of spaghetti