[Mod] Alive AI V26.32 [aliveai]

Post Reply
User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

[Mod] Alive AI V26.32 [aliveai]

by AiTechEye » Post

Image
Alive AI: the survivor ai mobs
83 npc / monsters

Depends: default, smartshop?, 3d_armor?, beds?, bones?, mesecons?
Licenses: code: LGPL-2.1, media: CC BY-SA-4.0
Source
Download:
Wiki:
More pictures



Spoiler
Candy
+candy biometric
+5 sweet & powerfull mobs
More ai
+about 50 npc
Spoiler
There is probably more things they can do.
Some NPC's is using custom properties, like the clown can juggle with items, trader can sell things, worker can mine and move items, diference monsters have theirs own properties.


build (by generated instructions)
search place to build
mine
drop bones
ignore inaccessible blocks
farm
craft
look for
use tools
path finding
build towers to reach targets
build bridges to reach targets
eat
give stuff to other bots
search for light or darknes or for darkes in light
nodes hanlers like, dig tnt, punsh mesecon buttons...
have temper and mood
pick up drops
get given things
steal from players
hunt things to get food
go to randomly positions
rotating (not only set yaw)
detect enemies
detect friends and team members
detect things to come to
detect by view field
storge inevtory and data, name, team, color, home pos ...
have home and go+teleport home if they are too far away
climb on ladders
open / close doors
place light in darknes
randomly look around
randomly look on things
randomly walk
randomly be annoyed by too near things
randomly folow things
avoid edges + randomly walk
use bows (viewtopic.php?t=14384)
leader (call every visiable team meber around it)
hurts by falling from heights
disappear by falling too far
hurts by blocks
drown (water)
choke (like vacuum blocks)
fight
smartfight (jumps round and removes blocks under the enemy, to make it fall down)
escape and hide
fly
suprbuild (do not need to stand near to place)
creative
walk
run
jump
jump over 2x nodes
jump when they stuck in blocks
dig if they stuck under blocks
sleep + in bed
sit in chair
die
dying
be relived
remember familiarizes
talk and answere on some questions
use armor
come (say: <name> come, say: come, right click it)
buy from smartshops
ride horses (mobs redo)
go by boats
go by carts
take chests with its content
be interested by blocks
The mobs will basically look for stuff it needs, mine, craft, build houses in randomly sizes, materials (depends on its ambient and what it have) with furnitures, and do things it needs to do.

bots can aslo buy using smartshop

bots can call bots like: <name> come
players can do: <name> come
and <team> come
default teams are Sam and Jezy ... eg: Sam come
or rightclick them

make them to a guard:
right click them with a diamond, this makes them stay around the position.
useful to keep monsters and enemies away.


Special tools:

aliveai:terminal or command /aliveai
set tempoary settings, eg freeze the ai system, or control bots, etc
requires privilege aliveai

aliveai:buildings_spawner
spawn / generate buildings, (use with care!)
requires privilege aliveai_buildings_spawning
Spoiler
limit chat distance to 200 (avoid botspam) [idea by bhree]
no more item crashes, (using pcall)
moved weather to another repo: https://github.com/AiTechEye/weather

26.2
-weather (was just too heavy)
somewhat more stable
-advanced/turnlook (bot was turning, instead look at directly, this was unnecessary in the long run)
-depends.txt
+mod.conf
26.1
new storage (save/load) system, your old data will be lost
(as default only contains what players has eaten and changed to team)

25.1 - 26
+privilege aliveai_invisibility (will not be detected by bots when sneak is holded)
complete the book to get the priv

*/aliveai not working
*/aliveai removes item in hand
+aliveai:buildings_spawner (instead of lots of spawning tools) [requires the aliveai_buildings_spawning privilege]
*light crash
*none digable but eatable items
*trying to use food as tools
*alien error by inf colorcode
+def no_entity, no_spawning, no_spawnitem (or replace)
+spawn_in node or group
+description to all bots (used with the book)
#replacing aliveai.convertdata with minetest.serialize (bots can now save/storage everything)
#replace buildings spawning tools with aliveai:buildings_spawner

+ai book
#change registered bots keys from name to mod:name, to avoid overwriting from different mods, you need to change spawners to keep them working
#adapts for statue/killerplant (you wont notice any difference)
Attachments
ss.jpg
ss.jpg (549.58 KiB) Viewed 5532 times
Last edited by AiTechEye on Wed Oct 14, 2020 20:07, edited 375 times in total.

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by TheReaperKing » Post

Some inspiration/helpful code from mods that do similar:

