Folks,
This is my first post, but I've been lurking for a while, reading as much as I can, learning lua, and learning the game. I know some of several different languages and have been a modder for a while on several different programs, so forgive me for jumping in with both feet right away.
A post a few pages ago was very interesting to me, as I was asking some of the same questions:
ak399g wrote:Four questions:
1.) Possible to create flying mobs?
2.) Possible to have certain mobs jump higher than others?
3.) How to change the Dungeon Master's fireball attack to only igniting flammable objects and air instead of every node?
4.) When I shoot a mob to death with your throwing mod, they don't drop anything.
I don't know about Item #1 or #2, but I do have some answers about the last two:
3) In the lua file for the Dungeon Master, there is a line of code near the bottom that prevents the fireballs from destroying default:obsidian and ethereal:obsidian block (or something close to that). In the Calinou-Carbone_mobs mod, the fireballs are set NOT to destroy furnaces, chests, and a few other items. I am guessing that you could just add some additional "and" nodes to the "if/then" statement and that would do it. You could also drop the random percentage that causes any non-flammable nodes to be set on fire (found right after the "and" statements). A more elegant solution would be to initialize a Group and designate it in the code, that way you could just edit the Group table rather than the if/then statement itself. Does anyone know how to do this? I'd like to create something similar to the skeletons in MC that would shoot less powerful arrows but I'm still learning lua. :-P
4) On line 650-ish of the mobs api.lua, there is a statement that goes something like:
"if hitter and hitter:is_player() then -- and hitter:get_inventory() then"
with the items after the -- commented out. Since the arrows from the throwing mod are shot
by the player but
are not the player per se, I think the program is not issuing the drop commands. I commented out the portion about "hitter:is_player()" and then went outside and shot some sheep (poor sheep, they always get used for tests). Every one dropped a mutton chop for me, and the cows and the chickens dropped their brand of food as well. I haven't tried extensively on any hostile mobs yet, so this may vary, but I'm working on it. As a side effect, this may allow hostile mobs to shoot each other, kind of like the skeletons in MC. Not sure of this yet, though.
Hope this helps people with their own modding!