Page 13 of 14

Re: [Mod] Alive AI V22 [aliveai]

PostPosted: Mon Jul 30, 2018 18:27
by Andrey01
In this mod i have noticed some lags with mobs (i use 5.0.0-dev): storm monster doesn`t blow away other mobs when they are near. This mob also sometimes stops to rotate and for some reason start to attack players/mobs as simple ones. Other lag is exploding mobs don`t destroy blocks when they are exploding.

Re: [Mod] Alive AI V22 [aliveai]

PostPosted: Wed Aug 01, 2018 16:39
by AiTechEye
its too early to notice bugs from 0.5 yet, cuz lots of weird stuff happens with it.
...
the ai can only build with pre-selected materials that depends on what that are near them.
stuff like sand,dirt leaves is added, just to make some ai build like noobs :)
but makes the sand any problems?

you can see/change it in aliveai/init.lua:45 (basics)

Re: [Mod] Alive AI V23.9 [aliveai]

PostPosted: Wed Aug 15, 2018 11:50
by AiTechEye
+ "terminal"

use the aliveai:terminal tool (found in creative inventory) or use the command /aliveai ...requires the aliveai privilege
and get some more power and info about this complex mod :)
this is almost done

the manu to left top is the selected bot or use the tool on it
the manu lower is objects around it

I suppose that this is awaited, for some reason

Image

Re: [Mod] Alive AI V24 [aliveai]

PostPosted: Wed Sep 05, 2018 01:30
by roboto
AITechEye: pull request https://github.com/AiTechEye/aliveai/pull/4

People are willing to help :)

Thank you for putting this project on GitHub.

Re: [Mod] Alive AI V24 [aliveai]

PostPosted: Wed Sep 05, 2018 11:21
by AiTechEye
i will make a wiki, so you know how it works first.

https://github.com/AiTechEye/aliveai/wiki

Re: [Mod] Alive AI V25 [aliveai]5

PostPosted: Sun Sep 16, 2018 16:31
by 42n4
I have such an error in minetest 4.17.1. Every trial to write /aliveai in console ends like this (with the other mods or without those mods):
Code: Select all
ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'aliveai' in callback on_chat_message(): ...hare/minetest/games/minetest_game/mods/aliveai/other.lua:58: attempt to index local 'user' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]:       ...hare/minetest/games/minetest_game/mods/aliveai/other.lua:58: in function 'show_terminal'
[Main]:       ...hare/minetest/games/minetest_game/mods/aliveai/other.lua:11: in function 'func'
[Main]:       /usr/share/minetest/builtin/game/chatcommands.lua:30: in function </usr/share/minetest/builtin/game/chatcommands.lua:9>
[Main]:       /usr/share/minetest/builtin/game/register.lua:420: in function </usr/share/minetest/builtin/game/register.lua:400>

Re: [Mod] Alive AI V25 [aliveai]5

