[Modpack] Animals Modpack [2.5] -- 2.6 approaching

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Mon Apr 08, 2013 01:04

I thinking in many small monsters like the slime mod. :)
 

Jouster27
Member
 
Posts: 117
Joined: Fri Mar 29, 2013 14:16

by Jouster27 » Mon Apr 08, 2013 04:44

I noticed that the ostrich eggs were displaying as "Unknown". I took a look at the files and found the following:

animalmaterials init.lua
minetest.register_craftitem("animalmaterials:egg_big", {
description = "Egg (big)",
image = "animalmaterials_egg_big.png",
stack_max=5

...

animalmaterialsdata["animalmaterials_egg_big"] = {
graphics_3d = {
visual = "mesh",
mesh = "animalmaterials_egg_ent.b3d",
textures = { "animalmaterials_egg_ent_mesh.png" },
collisionbox = { -0.24,-0.25,-0.24,0.24,0.25,0.24 },
visual_size = {x=2,y=2,z=2},
}


mob_ostrich init.lua
random_drop = {
result="animalmaterials:big_egg",
min_delay=300,
chance=0.1


Not sure if it's supposed to be "big_egg" or "egg_big" but I've got a strong suspicion they're supposed to match. Would someone fix this, please?
 

korkut
New member
 
Posts: 4
Joined: Tue Apr 02, 2013 02:13

by korkut » Mon Apr 08, 2013 12:54

sapier wrote:I've just released first preview version of 2.1 plz start testing
known Issues:
mobf_settings -> Tools menu doesn't work correct (bugfix in minetest required)
fighting -> no harm is done to mobs ... not quite sure what I did wrong when switching to new damage mechanism ... any suggestions?


let's look at old vombie
Code: Select all
 armor_groups= {
   fleshy=3,
   daemon=1,
 }


Each key describe the "element" that can damage the mob. Number indicates the purity of the element, i.e. vombie has a "3" fleshiness which is ordinary, while "1" is highly daemonic. Lower the rating, lesser affected the mob by the element. My workaround maps ratings something like {33,50,100,133}. New code replaces ratings with straight percentages, so it is basicaly a damage multiplier for the given element now.

Now the steel sword in default common:

Code: Select all
tool_capabilities = {
full_punch_interval = 0.8,
max_drop_level=1,
groupcaps={
  snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2},
},
damage_groups = {fleshy=6},
}


It simply says 6 damage to ordinary flesh targets. So a hypotetical daemonic weapon with damage_groups = {daemon=9} would deal 33% * 9 = 3 damage and the steel sword will 100%*6=6 damage. You can add an "angelic" key with value 1000 to vombie and a garlic mallet with {angelic=1} would deal 10 damage.

Correct fix would be replacing rating definitions of all the mobs with balanced percentages.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Mon Apr 08, 2013 19:14

Jouster27 you're right I'll fix this thx
korkut thx too I think I may have just to do some fine tuning with the values ... at least stone sword seams to do some damage
DON'T mention coding style!
(c) sapier all rights reserved
 

Jouster27
Member
 
Posts: 117
Joined: Fri Mar 29, 2013 14:16

by Jouster27 » Sat Apr 13, 2013 03:27

I'm getting errors while trying to capture a wolf (or dog, whichever the grey one is):

22:21:26: ACTION[ServerThread]: Jouster punches object 2: LuaEntitySAO at (-177.395,24,89.1855)
22:21:26: ACTION[ServerThread]: LuaEntitySAO at (-177.395,24,89.1855) punched by player Jouster, damage 0 hp, health now 5 hp
22:21:26: ACTION[ServerThread]: Jouster leaves game. List of players: Elzzira
22:21:27: ERROR[main]: ServerError: LuaError: error running function 'on_punch': ...dmods/animals_modpack-mobf_2_1_dev/mobf/fighting.lua:194: attempt to compare number with nil
22:21:27: ERROR[main]: stack traceback:


I got similar errors when trying to punch a vombie as well.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Apr 14, 2013 18:08

I've just released a new prerelease version of mobf.

Plz have a closer look at behaviour of vombie if you have latest core with pathfinding support.

2.0.81 is now feature complete, only polishing will be done until 2.1

@Jouster27 this bug should be fixed in 2.0.81 too
Last edited by sapier on Sun Apr 14, 2013 18:09, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

Jouster27
Member
 
Posts: 117
Joined: Fri Mar 29, 2013 14:16

by Jouster27 » Mon Apr 15, 2013 02:43

Sorry Sapier, dev 2.1 gives the following error:
21:38:14: ERROR[main]: ========== ERROR FROM LUA ===========
21:38:14: ERROR[main]: Failed to load and run script from
21:38:14: ERROR[main]: /home/jouster/.minetest/worlds/Jasoom/worldmods/animals/mobf/init.lua:
21:38:14: ERROR[main]: ...netest/worlds/Jasoom/worldmods/animals/mobf/init.lua:54: module 'luatrace' not found:
21:38:14: ERROR[main]: no field package.preload['luatrace']
21:38:14: ERROR[main]: no file './luatrace.lua'
21:38:14: ERROR[main]: no file '/usr/local/share/lua/5.1/luatrace.lua'
21:38:14: ERROR[main]: no file '/usr/local/share/lua/5.1/luatrace/init.lua'
21:38:14: ERROR[main]: no file '/usr/local/lib/lua/5.1/luatrace.lua'
21:38:14: ERROR[main]: no file '/usr/local/lib/lua/5.1/luatrace/init.lua'
21:38:14: ERROR[main]: no file './luatrace.so'
21:38:14: ERROR[main]: no file '/usr/local/lib/lua/5.1/luatrace.so'
21:38:14: ERROR[main]: no file '/usr/local/lib/lua/5.1/loadall.so'
21:38:14: ERROR[main]: stack traceback:
21:38:14: ERROR[main]: [C]: in function 'require'
21:38:14: ERROR[main]: ...netest/worlds/Jasoom/worldmods/animals/mobf/init.lua:54: in main chunk
21:38:14: ERROR[main]: =======END OF ERROR FROM LUA ========


I'll try the new 2.0.82 now...
 

Jouster27
Member
 
Posts: 117
Joined: Fri Mar 29, 2013 14:16

by Jouster27 » Mon Apr 15, 2013 03:15

Well, I tried 2.0.82. At least I can get this version to run but it still has the same problem. When I click the wolf with a lasso, the game crashes:
sapier wrote:22:11:45: ERROR[ServerThread]: LuaEntity name "animal_vombie:vombie_spawner_at_night" not defined
22:11:45: ERROR[ServerThread]: LuaEntity name "animal_vombie:vombie_spawner_at_night" not defined
22:11:50: ACTION[ServerThread]: singleplayer punches object 5: LuaEntitySAO at (-181.972,24,91.3924)
22:11:50: ACTION[ServerThread]: LuaEntitySAO at (-181.972,24,91.3924) punched by player singleplayer, damage 0 hp, health now 5 hp
22:11:50: ACTION[ServerThread]: singleplayer leaves game. List of players:
22:11:51: ERROR[main]: ServerError: LuaError: error running function 'on_punch': ...m/worldmods/animals_modpack-2.0.82/mobf/fighting.lua:194: attempt to compare number with nil
22:11:51: ERROR[main]: stack traceback:


In addition, I had the vombie spawning turned-on at one point but turned it off. Now I've got an unknown object that I can't get rid of.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Apr 16, 2013 20:51

Jouster27 fixed fighting crash in git version will be included in 2.0.83
thanks for your bug report
Last edited by sapier on Tue Apr 16, 2013 20:52, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

clarksallador
Member
 
Posts: 57
Joined: Sun Sep 30, 2012 03:18
Location: Philippines

by clarksallador » Wed Apr 17, 2013 08:00

i have a question:
why cant i kill a mob?i tried hitting them with every item but still no damage ... can you help me please
 

User avatar
Calinou
Moderator
 
Posts: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Wed Apr 17, 2013 08:40

clarksallador wrote:i have a question:
why cant i kill a mob?i tried hitting them with every item but still no damage ... can you help me please


Update Minetest to 0.4.6 -- see http://minetest.net/download.
 

clarksallador
Member
 
Posts: 57
Joined: Sun Sep 30, 2012 03:18
Location: Philippines

by clarksallador » Wed Apr 17, 2013 09:30

i have the latest update .. but still cannot kill a mob
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Wed Apr 17, 2013 09:34

Do you have the dev version or stable?
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

clarksallador
Member
 
Posts: 57
Joined: Sun Sep 30, 2012 03:18
Location: Philippines

by clarksallador » Wed Apr 17, 2013 09:37

@jojoa1997- yeah i have it
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Apr 17, 2013 10:44

@all
if you have found a bug plz try to add following information:
(exact) Minetest version
(exact) Mobf version
Last lines of console trace (everything that may be related, number of lines varies dependig on error)
DON'T mention coding style!
(c) sapier all rights reserved
 

Nebucad
Member
 
Posts: 13
Joined: Sat Apr 06, 2013 06:31
Location: nuremberg, germany

by Nebucad » Wed Apr 17, 2013 14:25

clarksallador wrote:i have the latest update .. but still cannot kill a mob


your problem sounds for me familiar. Go to post 936.
 

User avatar
Jonathan
Member
 
Posts: 119
Joined: Tue Apr 02, 2013 14:07
Location: USA

by Jonathan » Wed Apr 17, 2013 15:01

I love this mod, and the flexibility to modify, add, and remove creatures. For my personal use, I removed most creatures and I modified the npc trader so guards and archers could be purchased with wood (to be able to easy rebuild armies after destroyed). I also tweaked so one player's soldiers can defeat another player's soldiers (originally they would fight forever). In the Minetest game I played with my brothers, I seized my brother's castle by placing around 25 soldiers in the courtyard and outside lol.

Unfortunately, my brother is having issues joining the game now (minetest 0.4.5) that I have to figure out how to fix it :P (probably too many soldiers in one location and/or his player got in some odd state lol).
By perseverance the snail reached the ark.
- Charles Spurgeon
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Wed Apr 17, 2013 18:56

Is a very nice idea to a mod, have your code in some place to download Jonathan?
 

User avatar
Jonathan
Member
 
Posts: 119
Joined: Tue Apr 02, 2013 14:07
Location: USA

by Jonathan » Wed Apr 17, 2013 20:07

deivan wrote:Is a very nice idea to a mod, have your code in some place to download Jonathan?


No, I don't. Besides, this is sapier's mod which might include some of these type of changes in the future. Although below is what I replaced:

In the mob_npc init.lua I replaced the trader_inventory group:
Code: Select all
trader_inventory = {
                goods = {
                            { "mob_archer:archer 1","default:tree 4",nil},
                            { "mob_guard:guard 1","default:tree 4",nil},
                        },
                random_names = {"Honest Hank","Hungry Hungry Hans","Flip Flop Franz","Tough Tom","Frantic Fritz","Timid Thomas","Marvelous Martin","Furry Frank","Bobblehead Bobby","Sticky Stinky Steve"},
            }
        }


In the mobf fighting.lua around line 845:
Code: Select all
        --TODO call punch instead of manually setting health for player too
        if target:is_player() then
            local target_health = target:get_hp()

            --do damage
            target:set_hp(target_health -damage_done)
        else
--Jonathan added
            local target_health = target:get_hp()
            target:set_hp(target_health -damage_done)
            if target:get_hp() <= 0 then
                target:remove()
            end

--Jonathan commented out
--            target:punch(entity.object, 1.0, {
--                            full_punch_interval=1.0,
--                            groupcaps={
--                                fleshy={times={    [1]=1/(damage_done-2),
--                                                [2]=1/(damage_done-1),
--                                                [3]=1/damage_done}},
--                                snappy={times={    [1]=1/(damage_done-2),
--                                                [2]=1/(damage_done-1),
--                                                [3]=1/damage_done}},
--                            }
--                        }, nil)
        end


In the mobf fighting.lua line 928 remove "+1" added to mob_pos.y+dir.y:
Code: Select all
y=mob_pos.y+dir.y,


In the mobf weapons.lua around line 395:
Code: Select all
    if self.timer>0.2 then
--Jonathan changed radius area from 2 to 1.
        local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)
        for k, obj in pairs(objs) do
            if obj:get_luaentity() ~= nil and
                obj ~= self.owner then
                if obj:get_luaentity().name ~= "mobf:arrow_entity" and
                    obj:get_luaentity().name ~= "__builtin:item" then
--Jonathan added
                    local target_health = obj:get_hp()
                    obj:set_hp(target_health -self.damage)
                    if obj:get_hp() <= 0 then
                        obj:remove()
                    end
--Jonathan commented out
--                    obj:punch(self.object, 1.0, {
--                        full_punch_interval=1.0,
--                        groupcaps={
--                            fleshy={times={    [1]=1/(self.damage-2),
--                                            [2]=1/(self.damage-1),
--                                            [3]=1/self.damage}},
--                            snappy={times={    [1]=1/(self.damage-2),
--                                            [2]=1/(self.damage-1),
--                                            [3]=1/self.damage}},
--                        }
--                    }, nil)
                    self.object:remove()
                end
            else
--Jonathan added
                local target_health = obj:get_hp()
                obj:set_hp(target_health -self.damage)
                if obj:get_hp() <= 0 then
                    obj:remove()
                end

--Jonathan commented out
                --punch a player
--                obj:punch(self.object, 1.0, {
--                    full_punch_interval=1.0,
--                    groupcaps={
--                        fleshy={times={    [1]=1/(self.damage-2),
--                                        [2]=1/(self.damage-1),
--                                        [3]=1/self.damage}},
--                        snappy={times={    [1]=1/(self.damage-2),
--                                        [2]=1/(self.damage-1),
--                                        [3]=1/self.damage}},
--                    }
--                }, nil)
                self.object:remove()
            end
        end
    end


Some of the changes I made were to improve the arrows some. the arrow originally could always hurt you behind a wall if you were directly beside it. Now it only can hurt you behind the wall sometimes (due to going through the wall/ceiling corner!):P. It also makes it to where the arrow has to more directly hit you.

FYI: my code is very possibly not the most efficient, and I don't understand the punch function or armor groups very well. You might want to adjust the health of the archer and guard as well.

Note: Before I made some of the changes, arrows did not even hurt me (version minetest-0.4.6-1f42479-bugfixes-win32). Also, before I made some of the changes, one player's soldiers could not hurt another player's soldiers.
By perseverance the snail reached the ark.
- Charles Spurgeon
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Wed Apr 17, 2013 21:45

Nice. I will test it ASAP. :D
-*-
I don't found the "mob_archer:archer" or the other one in my sources, have another version fo this mod?
Last edited by deivan on Wed Apr 17, 2013 22:38, edited 1 time in total.
 

User avatar
Jonathan
Member
 
Posts: 119
Joined: Tue Apr 02, 2013 14:07
Location: USA

by Jonathan » Thu Apr 18, 2013 13:07

deivan wrote:Nice. I will test it ASAP. :D
-*-
I don't found the "mob_archer:archer" or the other one in my sources, have another version fo this mod?


I used the version 2.0.82 from the first post:
sapier wrote:Prerelease Download
Primary : Version 2.0.82 - finding a way out


Hope you enjoy it :)
By perseverance the snail reached the ark.
- Charles Spurgeon
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri Apr 19, 2013 20:38

