Entity 2.1.24

A wealth of applications with which you will need to mod Halo 2.
Post Reply
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Sorry to tweak your strings, but someone had to do it!
Image
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.19

Post by XZodia »

I can't believe I fell for that >_<
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
xxpenguinxx
Posts: 1974
Joined: Sun Jan 27, 2008 4:50 am

Re: Entity 2.1.19

Post by xxpenguinxx »

This april fools shit is getting really old.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Click16 wrote:Fuck fuck fuck! I started modeling a BSP in 3ds! FUCK I FOGOT IT WAS APRIL FIRST >_<
Sorry, but I laughed pretty hard when I read this. So how far did you get?
xxpenguinxx wrote:This april fools shit is getting really old.
wikipedia wrote:The earliest recorded association between April 1 and foolishness is an ambiguous reference in Chaucer's Canterbury Tales (1392).
Agreed, let's put a stop to this childish (at least) 600+ year old tradition. :lol:
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Entity 2.1.19

Post by Click16 »

I created a height map, and a grass texture... That's about it.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Created a new branch in Entity for VisualMenuEditor. Has the updated visual menu editor code (incorrect still, but see pic below).
https://github.com/troymac1ure/Entity/t ... MenuEditor

I dunno if I'm ever gonna get the push to continue it on more again. There are some other updates which are handy, but I'm not putting them on the auto-update as I can't remember what all they are (I think some bugs with poke/peek and some changes to the StringID selection box mostly). If you don't do Git and really want the newest version I can throw it up, but I don't know how much demand there is for any of this anymore.

Image
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Entity 2.1.19

Post by JacksonCougar »

When in doubt, git it; I find myself coming back to Halo 2 every year or so to do more work.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.19

Post by XZodia »

Even if it doesn't get used to make mods, I think its cool just to see how the menu is organised in the map.
Is there a binary for this?
Having a visual editor makes it a lot more fun/interesting to play around with =)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

I never figured out the menu options layout. It's my brick wall.
I had ideas, but they all fall through. You thought they might be imbedded in the XBE which seemed like a dumb suggestion as that would make the menus hard coded, but I can't find any rational data otherwise.

It seems like the layouts are just randomly tossed together and magically the engine sorts them out.
I noticed some weird happenings by changing the screen IDs. Can't remember completely, but I think it was like the original item list is there even though you couldn't see it. If someone wants to look at this more, try swapping 2 menu IDs (I did it in RTH) and notice the words disappear, but the links are still there (I think).
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.19

Post by XZodia »

Yeah, I did that a while ago when I made the plugins and came to the conclusion that the engine links the map menu info with the code links in the xbe using the screen ID's
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Entity 2.1.19

Post by Click16 »

I have a question. Does this version of Entity support writing over certain bitmap types such as AY8, A8Y8, G8B8, etc?
Image
xxpenguinxx
Posts: 1974
Joined: Sun Jan 27, 2008 4:50 am

Re: Entity 2.1.19

Post by xxpenguinxx »

I think Entity 1.6 UE can, or at least it can inject bumpmaps.

Have you tried injecting them?
DemonicSandwich wrote:See that? You see that how it is highlighted down here but it's not highlighted right there? Ah, I guess that's what I get for pirating it.
In Soviet Russia, DS touches you. Say it again and I'll do more than touch. ~DS -Oh baby
A cat was licking itself to the sound of potato chips.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Entity 2.1.19

Post by Click16 »

xxpenguinxx wrote:I think Entity 1.6 UE can, or at least it can inject bumpmaps.

Have you tried injecting them?
No I just programmed a converter to convert A8R8G8B8 dds textures to each of the types. Only thing I didn't work in is the bumpmap converter
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Click16 wrote:I have a question. Does this version of Entity support writing over certain bitmap types such as AY8, A8Y8, G8B8, etc?
From what I remember (many moons ago now) I had all formats supported. All formats could be converted to/from except no conversion to DXT I believe (and I think I had all the bugs worked out finally?). If over-writing with the same format I am sure that was no issue. Maybe I'll fire it up and check (been a looong time since I ran Entity).

