View unanswered posts | View active topics It is currently Thu Mar 28, 2024 9:06 am



Reply to topic  [ 14 posts ] 
 Need help fixing bunker module! 
Author Message
User avatar

Joined: Sun Jan 24, 2010 1:07 pm
Posts: 34
Location: behind you
Reply with quote
Post Need help fixing bunker module!
After downloading LFoW's Prefabs, I was inspired to have an attempt at module-making. It seemed simple enough. I copied Some of his code, and used textures from the vanilla modules to make the FG, BG, and Mat .bmp's. I dicided to do something simple: just a tunnel module with a different shaped metal piece. Not a big project, just a test to see if the code works.

It doesn't.

Well, I don't know if it's the code or not, all I know is that when I go to buy it in the Pre-battle buy menu, It's picture is all weird, and when I click on it, CC crashes. I'll attach the .rte folder and what the thing looks like in the menu. Can anyone tell me what's wrong? I've had trouble with the Material Palette before, perhaps it's that? Anyway, I use windows, and here's the attachments:


Attachments:
Test Module.rte.rar [2.63 KiB]
Downloaded 289 times
File comment: The screenshot of what the menu picture looks like.
Pyro's problem.bmp [17.77 KiB]
Not downloaded yet
Thu Apr 08, 2010 12:26 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Need help fixing bunker module!
The paint program you use messes up the palette. You should use another program.


Thu Apr 08, 2010 2:05 pm
Profile
User avatar

Joined: Sun Jan 24, 2010 1:07 pm
Posts: 34
Location: behind you
Reply with quote
Post Re: Need help fixing bunker module!
In what way does it mess it up? Like 'MS Paint says it's R:165, G:165, B:165 (or majenta, hue and whatever it uses) but it's actually not.' type mess it up? There's only one other image editing/making program thing I have: Corel paint shop pro photo XI. I have no idea how to use it, and when I check the RGB values of the metal in the Mat picture, it says it's R:165, G:165, B:165 aswell.

If someone could explain it in detail so I can work out exactly how to fix it, and get it into the palette, and use Corel paint shop pro photo XI, or one of the above, that would be great.

Maybe if someone just fixes it, then I check what paint shop says about the RGB numbers, I'll be able to go 'OK, so R:178 for my computer is R:165 for everyone else's coomputer!'

Paint shop pro can load a palette, then convert your image onto it, but I don't know how to work it. I'll practice more with it tomorrow, it's way too late now.


Thu Apr 08, 2010 3:52 pm
Profile
User avatar

Joined: Wed Feb 04, 2009 4:07 pm
Posts: 380
Location: Galacia
Reply with quote
Post Re: Need help fixing bunker module!
The colors might be from the pallate, but the sprite isn't in the pallate. I belive there is a FAQ on this somewhere in Mod Making.


Thu Apr 08, 2010 3:57 pm
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Need help fixing bunker module!
Pyro, do you have Windows 7?


Thu Apr 08, 2010 10:23 pm
Profile
User avatar

Joined: Sun Jan 24, 2010 1:07 pm
Posts: 34
Location: behind you
Reply with quote
Post Re: Need help fixing bunker module!
dragonxp wrote:
Pyro, do you have Windows 7?


No, I use Windows XP.

And I'll have a look for that FAQ.


Fri Apr 09, 2010 4:18 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Need help fixing bunker module!
Essentially you open Pallette.bmp, paste your sprite in and save somewhere else, possibly over your old, non-palletted sprites.


Fri Apr 09, 2010 4:21 am
Profile WWW
User avatar

Joined: Sun Jan 24, 2010 1:07 pm
Posts: 34
Location: behind you
Reply with quote
Post Re: Need help fixing bunker module!
Thanks, 411570N3, that's the info I really wanted. The deep purple that's used for the background turns out hazy purple-brown when I paste the Mat.bmp on the palette, which is weird. Something between this and this.
I now have 3 problems:

1. When I place the module underground, the dirt still stays in between the roof and floor. I have a feeling I just have to change some pink to purple or vise versa somewhere in the .bmp's.

2. I can't place anything inside the module, between the roof and floor. Like the Background's solid. But if I place them outside the module, then walk them through, they walk through it like air.

3. The metal and concrete crumble like Default terrain.

Here's The new folder, and the screenshot showing my problems. The pit was made with a single molotov cocktail.


Attachments:
Test Module.rte.rar [18.98 KiB]
Downloaded 281 times
File comment: The screenshot
concrete pit.bmp [181.44 KiB]
Not downloaded yet
Fri Apr 09, 2010 5:33 am
Profile
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post Re: Need help fixing bunker module!
Since I'm the one that inspired you, I'll take the responsibility of teaching you a little about Bunker Modules.

