Jump to content

Welcome to Omni-bot Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!

Most Liked Content

#21475 "Scripting" 2.0

Posted by DrEvil on 21 March 2015 - 02:50 PM

Can you believe this bot has been around about 10 years now? I started this bot just before I left my game dev school in Florida in 2004 to exercise my passion and to build up experience that would help me get into the game industry. Not only was did this bot account for the primary demonstration that got me both of my industry jobs, it was fun as hell to work on(and still is really).


I know the community may by dwindled down to almost nothing these days given the age of these games and such, but as a developer who still has that passion, I am still working feverishly behind the scenes on the bot. Primarily this work has been in integrating the fantasic recast navigation system that is available on github, and pulling together and writing code that extracts map geometry from the bsp files and props of the map so that the raw collision geometry may be used automatically to build a properly automatic navigation mesh for the bot in real time. This includes rebuilding tiles of it when the location of things change and such. For some examples of this, see



This work has not been without major refactoring of many areas of the bot. After all, I'm 7-10 years more experienced(depending on which code) than I was when i wrote most of this code initially, so as I go I'm trying to simplify many areas of it as well.


Other than getting a nice automatically built navigation mesh(outside of possibly needing to set up tricky custom traversal links manually), my eye would then turn to the scripting system. In the domain of scripting I have an itch to take a radically different approach than what we've seen on the bot thus far. I wanted to air these ideas to get a feel about how the community(if there's anyone left), feels about this possibility.



Game Monkey script is still probably my favorite scripting language, syntactically and feature wise. The issue for me is that I suppose I've 'out grown' the appeal of interpreted scripting languages. The binding is often at least a bit annoying to maintain and interpreted languages in general are frankly very slow. In the history of Omni-bot itself, nearly all of the persistent crash bugs we've had over the years have been attributed to the garbage collection of the scripting language. Those types of bugs are hard to debug.


Option 1

One obvious option to at least address the performance aspect might be to switch to Lua JIT(just in time). This version of lua is actually JIT compiled, rather than interpreted, so that its performance is generally much better. My issue with this option is that frankly I'm not a big fan of lua, and performance isn't really my primary motivation anyhow.


Option 2

The preferred options in my mind are to stick with C++ code and use it for 'scripting'. MSVC 2013 community edition is free these days, and although it's not a small tool compared to like notepad++ or whatever you use to script with now, using 'native' code solves the performance issue, the binding complexity issue, and greatly simplifies the debugging by taking advantage of the high quality debugger that the tool already has. If I went this direction, I would do so still with coroutines/fibers(what GM calls threads) that still provide the great benefits of being able to write top down serial code, yield, wait, sleep, block for events, etc.



