this project has a couple of goals:
- break lich into groups of files
- prune deadcode
- create a way forward for development
- provide a bin
gem
- use more gems to do the heavy lifting instead of own-rolled code
My previous attempts at a complete rewrite have been seriously hampered by MapDB's absolute necessity to navigate the game world in a reasonable manner, and the fact than any Lich API can be called within it. Without a way to isolate and refactor we will never be able to improve.
backwards compatibility with all systems and features is not a design goal
- the
Script
class is a trueThread
object Script.run
returns a handle to theScript
instance- scripts have
exit_codes
like processes in *nix environments - scripts use significantly fewer threads (has taken my average playing session from 30% memory usage to 18%)
- scripts are currently not "pausable"
- significantly fewer tight loops
wait_while
accepts atimeout:
keywordwait_until
accepts atimeout:
keyword;autostart
can optionally useYAML
to spin up supervisor trees
;autostart
is brittle for a variety of advanced use cases (like a Supervisor tree), but still supported unless a autostart/
directory is added to your cabal (lich) folder.
When an autostart/
directory is present, it instead uses YAML
.
my autostart/
dir for example:
autostart/
├── _global.yaml
├── ondreian.yaml
├── pixelia.yaml
└── szan.yaml
_global.yaml
is a special file that runs before character specific files, it's service-friendly (like Redis).
Example _global.yaml
:
gems:
- Olib
scripts:
- services/log
- alias
- infomon
- env
Notice that you can also specify gems
to require, which happens before any scripts
are launched!