Official NS2 bot

1356

Comments

  • Heroman117Heroman117 Join Date: 2010-07-28 Member: 73268Members
    OH MY GOD YESS I HAVE MY OWN BOT!!!!!!!!

    If I ever met you in person I would give you a box of cookies and a non-homo hug.

    I can now finally order and fight my own personal army of twins and my legacy will forever be solidified in the history of the world.

    I'm assuming the bots team killing was only because cheats was on, turning on friendly fire, but still; the progress your making is excellent. The world needs more programming beasts like you; then we can have a perfect world were everything is automated and people live for 1000 years.
  • WombatLOLWombatLOL Join Date: 2011-11-30 Member: 136042Members, Reinforced - Shadow
    <!--quoteo(post=1894827:date=Jan 16 2012, 12:35 AM:name=Heroman117)--><div class='quotetop'>QUOTE (Heroman117 @ Jan 16 2012, 12:35 AM) <a href="index.php?act=findpost&pid=1894827"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->OH MY GOD YESS I HAVE MY OWN BOT!!!!!!!!

    If I ever met you in person I would give you a box of cookies and a non-homo hug.

    I can now finally order and fight my own personal army of twins and my legacy will forever be solidified in the history of the world.

    I'm assuming the bots team killing was only because cheats was on, turning on friendly fire, but still; the progress your making is excellent. The world needs more programming beasts like you; then we can have a perfect world were everything is automated and people live for 1000 years.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Omg how did u get it :O
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    Nice progress 'mate! Looking forward to seeing your updates.
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    edited January 2012
    <!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo--><a href="http://dl.dropbox.com/u/53107776/electric/Electric.zip" target="_blank">Download Electric</a><!--sizec--></span><!--/sizec-->

    Nothing fancy at the moment and this mod is a server-side mod. The bots attack will run to where their order, attack others with their primary weapon and look for health. Both visually and functionally, the bot hasn't changed much from the previous videos. After a ton of redos and refactoring, the bot framework now seems decent enough to starting to solidify and release to the public.

    The next build should come quicker and will hopefully include, basic weapon handling so that bots use weapons other than their primary, evolving, and weapon purchasing.

    <!--coloro:#F5DEB3--><span style="color:#F5DEB3"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Beginner's Guide<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->

    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 1.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Extract Electric.zip somewhere onto your harddrive
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 2.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Double-click <i>Electric-Server on ns2_summit.bat</i>
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 3.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Double-click <i>Run NS2 + Electric.exe</i>
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 4.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Create a new game on ns2_summit
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 5.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> From the console, run the command: <i>addbots 6</i>
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 6.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Six bots will now be in the game

    <!--coloro:#F5DEB3--><span style="color:#F5DEB3"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Marine Commands<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
    Use the <i>Follow me</i> command to become the leader of a bot
    <i>Lets move</i> to tell the bot to move to where your crosshair is pointing
    <i>Covering you</i> to dismiss the bot

    <!--coloro:#F5DEB3--><span style="color:#F5DEB3"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Console Commands<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>addbots</b> <i>num_bots [team_number] [classname]</i><!--colorc--></span><!--/colorc-->
    Adds num_bots to the game.
    team_number: Optional. The team the bot should join (1 for marines, 2 for aliens)
    classname: Optional. The class the bot should spawn as (e.g. fade, gorge, etc.).

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>removebots <i>num_bots</i></b><!--colorc--></span><!--/colorc-->
    Removes num_bots from the game.

    <!--coloro:#F5DEB3--><span style="color:#F5DEB3"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Advanced Usage<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
    Electric-Server.exe takes the same arguments that NS2's server.exe takes e.g. <i>Electric-Server.exe -map ns2_tram -limit 8</i>

    <!--coloro:#F5DEB3--><span style="color:#F5DEB3"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Customization With Settings.json<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
    Certain features in Electric can be customized. To enable custom settings do the following:
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 1.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Double-click <i>Electric\Natural Selection 2 User Data</i>
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 2.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Create a folder called <i>Electric</i>
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 3.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Inside that folder, create a file called <i>Settings.json</i>
    <!--fonto:Lucida Sans Unicode--><span style="font-family:Lucida Sans Unicode"><!--/fonto--><!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b> 4.</b><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc--> Enter your custom settings into <i>Settings.json</i>
    <a href="http://dl.dropbox.com/u/53107776/electric/Settings.json" target="_blank">Sample settings file</a>

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>Bot settings</b><!--colorc--></span><!--/colorc-->
    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>aggression</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    When false, bots will not engage or attack enemies. Default <i>true</i>.

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>attack</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    When false, bots will not attack enemies. They will, however, still chase them. Default <i>true</i>.

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>botNames</b> <i><array of strings></i><!--colorc--></span><!--/colorc-->
    The possible names that the bots will use.

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>debug</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    When true, displays debugging information. Default <i>false</i>.

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>preservation</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    When false, bots will not attempt to heal themselves. Default <i>true</i>.

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>Server settings</b><!--colorc--></span><!--/colorc-->
    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>autoPopulate</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    Bots will be added and removed from the server to maintain a minimum number of players. Default <i>false</i>

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>clientsCanModifyBots</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    If true, connected users can add, remove and change bot settings without requiring cheats to be on. Default <i>false</i>

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>minPlayers</b> <i><number></i><!--colorc--></span><!--/colorc-->
    When autoPopulate is true, the server will be kept populated to at least this many players. Default <i>0</i>

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>maxBots</b> <i><number></i><!--colorc--></span><!--/colorc-->
    The maximum number of bots that may be connected to the server at any given moment. If <i>autoPopulate</i> is <i>true</i>, this value will be set to <i>minPlayers</i>. Default <i>30</i>

    <!--coloro:#BCB2A0--><span style="color:#BCB2A0"><!--/coloro--><b>sharedVision</b> <i><true/false></i><!--colorc--></span><!--/colorc-->
    If true, both teams will be able to view the enemy's minimap.

    <!--coloro:#F5DEB3--><span style="color:#F5DEB3"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo-->Flaws<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
    Bots are not recommend for listen servers as NS2 doesn't seem to be optimized for virtual clients on listen servers.

    The movement paths lerks use are offset from the ground and the lerk can get confused sometimes if the paths cross on the horizontal plane e.g. if the lerk is on the bridge in summit, commanding it to fly underneath.

    <a href="http://dl.dropbox.com/u/53107776/electric/Electric.zip" target="_blank">Download Electric</a>
    <a href="https://github.com/DamienHauta/NS2Electric" target="_blank">GitHub Repo</a>
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    nice. I'm just wondering, why is there a second exe needed? there is no explanation what the different exe files on github do, nor is there any source for them.
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1896577:date=Jan 22 2012, 01:08 AM:name=Asraniel)--><div class='quotetop'>QUOTE (Asraniel @ Jan 22 2012, 01:08 AM) <a href="index.php?act=findpost&pid=1896577"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->nice. I'm just wondering, why is there a second exe needed? there is no explanation what the different exe files on github do, nor is there any source for them.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Run NS2 + Electric.exe is equivalent to natural selection 2/NS2.exe
    Electric-Server.exe is the equivalent to natural selection 2/Server.exe
    Electric-Server on ns2_summit.bat runs this command: Electric-Server.exe -map ns2_summit

    Curves/XlsToLua.exe converts Curves.xls to Curves.lua
    Mod/Reload.exe is <a href="http://www.unknownworlds.com/ns2/forums/index.php?s=&showtopic=116001&view=findpost&p=1896456" target="_blank">this</a>
  • Heroman117Heroman117 Join Date: 2010-07-28 Member: 73268Members
    edited January 2012
    I've got to say, your bots are so fun to play around with that the game as a whole is so much more entertaining for me. Even in their current primitive state the only thing I have a problem with is that I can't have a bunch of them ingame at once.

    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/H0iQY3MNJAU"></param><embed src="http://www.youtube.com/v/H0iQY3MNJAU" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
    Crappy quality thanks to new Nvidia driver breaking Windows Live movie maker
  • Electr0Electr0 Join Date: 2011-10-31 Member: 130337Members
    I know it's not recommended but how do i run it on a listen server like a normal mod without all those extra exe?
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1896805:date=Jan 23 2012, 04:24 AM:name=Electr0)--><div class='quotetop'>QUOTE (Electr0 @ Jan 23 2012, 04:24 AM) <a href="index.php?act=findpost&pid=1896805"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I know it's not recommended but how do i run it on a listen server like a normal mod without all those extra exe?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Use Run NS2 + Electric.exe and create a game like normal.

    Even for testing Electric out, I recommend you to run a dedicated server however. There's about a 10-to-one performance improvement over listen servers when playing with bots. When your done testing it out, just close the dedicated server window.

    Virtual clients on a listen server create huge amounts of choke when firing there weapons around other players, causing the game to grind to a halt. Bots must use these virtual clients to function so it only takes one or two bots in combat to make the game unplayable but when run as a dedicated server, you can smoothly play with 10 or more bots.
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    edited January 2012
    have anyone gotten this to work with gm overmind or is it not possable

    i guess another question is is it strictly lua? as i guess you could just over write the game files

    i know you said not to do this but im trying to figure out what the easiest way to do this would be with out having to run the exe.
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    For some reason, when I execute Step #3, Electric closes when NS2 runs.
  • NurEinMenschNurEinMensch Join Date: 2003-02-26 Member: 14056Members, Constellation
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1897318:date=Jan 25 2012, 10:27 AM:name=BJHBnade_spammer)--><div class='quotetop'>QUOTE (BJHBnade_spammer @ Jan 25 2012, 10:27 AM) <a href="index.php?act=findpost&pid=1897318"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->have anyone gotten this to work with gm overmind or is it not possable

    i know you said not to do this but im trying to figure out what the easiest way to do this would be with out having to run the exe.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Extracting Electric\Mod\lua into NS2GmOvrmind\Lua will likely work, I have not actually tried this however.

    <!--quoteo(post=1897318:date=Jan 25 2012, 10:27 AM:name=BJHBnade_spammer)--><div class='quotetop'>QUOTE (BJHBnade_spammer @ Jan 25 2012, 10:27 AM) <a href="index.php?act=findpost&pid=1897318"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->i guess another question is is it strictly lua?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The mod is done entirely in Lua, the exes are for convenience.


    <!--quoteo(post=1897556:date=Jan 26 2012, 05:21 PM:name=Flayra)--><div class='quotetop'>QUOTE (Flayra @ Jan 26 2012, 05:21 PM) <a href="index.php?act=findpost&pid=1897556"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->For some reason, when I execute Step #3, Electric closes when NS2 runs.<!--QuoteEnd--></div><!--QuoteEEnd-->
    This is normal if a command-line window pops up and closes quickly after the NS2 windows appears. All <i>Run NS2 + Electric.exe</i> does is launch <i>Natural Selection 2\NS2.exe</i> and then closes itself. It's not like the Radiance Server where it needs to keep running to work.

    If the dedicated server is closing when starting <i>Run NS2 + Electric.exe</i> then something weird is going on. Running vanilla NS2 through Steam and then connecting to the server would likely alleviate that problem.
  • Heroman117Heroman117 Join Date: 2010-07-28 Member: 73268Members
    Just curious since its been a little bit without a forum post, how are the bots coming along? They're so awesome already that I can't wait to see any additional progress that has been made.
  • WombatLOLWombatLOL Join Date: 2011-11-30 Member: 136042Members, Reinforced - Shadow
    This idea might be scrapped.
  • BiovfBiovf Join Date: 2012-01-27 Member: 142136Members
    edited February 2012
    <!--quoteo(post=1900088:date=Feb 6 2012, 06:11 AM:name=WombatLOL)--><div class='quotetop'>QUOTE (WombatLOL @ Feb 6 2012, 06:11 AM) <a href="index.php?act=findpost&pid=1900088"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->This idea might be scrapped.<!--QuoteEnd--></div><!--QuoteEEnd-->

    What do you mean?

    I was working in my own bot but Onos ate me came up with the awesome electric and after checking his code most stuff I was implementing he had already done.
    I picked up his code and started adding behavior from there, I'm hoping to have a trailer soon.
  • HarimauHarimau Join Date: 2007-12-24 Member: 63250Members
    edited February 2012
    Not even a playtester. It's gotta be a troll.
  • BiovfBiovf Join Date: 2012-01-27 Member: 142136Members
    edited February 2012
    <!--quoteo(post=1900225:date=Feb 6 2012, 02:51 PM:name=Harimau)--><div class='quotetop'>QUOTE (Harimau @ Feb 6 2012, 02:51 PM) <a href="index.php?act=findpost&pid=1900225"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Not even a playtester. It's gotta be a troll.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Agreed, I found it really odd but he could know something I that didn't :)

    Back to work then.
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    Is your code also on github?
  • BiovfBiovf Join Date: 2012-01-27 Member: 142136Members
    edited February 2012
    Not yet, I'm still going working on it...I tried to contact Onos ate me to know where he was going with his implementation but he hasn't been around lately...so for now I picked up on improving some of the basic behaviours, splitting the architecture to allow reactive and more deliberative behaviors.
    There's quite some work left to be done and for now I would prefer to not promise much . Again as Onos ate me did I'm following some articles from Ai Game programming wisdom 1/4 but also picked AI Game engine programming and the material published by Splash Damage and Guerilla games.

    I'll get back when I have something substantial to show.
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    OK cool. Just in case, if you create a fork of his project on github, it will be very easy for both of you to reuse code of the other. for example if he releases a new version and you want to base your work off of his one, you can just reimport his code and git will solve most conflicts. Same thing the other way around, if he likes parts of your code he can just import it.
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    edited February 2012
    im guessing this is not working with the newest patch?

    im trying to get it to work on mineshaft and all it does is say game is starting in 15 sec plus the ready room dosent work and the game freezes when i add a bot and have to reconnect just to get out of the stuck state

    game never starts!
  • BiovfBiovf Join Date: 2012-01-27 Member: 142136Members
    I'm going to check that tomorrow (I haven't updated the game in my development system, only in my laptop), I'll let you know by then.
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    edited February 2012
    did you find out anything im wondering if any of the files it replaces are just missing the rest of what is in those files and maby that is causing the problem.

    NetworkMessages_Server.lua
    NS2ConsoleCommands_Server.lua
    player_server
    settings and shared
    are alot bigger than the files that are in there

    is there a reason for this Script.Load("lua/dkjson.lua")
    in settings.lua
  • BiovfBiovf Join Date: 2012-01-27 Member: 142136Members
    I've just managed to get a break from my thesis, going to check it now.
  • WombatLOLWombatLOL Join Date: 2011-11-30 Member: 136042Members, Reinforced - Shadow
    No way am I letting this thread die.. BUMP BUMP BUMP BUMP BUMP BUMP BUMP BUMP BUMP BUMP BUMP BUMP BUMP

    BUMP

    Did I mention bump?
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    im guessing nothing is happening here or did it move to another thread some where?

    i would like to get some one to help me try and fix the problem with the bots.
  • Electr0Electr0 Join Date: 2011-10-31 Member: 130337Members
    So what's going on with this?

    There was a lot of progress made in a short time then it went quiet.
  • 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
    I've been wondering the same thing. I hope development hasn't ceased
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    noone is discussing it any more either.

    and im still having problems getting it to work with overmind
Sign In or Register to comment.