8,119
edits
(Update Template w summary) Tags: Mobile edit Mobile web edit |
Paradox-01 (talk | contribs) mNo edit summary |
||
Line 290: | Line 290: | ||
'''Common mistake:''' | '''Common mistake:''' | ||
CJBO files '''need relative paths | A few CJBO files '''need relative paths for resources'''. Inserting only a file name will not work. Let us take consoles for example: A relative path to a console should look like this: "'''consoles/console_data.oni'''". The resources are stored in '''shared/console/''' but since the XML master file points to the starting folder via "../shared", it will be omitted in all actual resource paths. If you want, look a the files at [http://mods.oni2.net/node/299 demo project "lab"]. '''Doors''' and '''furniture''' also require relative paths. | ||
'''lab/lab.xml''' | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<Oni> | |||
<Level SharedPath="../shared"> | |||
... | |||
'''lab/Console.xml''' | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Oni> | |||
<Objects> | |||
<CONS Id="4695"> | |||
<Header> | |||
<Flags>Gunk</Flags> | |||
<Position>944.1944 -27 29.37764</Position> | |||
<Rotation>3.623707E-05 270 0</Rotation> | |||
</Header> | |||
<OSD> | |||
<Class>consoles/console_data.oni</Class> | |||
... | |||
|- | |- | ||
| <Environment> | | <Environment> |
edits