jakecool19 Posted February 28, 2021 Report Posted February 28, 2021 (edited) This mod will be suspended for an indefinite amount of time, so I can focus on other projects. It is open source so feel free to pick it up if you want! Ever been playing single-player and wish you could hire people to do the tedious stuff for you? Ever been in a cave and see a locust nest surrounded by locusts and wonder, would it not be great to reprogram them? This mod gives you the ability to harvest locust corpses, and rebuild them to do things like farming for you. Basics & Controls All locusts can be deployed by shift right-clicking with them in your hand All locusts need energy(kilojoules). To give a locust energy shift right click with any flammable item in your hand that burns higher than 200 degrees(Peat does not work for the player for some reason, but support locust can use peat). Locusts lose energy over time and when doing tasks. Locusts will go dormant when out of energy or when they have nothing to do. If they cannot find something they want in a container, put something in a container, or get stuck they will go onto a failure cooldown for that particular AI.(Default 1 minute, can be changed in the config) Pick up a worker locust by shift right-clicking with an empty hand. Ctrl+right click a locust to see their work area for 3 secs Shift+left click to make the locust forget everything(preferably with bare fists lol) Shift+ctrl+right click to attempt to swap items with a locust if they can Right-click with a hammer to repair a locust. Memory Gear An absolutely essential item for using the locusts, the memory gear is used to record a work area, chest, barrel, and item pickup for locusts. Controls: Ctrl+right click two corners of an area to select it for locust work(if you need to select an interactable block use Shift+Ctrl+right click) To select a single point ctrl+right click the same block twice. Shift+right click to select a barrel or chest to use Ctrl+right click while not selecting a block to activate item recording mode. Place an item on top of it in the inventory to record it for locust pickup. (Similar to how you put linen on clothes to repair them) or press ctrl+right click again to cancel. Shift+left click to highlight the work area in the memory gear. Place a memory gear in the crafting grid and take it out of the output slot to clear its memory. Types of Reprogrammed Locusts Harvester Locust This locust will harvest crops, berry bushes, beehives(without breaking the skep), and reeds/harvestable blocks on farmland. It needs a defined work area to harvest and requires a knife in order to harvest. The player can give it one or select a chest for it to get knives from. Planter Locust This locust will plant seeds, bushes, and saplings from a given chest or if the player give them it. They need a work area and preferably chest defined. With no item pickup memory, they will plant all plantable things that can be found in their selected chest. With an item pick up defined they will only pick up the item defined and plant it if they can plant it. Collector Locust This locust will pick up items in its area and put them in its defined chest. They need a work area and chest defined. Without an item pick up defined they will collect all items and place them in their selected chest. With an item pickup defined they will only pickup that item and place it in the chest. Transporter Locust This locust will transport items from one chest to another. For it to work, the chest defined must be the chest they are taking from. Then a single point for the work area with a chest(shift+ctrl+right click the same chest twice with memory gear) is where they will put the items. Without an item pick up defined they will collect all items from the chest defined and place them in their selected chest. With an item pick up defined they will only take that item from the defined chest to the selected one. Crafter Locust This locust will complete knapping and clay forming projects for you. To use you need to define a single point for the work area, and preferably a chest for it to get clay from. Start and select a recipe for clay forming/knapping in the point and they will begin to do it. For clay forming, they will need clay either provided by the player or from their defined chest. Give them an item pick up to restrict what clay they can use. Apiary Locust This locust will squeeze honeycomb from their chest putting honey into their defined barrel and dropping the wax on the ground. They need a chest and barrel defined. Their item pick up is locked on honeycomb and cannot be changed. Dairy Locust This locust will milk lactating animals in their work area and pour the milk into a defined barrel. They need a selected work area and barrel. Their item pick up is locked on milk and cannot be changed. Likewise, they cannot swap items with the player. Support Locust This locust will refuel and repair themselves and other locusts in its work area. They need a work area defined and preferably a chest to get fuel from. WARNING: They will INDISCRIMINATELY use any item for fuel. Make sure you have nothing flammable that you want in their work chest. Miner Locust This locust will mine out their work area starting from the top working its way to the bottom. They need a pickaxe in order to work, a work area, and preferably a chest to get pickaxes from. WARNING: They will INDISCRIMINATELY mine all blocks in their work area, including blocks that need special tools, or cannot be picked up for example a static translocator. Only select a few layers at a time to mine so that nothing valuable is destroyed. They forget their work area when finished and start over if not finished and unloaded/reloaded from disk. Builder Locust This locust will place blocks in a single layer where there is no other block at. They need a flat 1 block layer work area, a defined chest, and an item pick up that is a block, in order to work. They will only place blocks in the air, nowhere else. They forget their work area when finished and start over if not finished and unloaded/reloaded from disk. Guard Locust This unique locust will attack hostile creatures that comes in range. It only does 0.5 damage by default and needs to be equipped with a longblade, spear, or other melee weapon to increase its damage. By default it will follow the player around and act as a traveling companion if it has no selected point, or if a point is selected it will stay there and guard. It can also be given a chest to get longblades from. All damage it does and kills it gets are by the player instead. Sawblade Harvester Locust Does everything the harvester locust does except it needs an axe instead of a knife, and can chop trees. Translocator Chests & Barrels These special chests and barrels allow locust to instantaneously teleport items to and from working locusts. In order to be crafted, they need a Hivemind gear which can only be obtained from locust nests. Clockmaker Additions As you would imagine the Clockmaker class has huge advantages over the other classes in this area. Their Technomancer trait gives them triple the chance to harvest a fully intact body from bronze and corrupt locust. Their Reverse Engineering trait gives them significantly cheaper alternative crafting recipes for the locusts, memory gear, and translocator chest and barrel. Other Changes/Tips & Tricks Bronze & corrupt locust now spawn in caves naturally(without a locust nest) Drifters, locust, and wolves will attack reprogrammed locust if provoked Locust nests will drop Hivemind gear when broken Bells will drop decapitated bell on death. Locusts can be harvested like animals for intact bodies Tip: Gemstones can be found from panning bony soil Tip: These locusts excel at doing simple and repetitive tasks, they have no intelligence and will not do things like rotate crops for you. Those logistics are up to you, the master hacker, to figure out. Tip: Try to keep locust paths as clear as possible. They can walk over fences and 2 block high walls. Remember the golden rule: K.I.S.S Tip: Locust can not use work areas, chests, or barrels that are in unloaded chunks. Tip: The config for this mod contains configurations for locust cooldown, max energy, energy consumption, and energy gain that can be changed. DISCLAIMER: While this mod can be used for multiplayer, it is intended for single-player and has only been tested in a single-player world. I have no server to test it on. If you do use it for multiplayer please let me know how it goes! Compatibility/Issues with other mods Guard locusts will attack hostile mobs from Cob Bandits, The Neighbors, and Wild Goblins Planter locust can plant seeds from Wild Farming and AR Cotton Harvester locust can harvest any block on tilled farmland that has the Harvestable block behavior Any mod that removes locusts from spawning will make this mod impossible to use in a pure survival scenario(you would have to cheat bodies in) Crafter locusts should be able to knap or clay form any recipe from any other mod. Known Bugs/Todo Player cannot directly fuel with peat Reverse engineering trait not showing up properly in handbook Hope you enjoy it, and as always please report any bugs or issues here. https://mods.vintagestory.at/show/mod/207 Disclaimer: Please post any bug reports, suggestions, and feedback on the forum page of this mod. Anywhere else, such as Discord, will be ignored! Edited January 24, 2022 by jakecool19 2 4 2 1
l33tmaan Posted February 28, 2021 Report Posted February 28, 2021 How on EARTH did you pull this off? Oh my god. This is so cool. Wow. 1
Andrew Chevakin Posted February 28, 2021 Report Posted February 28, 2021 (edited) Hello. I get crash when try to put locust. i tried harvester and planter. If i in creative mod then there is no crash. Running on 64 bit Windows with 8 GB RAM Version: v1.14.8 (Stable)28.02.2021 19:20:08: Critical error occurred System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта. в TemporalHack.ItemDeployBot.OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, Boolean firstEvent, EnumHandHandling& handHandling) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.TryBeginUseActiveSlotItem(BlockSelection blockSel, EntitySelection entitySel, EnumHandInteract useType, EnumHandHandling& handling) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.TryBeginUseActiveSlotItem(BlockSelection blockSel, EntitySelection entitySel) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.HandleMouseInteractionsBlockSelected(Single dt) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.OnFinalizeFrame(Single dt) в Vintagestory.Client.NoObf.ClientEventManager.TriggerRenderStage(EnumRenderStage stage, Single dt) в Vintagestory.Client.NoObf.ClientMain.TriggerRenderStage(EnumRenderStage stage, Single dt) в Vintagestory.Client.NoObf.ClientMain.RenderToDefaultFramebuffer(Single dt) в _jeEziyUSYl0BpbOxT46FYwj5VWL._IIIrDcgMyMKwpTkEZsHikpfl3dh(Single ) в _idIkJkIueHHf3Oz2WNlBdD0E1XR._DvzT6D0wN3fMakeuDyljJJ09hok(Single ) в _idIkJkIueHHf3Oz2WNlBdD0E1XR._V5piYzG7beYPldE6UVxY58dqacE(Single ) в Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e) в System.EventHandler`1.Invoke(Object sender, TEventArgs e) в OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp) в OpenTK.GameWindow.DispatchRenderFrame() в OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second) в _YrS2W1MoaeqC4xqH8ItdZB6vADN._8t1BmEWVlCT9mjx5M0vFIzU9tif(_7T00Rjby4si0wyEBez5dXNqLm7h , String[] ) в _ejKuc6cg0k8V39o8jDIzquyczbO._8t1BmEWVlCT9mjx5M0vFIzU9tif(ThreadStart ) Edited February 28, 2021 by Andrew Chevakin
jakecool19 Posted February 28, 2021 Author Report Posted February 28, 2021 2 hours ago, Andrew Chevakin said: Hello. I get crash when try to put locust. i tried harvester and planter. If i in creative mod then there is no crash. Running on 64 bit Windows with 8 GB RAM Version: v1.14.8 (Stable)28.02.2021 19:20:08: Critical error occurred System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта. в TemporalHack.ItemDeployBot.OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, Boolean firstEvent, EnumHandHandling& handHandling) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.TryBeginUseActiveSlotItem(BlockSelection blockSel, EntitySelection entitySel, EnumHandInteract useType, EnumHandHandling& handling) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.TryBeginUseActiveSlotItem(BlockSelection blockSel, EntitySelection entitySel) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.HandleMouseInteractionsBlockSelected(Single dt) в Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.OnFinalizeFrame(Single dt) в Vintagestory.Client.NoObf.ClientEventManager.TriggerRenderStage(EnumRenderStage stage, Single dt) в Vintagestory.Client.NoObf.ClientMain.TriggerRenderStage(EnumRenderStage stage, Single dt) в Vintagestory.Client.NoObf.ClientMain.RenderToDefaultFramebuffer(Single dt) в _jeEziyUSYl0BpbOxT46FYwj5VWL._IIIrDcgMyMKwpTkEZsHikpfl3dh(Single ) в _idIkJkIueHHf3Oz2WNlBdD0E1XR._DvzT6D0wN3fMakeuDyljJJ09hok(Single ) в _idIkJkIueHHf3Oz2WNlBdD0E1XR._V5piYzG7beYPldE6UVxY58dqacE(Single ) в Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e) в System.EventHandler`1.Invoke(Object sender, TEventArgs e) в OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp) в OpenTK.GameWindow.DispatchRenderFrame() в OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second) в _YrS2W1MoaeqC4xqH8ItdZB6vADN._8t1BmEWVlCT9mjx5M0vFIzU9tif(_7T00Rjby4si0wyEBez5dXNqLm7h , String[] ) в _ejKuc6cg0k8V39o8jDIzquyczbO._8t1BmEWVlCT9mjx5M0vFIzU9tif(ThreadStart ) Thank you so much for bringing that to my attention and for providing the crash log. I have released a hotfix that should fix it.
Devilofether Posted March 3, 2021 Report Posted March 3, 2021 Hey this looks amazing, but is there an interface, or a handbook entry at least?, because this is super complicated to try to memorize
Sniper Ely Posted March 3, 2021 Report Posted March 3, 2021 It's oddly unsettling how they hold weapons, i kind of love it ngl . They don't look like servient AI and seem like they will rebel if given the opportunity..How cool would that be....? "Master! We come for your blood! You slaver! Now die... *gets bodied by 10 locusts with random tools* " Good job... the guard one you can have as a pet is awesome!
jakecool19 Posted March 3, 2021 Author Report Posted March 3, 2021 21 hours ago, Devilofether said: Hey this looks amazing, but is there an interface, or a handbook entry at least?, because this is super complicated to try to memorize I just released a patch that should add a handbook entry called Hacking 101, that for the mean time should contain a copy and paste of the info here until I have a bit more time to make a more watered down game appropriate one.
DragooKnight11 Posted March 4, 2021 Report Posted March 4, 2021 (edited) There seems to be an incompatibility with XSkills, which prevents you from harvesting locust corpses. Edit: Using the XSkills locust harvesting skill properly (with a hammer) seems to use a separate looting table. Edited March 4, 2021 by DragooKnight11
DanaCraluminum Posted March 9, 2021 Report Posted March 9, 2021 (edited) Suggestions: 1. Tag a whole vein of ore (blocks on the diagonal are also counted), I don't think it is technically difficult to just "mine this whole vein" as it is static. Mining a whole iron vein of 500+ blocks is a living hell. 2. Charging station for them that holds 10,000kj for example, instead of wasting a huge pile of coal going nowhere, yeah, I mean locusts with 1500kj, where 500/2000kj goes to the void Edited March 14, 2021 by Craluminum
Robzilla Posted March 14, 2021 Report Posted March 14, 2021 I must be doing something wrong, does the crafter locust ONLY finish a pottery/knapping for your or will it continue doing the same one you initiate over and over again? Despite defining the one area, the chest to pull the flint, and the flint to pick up, it will only finish one I put down and will not do any more. Unless I completely misunderstood what the crafter does I am at a loss.
jakecool19 Posted March 14, 2021 Author Report Posted March 14, 2021 11 hours ago, Robzilla said: I must be doing something wrong, does the crafter locust ONLY finish a pottery/knapping for your or will it continue doing the same one you initiate over and over again? Despite defining the one area, the chest to pull the flint, and the flint to pick up, it will only finish one I put down and will not do any more. Unless I completely misunderstood what the crafter does I am at a loss. The crafter locust only finishes so you have to start a knapping/clayforming surface and select a recipe, and it will do the rest instantly. It does not need another rock to knap(it is made of metal and has a drill), but it does require clay in order to make clay items.
Killer-of-Lawyers Posted March 15, 2021 Report Posted March 15, 2021 Can you start a whole bunch of knapping projects in an area and have it go and finish them for you while you do other stuff, or do you have to keep watching it and placing the knapping projects down one by one?
jakecool19 Posted March 18, 2021 Author Report Posted March 18, 2021 On 3/14/2021 at 9:17 PM, Killer-of-Lawyers said: Can you start a whole bunch of knapping projects in an area and have it go and finish them for you while you do other stuff, or do you have to keep watching it and placing the knapping projects down one by one? Currently right now they can only knap in one spot, sorry.
jakecool19 Posted March 22, 2021 Author Report Posted March 22, 2021 Released a small patch, that gives guard locusts the ability to teleport if you are too far away.
Digitalr Posted May 28, 2021 Report Posted May 28, 2021 (edited) Uhm... May be i not understand something, but i cannot program hatvester locust to harvest reeds or honeycombs. I define working area (with memory gear),which contains dozen harvestable beehives and flowers around, put knife in the chest, define chest, deploy locust, charge it with stack of coal, and download memory. Locust take knife and... Sleep. Same things, if working area contains reeds. But, if working area have ripe berry bushes, this little bastard harvest berries and leave them on ground. What i do wrong? Edited May 28, 2021 by Digitalr Updated
jakecool19 Posted May 28, 2021 Author Report Posted May 28, 2021 13 hours ago, Digitalr said: Uhm... May be i not understand something, but i cannot program hatvester locust to harvest reeds or honeycombs. I define working area (with memory gear),which contains dozen harvestable beehives and flowers around, put knife in the chest, define chest, deploy locust, charge it with stack of coal, and download memory. Locust take knife and... Sleep. Same things, if working area contains reeds. But, if working area have ripe berry bushes, this little bastard harvest berries and leave them on ground. What i do wrong? The reeds have to be on farmland in order for them to detect it as well as the farmland needs to be in the work area. As for the beehives they should get those no problem if it is in the work area.
DArkHekRoMaNT Posted October 28, 2021 Report Posted October 28, 2021 Can you split the recipe with and without the rengineer trait into different pages in the handbook? Now they are very uncomfortable to watch
DArkHekRoMaNT Posted October 31, 2021 Report Posted October 31, 2021 (edited) Locusts lose their owner if player offline. Do you take api.World.AllPlayers information on the client side? It only returns players online Edited October 31, 2021 by DArkHekRoMaNT
jakecool19 Posted October 31, 2021 Author Report Posted October 31, 2021 6 hours ago, DArkHekRoMaNT said: Locusts lose their owner if player offline. Do you take api.World.AllPlayers information on the client side? It only returns players online Do they permanently lose the owner, or just visually do not display the owner if they are not online? The locust stores the playeruid in their WatchedAttributes and gets the player object from entity.World.PlayerByUID.
DArkHekRoMaNT Posted November 1, 2021 Report Posted November 1, 2021 14 hours ago, jakecool19 said: Do they permanently lose the owner, or just visually do not display the owner if they are not online? The locust stores the playeruid in their WatchedAttributes and gets the player object from entity.World.PlayerByUID. Only while the player is offline. My PlayerCorpse had such a problem, so I now additionally store the player name for output, not just the UID. PlayerByUID also returns only online players on client side, since this is a wrapper over api.World.AllPlayers.
jakecool19 Posted November 1, 2021 Author Report Posted November 1, 2021 12 hours ago, DArkHekRoMaNT said: Only while the player is offline. My PlayerCorpse had such a problem, so I now additionally store the player name for output, not just the UID. PlayerByUID also returns only online players on client side, since this is a wrapper over api.World.AllPlayers. Thanks for the tip! Locust should now maintain their owner display if their owner is offline, although if the locust was deployed before the patch, it will either need to be redeployed or the owner needs to interact with it(right click) to get it to display. Also @TBNRregs the sawblade harvester should now be able to chop living trees from Wild farming.
TBNRregs Posted November 2, 2021 Report Posted November 2, 2021 9 hours ago, jakecool19 said: Thanks for the tip! Locust should now maintain their owner display if their owner is offline, although if the locust was deployed before the patch, it will either need to be redeployed or the owner needs to interact with it(right click) to get it to display. Also @TBNRregs the sawblade harvester should now be able to chop living trees from Wild farming. Yep I tested it and it works
DArkHekRoMaNT Posted November 3, 2021 Report Posted November 3, 2021 (edited) Collecting honey and bushes does not work. Do you add items to diet but don't process it? Raccoons have the AI task: { code: "seekfoodandeat", movespeed: 0.010, priority: 1.6, animationSpeed: 1.75, eatTime: 2, eatLooseItems: true, eatItemCategories: ["Fruit"], eatItemCodes: ["honeycomb"], animation: "Walk", eatAnimation: "gather", eatAnimationLooseItems: "eat", mincooldownHours: 6, maxcooldownHours: 12, }, Edited November 3, 2021 by DArkHekRoMaNT
jakecool19 Posted November 6, 2021 Author Report Posted November 6, 2021 On 11/3/2021 at 10:10 AM, DArkHekRoMaNT said: Collecting honey and bushes does not work. Do you add items to diet but don't process it? Raccoons have the AI task: { code: "seekfoodandeat", movespeed: 0.010, priority: 1.6, animationSpeed: 1.75, eatTime: 2, eatLooseItems: true, eatItemCategories: ["Fruit"], eatItemCodes: ["honeycomb"], animation: "Walk", eatAnimation: "gather", eatAnimationLooseItems: "eat", mincooldownHours: 6, maxcooldownHours: 12, }, Are you using the Apiary locust for hives?
Recommended Posts