Is there an enemy modding walkthrough somewhere?

Mods, guides how to use and install mods go right in here.
Post Reply
z0mb1
Posts: 16
Joined: 17 Mar 2012, 09:17

Post » 19 Mar 2012, 22:23

Hi!

So, I'm trying my hand at modding (it's my first attempt). I've got the sprite-making process down (GIMP for the win). What I need now is a beginner's class on how to make things that function within the game. I've seen some guides here and there and have tried to use them, mostly to no avail. I'm trying to do the following...

1: Create a non-breakable block. I've been able to make a block that I can drop into the game as a background object (by pulling the smbtitles.png file from the source and drawing the new tile into it), but Mario just runs right past it right now with zero interaction. How do I make it solid?

2: Make a basic enemy that functions like a Goomba, just with a different skin. I know that you need a lua and a modmain file, and that you need to have your entity and core images in a "graphics" file. I just don't know what actually needs to go into the lua files to bring the image to life. I've tried just copying the Goomba source file and changing the key words (for example, I'm trying to re-skin the Goomba into a thing called a "Ghoulie"), and while I can get the Ghoulie's icon to appear in my Entities tile list, when I drop it into the map all I get is the entity tile image I created for the Ghoulie (not his sprite), and it disappears when I try to test the game.

Is there a step-by-step tutorial somewhere that I can look at to get a good idea of what I'm supposed to do? Or does someone feel like writing/making a YouTube video of one if there isn't? I'm using MarioMS to do this, if it makes a difference.

Thanks!

- z0mb1

Edit: I figured out the answer to question #1. It was a matter of putting those little dots on the right side of the tile image. I'll try the suggestion for question #2 later tonight and see if it helps.
Last edited by z0mb1 on 19 Mar 2012, 23:20, edited 1 time in total.

User avatar
trosh
Posts: 1594
Joined: 03 Feb 2012, 08:36

Post » 19 Mar 2012, 22:47

I'd say this should be useful viewtopic.php?f=13&t=580
It's also good as personal practice to go mucking around in the code yourself to see how it all works.

z0mb1
Posts: 16
Joined: 17 Mar 2012, 09:17

Post » 20 Mar 2012, 02:59

Has anyone here ever re-coded a Goomba into a new enemy entity? If so, could you possibly share the entity lua and the modmain? If I can see what one looks like, I can probably run with it from there. I tried just changing the name from "goomba" to "ghoulie" in the source code and sticking that in my mod folder with its graphic, but that just makes the game blue-out, and it doesn't do anything to help me with the modmain problem (I've looked at several other modmains from zenx's mods, and I can't seem to find an apparent similarity between them... that's probably my inexperience talking). The closest I've come to getting what I want is to replace the Goomba's graphics in the source file with my own graphics. At that point, all the Goombas in the game looked like my Ghoulie character... But I want Goombas and Ghoulies in the game, so I'm hoping a proper mod folder can fix that.

User avatar
cloud6625
Posts: 47
Joined: 04 Mar 2012, 00:32

Post » 20 Mar 2012, 05:58

z0mb1 wrote:Has anyone here ever re-coded a Goomba into a new enemy entity? If so, could you possibly share the entity lua and the modmain? If I can see what one looks like, I can probably run with it from there. I tried just changing the name from "goomba" to "ghoulie" in the source code and sticking that in my mod folder with its graphic, but that just makes the game blue-out, and it doesn't do anything to help me with the modmain problem (I've looked at several other modmains from zenx's mods, and I can't seem to find an apparent similarity between them... that's probably my inexperience talking). The closest I've come to getting what I want is to replace the Goomba's graphics in the source file with my own graphics. At that point, all the Goombas in the game looked like my Ghoulie character... But I want Goombas and Ghoulies in the game, so I'm hoping a proper mod folder can fix that.
well i havent made goomba into brand new entity with new movement but i did change the goomba's spritesto something else so he looks like snes goomba but as far as completely changing i wouldlove to know how.

z0mb1
Posts: 16
Joined: 17 Mar 2012, 09:17

Post » 21 Mar 2012, 02:57

cloud6625 wrote:
z0mb1 wrote:Has anyone here ever re-coded a Goomba into a new enemy entity? If so, could you possibly share the entity lua and the modmain? If I can see what one looks like, I can probably run with it from there. I tried just changing the name from "goomba" to "ghoulie" in the source code and sticking that in my mod folder with its graphic, but that just makes the game blue-out, and it doesn't do anything to help me with the modmain problem (I've looked at several other modmains from zenx's mods, and I can't seem to find an apparent similarity between them... that's probably my inexperience talking). The closest I've come to getting what I want is to replace the Goomba's graphics in the source file with my own graphics. At that point, all the Goombas in the game looked like my Ghoulie character... But I want Goombas and Ghoulies in the game, so I'm hoping a proper mod folder can fix that.
well i havent made goomba into brand new entity with new movement but i did change the goomba's spritesto something else so he looks like snes goomba but as far as completely changing i wouldlove to know how.
By "changing the sprites to something else" do you mean you just went into the Mari0 source file and swapped out the images? Or did you make a whole new modded file with a modmain.lua and a .lua for the entity? If you made it with the modmain and the .lua for the entity, I'd definitely like to know how you did it. That's exactly what I want to learn how to do. Essentially, I'd like to have a Goomba in my game and a new enemy called a "Ghoulie" that works exactly like a Goomba but looks different.

z0mb1
Posts: 16
Joined: 17 Mar 2012, 09:17

Post » 21 Mar 2012, 11:19

Ok, I found a *sort of* solution to my problem. Since there are four spritesets for each character, I just changed the spriteset for one type and will always use that spriteset for the appropriate levels. For the Goombas that I turned into "Ghoulies" I just changed the second row of sprites in the goomba.png file, and set the tileset for "underground" whenever I want a Ghoulie in a level. Then I can keep the original Goombas in other levels by using the "overworld" spriteset. It means that Goombas and Ghoulies can't exist in the same level (unless I create a sub-level and use a different tileset), but it will do for now. Goombas and Ghoulies are sorta like Clark Kent and Superman... They're never in the same place at the same time. Mysteeeeeerious.

Still, if anyone comes up with a mod that lets you build a whole new enemy based on an original enemy's code, I would LOVE to see it.

Edit: As a note, if anyone out there is going to do this, I suggest first saving the original "goomba.png" file as "goomba.old," and then copying your new spriteset into the main graphics file as "goomba.png" after that. It's always good to be able to go back if you need to.

Post Reply