As a lot of you might have heard, I’ve been working on these mythical things called the rulesets again, but nobody actually seems to have a clear idea of what they’re for. So time for some history.
When I first started OpenXcom, one of the issues I ran into was how to structure all that valuable game logic. Should I just write it all up? Extract it from GEOSCAPE.EXE? Hardcode it in? Load it dynamically? All of it looking like a lot of work.
Then I thought of how the community loves tweaking. Things like XcomUtil and Ufo Extender are really popular by just letting you tweak little things like changing the starting base layout, giving Skyrangers a weapon pod, making Laser weapons more useful, etc. And there’s all those “game modes” people come up with to change things up. It’d be great if I could accomodate all of that easily. So I came up with rulesets.
OpenXcom uses rulesets to define all the game elements. There is a base UFO Ruleset that defines all the countries, crafts, weapons, base facilities, items, aliens, armors, UFOs, etc, etc. Something like this:
- type: STR_AUSTRALIA
- type: STR_BRAZIL
- type: STR_GENERAL_STORES
- type: STR_SKYRANGER
So if you want to tweak something, you just edit it and modify a value or two. But boy, that’d become a real pain to maintain, having to make your own versions of that big old file just to tweak a value or two. So I decided to make them modular, so that you can combine various rulesets as you please, and they only need to have the things that change. So if you wanted to make a super Interceptor that could detect everything and fly really fast, you’d just need this:
- type: STR_INTERCEPTOR
Or a Super Stingray launcher that would fire a million missiles a second:
- type: STR_STINGRAY
Or a Super Pistol that would nuke the whole map:
- type: STR_PISTOL_CLIP
And if you combined it all, you’d get something like this: