Meta Editor I Started On

Discuss anything programming related.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Meta Editor I Started On

Post by OwnZ joO »

I've started working on a meta editor and plugin system similar to Anthony's, but it has its differences too. This is not read from a map yet, it just creates an example Bitmap plugin and displays it. It only has non halo things for my plugin system so far, I'll implement strings and idents and such later when I start with the maps.
Image
Image

Heres the plugin that it is displaying so you can get an idea of how my plugin system would work:

Code: Select all


public class bitm : Meta
    {
        EnumType Bitmap_Type; 
        public class EnumType : Enum16
        {
            public override void  AddOptions()
            {
 	            AddOption("2D Textures", 0);
                AddOption("3D Textures", 1);
                AddOption("CubeMap", 2);
                AddOption("Sprite", 3);
                AddOption("UI Bitmap", 4);
            }
        }
        EnumFormat Bitmap_Format;
        public class EnumFormat : Enum16
        {
            public override void  AddOptions()
            {
                AddOption("DXT1 Encoded", 0);
                AddOption("DXT2/3 Encoded", 1);
                AddOption("DXT4/5 Encoded", 2);
                AddOption("16-Bit Colour", 3);
                AddOption("32-Bit Colour", 4);
                AddOption("Monochrome", 5);
            }
        }
        EnumUsage Bitmap_Usage;
        public class EnumUsage : Enum16
        {
            public override void AddOptions()
            {
                AddOption("Alpha Blend", 0);
                AddOption("Default", 1);
                AddOption("Height Map", 2);
                AddOption("Light Map", 3);
                AddOption("Vector Map", 4);
                AddOption("Height Map BLUE 255", 5);
                AddOption("embm", 6);
                AddOption("Height Map A8L8", 6);
                AddOption("Height Map G8B8", 7);
                AddOption("Height Map G8B8 /w Alpha", 8);
            }
        }
        BitMaskFormat Bitmap_Format_Flags;
        public class BitMaskFormat : BitMask16
        {
            protected override void AddBits()
            {
                AddBit("Enable Diffusion Dithering", 0);
                AddBit("Disable Height map compression", 1);
                AddBit("Uniform Sprite Sequnces", 2);
                AddBit("Filthy Sprite Bugfix", 3);
                AddBit("Use Sharp Bump Filter", 4);
                AddBit("unused", 5);
                AddBit("Use Clamped/Mirrored Bump Filter", 6);
                AddBit("Invert Detail Fade", 7);
                AddBit("Swap x-y Vector Components", 8);
                AddBit("Convert From Signed", 9);
                AddBit("Convert To Signed", 10);
                AddBit("Import Mipmap Chains", 11);
                AddBit("Internationally True Color", 12);
            }
        }
        Float Detail_Fade_Factor;
        Float Sharpen_Amount;
        Float Bump_Height;
        EnumSpriteBudgetSize Sprite_Budget_Size;
        public class EnumSpriteBudgetSize : Enum16
        {
            public override void AddOptions()
            {
                AddOption("32x32", 0);
                AddOption("64x64", 1);
                AddOption("128x128", 2);
                AddOption("256x256", 3);
                AddOption("512x512", 4);
            }
        }
        Int16 Sprite_Budget_Count_Int16;
        Int16 Color_Plate_Width;
        Int16 Color_Plate_Height;
        Int32 Compressed_Color_Plate_Data;
        [Size(12)]
        Unused Unused_Offset32;
        Float Blur_Filter_Size;
        Float Alpha_Bias;
        Float MipMap_Count;
        EnumSpriteUsage Sprite_Usage;
        public class EnumSpriteUsage : Enum16
        {
            public override void AddOptions()
            {  
                AddOption("Blend/Add/Subtract/Max", 0);
                AddOption("Multiply/Min", 1);
                AddOption("Double Multiply", 2);
            }
        }
        Int16 Sprite_Spacing;
        EnumFaceFormat Face_Format;
        public class EnumFaceFormat : Enum16
        {
            public override void AddOptions()
            {
                AddOption("Default", 0);
                AddOption("Force G8B8", 1);
                AddOption("Force DXT1", 2);
                AddOption("Force DXT3", 3);
                AddOption("Force DXT5", 4);
                AddOption("Force Alpha-Luminance8", 5);
                AddOption("Force A4R4G4B4", 6);
            }
        }
        Reflexive<SequencesChunk> Sequences;
        public class SequencesChunk : Chunk
        {
            //  <string32 name="Name" offset="0" visible="True" />
            Int16 First_Bitmap_Index;
            Int16 Bitmap_Count;
            [Size(16)]
            Unused Unused_Offset36;
            public Reflexive<SpritesChunk> Sprites;
            public class SpritesChunk : Chunk
            {
                Int32 Bitmap_Index;
                Unused Unused_Offset4;
                Float Left;
                Float Right;
                Float Top;
                Float Bottom;
                Float Reg_Point_X;
                Float Reg_Point_Y;
            }
        }
        Reflexive<BitmapDataChunk> Bitmap_Data;
        public class BitmapDataChunk : Chunk
        {
            //<tag name="Tag" offset="0" visible="False" />
            Int16 Width;
            Int16 Height;
            Int16 Depth;
            Int16 Type;
            Int16 Format;
            FlagsBitmask Flags;
            public class FlagsBitmask : BitMask16
            {
                protected override void AddBits()
                {
                    AddBit("^2 Dimensions", 0);
                    AddBit("Compressed", 1);
                    AddBit("Palettized", 2);
                    AddBit("Swizzled", 3);
                    AddBit("Linear", 4);
                    AddBit("v16u16", 5);
                    AddBit("HUD Bitmap?", 7);
                    AddBit("Always On?", 9);
                    AddBit("Interlaced?", 12);
                }
            }
            Int16 Reg_X;
            Int16 Reg_Y;
            Int16 MipMap_Count;
            Int16 Pixel_Offset;
            [Visible(false)]
            Int32 Zero;
            Int32 LOD1_Offset;
            Int32 LOD2_Offset;
            Int32 LOD3_Offset;
            [Size(12)]
            Unused Unused_Offset40;
            Int32 LOD1_Size;
            Int32 LOD2_Size;
            Int32 LOD3_Size;
            [Size(12)]
            Unused Unused_Offset64;
            //<id name="ID" offset="76" visible="True" />
            [Size(8)]
            Unused Unused_Offset80;
            [Visible(false),
            Comments("CBZ")]
            BitmaskFlagsCBZ Flags_CBZ;
            public class BitmaskFlagsCBZ : BitMask32
            {
            }
            Unused Unused_Offset4;
            [Visible(false),
            Comments("CBZ")]
            Int32 Unknown0;
            [Visible(false),
            Comments("CBZ")]
            Int32 Unknown1;
            [Visible(false),
            Comments("CBZ")]
            Int32 Unknown2;
            [Visible(false),
            Comments("CBZ")]
            Int32 Unknown3;
            Unused Unused_Offset112;
        }
    }
