Page 5 of 5

Re: [Mod] Alive AI V3.3 [aliveai]

PostPosted: Tue Feb 28, 2017 19:08
by AiTechEye
its lordfingle that adding it to github

Re: [Mod] Alive AI V3.31 [aliveai]

PostPosted: Thu Mar 02, 2017 04:50
by lordfingle
It's updated - I've been checking this about once a week. Remember that the latest version will always be here for now.

Re: [Mod] Alive AI V3.31 [aliveai]

PostPosted: Thu Mar 02, 2017 11:04
by bell07
Tried the updated version, still broken for me.
Each lua file begins with a not printable character <U+FEFF> Wtf?
Which editor do you use for development? I use https://www.geany.org but on Linux, no clue how it is on Windows.

Re: [Mod] Alive AI V3.31 [aliveai]

PostPosted: Thu Mar 02, 2017 13:41
by Diamond knight
I used to use Lua editor 2010 but for some reason it stopped working one day (even re installing doesn't work) so I use wordpad, don't know what he uses though

Re: [Mod] Alive AI V3.31 [aliveai]

PostPosted: Thu Mar 02, 2017 13:49
by ErrorNull
i use "pn" programmer's notepad. it's open source and works great food me. http://www.pnotepad.org

Re: [Mod] Alive AI V3.35 [aliveai]

PostPosted: Thu Mar 02, 2017 16:43
by AiTechEye
microsoft notepad (windows stadard texteditor)

+ electric terminator (just run away from it!)

Re: [Mod] Alive AI V3.35 [aliveai]

PostPosted: Fri Mar 03, 2017 00:26
by TheReaperKing
I recommend trying notepad++ on Windows. You can have multiple documents up at once too and they are tabbed + tons of other features and it still doesn't use up much juice and is free.

Re: [Mod] Alive AI V3.7 [aliveai]

PostPosted: Fri Mar 03, 2017 20:58
by AiTechEye
i used it and saved / converted all the files with it.

the newest mod version should be better and more stable than the others.

fixed spawner
use 50 insteand of 100 in check for "come" (i think this made the game lag a lot before)
better aim for bots that is using tools
better aim for natural_monster
fixed natural_monster jumping
fixed fall and hit glitch
fixed gliding away when punched
+minecontroller updaing position, if flying and if standing in a damaging block
remake regulate_prestandard system again: remove bots faster (necessary if you hit a large amount of bots)

the new regulate_prestandard system also let your game/server spawn as many bots as it fit for purpose.
and stops the bots if its too much.

Re: [Mod] Alive AI V3.72 [aliveai]

PostPosted: Sat Mar 04, 2017 00:15
by TheReaperKing
I messed with the newer versions finally today for the first time in a while and those monsters that pull others under ground are genius, I LOVEEE them. Those beetles are pretty awesome too. You've really done some incredibly amazing work with this mod.

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

PostPosted: Sat Mar 04, 2017 22:14
by AiTechEye
There is another guy that you maybe like in 3.9... its stubborn

unlike the most mobs mods, all the mobs have special properties (except NPC)
(stubborn is a npc and monster)

the mod should be complete and bug free now

Re: [Mod] Alive AI V3.91 [aliveai]

PostPosted: Sun Mar 05, 2017 19:21
by bell07
To get a world startable on Linux It was needed to do next things
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
find . -name '*.lua' -exec dos2unix {} \;
find . -name '*.txt' -exec dos2unix {} \;
find . -name '*.lua' -exec sed -i 's/\xEF\xBB\xBF//' {} \;
find . -name '*.txt' -exec sed -i 's/\xEF\xBB\xBF//' {} \;


Anyway, I get a crash after the first NPC is in the world spawned:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2017-03-05 20:16:33: ACTION[Server]:  digs default:dirt_with_grass at (76,5,-17)
2017-03-05 20:16:33: ERROR[Main]: ServerError: Lua: Runtime error from mod 'xpanes' in callback luaentity_Step(): invalid key to 'next'
2017-03-05 20:16:33: ERROR[Main]: stack traceback:
2017-03-05 20:16:33: ERROR[Main]:    [C]: in function '(for generator)'
2017-03-05 20:16:33: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:545: in function 'crafting'
2017-03-05 20:16:33: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:8: in function 'crafttools'
2017-03-05 20:16:33: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:197: in function 'invadd'
2017-03-05 20:16:33: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:351: in function 'dig'
2017-03-05 20:16:33: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:987: in function 'mine'
2017-03-05 20:16:33: ERROR[Main]:    ...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:35: in function <...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:4>

Re: [Mod] Alive AI V3.92 [aliveai]

PostPosted: Mon Mar 06, 2017 14:04
by AiTechEye
jimy wrote:http://lua-users.org/lists/lua-l/2009-05/msg00389.html
for the error with items.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
invalid key to 'next' ... in function '(for generator)'

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
> As stated in the Lua reference manual, this means that during the
> iteration you are assigning to a key that didn't exist prior to the
> iteration.  This was the case in Lua 5.0, however the error is not
> guaranteed to happen each and every time.

I compile minetest with liblua5.2 but the problem can still.

(When I replace all pairs() by ipairs() it works fine)



try to replace all pairs() with ipairs()

the "pairs" is used to return item-names and its content, "ipairs" returns number and its content in the newer lua versions.

to solve this problem for all users would require i remake a big part of the mod, that corrently is made by 7221 lines of code :-)