EDIT: (*note* everything written here is followed by "if I remember correctly")
Injections work for same color depth and (padded) dimensions files.
So as long as it's 8-bit to 8-bit, 16-bit to 16-bit or 32-bit to 32-bit file type doesn't matter.
When I say padded, it doesn't matter if you wish to inject a 120x120 over top as they both get padded to 128x128

So, you should be able to inject a 128x128 A8Y8 over a 128x128 G8B8 if desired.
I extracted "effects\bitmaps\distortion\distortion_ripple" and injected it over "effects\bitmaps\distortion\distortion_ring" with no issue (both are 128x128, G8B8 format). Looking at my changelog, it looks like that was all done by 2.1.17.

For the following Halo formats are translated into the following DDS formats (taken from "HaloMap\DDSFunctions\DDS.cs"):

Code: Select all

        public enum H2DDSFormats
        {
            A8 = DDSFileFormats.Alpha_8_bit, // ._8bpp_8_A_alpha,
            Y8 = DDSFileFormats.Alpha_8_bit, // ._8bpp_8_A_alpha,
            P8 = DDSFileFormats.Alpha_8_bit, // ._8bpp_8_A_alpha,
            AY8 = DDSFileFormats.A1R5G5B5_16_bit, // ._16bpp_1555_ARGB_Unsigned,
            A8Y8 = DDSFileFormats.AlphaLuminance_16_bit, // ._16bpp_88_AL_AlphaLuminance,
            R5G6B5 = DDSFileFormats.R5G6B5_16_bit, // _16bpp_565_RGB_Unsigned,
            A1R5G5B5 = DDSFileFormats.A1R5G5B5_16_bit, // ._16bpp_1555_ARGB_Unsigned,
            A4R4G4B4 = DDSFileFormats.A4R4G4B4_16_bit, // ._16bpp_444_ARGB_Unsigned,
            X8R8G8B8 = DDSFileFormats.X8R8G8B8_32_bit, // ._32bpp_8888_XRGB_Unsigned,
            A8R8G8B8 = DDSFileFormats.A8R8G8B8_32_bit, // ._32bpp_8888_ARGB_Unsigned,
            DXT1 = DDSFileFormats.DXT1, // ._4bpp_DXT1_ARGB_1BitAlpha,
            DXT3 = DDSFileFormats.DXT3, // _8bpp_DXT3_ARGB_ExplicitAlpha,
            DXT5 = DDSFileFormats.DXT5, // _8bpp_DXT5_ARGB_InterpolatedAlpha,
            Lightmap = DDSFileFormats.BITM_FORMAT_LIGHTMAP,
            G8B8 = DDSFileFormats.AlphaLuminance_16_bit // _16bpp_88_AL_AlphaLuminance
        }
and

Code: Select all

            string[] formatDescriptions = new[]
                {
                    "DXT1       ARGB    4 bpp | 1 bit alpha",
                    "DXT3       ARGB    8 bpp | explicit alpha", 
                    "DXT5       ARGB    8 bpp | interpolated alpha",
                    "8             A    8 bpp | alpha", 
                    "8.8          AL   16 bpp | alpha/luminance", 
                    "4.4.4.4     RGB   16 bpp | unsigned", 
                    "1.5.5.5    ARGB   16 bpp | unsigned",
                    "5.6.5       RGB   16 bpp | unsigned", 
                    "4.4        ARGB   16 bpp | unsigned",
                    "X.8.8.8    XRGB   32 bpp | unsigned", 
                    "8.8.8.8    ARGB   32 bpp | unsigned", 
                    "                         | lightmap"
                };
            switch (info.formatname)
            {
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_DXT1:
                    ddsff.Format = DDSFileFormats.DXT1;
                    temp += formatDescriptions[0];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_DXT2AND3:
                    ddsff.Format = DDSFileFormats.DXT3;
                    temp += formatDescriptions[1];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_DXT4AND5:
                    ddsff.Format = DDSFileFormats.DXT5;
                    temp += formatDescriptions[2];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8:
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_P8:
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_Y8:
                    ddsff.Format = DDSFileFormats.Alpha_8_bit;
                    temp += formatDescriptions[3];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_G8B8:
                    ddsff.Format = DDSFileFormats.AlphaLuminance_16_bit;
                    temp += formatDescriptions[4];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A4R4G4B4:
                    ddsff.Format = DDSFileFormats.A4R4G4B4_16_bit;
                    temp += formatDescriptions[5];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A1R5G5B5:
                    ddsff.Format = DDSFileFormats.A1R5G5B5_16_bit;
                    temp += formatDescriptions[6];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_R5G6B5:
                    ddsff.Format = DDSFileFormats.R5G6B5_16_bit;
                    temp += formatDescriptions[7];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8Y8:
                    ddsff.Format = DDSFileFormats.AlphaLuminance_16_bit;
                    temp += formatDescriptions[8];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_AY8:
                    ddsff.Format = DDSFileFormats.AlphaLuminance_16_bit;
                    temp += formatDescriptions[8];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_X8R8G8B8:
                    ddsff.Format = DDSFileFormats.X8R8G8B8_32_bit;
                    temp += formatDescriptions[9];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8R8G8B8:
                    ddsff.Format = DDSFileFormats.A8R8G8B8_32_bit;
                    temp += formatDescriptions[10];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_LIGHTMAP:
                    ddsff.Format = DDSFileFormats.BITM_FORMAT_LIGHTMAP;
                    temp += formatDescriptions[11];
                    break;
            }