Towntest:
viewtopic.php?f=11&t=3223

Bell's Fork of Towntest called TownChest:
viewtopic.php?f=9&t=15704

I'd love to someday see something similar to this Minecraft Mod:
http://millenaire.org/

And/or this one:
https://wiki.minecolonies.com/
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by AiTechEye » Post

it wont be a pet or mob that you can control, or something that just walks around randomly.
make it kinda players, so we not are alone in singleplayer

it would good, if there are code, to make the bots use tools, and maybe a fake inventory, and use things like players
should the bots use the "home" priv?



The build system is flexible, it using group:item if it are added, it makes the bots can use difference nodes to build same things.
so if the bot build a wood place in a jungle, will the house probably be in junglewood, or in more colors if it need.

code to build a test building, into the first ? are how much the bot basically need to build and how big the place are.
next are what to place, the line will be nodes and positions, the letter w are group:wood
w 48,?4*4?w 20,a 8,w 8,a 8,w 20,
Last edited by AiTechEye on Sat Dec 24, 2016 14:01, edited 2 times in total.

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by Diamond knight » Post

Maybe the bot could set up shops of it's own and use something similar to mobtalker (old mod look it up)

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by TheReaperKing » Post

What you are saying is very similar to Millenaire so I definitely think it'd be great to look at for inspiration:
http://millenaire.org/
Millénaire is a mod for Minecraft, a 3D sandbox game. It aims to fill the "emptyness" of Minecraft worlds by adding NPC villages to it, with loose 11th-century Norman, Japanese and Mayan themes and additional cultures planned.

Villages are populated with men, women and children of various kinds, who perform tasks such as trading with the player, expending current buildings or improving existing ones, cultivating crops such as wheat in Norman villages and rice in Indian ones, crafting tools and powerful amulets, etc. As the village expends, the number of villagers increases as couples have children who grow up into new adults.

Help villages grow by trading with them and be rewarded with unique items such as Normand and Indian food or statues and tapestries to decorate your house with. And if they start liking you enough, they might even build you a house of your own.
One cool thing is in addition to the villages the NPCs would work on building themselves, that you could help them with by donating materials, is that there were bandit lairs. So sometimes hanging around a village you'd hear a warning go off and bandits would be attacking and the villagers would be trying to fight them off. You can help them out of course and even track down the bandits lair and eliminate them and get their treasure. Cool stuff. The NPCs having kids was a pretty neat touch too.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by AiTechEye » Post

it will be kinda same for the alive ai, you can help them, be there frends or enimis and more :-)

i will upload an update as soon, when i fixed the gravity and clip-using,(so it not walks and fall from every cliff)

it can corrently craft things in 3 steps, like wood, chests, signs, fenses, furnaces... and fixed a lot of errors

Diamond knight wrote:Maybe the bot could set up shops of it's own
good idea. but it would be shops, that they can sell and make money with

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by GreenXenith » Post

UjEdwin wrote:currently i want to add
can mine randomly
plant food or hunt animals
stealing
crafting (done)
fighting
talking / chat
(maybe use shops)
have names
and more

it wont be a pet or mob that you can control, or something that just walks around randomly.
make it kinda players, so we not are alone in singleplayer

it would good, if there are code, to make the bots use tools, and maybe a fake inventory, and use things like players
should the bots use the "home" priv?



The build system is flexible, it using group:item if it are added, it makes the bots can use difference nodes to build same things.
so if the bot build a wood place in a jungle, will the house probably be in junglewood, or in more colors if it need.

code to build a test building, into the first ? are how much the bot basically need to build and how big the place are.
next are what to place, the line will be nodes and positions, the letter w are group:wood
w 48,?4*4?w 20,a 8,w 8,a 8,w 20,
Names, fighting, and chat are easily done.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [WIP] Alive AI (IA-Mob) [aliveai]

by TheReaperKing » Post

Subscribing to this thread, I'm so pumped! Living NPCs and towns are something I've been hoping for in Minetest for a LONGGG time.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.?2 (IA-Mob) [aliveai]

by AiTechEye » Post

Names, fighting, and chat are easily done.
yeah, but in this case it will be different parts

like temper, will it keep fight or escape and hide, is it a friend or enemy or team
names will be used when they are using stuff.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [WIP] Alive AI 0.?2 (IA-Mob) [aliveai]

by Inocudom » Post

To see actual bot players in Minetest is something that I find to be exciting. You will likely want them to respect protection mods though.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.?2 (IA-Mob) [aliveai]