PostPosted: Sun Sep 16, 2018 18:18
by 42n4
And the next error in minetest 4.17.1:
Code: Select all
WARNING[Server]: ScriptApiBase::objectrefGetOrCreate(): Pushing ObjectRef to removed/deactivated object, this is probably a bug.
ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'aliveai_weather' in callback on_leaveplayer(): ...netest/games/minetest_game/mods/aliveai_weather/init.lua:96: bad argument #1 to 'sound_stop' (number expected, got nil)
ERROR[Main]: stack traceback:
ERROR[Main]:       [C]: in function 'sound_stop'
ERROR[Main]:       ...netest/games/minetest_game/mods/aliveai_weather/init.lua:96: in function <...netest/games/minetest_game/mods/aliveai_weather/init.lua:93>
ERROR[Main]:       /usr/share/minetest/builtin/game/register.lua:420: in function </usr/share/minetest/builtin/game/register.lua:400>

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Sun Sep 16, 2018 20:32
by 42n4
I have repeated the minetest instalation only with mods: technic, smartshop, mesecons, aliveai and now without any error, maybe you should give a list of compatible mods with aliveai. There are a lot of mods at https://github.com/minetest-mods:
Code: Select all
biome_lib crops moreblocks moreores moretrees lightning torches plantlife_modpack more_chests round_trunks biome_lib unifieddyes unifiedbricks unified_inventory gloopblocks towercrane maptools mapfix technic mesecons MoreMesecons xdecor BobBlocks drawers playeranim digilines wielded_light digtron smartfs throwing_arrows throwing character_creator pipeworks nether ts_furniture item_drop intllib prefab towercrane homedecor_modpack currency craftguide ccompass mychisel mymillwork mydoors subterrane pontoons hopper airtanks framedglass drinks sling mymonths warps cake droplift flowerpot quartz ts_doors more_chests workbench ilights worldedge myroofs mylights crafting_bench chat2 coloredwood trash_can ts_paper camera loot mydeck enchanting tnt_extras painting jump mysoundblocks mymulch round_trunks sedimentology mywoodslopes turtle ts_workshop dynamic_liquid signs_lib jumping frozenenergy subspacewalker nightandday plantlife_modpack carpets mylandscaping mtg_i18n mg

and at the https://notabug.org/TenPlus1
Code: Select all
mobs_redo mobs_animal mobs_monster mobs_npc mob_horse ethereal farming lucky_block pigiron ambience real_torch bows pova pbj_pup cblocks teleport_potion pie  wine hopper bonemeal bakedclay money lapis signs_lib season falling_item stamina


Which should I use and which are safe?

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Sun Sep 16, 2018 21:06
by AiTechEye
fixed & thanks for reporting

check the poll viewtopic.php?f=11&t=16083&p=243314#p243314

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Sun Sep 16, 2018 22:00
by 42n4
I have found these mods and I think they are compatible and within aliveai:
https://github.com/AiTechEye/aliveai/wiki/Mods
But what about the rest of mods?

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Sun Sep 16, 2018 22:10
by 42n4
Which type of map generator is the best for aliveai? flat? v6?
I still have some warnings all the time:
Code: Select all
WARNING[Server]: ScriptApiBase::objectrefGetOrCreate(): Pushing ObjectRef to removed/deactivated object, this is probably a bug
WARNING[Server]: ScriptApiBase::objectrefGetOrCreate(): Pushing ObjectRef to removed/deactivated object, this is probably a bug
WARNING[Server]: ScriptApiBase::objectrefGetOrCreate(): Pushing ObjectRef to removed/deactivated object, this is probably a bug

