[Mod] Alive AI V26.32 [aliveai]

Post Reply
User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

microsoft notepad (windows stadard texteditor)

+ electric terminator (just run away from it!)

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

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

by TheReaperKing » Post

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.
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: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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.

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

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

by TheReaperKing » Post

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.
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: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

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

by bell07 » Post

To get a world startable on Linux It was needed to do next things

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:

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>

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

jimy wrote:http://lua-users.org/lists/lua-l/2009-05/msg00389.html
for the error with items.lua:

Code: Select all

invalid key to 'next' ... in function '(for generator)'

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.
[/size]
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 :-)

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

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

by bell07 » Post

Ok. 77 replacements by

Code: Select all

find . -name '*.lua' -exec sed -i ' s/ pairs/ ipairs/g' {} \;
Next error is

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:

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.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 :-/

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=nil confuses the loop on relist :-(

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

Now when you told the problem, it was clear what messed up :-)

relist=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

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

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

by bell07 » Post

Thank you!

Anyway, I run into next issue after ~1 minute:

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 :-(

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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.

download/file.php?id=9426

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

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

by bell07 » Post

Nope. The issue seems to be with the second value is lower or equal the first one. I changed your code to

Code: Select all

                                               if r1==0 then r2=-0.3 end
                                               if r2==0 then r2=0.3 end
to

Code: Select all

                                               if r2 <= r1 then r2=r1+0.1 end
And it seems to work now. I take more test evening

Azazel
Member
Posts: 20
Joined: Sun Dec 13, 2015 18:44
In-game: Omallem

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

by Azazel » Post

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

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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

download/file.php?mode=view&id=9446

bell07
Member
Posts: 599
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

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

by bell07 » Post

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. :-/

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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.

Azazel
Member
Posts: 20
Joined: Sun Dec 13, 2015 18:44
In-game: Omallem

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

by Azazel » Post

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

download/file.php?mode=view&id=9446
By far so good. Thanks for the last update

User avatar
lordfingle
Member
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle
Location: Australia
Contact:

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

by lordfingle » Post

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>
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

fixed in 4.6

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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
Attachments
screenshot_20170402_133838.png
(805.23 KiB) Not downloaded yet

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: [Mod] Alive AI V4.8 [aliveai]

by Diamond knight » Post

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.

User avatar
Andrey01
Member
Posts: 2444
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

Wow!New mobs!I didn`t even notice this mod earlier and didn`t know what he adds

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

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)

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: [Mod] Alive AI V4.8 [aliveai]

by Diamond knight » Post

what is the hybrid in this mod?

User avatar
AiTechEye
Member
Posts: 860
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

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

by AiTechEye » Post

stubborn_monster, it can lose parts of its body

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests