Cutstuff Forum

Mega Man 8-bit Deathmatch => Projects & Creative => Maps => Topic started by: CutmanMike on January 17, 2011, 03:42:06 PM

Title: [TUTORIAL] Importing new textures into MM8BDM
Post by: CutmanMike on January 17, 2011, 03:42:06 PM
Introduction

Importing textures into MM8BDM is not a simple case of dragging and dropping pictures into your new map files, as many of you may have noticed. In this tutorial we'll cover the steps for importing your own 8-bit textures into MM8BDM.

Download

The tool we're going to be using is SLumpEd. While any Doom lump manager can work, I use SLumpEd because it's the friendliest looking and most powerful tool I find convenient for me. Slade is the up to date version of SLumpEd, so feel free to use that if you prefer using it.

Download here: http://slumped.mancubus.net/index.php?page=downloads (http://slumped.mancubus.net/index.php?page=downloads)

Creating and refining your images

Before we begin let's understand the TEXTURE lump. The TEXTURE lump tells skulltag what images to put and where on new textures. The images you import into the wad are called patches. A texture can contain one or many patches, and TEXTURES is where you define where they lie, what properties each patch has etc. We'll get into that later.

The first thing you want to do, naturally, is create your textures. Once done so, there's a couple of things you need to check first:


With these rules in mind, create your textures. I usually make mine 32x32 or 16x16.

Creating the TEXTURE lump

