# A course on SFO

By DavidW - v1.0 6/17/2024

This is a course on (and documentation for) 'SFO', a large function library and modding environment for Infinity Engine games, written and maintained by DavidW. Part 1 explains what SFO is, how to install it, how its modding environment works, and how to read its function documentation. Part 2 is a partial guide to some of SFO's more widely useable functions. Part 3 is an even more partial guide to the 'SFO-LUA' subset of SFO's functions, which all deal with UI editing. Parts 2 and 3 are written to be read in order, but sections should mostly be readable independently.

- Part 1: SFO basics
  - Chapter 1.1: Introduction to SFO
  - Chapter 1.2: Getting Started
  - Chapter 1.3: Navigating the Function Libraries
- Part 2: Some Useful SFO Features
  - Chapter 2.1: lib_fn, lib_tools, lib_ietools, lib_sfo: Basic Tools for Programming
  - Chapter 2.2: ALTER_EFFECT, and an introduction to functional programming and anonymous functions
  - Chapter 2.3: lib_array: better handling of WEIDU array data
  - Chapter 2.4: lib_2da: better handling of 2-dimensional array data
  - Chapter 2.5: lib_2daq: speed-optimized access to in-game 2da files
  - Chapter 2.6: lib_include and lib_sugar: smoother mod structuring, and syntactic sugar for WEIDU
  - Chapter 2.7: alter_script and disjunctive_substitution: tools for script and dialog editing
  - Chapter 2.8: lib_struct: introduction to the struct paradigm
- Part 3: A Partial Guide to SFO-LUA
  - Chapter 3.1: ui_extra_spells - more space for priest/wizard spells
  - Chapter 3.2: ui_spell_system - bespoke allocation of spells
  - Chapter 3.3: ui_virtual_class - reorganizing the display of classes and kits
- Appendix: Formal Documentation
  - SFO and SFO-LUA functions
  - IE structures
  - Legacy listing of SFO 1e functions