[Mod] Alive AI V26.32 [aliveai]

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

Re: [Mod] Alive AI V2.04 [aliveai]

by AiTechEye » Post

hopefully fixed
i think it depends on the terminator made the npc punched it self, when it was gone.

it can happen with lags, im testing the mods offline on a fast laptop, so its hard to me to detect errors caused by that :-)

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Alive AI V2.04 [aliveai]

by SAMIAMNOT » Post

Yay! Thanks so much! I had pushed the mod to the latest version of my game Clonecraft before testing the mod when I saw that it crashed again...kinda embarrassing...
I test mines.

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 V2.04 [aliveai]

by Diamond knight » Post

suggestion: spawnzone blocks that have a higher rate of spawning in bots

edit: pvped some ai and they seriously need a full punch interval

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

Re: [Mod] Alive AI V2.04 [aliveai]

by AiTechEye » Post

suggestion: spawnzone blocks that have a higher rate of spawning in bots
spawners? ... i have thoughts to make it work with mesecon too but are not sure yet.
edit: pvped some ai and they seriously need a full punch interval
thay have a punch interval on 0.2 sec, that is based on its temper, the higher temper, the more chance to punch.
this does not work at all when the time are longer...

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 V2.04 [aliveai]

by Diamond knight » Post

spawners that have a high chance of spawning a bot, like a server spawn point type thing, maybe different variants:
popular server, crowded server, not popular server, mid popularity server etc. or maybe make them spawn at the static spawn point faster

I also have some other suggestions, the bots crafting weapons, arrows (if bows mod), bows (if bows mod), armor (if 3d_armor mod), and shields (if shields mod)

If your bows mod is enabled the bots could use the bows and arrows and if 3d armor they could use armor and shields

And the bots should run from lit TNT and (maybe) count it as an attack, they should detect if a player is trying to trap them by placing blocks and move and if enemy bot (jeezy in default) attack the player. They should also randomly attack animals for food as originally intended and maybe place their own shops.
It would be cool if you could also barter with them similar to mobf_traders and if they could farm and craft bread on their own and craft and use boats to cross large bodies of water.

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

Re: [Mod] Alive AI V2.04 [aliveai]

by AiTechEye » Post

a the problem is, the bots do not have inventorys, just lines with names and numbers
to use something requires instructions in somehow, if its not just to "use" (can use to air and objects)
bots can already use bows to shoot arrows if you makes one with the settings

but can also add a function that checks:

if fighting, and using a "bow tool"
and have "arrows"
create detached inventory
add a bow+arrow
create virtual user
use bow 2 times
delete bow, arrow, inventory


and randomly check if they have stuff to make tools

If your bows mod is enabled the bots could use the bows and arrows and if 3d armor they could use armor and shields
armors would be a tool that add objects that we stick on the bots that gives the bots more hp


And the bots should run from lit TNT and (maybe) count it as an attack
constantly check for blocks requiring a lot of unnecessary cpu

they should detect if a player is trying to trap them by placing blocks and move
a lot of unnecessary cpu too by doing it, but can make it dig blocks to get out (based on light)
or however, place blocks to trap enemies in underground... would be pretty annoying :P


and if enemy bot (jeezy in default) attack the player. They should also randomly attack animals for food as originally intended
none-player friendly bots is hunting both players and mobs for food... cannibals

maybe place their own shops.
the bots would just sell unusable things + cant handle rotations + hard to make... mobf_traders is a lot easyer

farm and craft bread on their own and craft
it was one of the original ideas, but seems to be very messy to do.
use boats to cross large bodies of water.
can be randomly, we can see later.

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Alive AI V2.04 [aliveai]

by SAMIAMNOT » Post

UjEdwin wrote:
and if enemy bot (jeezy in default) attack the player. They should also randomly attack animals for food as originally intended
none-player friendly bots is hunting both players and mobs for food... cannibals
LOL...however, the bots shouldn't be attacking players for food, but for destroying its house/houses. And eating animals, esp. for food, wouldn't make them cannibals.

EDIT: I found another glitch, looks like it's trying to access a getpos variable that is nil or not returning anything.

Code: Select all