Now you want to open your newly created map WAD file (http://cutstuff.net/forum/viewtopic.php?f=29&t=841) in slumped. Once you do this you should see a few lumps here. These are all to do with the map data, so try not to touch these AT ALL (I have accidentally hit save changes on one of these lumps and lost a whole map!). The safest way to create a new lump is to click the bottom lump (usually SCRIPTS or BLOCKMAP) and then click the new lump button. Name it TEXTURES.

(http://cutstuff.net/images/step1.png)

Importing the images

Before we begin typing in the code, we're going to import the images. Skulltag will only detect the images as patch files if we insert them between two special lumps called PP_START and PP_END. Do this the same way you created the new TEXTURES lump. Make sure PP_START is above PP_END (if this is not the case, use the arrow buttons at the top to arrange them correctly).

(http://cutstuff.net/images/step2.png)

Now we need to import our images BETWEEN these two lumps. To do this, highlight PP_START and hit the import new lump button at the top (the L with the green arrow). Now browse for your images (note you can select more than one and I highly recommend you do so). Once imported they should all appear between the PP_ tags. If they do not, use the arrow buttons to arrange them so they do.

(http://cutstuff.net/images/step3.png)

Writing the TEXTURE code

Now it's time to tell Skulltag how to use these images. TEXTURE uses a unique format that is fairly easy to understand compared to ACS and DECORATE. Each texture has to individually be defined. Here's an example of a new texture I just defined using Magnet Man's patches.

(http://cutstuff.net/images/MAGNET9.png) - MAGNET9

Code: [Select]
texture MAGTEST, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch MAGNET9, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

So this would create your basic texture that tiles infinitely. It's 32x32, the same size as the patch, so there's not much effort involved.

Let's look at a more complicated one. Let's say we wanted to take the below patches and create a long texture that has a different top and bottom to it.

(http://cutstuff.net/images/MAGNET5.png)(http://cutstuff.net/images/MAGNET6.png)(http://cutstuff.net/images/MAGNET7.png) - MAGNET5, MAGNET6 and MAGNET7

Code: [Select]
texture MAGWIRES, 32, 512 // This texture will be 32 wide and 512 high. Don't forget, must be power of 2!
{
   XScale 0.5
   YScale 0.5
   Patch MAGNET5, 0, 0 // The patch to appear at the top
   Patch MAGNET6, 0, 32 // 32 pixels down the second patch is used.
   Patch MAGNET6, 0, 64 // Same as above
   Patch MAGNET6, 0, 96
   Patch MAGNET6, 0, 128
   Patch MAGNET6, 0, 160
   Patch MAGNET6, 0, 192
   Patch MAGNET6, 0, 224
   Patch MAGNET6, 0, 256
   Patch MAGNET6, 0, 288
   Patch MAGNET6, 0, 320
   Patch MAGNET6, 0, 352
   Patch MAGNET6, 0, 384
   Patch MAGNET6, 0, 416
   Patch MAGNET6, 0, 448
   Patch MAGNET7, 0, 480 // The patch to be used at the bottom
   WorldPanning
}

This defines the long texture. I often use this format so create walls with edges, such as dirt at the bottom and grass at the top. Feel free to copy and tweak this code. As you can see you can use as many patches as you like. You could simply make this texture yourself in Photoshop or whatever, but because the texture is repeated so many times it would become a burden on the filesize.

After that you're pretty much done! The texture is ready for Doom Builder 2 to recognize and be used. Unfortunately there's no way to preview these without going into Skulltag or Doom Builder 2 yourself, so you will have to save your changes and close slumped every time.

If the texture appears in DB2 but displays a red X, it means that one of the patches is missing. Double check the TEXTURE code. If the textures do not appear at all, or some are missing, it means that there was an error in the code (usually a missing , ). Double check the TEXTURE code.

Note: It is important that you do not work with DB2 and SlumPed at the same time. Saving changes while another program is open can cause progress to be lost if you save with the other program. Be careful!
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: DJYosh on January 24, 2011, 09:26:23 AM
How would I import a static decoration?

Like, a bush or flowers or another thing that sits on one place for atmosphere.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: TERRORsphere on January 24, 2011, 11:58:40 AM
Quote from: "DJYosh"
How would I import a static decoration?

Like, a bush or flowers or another thing that sits on one place for atmosphere.
Either a DECORATE object or just use midtextures.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: DJYosh on January 24, 2011, 10:44:43 PM
Me again, (Boy, I'm needy).

I've been trying to follow this guide.
I've saved the wad to a map, but it says I have no textures at all.

I probably screwed up the tiniest,
most obvious detail and am getting flustered over it.

Code: [Select]
texture BLOCK_1, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch MAGNET9, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture BLOCK_2, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch BLOCK_2, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture BLOCK_3, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch BLOCK_3, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture QUESTION, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch QUESTION, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

texture Bush, 32, 32 // The NEW texture name is MAGTEST. It is going to be 32 units heigh and 32 units wide.
{
   XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
   Patch Bush, 0, 0 // Put the image MAGNET9 at 0,0, which is the top left corner of the texture.
   WorldPanning // Something to do with offsets, I can't remember but KEEP IT
}

(http://img692.imageshack.us/img692/4618/lumpproblems.png)


Any help here? After this, I'll try not to bother you guys again.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: CutmanMike on January 25, 2011, 12:15:15 AM
Are those spaces I see in the lump names? Bad idea!
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: DJYosh on January 25, 2011, 01:13:26 AM
Quote from: "CutmanMike"
Are those spaces I see in the lump names? Bad idea!
Is that it?
I thought I broke the files or something...


Thanks a lot.

Edit; It's fixed. The textures work!

I'll be submitting a wip map soon using these textures.
This was the one thing stopping me from submitting,
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Mr. X on February 18, 2011, 12:26:49 AM
I just now saw this topic.  I passed it up because I THOUGHT I knew how to import textures.  Turns out I've been doing it the long and hard way the whole freaking time.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Balrog on February 20, 2011, 05:42:58 PM
EDIT(problem solved): Why do you have to scale the texture if it's going to be the same size as the source graphic?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: mrjnumber1 on March 10, 2011, 04:48:35 PM
To make a quick thing for simple textures that don't need expanded very far, I made this thing in PHP (note: possibly requires GD image library). Basically, just put all the files in the same directory as this and run it. It should work, since it has for me! This is just for basic textures that you're not going to expand past one file.
Oh and no it's nto a standards complient webpage that's not the point. I'll make a C# console version... later. Maybe. Or a webpage where you can put in your image files like imgur. I dunno!
(click to show/hide)
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: LlamaHombre on May 09, 2011, 08:28:52 PM
While working on MMKENK, a problem occured.

My map renamed itself to PP_END, and MMKENK changed into a marker.

The textures still work, but the mapinfo doesn't.

And if I were to adjust the mapinfo to work on PP_END, it's still an awkward name to play a map with.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: CutmanMike on May 09, 2011, 08:33:49 PM
Open the map in DB2 and rename the map to something else? (map options)
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: LlamaHombre on May 09, 2011, 08:44:42 PM
I had renamed it in SLumpEd, that didn't work.

I'll try this though.

EDIT: It works, thanks.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: LlamaHombre on July 13, 2011, 11:50:43 PM
Sorry for the double post and bump, but upon bringing in NemZ's Burner Man tiles, a problem occured.

I put in the textures, making sure to use intervals of 16, and the textures don't work.

Are 48, 80, 96, and 192 reasonable texture boundaries?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Galaxy Sisbro on July 17, 2011, 05:59:45 PM
Something else is happening to me too. I've tried to put astro man tiles, and i got a problem:

Every time i'm putting numeric values over 1 at the end of every texture made in the texture lump, they'll dissappear from DB. For example, i'm making MMBFLO1 AND MMBFLO2. Only MMBFLO1 appears, while MMBFLO2 oddly vanishes. It's strange, because it never happened to me before. I think it has to do with animdefs. But i don't have these in the map. So what's on? As for now i just have letters.

Also, llama, they are. Mostly of the Backgrounds have big values.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on September 29, 2011, 09:46:56 PM
I hope this isn't a problem "bumping" this, but...

Do you know how to import a decoration that has more than one sprites? For example, I'm attempting to make this:

(http://img198.imageshack.us/img198/9218/soshibreaker.png) (http://imageshack.us/photo/my-images/198/soshibreaker.png/)

Into a decoration. How do I do so?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: LlamaHombre on September 30, 2011, 12:40:56 AM
SLumpEd.

SS_START, SS_END, DECORATE.

CSCM11.

Do the math.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: DarkAura on September 30, 2011, 12:56:06 AM
Aura - Is there a specific action you're trying to make him do or just a standard 2-frame animation?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on September 30, 2011, 02:59:11 AM
Just a standard two frame animation is all. Just want to make him blink.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: DarkAura on September 30, 2011, 04:04:37 AM
Aura - Like LlamaHombre said, CSCM11's Blaze decoration is a good example:
Code: [Select]
actor Blaze 24005
{
+CLIENTSIDEONLY
scale 2.5
translation "192:192=162:162", "198:198=175:175"
States
{
Spawn:
BLAE A -1
stop
}
}

Listed in map wad in order:

SS_START
BLAEA1
BLAEA8A2
BLAEA7A3
BLAEA6A4
BLAEA5
SS_END

To make the Soshi Breaker into a decoration, I would suggest this:
Code: [Select]
actor SoshiBreaker (unique Doom# here)
{
+CLIENTSIDEONLY
scale 2.5
States
{
Spawn:
SOSH A 42
SOSH B 6
stop
}
}

Sprite names in order from left to right:
(http://img198.imageshack.us/img198/9218/soshibreaker.png)
Top row: SOSHA1 SOSHA8A2 SOSHA7A3 SOSHA6A4 SOSHA5
Bottom row: SOSHB1 SOSHB8B2 SOSHB7B3 SOSHB6B4 SOSHB5

QUICK NOTE: This will only work if the diagonal and side sprites are facing the right, so those sprites will have to be horizontally mirrored for it to work properly.

And set up in the map wad like this, in order:

SS_START
SOSHA1
SOSHA8A2
SOSHA7A3
SOSHA6A4
SOSHA5
SOSHB1
SOSHB8B2
SOSHB7B3
SOSHB6B4
SOSHB5
SS_END

I think that is as best as I can explain it. If not, then that proves I never was good at being a teacher.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on September 30, 2011, 08:11:04 PM
Ok, I've got this so far:
This is in the entry contents file

+CLIENTSIDEONLY
scale 2.5
States
{
Spawn:
SOSH A 42
SOSH B 6
stop
}
}

This is in the Entries file
ACTOR SO Size: 0 Type: Marker

Now what do I do?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Korby on September 30, 2011, 09:30:04 PM
Name it and give it a unique DoomED number.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on September 30, 2011, 09:31:47 PM
DoomED number? Uh...

Like what? 100005?

EDIT: And where do you put in this number?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Ivory on September 30, 2011, 09:41:04 PM
You don't need the DoomED number unless you want to be able to place it on the map, otherwise you don't need the number as you can spawn it by other means. (ACS, etc)
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on September 30, 2011, 09:54:06 PM
But I don't know how to put it on through ACS...

Where do you put the DoomEd number?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: DarkAura on September 30, 2011, 11:14:53 PM
Aura - *Aura used Magical Recall*

Code: [Select]
actor SoshiBreaker (unique Doom# here) <-------
{
+CLIENTSIDEONLY
scale 2.5
States
{
Spawn:
SOSH A 42
SOSH B 6
stop
}
}
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on October 01, 2011, 12:59:11 AM
Can someone give me a good doom number?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: LlamaHombre on October 01, 2011, 01:02:39 AM
It must be between 0 and 28000, if I recall.

Anything in the 20000's is fair game.

If it does work, make sure it's compatible with Burner Man though or I will eat you.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on October 01, 2011, 01:20:13 AM
Uh, ok.

I'll put it down as 23560.

EDIT: WHERE DO YOU PUT IN THE NUMBER AND WHERE THE HELL IS MAP EDITOR IN SLADE
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Korby on October 01, 2011, 01:51:33 AM
Right after the name.

"actor blahblah 98759234752890345"
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Magnet Dood on October 01, 2011, 02:00:24 AM
So you're supposed to put the number after the actor name?

Jeez, I'm stoopid.

EDIT: Now I'm getting angry, why does Slade only accept 8 characters for the name?

I'm in a WAD maker, and it only allows 8 chars. For example: ACTOR SO

What the heck is wrong with this thing???

Can someone just make this for me? It's becoming too complicated...
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: BiscuitSlash on January 20, 2012, 08:19:20 PM
I quickly need quick help with something.

This texture is 96x48, and it is the only texture I can choose for my map.
(http://img38.imagefra.me/i51k/michael712/o1me_aef_ubf6m.png) (http://i.imagefra.me/37ciylbg)
Quote from: "CutmanMike"
Make sure the image is to the power of 2. Textures in Doom MUST obey this rule or they will get scewed in certain situations (especially for software users). Textures will usually be be 16, 32, 64, 128, 256, 512 or 1024 pixels high/wide, meaning they can be rectangular.
Is there any way I can make this tile fit that rule? I can't seem to arrange it into a looping power of 2 texture size.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Korby on January 20, 2012, 08:57:01 PM
Not sure why that's the "only texture you can use" but 48x48 might be fine, so you could probably just use that.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: NemZ on January 21, 2012, 05:18:59 AM
That's twice as wide as it needs to be to tile perfectly, but it looks slightly off-center.  Make sure to crop it so that it breaks in the middle of a gap in one row of the bricks, otherwise you'll have slightly jagged edges at corners.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: BiscuitSlash on January 21, 2012, 01:02:20 PM
Ahh, how did I not notice that....

I'l change it to 48x48, but when using that one that I tried....
(click to show/hide)

EDIT: Don't worry, I've found some textures that suit what I'm aiming for much better and they are in 32x32 format.
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Pikmin747 on June 30, 2012, 09:42:06 PM
This may not be the place to ask but…

How can I give slopes different textures?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Knux on December 30, 2012, 04:19:44 AM
I don't know if someone will come to my aid here, but I'm desperate.

Quote
  XScale 0.5 // Used to tell Doom to scale the textures up, do not change!
   YScale 0.5 // Same as above
And then I changed it to 0.0 because the textures I have are big enough. And everything crashes. Isn't there a way to keep them in the size they are? Do I really need to double it!?
Title: Re: [TUTORIAL] Importing new textures into MM8BDM
Post by: Ivory on December 30, 2012, 04:49:51 AM
Just omit the scales entirely from the texture definition.
Title: *my dad has a kingler flashbacks
Post by: TheRealRoyale on July 30, 2016, 04:28:49 PM
How do i make animated tiles, like a conveyer belt (for solar man's stage, i want to contribute to v6)?
Title: Re: *my dad has a kingler flashbacks
Post by: fortegigasgospel on July 30, 2016, 08:03:05 PM
Quote from: "TheRealRoyale"
How do i make animated tiles, like a conveyer belt (for solar man's stage, i want to contribute to v6)?
Hope this helps, obviously set it up to fit your map codes, change the tics and test what works best, the highlighted section on the bottom is the texture names for reference of where I'm fetching them from. If you need more help then this I'll go into better detail.
(http://i.imgur.com/YGO0Nxd.png)