cabaletta / baritone

google maps for block game
GNU Lesser General Public License v3.0
6.9k stars 1.41k forks source link

Survival Mode #1175

Open SylveonBottle opened 4 years ago

SylveonBottle commented 4 years ago

". . . Because in this case, the [bot] will enter "Survival Mode" - or to use the more scientific name, the "OH FUCK SHiT FUCK NooOoo ImgonnaDie I Was sooo young.. Mode." . . . This mode doesn't give a shit to where the [goal] is, all it's doing is trying to survive." -CodeBullet https://youtu.be/tjQIO1rqTBE?t=489

This is pretty much similar to #1131 but without the "this is already in impact" bs.

Describe your suggestion

While this mode is definitely useful for getting the bot to not die, it's also to keep baritone from getting itself stuck in a bad place.

In this mode, Baritone should prioritise the player/bot's life above all else, completely ignoring the user's requested goal. This "mode" activates as a form of emergency, temporarily disabling the current pathing to get the fuck out of whatever situation it's in before returning back to the user's goal afterwards.

Regardless of what the bot is currently doing, in Survival Mode the bot will stop pause all current paths in order to protect itself.

Settings

Lingo: Safe block = The closest block with two air blocks above it. If none is found within ~5 blocks, try and path into a wall or create a pillar/bridge to step onto. Forcefully Path = Look towards the final goal and literally just walk forwards, ignoring the actual path. Sort of an emergency pathing incase something is causing the bot to move weird, such as flowing water.

#survivalmode Allows baritone to activate Survival Mode in case of danger. Note: Despite survivalmode being enabled, it won't actually do anything until baritone manually activated survivalmode. This setting just allows baritone to activate it.

#survivalmodeShouldSprint Regardless of `#allowSprint, this setting allows the bot to sprint while pathing in survival mode. This is preferable for situations like avoiding creepers. This is applicable when baritone is in survival mode, i.e. currently freaking out. Baritone returns to #allowSprint's current setting when the danger is over.

#survivalmodeShouldDisconnect 0/1/2 This lets the bot disconnect from the server. 0 = false, 1 = if on low health, 2 = always disconnect when activating survival mode. If possible, Baritone should display an error on the disconnect screen including what happened, and the position of the player. If 1, it should always be "[Baritone] Disconnected due to low health." If 2, it should explain what flag caused it to disconnect, i.e. "[Baritone] #survivalmodeFallenInLava 1603/16/2701". The location is just in case the user wishes to "save" the bot account on an alt. E.x. if the bot somehow fell into lava in the nether, the player can login with an alt, go to the lava source, build a quick platform before logging in with the first account and trying to get out.

#survivalmodeFire If the player is on fire, baritone should search the inventory for a waterbucket and (if found) place it directly downwards for a quick second, before picking it up and continuing with the path.

#survivalmodeFallenInLava If the player is in lava, baritone should attempt to place a water bucket somewhere nearby (above the player on the roof, on the side of a block - fucking anywhere it can really) and attempt to forcefully path itself towards the closest safe block. Afterwards, pick up the waterbucket.

#survivalmodeAvoidCreeper Regardless of pathing, regardless of #avoidance setting, regardless of anything else - if a creeper within explosion radius has activated it's explosion prep, set a goal to the creeper and invert path. This would be a good example of baritone pausing the player's goal temporarily. If baritone happens to path through a cave, and a creeper happens to be in front of the path - the moment the creeper begins to explode, baritone should get the fuck away from that thing. After getting out of range, it should disable survival mode and continue on its way that the player previously specified.

#survivalmodeAvoidTNT Same as #survivalmodeAvoidCreeper.

#survivalmodeExitWater If the bot is 1.) within water, 2.) isn't actively walking, 3.) is moving, then the bot should attempt to forcefully path to a safe block. This is an assumption that the bot is stuck in a water.

#survivalmodeFullInventory If baritone's goal is to mine and pickup blocks, and the inventory becomes full, Baritone should attempt to dispose of asitems listed in acceptableThrowawayItems. Assume that it's more important to pickup the required goal items than it is to keep throwawayitems (there's probably a lot of cobblestone)

#survivalmodeSprintPastHostiles Regardless of #avoidance and #allowSprint, Baritone should attempt begin sprinting if within ~5 blocks of a hostile mob or a fireball.

#survivalmodeAvoidPlayers Not currently applicable. I'd like for it to path away from players the moment a player is loaded in and then blacklist those chunks temporarily, but that would require #1165. For the meantime, enabling #survivalmodeAvoidPlayers and #survivalmodeShouldLog would result in baritone immediately disconnecting when finding a player (which would, of course, state in the disconnect reason where it logged out at. Good for #explore and finding player bases.)

#survivalmodeAvoidPhantoms If a phantom is within ~80 blocks, baritone should penalize pathing over blocks with open air above. This should get baritone to prefer pathing under trees, which should help against phantoms.

Context

The user is stupid. Not gonna lie. We're lazy fucks who need a bot to literally play minecraft for us. So, chances are, we're not really paying attention to what the bot's doing. And guess what? The bot's a little stupid, too. At least, it used to be - but with the additions of mob avoidance and not breaking blocks near liquids, it's gotten pretty good. I just think it could be a lot better to account for undesirable actions - or, rather, the user's lack of actions.

These settings should help the bot try to not get stuck in bad places, as well as add some necessary quality-of-life updates to baritone.

Final checklist

SpicyBigGithub commented 4 years ago

Stupid and pointlessly complex

SylveonBottle commented 4 years ago

Stupid and pointlessly complex

Your face is stupid and pointlessly complex

SpicyBigGithub commented 4 years ago

No harassment warning -1/1