 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
26 int text = 0, nrofmsg = 0;
28 LOG(
llevDebug,
"Reading messages from %s...\n", filename.c_str());
38 while (cp >
buf && (cp[-1] ==
' ' || cp[-1] ==
'\t'))
45 if (
text && strncmp(
buf,
"ENDMSG", 6) == 0) {
47 LOG(
llevDebug,
"Warning: this string exceeded max book buf size:\n");
68 }
else if (strcmp(
buf,
"TEXT") == 0) {
70 }
else if (strncmp(
buf,
"CHANCE ", 7) == 0) {
72 }
else if (strncmp(
buf,
"TITLE ", 6) == 0) {
74 }
else if (strncmp(
buf,
"QUEST ", 6) == 0) {
76 }
else if (strncmp(
buf,
"FACE ", 5) == 0) {
82 }
else if (strncmp(
buf,
"MSG", 3) == 0) {
109 LOG(
llevDebug,
"done messages %s, found %d messages.\n", filename.c_str(), nrofmsg);
New face structure - this enforces the notion that data is face by face only - you can not change the...
One general message, from the lib/messages file.
size_t bufferreader_current_line(BufferReader *br)
Return the index of the last line returned by bufferreader_next_line().
@ llevError
Problems requiring server admin to fix.
AssetsTracker * m_tracker
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
MessageLoader(Messages *messages, AssetsTracker *tracker)
sstring title
The message's title, only used for knowledge.
sstring identifier
Message identifier, can be NULL.
const Face * find_face(const char *name)
#define HUGE_BUF
Used for messages - some can be quite long.
Base class to be informed of where an asset is defined.
int chance
Relative chance of the message appearing randomly.
T * define(const Key &name, T *asset)
Define an asset, erasing an existing one.
sstring add_string(const char *str)
Share a string.
How to Install a Crossfire Server on you must install a python script engine on your computer Python is the default script engine of Crossfire You can find the python engine you have only to install them The VisualC Crossfire settings are for but you habe then to change the pathes in the VC settings Go in Settings C and Settings Link and change the optional include and libs path to the new python installation path o except the maps ! You must download a map package and install them the share folder Its must look like doubleclick on crossfire32 dsw There are projects in your libcross lib and plugin_python You need to compile all Easiest way is to select the plugin_python ReleaseLog as active this will compile all others too Then in Visual C press< F7 > to compile If you don t have an appropriate compiler you can try to get the the VC copies the crossfire32 exe in the crossfire folder and the plugin_python dll in the crossfire share plugins folder we will remove it when we get time for it o Last showing lots of weird text
virtual void assetDefined(const archetype *asset, const std::string &filename)
Function called when an asset is defined in a file.
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
sstring message
The message's body.
static char msgbuf[HUGE_BUF]
#define BOOK_BUF
Maximum message buf size for books.
virtual void load(BufferReader *reader, const std::string &filename) override
Load assets from the specified reader.
int buf_overflow(const char *buf1, const char *buf2, size_t bufsize)
We don't want to exceed the buffer size of buf1 by adding on buf2!
const Face * face
Face the message displays at in the knowledge dialog, NULL if no face defined.
@ llevDebug
Only for debugging purposes.
sstring quest_code
Optional quest code and state this message will start.
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn though Notes on Specific and settings file datadir Usually usr share crossfire Contains data that the server does not need to modify while such as the etc A default install will pack the and treasurelist definitions into a single or trs file and the graphics into a face(metadata) and .tar(bitmaps) file
char * bufferreader_next_line(BufferReader *br)
Return the next line in the buffer, as separated by a newline.