User avatar
Aumaan Anubis
Staff
Posts: 1812
Joined: Thu Dec 13, 2007 12:18 am
Contact:

Re: Meta Editor I Started On

Post by Aumaan Anubis »

Cool.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: Meta Editor I Started On

Post by neodos »

Nice, is it for halo 2 or halo 3?
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Meta Editor I Started On

Post by Grimdoomer »

Cool, Ive been using a cs plugin system too. Mostly because mine are harcoded ftw :D
Don't snort the magic, we need it for the network.
Supermodder911
Posts: 409
Joined: Sat Jan 12, 2008 11:42 pm
Location: Michigan
Contact:

Re: Meta Editor I Started On

Post by Supermodder911 »

Good job man...

I'm still loving it.
Image
Chad Warden is Ballin'. No jk.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

neodos wrote:Nice, is it for halo 2 or halo 3?
Halo 2, at least first. Maybe I'll work it in with CC if they want it, but I need to fix it up some more. Keep in mind this is just the start, it doesn't have anything like idents or stringIDs yet, but I like how it's going so far, it will read and write everything "correctly" on my examples which don't actually read from a map, but a temp file it created. I also think this plugin system will be great for chunk cloning, since it represents unused in an array of bytes and would copy it exactly, instead of messing it up like entity. I'm gonna focus on meta editing first though.

Edit: I might need some help later on, but for now I'm gonna go it alone.

Edit:
Also another cool thing is it will tell you right away if you enter data that's wrong, like you enter a number thats too long for a byte or something of that nature, and I made the number control not allow letters to be typed at all.
Example:
Image
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: Meta Editor I Started On

Post by neodos »

Well meta editor would be kind of useless to be honest that may be a loss of time, what we need is a perfect chunk cloner, entity meta editor works fine and in my opinion a chunk cloner shouldn't work using the plugins as we update em and there can be bugs etc.
Supermodder911
Posts: 409
Joined: Sat Jan 12, 2008 11:42 pm
Location: Michigan
Contact:

Re: Meta Editor I Started On

Post by Supermodder911 »

It has to.
Image
Chad Warden is Ballin'. No jk.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: Meta Editor I Started On

Post by neodos »

I mea shouldn't use plugins that are beign updated because not perfect, the programmers should check the plugins for clonning purposes then.
Supermodder911
Posts: 409
Joined: Sat Jan 12, 2008 11:42 pm
Location: Michigan
Contact:

