Alright, so I figured I would explain my new script organization format before I upload them, just so people can know what to expect, and offer criticism/advice.
The basic idea behind the structure is that scripts that effect specific things should be in specific folders. In addition the different "systems", as I call them, each get their own folder. And finally there is a special folder (called functions) where I store different functions that are shared between multiple scripts, so that a simple script_environment call can be used instead of a copy/pasting them into multiple locations. This new use of "functions" means that almost all of my scripts are much shorter than they were previously, and, additionally, allows for easier creation of more scripts in the future. The current complete list of scripts and organization is;
- scripts
- base
- on-death.lua
- on-time.lua
- roses-init.lua
- building
- civilizations
- level-up.lua
- noble-change.lua
- resource-change.lua
- classes
- add-experience.lua
- change-class.lua
- learn-skill.lua
- level-up.lua
- events
- flow
- liquid.lua
- random-surface.lua
- random-unit.lua
- functions
- building.lua
- civilization.lua
- class.lua
- entity.lua
- event.lua
- item.lua
- map.lua
- misc.lua
- tables.lua
- unit.lua
- wrapper.lua
- item
- create.lua (differs from the base create script in only that it has a duration argument which deletes the item after a certain number of ticks)
- material-change.lua
- projectile.lua
- quality-change.lua
- subtype-change.lua
- tile
- material-change.lua
- temperature-change.lua
- unit
- attribute-change.lua
- body-change.lua
- counter-change.lua
- propel.lua
- skill-change.lua
- trait-change.lua
- wrapper.lua
I am, of course, open to criticism/discussion. At this point I am fine with changing things around if those in the know think it would be better, but after I put out this release I am really hoping to stick to a single convention for all future work.
I do have to decide where best to include "system" files. That is to say, if you want to use the class/civilization/event system you need a corresponding file classes.txt/civilizations.txt/events.txt. I suppose I could have the scripts check in multiple locations for each, but where should they check?