mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
improved documentation of ESM::Script member variables
This commit is contained in:
parent
1ca0cc4988
commit
acb728195f
@ -23,29 +23,8 @@ public:
|
|||||||
|
|
||||||
struct SCHDstruct
|
struct SCHDstruct
|
||||||
{
|
{
|
||||||
/* Script name.
|
/// Data from script-precompling in the editor.
|
||||||
|
/// \warning Do not use them. OpenCS currently does not precompile scripts.
|
||||||
NOTE: You should handle the name "Main" (case insensitive) with
|
|
||||||
care. With tribunal, modders got the ability to add 'start
|
|
||||||
scripts' to their mods, which is a script that is run at
|
|
||||||
startup and which runs throughout the game (I think.)
|
|
||||||
|
|
||||||
However, before Tribunal, there was only one startup script,
|
|
||||||
called "Main". If mods wanted to make their own start scripts,
|
|
||||||
they had to overwrite Main. This is obviously problem if
|
|
||||||
multiple mods to this at the same time.
|
|
||||||
|
|
||||||
Although most mods have switched to using Trib-style startup
|
|
||||||
scripts, some legacy mods might still overwrite Main, and this
|
|
||||||
can cause problems if several mods do it. I think the best
|
|
||||||
course of action is to NEVER overwrite main, but instead add
|
|
||||||
each with a separate unique name and add them to the start
|
|
||||||
script list. But there might be other problems with this
|
|
||||||
approach though.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// These describe the sizes we need to allocate for the script
|
|
||||||
// data.
|
|
||||||
int mNumShorts, mNumLongs, mNumFloats, mScriptDataSize, mStringTableSize;
|
int mNumShorts, mNumLongs, mNumFloats, mScriptDataSize, mStringTableSize;
|
||||||
}; // 52 bytes
|
}; // 52 bytes
|
||||||
|
|
||||||
@ -53,9 +32,16 @@ public:
|
|||||||
|
|
||||||
SCHDstruct mData;
|
SCHDstruct mData;
|
||||||
|
|
||||||
std::vector<std::string> mVarNames; // Variable names
|
/// Variable names generated by script-precompiling in the editor.
|
||||||
std::vector<unsigned char> mScriptData; // Compiled bytecode
|
/// \warning Do not use this field. OpenCS currently does not precompile scripts.
|
||||||
std::string mScriptText; // Uncompiled script
|
std::vector<std::string> mVarNames;
|
||||||
|
|
||||||
|
/// Bytecode generated from script-precompiling in the editor.
|
||||||
|
/// \warning Do not use this field. OpenCS currently does not precompile scripts.
|
||||||
|
std::vector<unsigned char> mScriptData;
|
||||||
|
|
||||||
|
/// Script source code
|
||||||
|
std::string mScriptText;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm);
|
||||||
void save(ESMWriter &esm) const;
|
void save(ESMWriter &esm) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user