and also very important are the flags:

Code: Select all

                // For RGB formats dwFlags should include DDPF_ALPHAPIXELS if it contains an alpha channel.
                // For A8R8G8B8, this value would be 0xff000000.
                switch (b2.formatname)
                {
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A1R5G5B5:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A4R4G4B4:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8R8G8B8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_G8B8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8Y8:
                        Flags = Flags + (int)DDSEnum.DDPF_ALPHAPIXELS;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_P8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_Y8:
                        Flags = Flags + (int)DDSEnum.DDPF_ALPHA;
                        Flags = Flags - (int)DDSEnum.DDPF_RGB; // These formats are ALPHA ONLY, no RGB
                        break;
                }

                // For RGB formats, this contains the masks for the red, green, and blue channels. For A8R8G8B8, these
                // values would be 0x00ff0000, 0x0000ff00, and 0x000000ff respectively.
                switch (b2.formatname)
                {
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_G8B8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8Y8:
                        RGBAlphaBitMask = 0xFF00;
                        RBitMask = 0x00FF;
                        GBitMask = 0x0000;
                        BBitMask = 0x0000;
                        Flags -= (int)DDSEnum.DDPF_RGB; // This format doesn't use RGB
                        Flags += (int)DDSEnum.DDSD_MIPMAPCOUNT; // Mipmap Count
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_AY8:
                        RGBAlphaBitMask = 0x0000;
                        RBitMask = 0x000F;
                        GBitMask = 0x00F0;
                        BBitMask = 0x0000;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_P8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_Y8:
                        RGBAlphaBitMask = 0x00FF;
                        RBitMask = 0x0000;
                        GBitMask = 0x0000;
                        BBitMask = 0x0000;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_R5G6B5:
                        RGBAlphaBitMask = 0x0000;
                        RBitMask = 0xF800;
                        GBitMask = 0x07E0;
                        BBitMask = 0x001F;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A1R5G5B5:
                        RGBAlphaBitMask = 0x8000;
                        RBitMask = 0x7C00;
                        GBitMask = 0x03E0;
                        BBitMask = 0x001F;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A4R4G4B4:
                        RGBAlphaBitMask = 0xF000;
                        RBitMask = 0x0F00;
                        GBitMask = 0x00F0;
                        BBitMask = 0x000F;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_X8R8G8B8:
                        RGBAlphaBitMask = 0x00000000;
                        RBitMask = 0x00FF0000;
                        GBitMask = 0x0000FF00;
                        BBitMask = 0x000000FF;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8R8G8B8:
                        RGBAlphaBitMask = 0xFF000000;
                        RBitMask = 0x00FF0000;
                        GBitMask = 0x0000FF00;
                        BBitMask = 0x000000FF;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_LIGHTMAP:
                        RGBAlphaBitMask = 0x00000000;
                        RBitMask = 0x000000FF;
                        GBitMask = 0x000000FF;
                        BBitMask = 0x000000FF;
                        Flags -= (int)DDSEnum.DDPF_RGB; // This format doesn't use RGB
                        Flags += (int)DDSEnum.DDSD_MIPMAPCOUNT; // Mipmap Count
                        break;
                    default:
                        RGBAlphaBitMask = 0x0;
                        RBitMask = 0;
                        GBitMask = 0;
                        BBitMask = 0;
                        break;
                }
            }