@Jonathan thanks for your contributions. I think I've fixed the damage issues for 2.0.83 ... I don't wonder you didn't understand the damage system it's quite strange I had to debug c++ code to understand how this works now too.

I'll add a configurable trader inventory to 2.2, I'm sorry but for 2.1 it's to late to add a feature like that, as I need to write a gui to add this in a conveniant way.

I don't quite understand what you want to achieve by removing the +1 in fighting.lua? It's quite some time since I wrote that but I believe to remember this was required to get a clear target. Am I wrong with this assumption?
Last edited by sapier on Fri Apr 19, 2013 20:38, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Jonathan
Member
 
Posts: 119
Joined: Tue Apr 02, 2013 14:07
Location: USA

by Jonathan » Fri Apr 19, 2013 23:41

Well if I remember right, I removed the "+1" so the arrow would still be able to hit the player after changing line 396 in weapons.lua

Weapons.lua line 396:
From:
Code: Select all
local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)

To:
Code: Select all
local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1)


I changed the radius value from 2 to 1 so the arrow had to hit the player more accurately in order to hurt him. Also, with a radius of 2 it was easier for it to hurt a player behind a wall. (Although there might have been a better way to accomplish this)

Thanks for your work on this mod. I really enjoy it. I also like all your work you have been doing on pathfinding. It would be awesome to have creatures that can use path-finding efficiently, and that could open wood doors! :)
By perseverance the snail reached the ark.
- Charles Spurgeon
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Apr 21, 2013 00:02

Hmm maybe 1.5 is a good value to use ... I'll have a try.

I've just updated download link for 2.0.83, main enhancements:
-Updated trader inventory
-hirelings can be rotated by punching them
-naked sheeps get wool again
-mobf_settings is working for non admin players (at least those parts they should be able to use)
-damage should work now as expected plz have a try!
-many other small fixes, see changelog or github commit list
DON'T mention coding style!
(c) sapier all rights reserved
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 4 guests