13:42:26: WARNING: Assignment to undeclared global "NPC" inside a function at ...\..\games\Clonecraft\mods\peaceful_npc/npc/npc_dwarf.lua:182.
13:42:26: WARNING: Assignment to undeclared global "PLAYER" inside a function at ...\..\games\Clonecraft\mods\peaceful_npc/npc/npc_dwarf.lua:183.
2017-01-28 13:42:27: ERROR[ServerThread]: pathfinder: failed to update cost map
2017-01-28 13:42:27: ACTION[ServerThread]: LuaEntitySAO at (-47.15,6.5,110.85) punched by LuaEntitySAO at (-46.85,7.5,111.55), damage 4 hp, health now 196 hp
2017-01-28 13:42:27: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2017-01-28 13:42:28: ERROR[ServerThread]: pathfinder: failed to update cost map
2017-01-28 13:42:30: ERROR[ServerThread]: pathfinder: failed to update cost map
2017-01-28 13:42:30: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2017-01-28 13:42:32: ACTION[ServerThread]: LuaEntitySAO at (-44.7979,6.5,110.987) punched by LuaEntitySAO at (-46.85,8.5,110.209), damage 4 hp, health now 196 hp
2017-01-28 13:42:33: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2017-01-28 13:42:33: ACTION[ServerThread]: LuaEntitySAO at (-44.7979,6.5,110.987) punched by LuaEntitySAO at (-46.85,8.5,110.198), damage 4 hp, health now 196 hp
2017-01-28 13:42:33: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2017-01-28 13:42:37: ACTION[ServerThread]: Player singleplayer punched by LuaEntitySAO at (-45.9661,6.5,110.85), damage 10 HP
2017-01-28 13:42:37: ACTION[ServerThread]:  digs peaceful_npc:spawner_npc_dwarf at (-46,8,111)
2017-01-28 13:42:37: ERROR[main]: ServerError: Lua: Runtime error from mod 'aliveai_threats' in callback ScriptApiEntity::luaentity_Step(): ....\games\Clonecraft\mods\aliveai\aliveai_threats\init.lua:228: attempt to call method 'getpos' (a nil value)
2017-01-28 13:42:38: ERROR[main]: stack traceback:
2017-01-28 13:42:38: ERROR[main]: 	....\games\Clonecraft\mods\aliveai\aliveai_threats\init.lua:228: in function 'on_punching'
2017-01-28 13:42:38: ERROR[main]: 	...3\bin\..\games\Clonecraft\mods\aliveai\aliveai/event.lua:466: in function 'fight'
2017-01-28 13:42:38: ERROR[main]: 	....13\bin\..\games\Clonecraft\mods\aliveai\aliveai/bot.lua:14: in function <....13\bin\..\games\Clonecraft\mods\aliveai\aliveai/bot.lua:2>
2017-01-28 13:42:38: ACTION[ServerThread]: Spawned creatures:sheep at (-60,9,130)
I test mines.

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 V2.04 [aliveai]

by Diamond knight » Post

that attacking players part was part of the if you try to trap them they will attack you but your team will be more leniant i did not mean canibalism

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

Re: [Mod] Alive AI V2.05 [aliveai]

by AiTechEye » Post

it should be fixed this time, because i got same error as you :-)

i will see how much stuff i will add to the mod for a while, two months of intense coding takes hard on the health

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

Re: [Mod] Alive AI V2.05 [aliveai]

by TheReaperKing » Post

Thank you for all you have done with this mod! My students are building cities for a competition between classes and I think with some tweaks these NPCs would be really awesome to use to populate the cities especially since you granted them the ability to buy from shops. I'm looking forward to messing with them :)
-Mike
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
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 V2.05 [aliveai]

by Diamond knight » Post

Maybe you can open up a github page, I am sure many modders would love to contribute to this amazing mod (that I am going to be using in a RPG/RTS empire building subgame)

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.05 [aliveai]

by Karkaras » Post

This may be a stupid question, but I'm still alone : it seems that the game is spawning no mob by default (without creative mode). Maybe I missed some configuration step or something ?

I use Alive AI v2.05 and minetest 0.4.15 on Linux Mint (LMDE2).

Also, in creative mode, if I spawn some mobs, the game crashes completely with this error very quickly :

Code: Select all

minetest: /build/minetest-0.4.15+repack/src/util/serialize.h:278: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((float)(s32)((-0x7FFFFFFF - 1) / 1000.0f)) && i <= ((float)(s32)((0x7FFFFFFF) / 1000.0f))' failed.
Aborted
And a lot of these :

