Marine Bot 0.97.3b change log FIXED instant crash to desktop in FA versions 2.9 & 3.0 on map ctisdps_mexico due to the explosion on light bulbs (originally in FA 2.5 the large light bulbs on this map exploded if someone shot at them but in newest versions this makes the game crash to desktop, now there's a patch that gets automatically activated in any version above 2.8 and that removes the explosion, the bulbs can still be destroyed to make the area dark just the explosion isn't there anymore) FIXED bot being able to waste claymore mine on maps where is this explosive required for the map goal (in MB0.96b there was introduced a new behaviour where the bot reads game entities during map load and checks whether the FA specific Search and Destroy entity requires the claymore mine so that bot doesn't foolishly use the mine on regular waypoints all around the map but this feature was locked only for maps with prefixes sd_ and sdtc_, now it's done during loading on all maps so this behaviour will be correctly activated no matter the map name e.g. even on ctisdps_mexico) Added two client commands 'wpt timeincrease' and 'wpt timedecrease' allowing you to fine tune the waypoint wait time (they have aliases 'timeinc' and 'timedec' and the argument they accept is the team ID for which you want to do the tuning, no argument given means the time tuning will be done for both teams, the steps at which is the time changed are either by 5 or 10 seconds that depends on current time value where a time below 60 seconds will be changed by 5 and a time equal or over 60 seconds will be changed by 10) FIXED bot being able to enter the same path again when it starts and ends on the same junction (rare occurrence because usually there aren't many paths that start and end around the same cross waypoint, still it's a bug that got to source code in version 0.96b as a result of code optimization to make MB be less demanding on CPU usage by not calling path navigation function upon reaching a cross waypoint, this however led to clearing crucial variable and allowed bot to pick the same path again in such case) FIXED autowaypointing not signing the waypoints at times (autowaypointing should always set the "built-in auto waypointing" string to the author's signature and erase the 'modified by' signature but this didn't work if you started on fresh map with no previous waypoints, now the system will correctly remember that you've activated autowaypointing so the signatures will be set right, this memory lasts till the moment you change or restart the map) FIXED navigation in cramped space (if there was a sequence of two waypoints with a range below 20 units and the second one was either a crouch or a prone one then the bot didn't slow down and sometimes missed that waypoint and/or got stuck on nearby obstacle due to that, now the bot will slow down properly to achieve required precision in navigation) Improved unstuck behaviour (when bot gets stuck and has to reset navigation he searches for any nearby waypoint besides those on the list of 5 lastly visited waypoints but if there are multiple such waypoints that are actually also unreachable - close and on same level and fully visible but behind impassable object like a line of pillars for example - the bot may enter a loop where he keep switching between those other waypoints in a try to reach them and can stay stuck forever, now these other waypoints are correctly processed through the previously visited ones so the bot shouldn't get into the loop anymore, this should also free some of the truly lastly visited waypoints and allow the bot to return back the same way that he got to his current location) Added optimization to waypoints and paths save functions (both now first sort the list of used waypoints/paths so that all deleted waypoints/path are at the end and then trim the list to last valid - i.e. not deleted - record, this means there won't be saved and next time loaded and processed any deleted waypoints/paths that may have been at the end of the list, e.g. you've created total of 120 paths but then you've erased 5 of them for some reason so when you save the waypoints there will be stored only 115 existing paths; this again helps to keep low system resources to run MB) Changed client commands 'wpt printall' and 'pathwpt printall' (both now accept argument 'reset' that gets you back to the start of the list without having to go through rest of the pages) Added client command 'wpt changenumber' that allows you to set a new index for any waypoint on the map (the alias is 'changeindex' and the two arguments this command takes are the new index and the index of a waypoint for the change where the second argument can be omitted if you are standing close to any waypoint, this command basically swaps the indexes of any two waypoints including the deleted ones which allows you to sort the list of all waypoints at your will - e.g. move all cross waypoints to the beginning of the list) Added client command 'pathwpt changenumber' that allows you to set a new index for any path on the map (the alias is 'changeindex' and the two arguments this command takes are the new index and the index of a path for the change where the second argument can be omitted if you are standing close to any waypoint where is at least one path, this command swaps the indexes of any two paths including the deleted ones which allows you to sort the list of all paths at your will but typically to fill the blanks in the list) FIXED bug in assigning the move speed when having to drop from the ledge or low wall or to lower level in general (when the bot reached the edge he slowed down so much that the unstuck code incorrectly treated that as being stuck and usually made the bot jump which often led to getting hurt) FIXED navigation reset because of not reaching next waypoint in time when having a broken leg (due to slow movement the bot sometimes wasn't able to reach his next waypoint in standard 5 seconds and incorrectly reset the navigation, now the bot will gain more time for that much like if he's moving crouched or in prone) FIXED 'pathwpt printall' command printing just the newly added paths in certain cases (if you used this command prior adding at least two new paths and then after the addition again then only the newly added paths were printed instead of the full list, also added intro message for the list so that this console output is clearly separated which improves readability) Changed console output for 'pathwpt checkproblems' command (mostly formating not to look that weird, but the bug report about a roadblock waypoint not being in a pair on a path got modified so that it's reduced only to a warning in cases when this waypoint is the last one on a one-way path to reflect the updates to navigation code done for 0.97b release, like all warnings this helps waypoints creator see whether such setup was really meant to be there) FIXED zero priority setting not disabling the wait time on the waypoint (due to fatal bug in original implementation some time in spring or summer 2024 and a need to revert the source code to state prior this feature, this got completely lost from the code, now this major mistake was finally noticed and the feature was reimplemented so you can use the trigger tag on a typical camper/sniper waypoint setup to make the bots wait or not wait at such waypoint based on game events that you link to this waypoint) FIXED occasional inability to detect open door (in not so common cases when the sliding door entity wasn't correctly aligned to particular axis in the 3D space - the door moved on both X as well as Y axis so for example not directly to left but also slightly to back - then the bot kept standing there until the set time limit to reach his next waypoint ran out which made the bot reset the navigation and start moving again, next there was problem with swing door that didn't open that much - e.g. large gate - bot wasn't able to detect open status and waited there till he ran out of the time to reach next waypoint which again resulted in navigation reset, now the bot will check for free space in front of him after 5 seconds of waiting in order to pass through the door in case they are open enough to allow it) FIXED bot trying to go prone when equipped with parachute (there's no message or anything, FA simply won't allow it, this partly broke the stance management, also made the bot go prone immediately at the moment he finally dropped the parachute no matter at which waypoint he was; actually it's FA that does it to all clients even human players who would try it) Improved ability to parachute (bot is now able to parachute even when he's crouched, next his ability to detect being in midair was reworked so now the bot is using the traceline to correctly determine whether he's really in midair or just stepping down from some low object, he's also able to detect cases when the parachute failed to open and will try to use it again, and the actions to throw the parachute away when he's back on ground have been slightly tweaked to make him handle this action a bit better, next if there is no wait time assigned on parachute waypoint the bot will now check height positions of that waypoint and the next one and based on the difference will set either short of long parachute use time - so a parachute waypoint being only slightly above the landing one means short parachute time in order to prevent not opening the parachute because of not enough time spent in the midair, and last the bot will now always treat any path with parachute waypoint as basically a one-way so he'll always head toward its end point - only the logic at parachute waypoint can make him return to path start point - it means you no longer have to use zero priority on the last waypoint on such path) Bot can now detect cases when his name gets changed by game engine and rename himself to have a unique name (Half-Life engine differs clients that would have same name by adding a number in round brackets in front of the name, typically happens on public servers; MB is able to detect this and pick different name from the list of names in marine_dog-tags.txt to rename himself soon after he is given this numbered name) FIXED bot being able to pick empty name or name with random characters if marine_dog-tags.txt file doesn't exist or has no names (in such case the function responsible for picking the name was wrongly able to access the memory address of the array that normally holds the bot names and return random nonsense that was stored there at that very moment) FIXED inability to disable send_presentation message (setting it to value 0 is meant to stop showing the message telling the clients the server is running Marine Bot, due to a bug this not only didn't work but it could potentially lead to dropping the clients from the server because of a "overflow on netchan" error, the server kept sending the message over and over again until the client simply crashed to title screen) FIXED possible issues with insecure console commands on Dedicated server (MB has a system to validate the data users input through the console in order to prevent processing nonsense values like for example a character instead of a number, some commands on DS weren't utilizing this system fully, there were used only the checks for validity but then the final value was gathered using the old insecure way instead of getting it from already processed and validated data from the check itself, now all DS commands are fully changed to the secure system used for console inputs) Added 2 new bug reports and 3 warnings for 'wpt checkproblems' (a bug report that points to cross waypoints that can trap bots - either solitary one with no connection or a cross waypoint where are only inbound paths but no outbound one, next a bug report pointing to a badly created sniper spot where is missing a wait time setting - using the strict argument can reveal even sniper spot that is missing both the wait time as well as aim waypoint but this can lead to false positives too, next is a warning pointing to a cross waypoint with just one connected waypoint where is starting only one-way path or multiple such paths, next is a warning pointing to a badly set range setting that reaches into solid object however this warning is available only with the strict argument because it can result in many false positives, and last is a warning - only with the strict argument - that points to a waypoint where is set wait time for either team but there isn't any path for that team on this waypoint so such wait time is unused and shouldn't be set at all) Added new argument 'strict' for 'wpt checkproblems' command (allows you to run a more thorough check to find problems that are normally - without the argument - skipped because they may result in many false positives, currently available only in case of the check for issues with cross waypoints, issues with a sniper waypoint, a check for bad range setting, and lastly a check for unused wait time, other checks do not utilize this yet) FIXED printing formatting for waypoints and paths check for problems commands when 'bugsonly' argument was used (there's a system of limiting the number of printed issues to only 22 lines in order to fit the output into the console, especially needed for old WON game client, due to counting issues flagged as a warning - aren't printined in case you use the 'bugsonly' argument - the output didn't use all 22 lines in case when there were many issues with the waypoints/paths and so you couldn't see some of the bugs, now the system will always correctly utilize up to 22 lines no matter the argument you use) FIXED repair function 'wpt repair disabledwaittime' unable to fix the issue if it was present for both teams on the same waypoint (to have a wait time and a zero priority set for one team on a waypoint is nonsense as the zero priority disables the waiting, which is the reason for having this repair function in MB but this function was able to fix the bug only for one team per one call so you had to use it twice to repair this issue fully) FIXED bot being able to see through solid models such as trees, trucks or tanks (bot has to be able to see and attack enemy through some transparent objects such as fence, window or glass in general but various game models that are added to the map when the engine builds the world at map load do use same function and properties which allowed bots to attack enemy that was hidden behind say a tank, bots simply were able to see through all these models, now there is kind of exception to remove the models from those transparent objects so the bots will no longer see and attack enemy hidden behind these models) FIXED potential crash due to trying to write a issue to error log in case the error log couldn't exist yet (the crash was possible in case you'd try to log something at the very first moments when MB was still scanning the folders to detect its position within the game installation, in the release build this was most probably impossible but using the source code to compile a development build and adding some custom logging this was possible because the logging function didn't test whether the log is accessible or not) Added client command 'pathwpt makecopy' (short alias is 'pathwpt copy' and this allows you to make a copy of existing path, index of a path that needs to be copied can be passed as argument to this command, if no argument is given and you aren't currently working on any path then the system will try to find the first path on nearby waypoint to make a copy of it, the copy will have all properties and waypoints of the original path) Changed 'check_ranges' feature (now it automatically checks the range for possible obstacles and uses color coding to differ waypoints with bad range setting, this means that if the range reaches into or through a wall for example then the two beams that show the range will start flashing with red and yellow colors, if the range is fine they remain white as they were until now, however this can be a false positives in times - for example a waypoint with large range on a hillside or stairs etc. with steep slope, also some game entities like func_illusionary remain undetected despite being solid and blocking movements) Changed client command 'wpt delete' (now it allows additional argument where you can specify waypoint number to be deleted, this is useful when you want to or need to work remotely - e.g. in cramped area with multiple waypoints and paths, option to have no argument where it will delete nearby waypoint remained unchanged) Changed the behaviour on ignore_enemy path (now if the bot reaches a sniper waypoint with wait time then he will switch from searching for enemy in limited range - i.e. 300 units only - to searching for any enemy that is in the range of his weapon to allow him guard that position correctly, moving along the rest of the path is unchanged and keeps the limited range to search for enemy) FIXED potential problem with some breakable game objects (on one of 3rd party maps for DoD 1.3 are some crazy objects with health values way over 100k points and one that doesn't take any damage despite its properties say so, bots that got stuck on them stayed there forever in a try to destroy them, now there's a new condition that tells the bot to ignore any object that has over 5000 health points where typical object has about or less than 100) Added new argument 'strict' for 'pathwpt checkproblems' command (allows you to run a more thorough check to find problems that are normally - without the argument - skipped because they may result in false positives, a warning about suspicious start of one-way path has now been made available only by using this argument) Added 2 new bug reports and 2 warnings for 'pathwpt checkproblems' (a bug report about 2 waypoints long path that starts and ends at the same cross waypoint, next is a bug report pointing to a path that has another waypoint besides the starting and ending one connected to a cross waypoint at its start or end - e.g. the first two waypoints connected to the same cross waypoint, a warning that is available only by using the strict argument that points to path with length of at least 3 waypoints and that starts and ends at the same cross waypoint, next is a warning through the strict argument that points to a path that has one of its "inner" waypoints connected to a cross waypoint other than the cross waypoint that is at its start or end - typically a badly setup transition point through some junction) Changed waypoints debugging console message "<>***No waypoint to head to - clearing previous waypoints history!" (now it reads "<>***No waypoint to head toward from waypoint #%d -> Navigation RESET" where the "%d" is replaced by waypoint number where the bot encountered this problem, previous availability in 'debugwaypoints' and 'debugstuck' is increased by 'debugcross', also message will be logged to MB error-log if either of these three commands is active, if neither is active no logging happens so standard game or dedicated server aren't affected by that) Added option to use priority 1 & 2 settings on the use waypoint to make the bot maintain the game entity connected to this button either activated or deactivated (basically this is upgrade of previous system that worked only for door connected to a button, now this will allow also a button that is connected to other game entities like for example a light, same as before by default a priority 1 means the bot will activate the button keep it activated and priority 2 means the bot will deactivate it and keep it deactivated, however multiple buttons connected to the same light won't work as currently there isn't any way to get to the data needed for that, so unlike the buttons that operate the door the other game entities like lights will work with only a single button, at least for the time being) Added new waypoint repair command 'unused_wait_time' with alias 'unusedwaittime' (allows you to easily fix any waypoint where is set wait time for a team that cannot reach this waypoint, use 'wpt repair help' for the details, this repair function is also part of the general 'masterrepair' routine now) FIXED "wpt repair disabled_wait_time" command (if you used invalid argument - e.g. non existing waypoint - then this worked like if you didn't use any command and this repair function was called for all waypoints, now this will give you error message and nothing will be done to the waypoints) Changed client command 'wpt reset' (now any of its 4 arguments can be a valid waypoint index, this is useful in cases when you need to or want to work remotely) Bot will now use map based visibility data to target enemies by default (bot will first filter out all enemies that are out of range for his current weapon - like he did till now - but then he will call to game engine to get data about all potentially visible players and finally then he will use the tracelines to determine truly visible enemy to engage in combat, this not only prevents bots from being able to attack enemy from other map section through the skybox but also reduces the system resources needed for the bots to track all possible enemies) Added 'use_mapvisdata_targeting' as a Dedicated and Listen Server commands (by default it's turned on, allows you to activate or deactivate the use of data about potentially visible entities that the game engine gets from the map file to improve bots ability to target enemies, this is sort of a static switch - a persistent setting that stays set the way you choose for the whole time the server is running or until you change it again, it doesn't get reset on map change) Added option to use MB Dedicated server commands in the marine.cfg file in the Binding/commands section (for example if you add a line addcommand "mbot usemapvisdatatargeting off" then you'll deactivate this feature that is by default turned on, it must be a full valid command which means it has to start with either m_bot or mbot otherwise it won't work at all, standard client game commands cannot be used because the client - i.e. you - doesn't exist yet during map loading) FIXED bug in 'pathwpt checkproblems' command (one counter that is needed for correct path checking didn't get reset which could cause incorrect error message printing to the error-log file, and if development build was used then it crashed to desktop; the error message in question was "LinkedListError @ Check Paths For Problems for path no. !!!") Added 'dont_use_carryitem_behaviour' as a Dedicated and Listen Server commands (by default any bot that is carrying a goal item such as a briefcase has a limited aggression and attacks only enemy that gets in 200 units radius around him but this command allows you to disable this behaviour and make the bot behave as if he didn't carry any item and make him attack any visible enemy, this command is a standard switch that lasts only for duration of the map, map restart or change to different map will reset it back to disabled state which means the bots that carry goal item will return back to standard limited aggression behaviour, on Listen server - i.e. Create/New game - there is also an alias 'botdontusecarryitembehaviour' to match other bot setup commands) FIXED possibility to pick again the same path the bot is already moving on at a cross waypoint (bot does already drop the priority of waypoint with such path down below lowest priority to avoid choosing it but due to heavy randomizing involved in the choice mechanism and combined with quite specific setup of waypoints on a junction in question the bot was still able to pick such waypoint and so reuse the same path repeatedly, now there's been added a mechanism to give bot up to 10 tries to choose different waypoint and so avoid using the same path again) FIXED inability to correctly target a breakable object under certain conditions (when aiming at such object the bot needs to get this target to pretty narrow view cone, but if the breakable object was down below the bot - e.g. a sewer or vent cover where the bot was standing on it - bot wasn't able to reach given aim limits thus couldn't start shooting and destroy such object, there already was a exception for a case when similar object was above the bot, now this exception was extended to include also objects that are below the bot so in both cases the bot will loosen these limits a little in order to pass that strict aiming check and destroy such object)