publish lua-script mod
Hi,
I have a lua script mod adding to ns2 original Bot.lua and when publishing it and loading the 2 scripts I get a consistency error.
I've found the 'ConsistencyConfig.json' and noticed it runs a check on all lua files.
So, how do I proceed to succeed with publishing a mod expanding lua files?
Is it maybe a server setting I'm missing?
I have a lua script mod adding to ns2 original Bot.lua and when publishing it and loading the 2 scripts I get a consistency error.
I've found the 'ConsistencyConfig.json' and noticed it runs a check on all lua files.
So, how do I proceed to succeed with publishing a mod expanding lua files?
Is it maybe a server setting I'm missing?
Comments
Yes, by default all of the Lua files are parse by the consistency hash-er code. This is a good thing, and I strongly recommend you not try to make exclusions for any files. You need to create a sub-directory in the 'Natural Selection 2' directory, NOT the 'ns2' directory. This folder is the root folder for your mod.
So, if you want to make any changes to the Lua files, place them in a folder named 'lua' within your mod's directory. When running a dedicated or listen server, this will ensure any clients are using the same code as the server, thus passing consistency checks.
<a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=118717" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=118717</a>
I'll see if I can get my small mental bots to load on my server without editing the standard Bot.lua
Maybe that thread will teach me something.
Cheers
Restoring Bot.lua and publishing this mod ends with (hosting local server):
[Error: Mod '68d9a87', doesn't contain a valid title]
and the mod won't load (well, doesn't respond to setbots command in console at least).
[Error: Mod wasn't available]
Will I have to release this work as free files for server-people to install manually backing up Bot.lua like I do?
(I plan to release the sourcefiles anyway but it would be nice to 'publish' the bots for easier access)
Any ideas?
PS
Consistency issue was solved using "ignore" in 'ConsistencyConfig.json'
"ignore": [ "lua/Bot.lua" ]
I think..