Parsing order of '.lua' files

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
Remy
Craftsman
Posts: 111
Joined: Wed Sep 05, 2007 5:24 pm
Contact:

Parsing order of '.lua' files

Post by Remy »

Okay, I know there's a 'lua_manifest' in 'globals' which gives the order of most of the base lua files, but my question is about those not listed and any that happen to be in the dungeon's folder.
In which order do 'global.lua', 'startup.lua', and 'objects.lua' get parsed in base? And in dungeon directories, I know both 'startup.lua' and 'objects.lua' files are parsed - are there any others that happen automatically? And in what order?
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

In base, it's first global, then startup.
In the dungeon, only startup.lua, objects.lua and then dungeon.lua are parsed.
(I think it's in that order, but I might be wrong)
Other files should be put in a manifest in your dungeon's startup.lua in order to be considered.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Joramund is correct. :)
base parses global.lua, startup.lua, then objects.lua.
A dungeon parses startup.lua, objects.lua, then dungeon.lua.
Remy
Craftsman
Posts: 111
Joined: Wed Sep 05, 2007 5:24 pm
Contact:

Post by Remy »

Thank you!
Post Reply