buldthensnip/docs/modding_101.txt
2013-06-08 16:27:07 +12:00

145 lines
4.3 KiB
Plaintext

Please read this before you attempt to make any mods or mod any existing mods.
Yes, the whole lot.
------------------------------------------------------------------------------
Please use this format for stuff:
pkg/<group name>/<mod name>/*
We can get away with using "base", but you can't.
The other directories of course are:
clsave/<group name>/<mod name>/*
svsave/<group name>/<mod name>/*
You can use a common name for these if you want,
but please stick to your group name.
Also, "pub" and "vol" are not valid group names, as you will find out soon...
------------------------------------------------------------------------------
ALL FILENAMES ARE CASE SENSITIVE.
If you find that they're not, they WILL be on my computer.
To prevent any issues, make sure all your filenames are fully lower-case.
THIS INCLUDES FILENAME EXTENSIONS!
------------------------------------------------------------------------------
There are libraries in the base mod!
Use pkg/base/lib_*.lua for them.
------------------------------------------------------------------------------
For security reasons,
you are only allowed to modify files in these directories:
Client only:
clsave/<group name>/<mod name>/vol/*
clsave/vol/*
Server only:
svsave/<group name>/<mod name>/vol/*
svsave/vol/*
Note: "vol" is short for "volatile".
You can also read them.
You ARE allowed to read these:
pkg/*
Client only:
clsave/<group name>/<mod name>/*
clsave/pub/*
Server only:
svsave/<group name>/<mod name>/*
svsave/pub/*
Note, it is advised that you DO NOT run client-local Lua scripts!
If you do, you open your mod up to an awful lot of cheating.
In fact, you should be very careful with ANYTHING in clsave.
If it's anything other than a config, you will have to sanity-check it.
------------------------------------------------------------------------------
Aside from maps, don't rip stuff from Ace of Spades,
unless you're doing it as an optional pack and as a separate download.
With that said, if someone sets up a good enough pack,
I would encourage you to use that for AoS data instead.
If you're taking on this task, please do the following:
- Include models/sounds from all versions where possible
- Denote stuff by the first version that uses it in this format:
pkg/<group name>/<pack name>/whatever/name-X.XX.whatever
For instance, shotgun.kv6 would be:
pkg/<group name>/<pack name>/kv6/shotgun-0.58.kv6
OR, if converted to PMF:
pkg/<group name>/<pack name>/pmf/shotgun-0.58.pmf
- I think that's it, really.
------------------------------------------------------------------------------
A quick template for a mod that uses a custom set of PMFs:
-- client_start.lua
loadfile("pkg/base/client_start.lua")(...)
--stick in your plugins here
-- main_client.lua (the actual client entry point)
DIR_PKG_PMF = "pkg/"..common.base_dir.."/pmf"
loadfile("pkg/base/main_client.lua")(...)
-- main_server.lua
loadfile("pkg/base/main_server.lua")(...)
------------------------------------------------------------------------------
Format support:
Maps:
- *.icemap: Iceball map format
- *.vxl: Ace of Spades headerless 512x512x64 VOXLAP map
- well, why *wouldn't* we support that?
Models:
- *.pmf: Point Model Format, designed for this game
- Might support *.kv6 in future, who knows.
Graphics:
- *.tga: Truevision Targa
- The loader is based on the assumption that RLE is line-by-line.
- The second version of the TGA spec asserts this.
- Greyscale images are NOT SUPPORTED.
- Interleaving is NOT SUPPORTED.
- Per-pixel attributes are NOT SUPPORTED.
- X/Y offsets are IGNORED.
- Extended TGA information is IGNORED.
Metadata:
- *.json: JavaScript Oriented Notation
- Hoping to support a simple line-by-line append-mode format, too.
Sounds:
- 8/16-bit *mono* *.wav. Stereo .wav will just be rejected.
- Hoping to get ADPCM support in there too.
- If someone can be bothered with libogg/libvorbis, *.ogg vorbis too.
- Maybe even some form of DFPWM, but that'll be for voice chat only.
Music:
- *.it: Impulse Tracker.
- This is via libsackit.
- We are not supporting any other module formats. Convert it to .it.
- WE ARE NOT USING SDL_MIXER FOR THIS
- Might possibly allow for *.ogg, too.
Video:
- Oh piss off.
------------------------------------------------------------------------------
TODO: more stuff