Firstly, a Bunker Module is comprised of 3 parts. NOTE: ALL 3 parts must be the EXACT same dimensions or there will be collision problems.

Foreground Bitmap - This image must be in palette and is what appears over the top of the background image.
Background Bitmap - This image must also be in palette and is what appears beneath a foreground image, as well as what gives a module any collision at all.
Material or MAT image - This image is in a "DIFFERENT PALETTE". Material files use only a few colors to determine what the strength of the Bunker Module is. The main colors are as follows:
Dark Grey (R:128, G:128, B:128) is concrete, used for most walls.
Light Grey (R:192, G:192, B:192) is heavy concrete used for the metal girders that reinforce bunker walls.
Dark Purple (R:128, G:0, B:128) is open background, and is placed where you want only background to appear (i.e. Dark Purple is where you color the "open" part of a tunnel, the middle part between the walls)
Pink/"True Purple" (R:255, G:255, B:255) is open air, and is the background color of all CC sprite files. No collision will be drawn in these areas.

When making MAT files, my method involves copying the Foreground Bitmap onto an existing MAT file to first get the image into palette, resize it properly, then drawing the MAT colors over the top of the now in "MAT palette" foreground image.

Your current problem is that you have an odd color on your bunker walls (giving them odd collision) and it appears you have filled what should be the open tunnel with dark grey (concrete), so you can't place anything in it. It's essentially a solid block.


Fri Apr 09, 2010 8:05 am
Profile
User avatar

Joined: Sun Jan 24, 2010 1:07 pm
Posts: 34
Location: behind you
Reply with quote
Post Re: Need help fixing bunker module!
Thank you LFoW, I replaced the TestModMat.bmp with the old one, then checked the RGB values a second time. (First time was the Fri Apr 09, 2010 1:52 am post.) I had some weird numbers in there. I fixed them up, and problem 3 is sorted. It's as strong as concrete.

But problems 1 and 2 still exist. Underground, there's dirt inside it, and I cant place anything inside except an AHuman actor if it's facing left and in front of the right-hand-side greenish stripe in the background. But now, there's a new problem: Vertical stripes are missing from the module. Observe in the attachment.

So, from when I posted the first version of Test Module.rte to now, I have essentially:

Opened Palette.bmp from Base.rte in MS Paint.
Opened TestModFG.bmp from Test Module.rte in MS Paint.
Used the 'Select' tool to select the entire TestModFG and rightclicked and clicked 'copy'.
Then went back to Palette.bmp and rightclicked, then clicked paste.
Thought I noticed some of the colours change a little.
Saved It as TestModFG2.bmp, So I have the old and new copies of the FG.bmp.
Repeated these steps for TestModBG.bmp.
Changed the FilePaths in the code.
Changed the RGB values in TestModMat.bmp to what LFoW said.

What do I have to do now to fix it?


Attachments:
TestMod problem 3 sorted.bmp [96.33 KiB]
Not downloaded yet
Fri Apr 09, 2010 12:21 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Need help fixing bunker module!
Foreground and background palette:
Image

Material and scene palette:
Image

Not every 'paint' program can show you in what palette your picture is in.
Hope this helps to create a mental image or something. :)


Fri Apr 09, 2010 2:12 pm
Profile
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post Re: Need help fixing bunker module!
Pyrodoom wrote:
What do I have to do now to fix it?


If Gotcha's images didn't help you, just PM me the whole file and I'll make it workable while trying to explain what was wrong.


Sat Apr 10, 2010 1:11 am
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Need help fixing bunker module!
there are 3 different layers for bunker modules

they do not all use pallet.bmp, but they all have specific pallets.

Paste them into any bunker module, of the same layer, and save them as your new module layer. this works 99.9% of the time, the exception being if the top left pixel, is the air material, or the 'there's a background here' material, then the colors go a little wonkey in the buy/build menu but not when actually playing.

I know, I've made quite a few bunker modules, they just went sort of under-appreciated. I'd been meaning to do more.


Sat Apr 10, 2010 4:38 am
Profile YIM WWW
User avatar

Joined: Sun Jan 24, 2010 1:07 pm
Posts: 34
Location: behind you
Reply with quote
Post Re: Need help fixing bunker module!
Yes! It works in every way now.

Thank you everyone who helped!

Now maybe for a project I was thinking of: A set of the bunkermodules with all the concrete and metal reversed! They would be much stronger.

I also pasted my Default tarrain scene onto grasslands.bmp, and now it works. Thank you Miles_T3hR4t.


Sat Apr 10, 2010 11:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.125s | 18 Queries | GZIP : Off ]