Code: Select all

2017-01-29 09:23:16: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead

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

Re: [Mod] Alive AI V2.06 [aliveai]

by AiTechEye » Post

Maybe I missed some configuration step
no, they should spawn by own in somehow.
but the bots kill they self if they have a special void values, or they would crash a lot of times.
its hard to figure out whats wrong, if nothing tells something about it.
but im pretty shore its something with the mine, build and craft part.

download the newest upload and this very simple mod + enable
download/file.php?mode=view&id=8750
and if there are spawned bots, say /clearobjects

it will disable build,craft and mine for all bots, so they will not build houses.




open up a github page
i have been trying it 3 times, and just messing up. but would be nice if someone wants to upload it.
but anyway, all bots can use bows + arrows if they get it in somehow.
and randomly checking if they can craft pickaxes, but im unsure if they will craft it.


even i should know exacly how they is thinking, i only know about 85% of it.
the other 15% is preoccupation, temper and randomly thinking, and who knows what a bot is thinking? :P

would be nice to make them develop personality traits too
Attachments
aliveai_dmcb.zip
(507 Bytes) Downloaded 204 times

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.061 [aliveai]

by Karkaras » Post

I installed the latest version and the simple mod, but still nothing in view for me. I checked around in fly mode, but I saw nobody.

When I spawned 2 bots in creative mode, it took longer for the game to crash, bit it did eventually, with this message :

Code: Select all

minetest: /build/minetest-0.4.15+repack/src/util/serialize.h:278: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((float)(s32)((-0x7FFFFFFF - 1) / 1000.0f)) && i <= ((float)(s32)((0x7FFFFFFF) / 1000.0f))' failed.
Aborted
One bot had killed the other one apparently.

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.061 [aliveai]

by Karkaras » Post

I think I may have the reason why the mobs are not spawning : when registering the abm to spawn the bot, you set the chance as parameter in register_abm, but also check it with math.random before adding the new entity in the action parameter.

As minetest is already enforcing the probability to execute the action function, checking again the chance parameter bring the probability to spawn much lower than intended. By removing the check, I can see that some mobs are spawning now.

The game is still crashing though.

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 V2.061 [aliveai]

by Diamond knight » Post

A terminator spawned naturally for me and they use the same spawn function I think

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

Re: [Mod] Alive AI V2.061 [aliveai]

by AiTechEye » Post

the game works different on different platforms/systems and builds.

in the init.lua, set status=true
it makes the bots show what they is doing, then i will make the bots shows more, so we can analyze whats wrong.
they will print their status in 2.062

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

can you upload the spawn changes you did?

the craftsystem should be replaced too, but are too messy for me :-)
Last edited by AiTechEye on Sun Jan 29, 2017 19:27, edited 3 times in total.

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.062 [aliveai]

by Karkaras » Post

I activated the status but most of the time, the game is crashed before anything happen : the bots just show up, walk or jump a bit (like 2 sec.) and then bam!; game crash. The last time, a terminator was showing "ATTACK"; but I do not think this is relevant to this issue.

The (small) change I did, in bot.lua, line 372 :

Code: Select all

		if (def.light==0 
		or (def.light>0 and l>=def.lowest_light) 
		or (def.light<0 and l<=def.lowest_light))
		and minetest.get_node(pos1).name==def.spawn_in
		and minetest.get_node(pos2).name==def.spawn_in then
			aliveai.newbot=true
			minetest.env:add_entity(pos1, def.mod_name ..":" .. def.name):setyaw(math.random(0,6.28))
		end
I stumbled upon this on the minetest github : https://github.com/minetest/minetest/co ... e1a088b96c

It seems to be the assert that fail and crash the server (visibly this is the expected behavior to avoid weird stuff from happening inside the game). I suspect it may be related to the serialization of the mobs. Is it possible that some float numbers are too high or too low in the bot parameters/data ?

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.062 [aliveai]

by Karkaras » Post

Oups, did not saw that there was a new version. I test it right away.

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.062 [aliveai]

by Karkaras » Post

Here is the logs (after the minetest starting stuff) :

Code: Select all