Re: Meta Editor I Started On

Post by Supermodder911 »

If only it were that easy. :P
Image
Chad Warden is Ballin'. No jk.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

neodos wrote:Well meta editor would be kind of useless to be honest that may be a loss of time, what we need is a perfect chunk cloner, entity meta editor works fine and in my opinion a chunk cloner shouldn't work using the plugins as we update em and there can be bugs etc.
Nice thing is that xzodia finished a lot of them, so hopefully those are correct. All I have to do is write a converter.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: Meta Editor I Started On

Post by neodos »

I guess relfexives and chunks are well mapped the thing is he let some values to unused when these are not really unused but for a really particular use, so yeah not much people would use it only a few.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

My cloner would work with unused, because it reads it, and would copy it exactly as it is. Also it would be a big pain to make a chunk cloner the way you're talking about, and if they're mapped out correctly, this is a much better solution. Keeping in mind that unused will be cloned properly, this should be good as long as the chunks are correctly mapped out.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: Meta Editor I Started On

Post by neodos »

Allright, even if it's not ifp it's easy to understand these plugins, not like for C# plguins for h3 is ....
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

neodos wrote:Allright, even if it's not ifp it's easy to understand these plugins, not like for C# plguins for h3 is ....
Haha so far at least it is, I tried to keep it simple.
I just got reading and writing working for simple tags, so this is coming along nicely so far.
I'm somewhat open to suggestions on what would make it better.
If I still have interest in it after I hopefully finish my meta editor I will work on a chunk cloner, but who knows, maybe if I don't feel like making a chunk cloner I'll release the source.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Meta Editor I Started On

Post by Grimdoomer »

Add an information item. So you can add important blocks of info like the H2V guerilla :D its really help full. This would make an awsome dll, for use with any programing project not just halo!
Don't snort the magic, we need it for the network.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

Grimdoomer wrote:Add an information item. So you can add important blocks of info like the H2V guerilla :D its really help full. This would make an awsome dll, for use with any programing project not just halo!
I have an Attribute called Description(it was Comments in that plugin but i changed it) so that you can add ("Description") to the end of a name
so for example:
[Description("World Units")]
Int Bounding_Radius;
would look like this in the meta editor:
Bounding Radius (World Units)
Yeah it is possibly going to be used with other stuff besides halo, I might have some other use for it.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Meta Editor I Started On

Post by Grimdoomer »

If you released a dll or source, I would defently use this with my Far Cry app :D
Don't snort the magic, we need it for the network.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

I'm not sure if I'm going to or not, but it is a possibility, I wanna make it work flawlessly before I would do that though.
Supermodder911
Posts: 409
Joined: Sat Jan 12, 2008 11:42 pm
Location: Michigan
Contact:

Re: Meta Editor I Started On

Post by Supermodder911 »

OwnZ joO wrote:I'm not sure if I'm going to or not, but it is a possibility, I wanna make it work flawlessly before I would do that though.
We need to finish converting em' to. :p
Image
Chad Warden is Ballin'. No jk.
DarkShallFall
Posts: 710
Joined: Thu Jan 03, 2008 5:29 pm

Re: Meta Editor I Started On

Post by DarkShallFall »

Why the fucks is it green.
Supermodder911
Posts: 409
Joined: Sat Jan 12, 2008 11:42 pm
Location: Michigan
Contact:

Re: Meta Editor I Started On

Post by Supermodder911 »

It's not the actual colors... :|

Ownz just sucks at UI. :XP:
Image
Chad Warden is Ballin'. No jk.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

Supermodder911 wrote:It's not the actual colors... :|

Ownz just sucks at UI. :XP:
All the controls are transparent, and I had just made that form background green.
What I'm currently working with has a white background, I feel it's more important to get it all working than to have a good UI during beta, then tweak the UI when you have everything functioning properly. I don't really enjoy making the UI much, so I'll probably get some help form people on what I should do with it. I might end up using the dropdown control that Shade used in Engineer also, I could come out with multiple releases for different options, like a checked combobox for bitmasks too. It's by no means done, but it is functioning pretty good, and I think I converted all the plugins properly too.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

Good news, I'm pretty sure I just loaded scnr on lockout and it was all/mostly correct. Doesn't like to work on ascension yet for some reason, but i'll figure it out eventually. I wouldn't be surprised if I got a beta out within a week or 2. Also it uses less memory than Entity as of now, but I don't load the stringTable yet or display idents and strings, so we'll see how it works after I get that stuff going.
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Meta Editor I Started On

Post by OwnZ joO »

If anybody wants to beta this, pm me.
Post Reply