Re: [Mod] Alive AI V3.92 [aliveai]

PostPosted: Mon Mar 06, 2017 14:44
by bell07
Ok. 77 replacements by
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
find . -name '*.lua' -exec sed -i ' s/ pairs/ ipairs/g' {} \;


Next error is
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2017-03-06 15:40:44: ERROR[Main]: ServerError: Lua: Runtime error from mod 'aliveai' in callback luaentity_Step(): ...netest/mods/staging-aliveai-modpack/aliveai/base.lua:498: bad argument #2 to 'random' (interval is empty)
2017-03-06 15:40:44: ERROR[Main]: stack traceback:
2017-03-06 15:40:44: ERROR[Main]:    [C]: in function 'random'
2017-03-06 15:40:44: ERROR[Main]:    ...netest/mods/staging-aliveai-modpack/aliveai/base.lua:498: in function 'rndwalk'
2017-03-06 15:40:44: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:668: in function 'findspace'
2017-03-06 15:40:44: ERROR[Main]:    ...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:39: in function <...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:4>


EDIT: I see to replace all pairs by ipairs does not sense and can have unexpected site effects.
Example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
         for i, v in pairs(self.inv) do
            if minetest.registered_nodes[i] and minetest.registered_nodes[i].walkable then
If "ipairs" is used at this place the minetest.registered_nodes[i].walkable will not crash the game, but a wrong node definition will be checked that has randomly the index i at this time.


So each coding place needs to be checked and fixed. The code contains 77x "pairs" loops, I think the most of them does work as expected. Can you please change the implementation at the affected line items.lua:545 at the first? Maybe it is enough. I tried it, but not really understand how it should work :-/
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- collect items to remove
   for i, v in pairs(list) do
      local gr=aliveai.namecut(v,true)
      if not relist[gr] then relist[gr]=0 end
      relist[gr]=relist[gr]+1
   end
-- check if list can be removed, or try to craft
   local nothaveall=false
   for i, v in pairs(relist) do
      local newre=aliveai.namecut(i,true)
      if string.find(newre,"group:",1)~=nil then
      if self.need then i=aliveai.crafttoneed(self,newre,true) end
         relist[i]=nil
         relist[newre]=v
      end

      if not aliveai.invhave(self,i,v) then
         local getc
         if self.need then getc=aliveai.crafttoneed(self,i,false,v) end
         if getc then aliveai.crafting(self,getc,norecraft,v) end
         nothaveall=true
      end
   end