I have install mods in this way:
Code: Select all
cd /usr/share/minetest/games/minetest_game/mods
[ ! -d 3d_armor ] && wget  https://github.com/stujones11/minetest-3d_armor/archive/master.zip -O 3d_armor-master.zip && unzip 3d_armor-master.zip && rm 3d_armor-master.zip && mv minetest-3d_armor-master 3d_armor
for i in moreblocks moreores pipeworks mesecons technic; do [ ! -d $i ] && git clone https://github.com/minetest-mods/$i; done;
for i in smartshop aliveai; do [ ! -d $i ] && git clone https://github.com/AiTechEye/$i; done;
mv aliveai alive && mv alive/* . && rm -rf alive
sed -i 's/status=false/status=true/g' aliveai/init.lua


Commands:
/aliveai count
/aliveai status=true
have no response. Only "issued command", nothing else...

And bots without any privilige (only shout, interact) can fly and build above the ground (one air brick layer below the building).

After spawning in creative mode there two copies of the bot: one just standing and another walking around (maybe working, but monsters kill them all just after or before making the building.

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Mon Sep 17, 2018 10:30
by AiTechEye
1: https://github.com/AiTechEye/aliveai/wiki/Mods is the default / included mods (will change the title)
2: mapgen doesn't matter, as long there are sand,dirt/grass and stone

fixed command /aliveai ... since v24 the command only shows the terminal gui ... can also show/set count/status


checking the bugs...

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Mon Sep 17, 2018 22:55
by 42n4
Now spawned bots have two copies: a kid and a moving adult.
After restart of the minetest kids disapeared, maybe an added aliveai privilige helped. Terminal works very good. Only warnings remained:
WARNING[Server]: Pathfinder: failed to update cost map
WARNING[Server]: ScriptApiBase::objectrefGetOrCreate(): Pushing ObjectRef to removed/deactivated object, this is probably a bug.

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Mon Sep 17, 2018 23:26
by 42n4
Finally another error:
Code: Select all
ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'aliveai_folk' in callback luaentity_Step(): ...hare/minetest/games/minetest_game/mods/aliveai/event.lua:459: attempt to compare number with nil
ERROR[Main]: stack traceback:
ERROR[Main]:       ...hare/minetest/games/minetest_game/mods/aliveai/event.lua:459: in function 'light'
ERROR[Main]:       .../share/minetest/games/minetest_game/mods/aliveai/bot.lua:44: in function 'bot'
ERROR[Main]:       .../share/minetest/games/minetest_game/mods/aliveai/bot.lua:16: in function <.../share/minetest/games/minetest_game/mods/aliveai/bot.lua:1>

Re: [Mod] Alive AI V25.1 [aliveai]

PostPosted: Tue Sep 18, 2018 16:48
by AiTechEye
fixed

you can now use aliveai:buildings_spawner

Re: [Mod] Alive AI V26 [aliveai]

PostPosted: Thu Dec 27, 2018 18:29
by bhree
Another error when i was trying to use gift on an ai bot.
Code: Select all
2018-12-27 17:20:14: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod
 'aliveai' in callback item_OnUse(): ...4/bin/../games/minetest_game_local/mods/aliveai/base.lua:268:
attempt to index local 'd' (a string value)
2018-12-27 17:20:14: ERROR[Main]: stack traceback:
2018-12-27 17:20:14: ERROR[Main]:       ...4/bin/../games/minetest_game_local/mods/aliveai/base.lua:26
8: in function 'save'
2018-12-27 17:20:14: ERROR[Main]:       ...4/bin/../games/minetest_game_local/mods/aliveai/base.lua:23
3: in function 'team'
2018-12-27 17:20:14: ERROR[Main]:       .../bin/../games/minetest_game_local/mods/aliveai/other.lua:11
77: in function <.../bin/../games/minetest_game_local/mods/aliveai/other.lua:1174>


suddenly happened without cause:
Code: Select all
2018-12-27 21:03:07: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod
 'aliveai_folk' in callback luaentity_Step(): .../bin/../games/minetest_game_local/mods/aliveai/tasks.
lua:58: attempt to compare number with nil
2018-12-27 21:03:07: ERROR[Main]: stack traceback:
2018-12-27 21:03:07: ERROR[Main]:       .../bin/../games/minetest_game_local/mods/aliveai/tasks.lua:58
: in function 'task3'
2018-12-27 21:03:07: ERROR[Main]:       ....4/bin/../games/minetest_game_local/mods/aliveai/bot.lua:81
: in function 'bot'
2018-12-27 21:03:07: ERROR[Main]:       ....4/bin/../games/minetest_game_local/mods/aliveai/bot.lua:16
: in function <....4/bin/../games/minetest_game_local/mods/aliveai/bot.lua:1>

Thanks

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Thu Dec 27, 2018 21:27
by AiTechEye
fixed and changed to a new storage (save/load) system, your old data will be lost
(as default only contains what players has eaten and changed to team)

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Thu Dec 27, 2018 23:57
by bhree
great, now testing it i'll report again.

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Sat Jan 05, 2019 01:52
by bhree
Hi AiTechEye,
Great mods and love to study the codes

Story, I'm using thirsty mod and I gave one of the bots a canteen then provoked it so it punched me back using the canteen and it crashed. I tried to bypass telling the mod that it should check whether the user a player or a bot but it always fails. It is not your mod fault, but raised a question.

A little question, can we attach some kind of persistent player attributes from other mod because when it is on_use by the bot some items check and can't find it since the bot isn't a real player and it crashes. Or should we black list certain items to avoid problems. The error comes from the other mod because it can't distinguish the user. I read the bot returns many attributes like a real player and it really fools some mods. I hope we can find a road to make this AI really close to real player.

Thanks.

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Sat Jan 05, 2019 12:43
by runs
Please, made an APi for mobs from this!

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Sun Jan 06, 2019 22:38
by AiTechEye
the bots are sending a array/table to the tools with functions like players have, and will be accept as player becaouse it has the function is_player() and returns true.

this makes it possable to the bots to use all tools, as long the tools not are checking if its a real player.

to prevent crashes its just to add more functions to it, or avoid using mods,
otherwise we have to make a loooooooong list of items to avoid, that constantly need to be updated :)

aliveai is an api, the other folders in the modpack is just add ons.

im working on a new mod where you can program in game

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Sun Jan 27, 2019 04:12
by bhree
At the moment i made items blacklist so bots dont use them. Currently it is the easiest way to prevent crash. They are amazing and add overall creepiness atmosphere.
I also added some codes to prevent them spam global chat and only allow local chat up to several nodes away. This give personal experience with the bots to each player. I hope i'm allowed to keep this nice mod this way.
Code: Select all
aliveai.say=function(self,text)   
   if self.talking==0 then return self end
   local pos = self.object:get_pos()
   local objects = minetest.get_objects_inside_radius(pos, 50)
   for i, o in pairs(objects) do
      if o:is_player() then
         local name = o:get_player_name()
         minetest.chat_send_player(name, "<" .. self.botname .."> " .. text)
      end
   end

   aliveai.last_spoken_to=text
   aliveai.on_chat(self.object:get_pos(),self.botname,text)
end

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Sun Jan 27, 2019 22:20
by AiTechEye
i had no more time today to add the limited player / distance chat as setting (anyway a good idea by you), but "pcall"

this makes items wont crash while the bots are using them (protected / safe mode)

edit:
+limit chat distance to 200

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Mon Jan 28, 2019 02:10
by bhree
I'll take a look, thanks. It is interesting to see that they are quite unpredictable.

Re: [Mod] Alive AI V26.1 [aliveai]

PostPosted: Mon May 06, 2019 01:23
by Joseph16
If you have Alive AI and the awards mod installed at the same time it crashes the game when trying to start the world.
Code: Select all
2019-05-05 21:20:24: ERROR[Main]: ModError: Failed to load and run script from D:\Joseph\Minetest\minetest-5.0.1-win64\bin\..\mods\awards\init.lua:
2019-05-05 21:20:24: ERROR[Main]: ...inetest-5.0.1-win64\bin\..\mods\aliveai\aliveai/base.lua:32: attempt to index local 'itemstack' (a nil value)
2019-05-05 21:20:24: ERROR[Main]: stack traceback:
2019-05-05 21:20:24: ERROR[Main]:    ...inetest-5.0.1-win64\bin\..\mods\aliveai\aliveai/base.lua:32: in function 'register_on_item_eat'
2019-05-05 21:20:24: ERROR[Main]:    ...minetest-5.0.1-win64\bin\..\mods\awards/src/triggers.lua:133: in main chunk
2019-05-05 21:20:24: ERROR[Main]:    [C]: in function 'dofile'
2019-05-05 21:20:24: ERROR[Main]:    ...inetest\minetest-5.0.1-win64\bin\..\mods\awards\init.lua:18: in main chunk
2019-05-05 21:20:24: ERROR[Main]: Check debug.txt for details.
2019-05-05 21:20:24: ACTION[Main]: Server: Shutting down

Maybe this can get fixed soon?