You'll notice some files are saved in unexpected manners (ex. AY8 (8-bit) is saved as a 16-bit ARGB file with a mask that only uses 4 bits in R and 4 bits in G). This may seem weird, but when I was writing this I was saving files from photoshop into each of the formats to see how it ouput them and then wrote Entity to conform to this standard (as other programs could load photoshop DDS files)
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

One other interesting update that probably never got noticed was the 3D bitmap support (click on "rasterizer\plasma_shield_noise" [A8Y8] or "rasterizer\distance_attenuation" [AY8]) to see animated 3D bitmap in the preview box. DO NOT click on "rasterizer\default_3d" as it crashes Entity.

Also, "rasterizer\distance_attenuation" clearly shows that I still had decoding issues with AY8 files.

Never realized the bitm sequences before. Would have been easy to add animated bitmaps as well. Oh crap. I have the urge to just add that one small update, but I know how that would end up. lol
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Entity 2.1.19

Post by JacksonCougar »

First a method, then your soul.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

JacksonCougar wrote:First a method, then your soul.
^This. There must be another way though...

I guess you could say that there's a Method to our Madness ;)
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: Entity 2.1.19

Post by CaptainPoopface »

Is it a 3d bitmap that shows an outline of the chief or elite body with the orange or blue lightning when the shield takes damage in 3P? I thought that was a hidden shader function but could never find a way to leave it on all the time. Sure would be nice to more clearly show players on some of the darker lightmaps.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Yes. The only two 3D ones are the two above I think (plasma_shield_noise & distance_attenuation).
There are numerous animated bitmaps though (seem very much the same as 3D bitmaps).
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Well... :roll:
So a lot of the animated bitmaps look kinda dumb on their own, but fire_cloud_alpha looks good and the spinning shells are looking good (other than the low res images are stretched to fit the image box). Will hopefully post pics after I find the memory leak (I must be forgetting to dispose a picture or 300 since Entity is using 1.5GB of memory :shock: )

EDIT:
The memory leak wasn't new. I just never knew how to fix it before and when loading bitmaps for Animation, it stacks up quick. Anyways, this will resolve memory leaks in many area (Visual editor, mainmenueditor, etc).
Also, fixed the AY8 bitmap displays, so I think all bitmaps now display properly.
All the animated bitmaps now animate (with an option to disable as well).
So, for being away so long, this small section came back very naturally.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.19

Post by troymac1ure »

Entity 2.1.20 (w/ animated bitmap support and memory leak fixes).
(as well as fonts in mainmenueditor I think)

The newest version is available through the FTP server and update server. Source is on the FTP server as usual.

Keep a backup of your old copy (if anyone evens still touches this) as I don't know what I was doing when I stopped ages ago. There may be a major bug in one section for all I know. :roll:

Wow, it's been almost 1 1/2 years since last update.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.19

Post by XZodia »

I love seeing this updated =)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: Entity 2.1.19

Post by CaptainPoopface »

Hot sauce! I want to see the animated bitmap stuff. Can someone remind me how to get to the FTP server?
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: Entity 2.1.19

Post by DoorM4n »

Animated Bitmaps?! OMG, I can finally do proper warthog spinners!
Image
Remnant! We were the last stand.
xXF3RcHoXx
Posts: 338
Joined: Sat Sep 06, 2008 2:36 am
Location: Mexico

Re: Entity 2.1.19

Post by xXF3RcHoXx »

Yay new entity, thanks a lot for taking the time to (still) work on it :D

Btw, just saying, the bsp viewer doesn't show all AI spawns, just a few ones
We are the last stand.
Aumman Anubis wrote:I'm still trying to figure out how a cat grooming defeats a failing economy.
Post Reply