default:steel_ingot
default:steelblock
default:steelblock
default:steel_ingot
default:steel_ingot
default:steelblock
default:steelblock
default:steel_ingot
default:steel_ingot
default:steelblock
default:steelblock
default:steel_ingot
default:steelblock
default:steel_ingot
default:steelblock
default:steel_ingot
default:steel_ingot
default:steelblock
default:steel_ingot
default:steelblock
default:steelblock
default:steel_ingot
default:steel_ingot
default:steelblock
default:steel_ingot
default:steelblock
i6OI: jump inside block
2017-01-29 20:27:08: WARNING[Server]: core.env:[...] is deprecated and should be replaced with core.[...]
minetest: /build/minetest-0.4.15+repack/src/util/serialize.h:278: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((float)(s32)((-0x7FFFFFFF - 1) / 1000.0f)) && i <= ((float)(s32)((0x7FFFFFFF) / 1000.0f))' failed.
Aborted

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

Re: [Mod] Alive AI V2.062 [aliveai]

by AiTechEye » Post

looks like it had something with minetest.env:add_entity and minetest.add_entity to do
core.env:[...] is deprecated and should be replaced with core.[...]
the minetest.get_node(pos1).name==def.spawn_in and minetest.get_node(pos2).name==def.spawn_in
is made to make shore bots spawns in air, but are added as check_spawn_space in the init.lua so we can skip it

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

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.064 [aliveai]

by Karkaras » Post

Still no luck

Code: Select all

2017-01-29 22:48:29: ACTION[Server]: Giving initial stuff to player singleplayer
2017-01-29 22:48:29: ACTION[Server]: singleplayer [127.0.0.1] joins game. 
2017-01-29 22:48:29: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2017-01-29 22:48:54: ACTION[Server]: singleplayer takes aliveai:bot2_spawner from creative inventory
2017-01-29 22:48:57: ACTION[Server]: singleplayer takes aliveai:bot_spawner from creative inventory
2017-01-29 22:49:05: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead

  ... skip tons of the same message ...

2017-01-29 22:49:05: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead
V09UKdBJvI4NOM: mine
V09UKdBJvI4NOM: mine
2017-01-29 22:49:08: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead

 ... skip tons of the same message ...

2017-01-29 22:49:08: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead
83TU7: mine
83TU7: mine
2017-01-29 22:49:08: WARNING[Server]: core.env:[...] is deprecated and should be replaced with core.[...]
83TU7: searching
83TU7: need: vessels:glass_bottle 1 search  have: 0 time: 1
83TU7: need: default:chest 1 search default:chest have: 0 time: 1
83TU7: need: default:chest 1 search default:chest have: 0 time: 1
83TU7: need: s 319 search group:stone have: 0 time: 1
83TU7: need: s 319 search group:stone have: 0 time: 1
83TU7: need: default:sign_wall_steel 1 search  have: 0 time: 1
83TU7: need: default:chest 1 search default:chest have: 0 time: 1
83TU7: need: default:chest 1 search default:chest have: 0 time: 1
83TU7: need: s 319 search group:stone have: 0 time: 1
83TU7: need: s 319 search group:stone have: 0 time: 1
83TU7: need: default:furnace 2 search  have: 0 time: 1
83TU7: need: default:dirt 7 search group:soil have: 0 time: 1
83TU7: need: default:dirt 7 search group:soil have: 0 time: 1
2017-01-29 22:49:13: ACTION[Server]:  digs default:dirt_with_grass at (45,13,60)
83TU7: dig default:dirt_with_grass
2017-01-29 22:49:13: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead
2017-01-29 22:49:13: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead
2017-01-29 22:49:13: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead
2017-01-29 22:49:13: WARNING[Server]: Deprecated usage of get_node_group, use get_item_group instead
minetest: /build/minetest-0.4.15+repack/src/util/serialize.h:278: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((float)(s32)((-0x7FFFFFFF - 1) / 1000.0f)) && i <= ((float)(s32)((0x7FFFFFFF) / 1000.0f))' failed.
Aborted

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

Re: [Mod] Alive AI V2.064 [aliveai]

by AiTechEye » Post


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

Re: [Mod] Alive AI V2.065 [aliveai]

by AiTechEye » Post

this should help a lot

show next to everything the bots is doing, and replaced get_node_group to get_item_group

download/file.php?id=8763

Karkaras
Member
Posts: 14
Joined: Sun Jan 29, 2017 08:32

Re: [Mod] Alive AI V2.065 [aliveai]

by Karkaras » Post

This one seems to be much more stable !!

I'll check it a give you feedback

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests