Author Topic: Host Bot  (Read 32588 times)

Offline {Lance}

  • Sappers
  • ******
  • Posts: 888
    • View Profile
Re: Host Bot
« Reply #15 on: August 19, 2015, 01:07:25 PM »
For those that have been following Hostbot work,  I've posted the source to a complete re-write of iL's hostbot in the Mods section in the Hostbot thread:  http://forum.war2.ru/index.php/topic,1256.msg21239.html#msg21239

It includes step by step instructions on how to use it,  but if you cant already host, its not for you.  Its for those that CAN host and who want to help new players get games going.  Or if you know how to develop, extend it to do whatever you want.

This is my makeshift "TODO" List. 
* = 100% Complete
~ = Functional but not yet used in a bot command (Partially Complete)

* Optimize code and make it FAR more extensible/flexible/easier to use (yes, I rewrote the ENTIRE bot,  theres not a single line left from iL's old bot,  this is a complete rewrite from scratch.  The only thing that remains is iL's GPL License header lol.
* replace Timer with LongTimer (miliseconds to seconds since Timer sux ass with a 65K limit)
* replace nncron with autoit.
* create new InGame
* autohost games for new players
* add banning and kicking based on slots
~ Make Log() log to file AND the bot owner.
~ add a tVb game type
~ add a FFA game type
~ add feature to allow player to setup all the settings
~Allow any BUILT IN map to be played by giving each map an assigned # that cooresponds to the number of up/down arrows in the built in maps dir.
« Last Edit: August 19, 2015, 01:11:02 PM by {Lance} »
Dk At hall is cause I started with temple at start and didn't need the castle . Not a hack .  I wouldn't bother editing a ss btw

^---- Dellam doesnt hack!  See, even by his own admission, no hack!!  LMFAO.

Offline Player

  • Axe Thrower
  • ****
  • Posts: 484
    • View Profile
Re: Host Bot
« Reply #16 on: August 19, 2015, 04:10:18 PM »
Good stuff man.

Offline GaNzTheLegend

  • Best War2 Player Ever
  • Ogre Mage
  • ********
  • Posts: 1745
  • #1 on: Kali, Heat, Zone, Kahn, GameStorm, Bnet, RU
    • View Profile
    • Kali Hall Of Fame
Re: Host Bot
« Reply #17 on: August 20, 2015, 04:23:30 PM »
hostbot has latency too high today.
« Last Edit: August 20, 2015, 04:29:10 PM by GaNzTheLegend »
Kali IGL Stats

Offline I hate naggers

  • Ogre Mage
  • ********
  • Posts: 2345
    • View Profile
Re: Host Bot
« Reply #18 on: August 20, 2015, 04:29:36 PM »
iz ther a rejoin between hosted games?

Offline {Lance}

  • Sappers
  • ******
  • Posts: 888
    • View Profile
Re: Host Bot
« Reply #19 on: August 20, 2015, 06:14:39 PM »
Sometimes it loses UDP capabilities not sure why.  I noticed while watching it today when it autocreated a game that iL's "Note" bot told it that port 6112 was closed.  So,  I rebooted it just tell it "/msg ef_hostbot reboot" and it was fixed.  It just needed to rejoin the server.  I allow anyone to reboot it,  but a reboot will only work if the bot is not in a game.  Otherwise it'll just say the bot is busy.

I'm also adding the ability for anyone to start the Autocreated games.  That is,  those owned by EF_Hostbot.  While watching it,  I noticed players asking each other how they could start it.  It also has the ability to kick/ban players,  but I dont think I'll add that feature to the autocreated games.  Just games where the owner is anyone other than EF_Hostbot.  So far I'm the only one that has actually used the kick/ban commands which I think is a good thing lol.  Maybe its better that people dont know that command even exists haha.
« Last Edit: August 20, 2015, 06:18:32 PM by {Lance} »
Dk At hall is cause I started with temple at start and didn't need the castle . Not a hack .  I wouldn't bother editing a ss btw

^---- Dellam doesnt hack!  See, even by his own admission, no hack!!  LMFAO.

Offline {Lance}

  • Sappers
  • ******
  • Posts: 888
    • View Profile
Re: Host Bot
« Reply #20 on: August 20, 2015, 06:19:35 PM »
iz ther a rejoin between hosted games?

There isnt,  but I think this is a good idea.  I think I'll add that in.
Dk At hall is cause I started with temple at start and didn't need the castle . Not a hack .  I wouldn't bother editing a ss btw

^---- Dellam doesnt hack!  See, even by his own admission, no hack!!  LMFAO.

Offline iL

  • Administrator
  • Ogre Mage
  • *****
  • Posts: 1653
    • View Profile
Re: Host Bot
« Reply #21 on: August 22, 2015, 02:51:03 PM »
So, as i see currently working bot is a demonstration of it's potential, perfect result of programmer work.

Anyone can start game on 1 map: gow with 2 speeds: ef and f, melee.

What are your plans for that bot project for future?
- Do you plan to continue hosting it on your server?
- Do you plan to add other maps (as i see - 1 more line per map into Event_WhisperFromUser)? gow bne, chop, nwtr, gsew, etc?
- Also to let players select melee or tvb?
- Would be possibly useful to add different speeds: faster, normal or w/e. Easy to add and i don't see any harm from that.
« Last Edit: August 22, 2015, 02:53:31 PM by iL »
Need help to translate War2Combat to German, French, Italian, Polish or another language: http://forum.war2.ru/index.php/topic,4728.0.html
Please, contact me if you are interested in that.

Offline {Lance}

  • Sappers
  • ******
  • Posts: 888
    • View Profile
Re: Host Bot
« Reply #22 on: August 23, 2015, 06:08:14 PM »
The plan was to create a base that others could pick up and modify themselves.   I have plans to keep hosting it from my server until its no longer needed either because there are other people hosting  bots or hosting for all users is somehow fixed. I dont think either of those will ever happen so for now I plan to keep hosting it.  I have been working on some other map settings as well as tvb/ffa map types.  All of the code for making map selections is complete.  So adding new maps, settings, etc is just a matter of finding the time to add them in.  Its nothing more than cut/paste/modify existing code so its pretty easy to do.  I will be updating the source in the mods forum sometime this week with a newer version that has some more preset maps as well as all of the new features I added last week (that can all be used with my current bot).
Dk At hall is cause I started with temple at start and didn't need the castle . Not a hack .  I wouldn't bother editing a ss btw

^---- Dellam doesnt hack!  See, even by his own admission, no hack!!  LMFAO.

Offline {Lance}

  • Sappers
  • ******
  • Posts: 888
    • View Profile
Re: Host Bot
« Reply #23 on: August 31, 2015, 02:39:17 AM »
The EF_HostBot has been updated with the following new commands:

Preset Suggestions are accepted,  I have 1 already (gowcomps) and am at a point where I can make more if people think it's necessary.

Here are some examples of how to use the bot as a PLAYER.  These are not as userfriendly as I'd like, but I dont think it can be simplified any further.  The best plan I could come up with are "Presets".  I have 1 example of a "Preset" called "gowcomps".

The settings of a game can by changed by sending the bot a list of commands in this order as seen below:
/msg EF_HostBot MapName Speed AutoStartTime GameType NumOfCPUs MapResources FixedOrder OnePeon GamePassword

Valid values for MapName:  gow, gowbne  (yes more maps can be added quickly now, takes about 5 mins to add a map, but I only plan to add Built in War2Combat maps.  If it's not built in, I wont add it)
Valid values for Speed: ef, f  (more are possible, but why? lmao)
Valid values for AutoStartTime:  1 to 15
Valid values for GameType: Melee, FFA, TvB, UseMapSettings
Valid values for  NumOfCPUs: 0 to 4 (I may increase that later)
Valid values for MapResources: High, Low, Default
Valid values for FixedOrder: Yes, No
Valid values for OnePeon: Yes, No
Valid values for Password: Anything you want.

Defaults to Gow Old EF with a Time of 5 mins
/msg EF_HostBot gow

Gow Old F with a time of 5 minutes
/msg EF HostBot gow f

Gow Old EF with a time of 3 minutes
/msg EF_HostBot gow ef 3

Old Gow on F with 0 CPUs in TVB on Low resources Format that will start in 5 Mins  (NOTE: If you try to add CPUs to a TvB game, it will tell you that you cannot do that.)
/msg EF_HostBot gow f 5 TvB 0 Low

Old Gow EF that has 2 CPUs on Low res and the game will start in 10 mins
/msg EF_HostBot gow f 5 Melee 2 Low

Gow BNE F that starts in 5 mins
/msg EF_HostBot gowbne

Gow BNE EF that starts in 5 mins
/msg EF_HostBot gowbne ef

Gow BNE EF That starts in 3 mins
/msg EF_HostBot gowbne ef 3

and so on.  There are lots of different combinations now that users have full control over pretty much all of the settings.

The 1 preset I have is this and it allows numeric argument:
Defaults to GowBNE EF with 4 CPUs and starts in 5 mins
/msg EF_HostBot gowcomps

Same as above but with only 1 CPU
/msg EF_HostBot gowcomps 1

Same as above but with only 2 CPUs
/msg EF_HostBot gowcomps 2

Same as above but with only 3 CPUs
/msg EF_HostBot gowcomps 3

Same as above but with only 4 CPUs
/msg EF_HostBot gowcomps 4
Dk At hall is cause I started with temple at start and didn't need the castle . Not a hack .  I wouldn't bother editing a ss btw

^---- Dellam doesnt hack!  See, even by his own admission, no hack!!  LMFAO.

Offline mousEtopher

  • Administrator
  • Ogre Mage
  • *****
  • Posts: 2065
    • View Profile
    • War2.me
Re: Host Bot
« Reply #24 on: August 31, 2015, 05:24:50 AM »
That's sweet. I can make a page about the hostbot on the site with all the info on how to use it that you can link to from the profile or w/e if you think that'd be helpful.
squeak!

Offline {Lance}

  • Sappers
  • ******
  • Posts: 888
    • View Profile
Re: Host Bot
« Reply #25 on: August 31, 2015, 09:48:01 AM »
Thats likely a decent plan as the profile isnt really big enough and a /help command would probably be to long to view in such a small screen
Dk At hall is cause I started with temple at start and didn't need the castle . Not a hack .  I wouldn't bother editing a ss btw

^---- Dellam doesnt hack!  See, even by his own admission, no hack!!  LMFAO.