The "pairs" is correct, Just change to "ipairs" results in the loop is never called. The issue is relist[i]=nil confuses the loop on relist :-(

Re: [Mod] Alive AI V3.93 [aliveai]

PostPosted: Mon Mar 06, 2017 20:41
by AiTechEye
Now when you told the problem, it was clear what messed up :-)

relist[i]=nil whas meant to remove an old item, then insert a new, but there was a much better way t do this.

the crafting should work better now

Re: [Mod] Alive AI V3.93 [aliveai]

PostPosted: Tue Mar 07, 2017 07:42
by bell07
Thank you!

Anyway, I run into next issue after ~1 minute:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2017-03-07 08:34:45: ERROR[Main]: ServerError: Lua: Runtime error from mod 'aliveai_folk' in callback luaentity_Step(): ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:643: bad argument #2 to 'random' (interval is empty)
2017-03-07 08:34:45: ERROR[Main]: stack traceback:
2017-03-07 08:34:45: ERROR[Main]:    [C]: in function 'random'
2017-03-07 08:34:45: ERROR[Main]:    ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:643: in function 'fight'
2017-03-07 08:34:45: ERROR[Main]:    ...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:21: in function <...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:4>


math.random(yaw*0.5,yaw*1.5) does not work in case of yaw=0 :-(

Re: [Mod] Alive AI V3.935 [aliveai]

PostPosted: Tue Mar 07, 2017 11:15
by AiTechEye
i made it cant be 0 in that function, if it fixes the crashes in this case then i will remake all random and set yaw functions.

https://forum.minetest.net/download/file.php?id=9426

Re: [Mod] Alive AI V3.935 [aliveai]

PostPosted: Tue Mar 07, 2017 11:35
by bell07
Nope. The issue seems to be with the second value is lower or equal the first one. I changed your code to
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
                                               if r1==0 then r2=-0.3 end
                                               if r2==0 then r2=0.3 end

to
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
                                               if r2 <= r1 then r2=r1+0.1 end
And it seems to work now. I take more test evening

Re: [Mod] Alive AI V3.935 [aliveai]

PostPosted: Wed Mar 08, 2017 00:12
by Azazel
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ServerError: Lua: Runtime error from mod 'aliveai_threats' in callback luaentity_Step(): /home/****/.minetest/mods/aliveai/aliveai/items.lua:474: 'for' limit must be a number
2017-03-07 18:53:38: ERROR[Main]: stack traceback:
2017-03-07 18:53:38: ERROR[Main]:    /home/****/.minetest/mods/aliveai/aliveai/items.lua:474: in function 'eat'
2017-03-07 18:53:38: ERROR[Main]:    /home/****/.minetest/mods/aliveai/aliveai/items.lua:171: in function 'invadd'
2017-03-07 18:53:38: ERROR[Main]:    /home/****/.minetest/mods/aliveai/aliveai/items.lua:712: in function 'pickup'
2017-03-07 18:53:38: ERROR[Main]:    /home/****/.minetest/mods/aliveai/aliveai/bot.lua:29: in function </home/****/.minetest/mods/aliveai/aliveai/bot.lua:4>
2017-03-07 18:53:38: ACTION[Server]: singleplayer leaves game. List of players:


And the same error happens with aliveia_folk all the time. So turn it off

Re: [Mod] Alive AI V3.938 [aliveai]

PostPosted: Wed Mar 08, 2017 13:35
by AiTechEye
i replaced a lot of math.random, where it could be error, to aliveai.random, that will check for errors
and checked all for loops, if someone could mess up

try if it works better now

https://forum.minetest.net/download/file.php?mode=view&id=9446

Re: [Mod] Alive AI V3.941 [aliveai]

PostPosted: Thu Mar 09, 2017 10:08
by bell07
Seems to be beter. I started the game early in the moring, logged in and spawned some NPC's. No crash since 3 hours. But I suspect something is wrong because no NPC did anything usefull. The most time they just stay at the same place. Sometimes place a glass node to the ground, sometimes get a sand node from ground, write someting to chat or fight an other NPC. :-/

Re: [Mod] Alive AI V3.941 [aliveai]

PostPosted: Thu Mar 09, 2017 10:57
by AiTechEye
it depends where they are, in the mostly cases they just stand and dig, often stone under the dirt, walk, walks to each other, fights, saying randomly things.

this is the mostly you will see from them, but does more then that.

when you sees someone that placing nodes on the ground, but not builds a house, they builds a bridge to reach something, its made to master cliffs.

Re: [Mod] Alive AI V3.938 [aliveai]

PostPosted: Thu Mar 09, 2017 15:59
by Azazel
AiTechEye wrote:i replaced a lot of math.random, where it could be error, to aliveai.random, that will check for errors
and checked all for loops, if someone could mess up

try if it works better now

https://forum.minetest.net/download/file.php?mode=view&id=9446


By far so good. Thanks for the last update

Re: [Mod] Alive AI V4.6 [aliveai]

PostPosted: Thu Mar 23, 2017 03:39
by lordfingle
Crash in version 4.5

2017-03-23 13:33:25: VERBOSE[Server]: LuaEntitySAO::getStaticData
2017-03-23 13:33:25: ERROR[Main]: ServerError: Lua: Runtime error from mod 'aliveai' in callback ScriptApiEntity::luaentity_Step(): ...idy\eidy\bin\..\games\eidy\mods\aliveai\aliveai/base.lua:426: attempt to perform arithmetic on local 'pxz' (a nil value)
2017-03-23 13:33:25: INFO[Server]: Server::ProcessData(): Canceling: peer 2 not found
2017-03-23 13:33:25: ERROR[Main]: stack traceback:
2017-03-23 13:33:25: INFO[Server]: Server::ProcessData(): Canceling: peer 2 not found
2017-03-23 13:33:25: ERROR[Main]: ...idy\eidy\bin\..\games\eidy\mods\aliveai\aliveai/base.lua:426: in function 'checkarea'
2017-03-23 13:33:25: VERBOSE[Server]: Server::deletingPeer(): peer->id=2, timeout=0
2017-03-23 13:33:25: ERROR[Main]: ...dy\eidy\bin\..\games\eidy\mods\aliveai\aliveai/event.lua:757: in function 'findspace'
2017-03-23 13:33:25: ERROR[Main]: ...eidy\eidy\bin\..\games\eidy\mods\aliveai\aliveai/bot.lua:39: in function <...eidy\eidy\bin\..\games\eidy\mods\aliveai\aliveai/bot.lua:4>

Re: [Mod] Alive AI V4.6 [aliveai]

PostPosted: Thu Mar 23, 2017 16:05
by AiTechEye
fixed in 4.6

Re: [Mod] Alive AI V4.8 [aliveai]

PostPosted: Sun Apr 02, 2017 11:51
by AiTechEye
in 4.8
The tree that will keep staring at you, maybe be angry.
it can be nervous too when you stands too near it.

spawns on trees with some space asound.

Image

Re: [Mod] Alive AI V4.8 [aliveai]

PostPosted: Sun Apr 02, 2017 13:46
by Diamond knight
Is there a way I could increase the bot's enemy tracking distance? In my empire addon the archers on the wall do not do anything about the rebels fighting their comrades outside the castle walls.

Re: [Mod] Alive AI V4.8 [aliveai]

PostPosted: Sun Apr 02, 2017 15:33
by Andrey01
Wow!New mobs!I didn`t even notice this mod earlier and didn`t know what he adds

Re: [Mod] Alive AI V4.8 [aliveai]

PostPosted: Sun Apr 02, 2017 17:35
by AiTechEye
aliveai.create_bot({
name="name",
texture="texture.png",
arm=3, (range, that it can reach, default is 5)
distance=30 (default is 15)
})

the mod has been a bit hidden dephens on its odd name
currently adds 35 mobs:
20 npc's, 15 monsters and 1 hybrid (becomes monster after death)

Re: [Mod] Alive AI V4.8 [aliveai]

PostPosted: Sun Apr 02, 2017 18:41
by Diamond knight
what is the hybrid in this mod?