The biggest hurdle to work out with going to native c++ 'scripting' would be whether or not I can sandbox it enough where people cant code malicious stuff. That's one benefit of a scripting system that isn't so easily solvable in native scripting. If I can make the bot responsible for compiling the code(such as with http://runtimecompil...s.blogspot.com/), I could perhaps secure the code by disallowing linking with anything not provided with the bot(not even the c standard library)


Anyways I wanted to see if there was any feedback on the topic, especially from scripters themselves. To users the changes would basically invisible. The bot would load dlls or obj files rather than .gm scripts, to users any noticeable benefit would likely be in a significant cpu reduction.


Scripters would feel the brunt of this change. They would be writing and debugging their scripts in C++ using interfaces provided by the bot. 


This change is pretty far out, but I want to spark a discussion in the mean time. I plan to get the navigation improvements to a stable state first.




  • Niek, Mateos, Gramp and 2 others like this

#22286 bot.TargetBreakableDist

Posted by palota on 07 August 2017 - 08:48 AM

If you set bot.TargetBreakableDist inside OnBotJoin function, then bots will destroy all breakable objects which are closer than the distance.


Trigger regions are useful if you want to destroy only a few obstacles and don't want bots to shoot everything. For example, see fueldump.gm.

When a bot enters the region, bot.TargetBreakableDist is set to RegionTrigger.BreakableDistance.MaxBreakableDist.

When a bot exits the region, bot.TargetBreakableDist is set to RegionTrigger.BreakableDistance.MinBreakableDist.


Paththrough navigation is necessary for ladders or difficult obstacles. For example, see et_poker_b2.gm.


  • d00d, VargaTom and Mateos like this

#21828 Where to put Waypoints? o0

Posted by d00d on 18 December 2015 - 05:58 PM

You need three files for each map if you want decent bot behavior, all of which should be put into the nav folder:

  • mapname.gm
  • mapname_goals.gm
  • mapname.way

mapname.script files have nothing to do with Omni-bot. They are part of the map itself, but they are already inside the map's .pk3 file. You can delete them unless you are interested in making maps.


But be warned that the UJE guys usually do a lousy job on bot scripts. Most of the bot scripts they provide with their maps are pretty much useless and do not enable the bots to play properly. At least this was true for 95 % of the UJE scripts I looked at some time ago. Maybe they have a better scripter now.

  • Mateos, palota and kino like this

#21662 New version of Omni-bot for RTCW

Posted by palota on 01 September 2015 - 12:20 PM

The latest version of Omni-bot for RTCW and current waypoints are on GitHub.

Clone URL: https://github.com/j...rt/omni-bot.git

Branch: stable


Git repository is very big because it contains full C++ source code. Compiled binaries are located in folder 0.83/Installer/Files. File omnibot_rtcw.dll is for Windows. File omnibot_rtcw.so is for Linux. Folder rtcw contains scripts and waypoints.


You must also copy global_scripts folder from Enemy Territory or use SVN client to checkout url http://svn.assembla..../global_scripts


The mod is in the folder rtcw/game. You must copy it into "Return to Castle Wolfenstein" installation folder and then set fs_game parameter when launching the game.


  • d00d, Mateos and kino like this

#21599 8.4 omni-bot help on heavy weapons

Posted by palota on 17 July 2015 - 11:52 AM

It's not recommended to modify et_autoexec.gm.  It's better to create a new file et_autoexec_user.gm  for all your settings. The file should be in folder omni-bot/et/scripts.


If you want to disable panzer and flamethrower, add these commands to et_autoexec_user.gm:

WeaponTable.SetWeaponAvailability(CLASS.SOLDIER, WEAPON.PANZERFAUST, false);
WeaponTable.SetWeaponAvailability(CLASS.SOLDIER, WEAPON.FLAMETHROWER, false);
WeaponTable.SetWeaponTeamAvailability(TEAM.AXIS, CLASS.SOLDIER, WEAPON.MP40, true);
WeaponTable.SetWeaponTeamAvailability(TEAM.ALLIES, CLASS.SOLDIER, WEAPON.THOMPSON, true);

If you want to disable soldiers and you have the latest Omni-bot version from Assembla, add these commands to et_autoexec_user.gm:

Server.MinClassCount[TEAM.AXIS][CLASS.SOLDIER] = 0;
Server.MinClassCount[TEAM.ALLIES][CLASS.SOLDIER] = 0;

If you want to disable soldiers and you have Omni-bot version 0.84, you must modify MinClassCount values in et_autoexec.gm.

  • JohnDory, d00d and hellreturn like this

#21509 Lifts

Posted by palota on 22 April 2015 - 08:42 AM

Sphere region triggers are activated when center point is inside the sphere. The center point is usually not same as origin !

AABB region triggers are activated when bounding box intersects the region. The bounding box can be much bigger than entity and then the trigger is activated too soon.

All region triggers (OnTriggerRegion) must compare coordinates every frame. That's why it's better to use goto triggers (OnTrigger) which don't need any CPU usage.

  • d00d, VargaTom and Mateos like this

#21873 Waypoint for Teutoburg_Forest

Posted by Teuthis on 11 January 2016 - 08:08 PM

Here some screenies

Attached Thumbnails

  • image.jpeg
  • image.jpeg
  • image.jpeg

  • Mateos and Macchute like this

#20775 0.82 crashes + Jaymod 2.2.0 and Debian Wheezy

Posted by crapshoot on 23 November 2013 - 04:18 PM

0.83 has been released.

  • hellreturn and Mateos like this

#22282 Plant Goal with 2 use points

Posted by palota on 23 July 2017 - 07:28 PM

Edit the goal, then look towards the door and type command goal_setproperty coversplit. It will save your current rotation vector. Your position is not important.

  • d00d, VargaTom and Mateos like this