by AiTechEye » Post

that's a very basic part

but a problem are to let it know how stuff from mods work, like if something are locked, as default will it check for "owner" in the node metadata, and "main" as inventory.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI ?3 (IA-Mob) [aliveai]

by AiTechEye » Post

When i fixed errors and made craftsystem works correct then it stops to work and solve its own bugs again.
i made it able to do things and understand what to do, as well it wont work next time and I have to start over several times.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.11 [aliveai]

by AiTechEye » Post

Now it should be able to mine ,craft and build without any problems, because it will ignore everything that messing after a while.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [WIP] Alive AI 0.11 [aliveai]

by GreenXenith » Post

Maybe add ability to remember what he has. Whenever game crashes, I have to start over and give him what he needs.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.11 [aliveai]

by AiTechEye » Post

Edit:
fixed, all settings was ignored

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [WIP] Alive AI 0.2 [aliveai]

by Diamond knight » Post

maybe they could use and craft weapons and armor (optinal dependancy to 3d armor)

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.2 [aliveai]

by AiTechEye » Post

i will try that later, when the house code generator are done.

it makes bots will build randomly houses (not predetermined constructs)

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [WIP] Alive AI 0.2 [aliveai]

by orwell » Post

Nice. That's actually something I wanted to start but didn't have time yet. Let's see if I can contribute. I'd like to see something like millenaire in minetest, and this is on a good way.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [WIP] Alive AI 0.2 [aliveai]

by TheReaperKing » Post

orwell maybe even eventually the NPCs will be driving your trains haha. That'd be interesting, like train stops and subway stops, weee
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.21 [aliveai]

by AiTechEye » Post

they are too dumb to do things like that :-)

there was also a bot that just buildt hims home, then tear it to build next house...

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [WIP] Alive AI 0.21 [aliveai]

by orwell » Post

Actually they just have to sit inside the driver stand and pretend to do something, the rest is done by ATC in secret...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.8 [aliveai]

by AiTechEye » Post

Now there are a lot more to test

+ make you to a "member" if it picks up a drop by you and the bot need it, it wont fight you, until you hurt it
+ hurts by blocks
+ avoiding hurting blocks
+ swim/drowning
+ use ladders (up)
+ settings to customize the bots
+ use tools (long/near view)

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [WIP] Alive AI 0.8 [aliveai]

by orwell » Post

Great work! I tried it. It's fun to watch the NPC building a house. Please continue working on this.
Some ideas that I had regarding a mod like this:
-> Maybe have some sort of "task stack". Tasks that require other tasks could be added on top of each other. Example:
-You want to build a house. Task "Build house".
-To build house 200 dirt are needed. Push "Get 200 Dirt" on top of stack.
-This task "Get 200 Dirt" spawns a new task "Mine dirt" until 200 dirt are reached and then disposes itself.
-"Mine dirt" finds out the next position of dirt and if it's not in range, spawns another task "Go near position". After this completes, the bot can:
-mine the dirt and dispose the task "mine dirt"
-(when 200 dirt are available) dispose the task "get 200 dirt"
-continue building the house by spawning tasks "build node at position"
a.s.o.

-> some code to actively build ways to a required positions (place single dirt blocks to climb 2 nodes high heights, or dig into the ground to get stone)
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI 0.81 [aliveai]

by AiTechEye » Post

yeah, the bots works in that way (get instections and what it needs --> mine --> search space --> build --> done)
if no task (in this case "mission") and dont have a home (position):


1: generate house code, 2 and get list with stuff it needs, an item can look like (item="default:wood",search="group:tree",n=235)
3 search the nodes (mine) and dig if its near or can reach it
one by one will the items in the list will be ignored after a time, default is 200s, or it will search for the items for ever.

if it have all items or the list are gone, will it check for space to build on, then build.
4: search space on its position and look for space in x+,x-,z+,z-
5: the bots will build of randomly blocks, also by stuff that are near it, like dirt,sandstone, stone...

but this needs

Code: Select all

some code to actively build ways to a required positions (place single dirt blocks to climb 2 nodes high heights, or dig into the ground to get stone)
the bots can jump(climb 2 blocks high
it can also see if it can go under and reach stuff it needs.
a question are, how it will steal things, its have support to steal chests, and its content, but are not used.
i want it to steal from players/bots hand, but it would be a problem, if it fights, they becomes pretty aggressive.

+ the mod need to be hard tested

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [WIP] Alive AI 0.81 [aliveai]

by Chibi ghost » Post

sounds interesting

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests