publish lua-script mod

ASAODENASAODEN Join Date: 2003-12-17 Member: 24467Members
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?

Comments

  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    The Bot.lua file is a helper for BotPlayer. This also is a server-side change as the Bots are treated as fake clients. If you made changes and are attempting to run it on a client AND connect to a non-modded server you will get that error.

    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.
  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    Also, see this thread

    <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=118717" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=118717</a>
  • ASAODENASAODEN Join Date: 2003-12-17 Member: 24467Members
    Thanks McGlaspie,

    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
  • ASAODENASAODEN Join Date: 2003-12-17 Member: 24467Members
    Editing original file [ns2/lua/Bot.lua] makes it all work ok.
    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..
Sign In or Register to comment.