Page 1 of 1

mobs - coding help

PostPosted: Mon Jul 23, 2012 09:09
by JoefromTWG
Hi, I'm new here, I'm creating new mobs.

would is be possible for someone to post a generic code for a mob to do this:

simply walk towards and attack! - I've looked at "sapier -animals_modpack-1.2.90" and noticed that it say I can use the coding/script.

I've managed to add a few things and change some sprites, I just need a little help with a few things:

Spider:
I'd like it to jump towards the character as it walks, at the moment I'm using the rats £run_and_jump_low" movement, but I'm wondering if its possible to create a "jump towards you" attack.

Also I've added a ghost mob (looks like haunter from pokemon lol) and I'd like it to just "pop up" like it teleports instead of floats.

eventually I'd like to create an RPG style game, it would be great to be able to add NPC characters that I can make them speak when you hit them, then create shops to sell certain things, but for this I'd need a currency system lol

is this a little too much and shall I stick to mobs, I did notice that (it could just be my laptop) but too many mobs cause a problem in the game and it unexpectedly stops working,

I'm trying to either create my own images or use free ones online that people post, for example rpg maker xp/VX sprites then edit them/convert them, of course I will give credit where credit is due.

- Also I managed to change the character from a green dude to Vivi from ff9 as a joke, I even gave him a pickaxe lol
Image
--I know the image is small lol. I drew him :D
Thanks in advance

PostPosted: Mon Jul 23, 2012 09:44
by PilzAdam
The mods you want to create are all possible but not that easy. Maybe you should start with "normal" mods. Just add a few nodes to the game to get a experiences in using lua. Then read /doc/lua-api.txt (better read it 3 or 4 times) to know how to reigster entities. THEN you can start make this mods. (Dont missunderstand me: I dont think you are unable to make this mods but with this guidance it is easier.)

PostPosted: Mon Jul 23, 2012 09:58
by JoefromTWG
Yea I've opened up the "sapier -animals_modpack-1.2.90" files and I've figured it out a little lol. Is there a like example sheet, or something that shows all codes e.g. "run_and_jump_low".

As regards to the jumping, would it be a case of creating new movement lua file and find the movement out, like X&Y positioning/movement... if you know what I mean lol.

PostPosted: Mon Jul 23, 2012 10:03
by PilzAdam
The methods in the animals mod that you mean are written by the author of animals mod. To see the basic methods of objects see doc/lua-api.txt. With this methods you can write your own methods like moving or jumping.

PostPosted: Mon Jul 23, 2012 10:13
by JoefromTWG
wow thank you! That's great!

Edit:
I'm struggling to find a section on movement :s

PostPosted: Mon Jul 23, 2012 10:55
by JoefromTWG
Also on a side thought, how hard would it be to put in like powers, like fire ball n healing then set them up to work under numbers, I noticed in the doc/lua_api.txt has information about input for directions ect. Has anyone else made this?

I would just really like a fantasy rpg building style game mode thing lol

PostPosted: Mon Jul 23, 2012 10:58
by PilzAdam
The interesting part for objeccts is line 1038 ff. and 1173 ff..