XZodia's Plugins

This is dedicated to all the mods the community wants to share!
Patches only people. No Map files.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

Sounds complicated...
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: XZodia's Plugins

Post by troymac1ure »

XZodia wrote:And....Its another menu related complete plugin! >_>
wgit.ent
download/file.php?id=681
This is wrong, but I'll update it later. Basically the "UI Bitmap" Top & Left variables are backwards. Also, they are offsets from screen center (I'm sure this was obvious as they contained negative values).
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

Well I took the values from Open Sauce...
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: XZodia's Plugins

Post by troymac1ure »

The other strange thing is the origin values are like a graph, not a screen coordinates. X positive is right & Y positive is up (not down).
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

Thats actually normal, its Windows thats backwards.
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: XZodia's Plugins

Post by troymac1ure »

I beg to differ. It's not windows, it's just computers in general. Video cards access the screen through memory, which starts at the upper left side of the monitor (due to beam travel direction on old CRTs) and work across, then down. Therefore, it makes sense to have the top left as 0,0 origin. DOS was like this as well and I'm sure mac is most probably the same.
On paper, it makes more sense the other way though...
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: XZodia's Plugins

Post by Grimdoomer »

troymac1ure wrote:I beg to differ. It's not windows, it's just computers in general. Video cards access the screen through memory, which starts at the upper left side of the monitor (due to beam travel direction on old CRTs) and work across, then down. Therefore, it makes sense to have the top left as 0,0 origin. DOS was like this as well and I'm sure mac is most probably the same.
On paper, it makes more sense the other way though...
This.
Don't snort the magic, we need it for the network.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

...and its another completed plugin!!!!!

styl : AI Style

Has been attached to the main post, it looks like it could be interesting for AI in MP mods...

Unfortunately, Meta Editor Plus doesn't seem to work with it and I don't know why, could you maybe check this out for me troy?
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: XZodia's Plugins

Post by CaptainPoopface »

What is the styl tag used for? I never poked around with it.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

It has something to do with AI behaviour but I'm not exactly what it does. There's a shit load of tick box options for stuff like whether or not the ai should retreat, berserk, use a vehicle etc
Theres also something about there movement, like if they should climb walls, or jump around...
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: XZodia's Plugins

Post by troymac1ure »

XZodia wrote:...and its another completed plugin!!!!!

styl : AI Style

Has been attached to the main post, it looks like it could be interesting for AI in MP mods...

Unfortunately, Meta Editor Plus doesn't seem to work with it and I don't know why, could you maybe check this out for me troy?
I'll take a look when I get a chance.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: XZodia's Plugins

Post by troymac1ure »

It loads fine on my end. Are you sure it's in the right directory? The newer entity's don't use the .\plugin directory, they use a common plugin directory allowing for multiple plugin sets. Check your plugin directory and if you still have issues post back.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

Yea, it works fine in the old meta editor but the new one gives me an error "Value was either too large or too small for Int32"
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: XZodia's Plugins

Post by troymac1ure »

Have you tried on multiple maps? Clean/Modded? I will try it on a few more maps when I next get a chance.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

Just tried a few tags in a clean lockout, only a couple of them worked.
Also, I made a small mistake in the plugin, which I have now corrected, new download is up
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: XZodia's Plugins

Post by troymac1ure »

Found a coding error in the bitmask fields. A Bitmask32 value was being saved as a uint32, but later was being used as a int32. Fin for anything < ~2,100,000,000, but errors for anything above that (such as ALL checkboxes). Updated Entity's code and will ship it down the auto-update pipe briefly.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

I've attached a version of Phmo to the main post, it is 90% complete but I don't know where it came from and I don't think I made it...buts it's really good.

It also made me realise we have the capability to create/import minecraft style maps. Would that interest anyone?
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: XZodia's Plugins

Post by Click16 »

XZodia wrote:It also made me realise we have the capability to create/import minecraft style maps. Would that interest anyone?
Yes, and how would this be done? I really don't know how Collision and Physics model tags work. I know what they do, but I don't know what defines them. Like, for example, is the collision model a collection of spheres and cubes to make the approximate hit box for an object, or is it an actual mesh with vertices and whatnot?
Image
User avatar
NotZachary82
Posts: 1846
Joined: Thu Dec 20, 2007 8:39 pm

Re: XZodia's Plugins

Post by NotZachary82 »

Click16 wrote:
XZodia wrote:It also made me realise we have the capability to create/import minecraft style maps. Would that interest anyone?
Yes, and how would this be done? I really don't know how Collision and Physics model tags work. I know what they do, but I don't know what defines them. Like, for example, is the collision model a collection of spheres and cubes to make the approximate hit box for an object, or is it an actual mesh with vertices and whatnot?
Collision at least is an actual mesh with vertices. Physics is a little different I think and is a mix of both (I believe). I'm basing this off my experience compiling those tags in Halo CE long ago, but physics only applies to vehicles in that game.

It's a mystery to me why there isn't custom (projectile) collision yet. It's just a collection of vertices and edges and faces, and if you gave the correct coordinates and did the math correctly to get accurate distances from the center, it should be good to go. I'm 99% sure this is what DemonicSandwich did with his right triangle block (modified from a cube)
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: XZodia's Plugins

Post by JacksonCougar »

The problem with collision is that it is packed into a BSP tree. So to make a collision model you also need to be able to generate a valid tree for it. Not exactly hard, not exactly easy.

And physics_collision is probably done without any 'mesh' information at all.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: XZodia's Plugins

Post by XZodia »

@Click: Well minecraft is basiscally just a shit load of boxes and we already know how to make collision boxes using the phmo tag (see ICanHazCubes). Therefore, to create a minecraft style map in halo, all we need to do is line up a load of same sized phmo cubes. This could be generated is various ways including procedurally and from an image. We could potentially create all sorts of terrain at the push of a button.
A really cool side of this would be automatic creation of player spawns, weapon placements, vehicle placements and objectives =)

@NotZachary and Jackson
Phmo (Physics models) are create primarily from a collection of cubes, spheres and planes. Which is used for object to object collision. These primitives are then associated with a rigidbody (also found in the phmo tag) which controls how the object responds to collisions etc

I can't currently comment on bullet collision but I'm fairly sure its triangle based and involves the coll tag.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: XZodia's Plugins

Post by JacksonCougar »

Coll is like this. Is the ray (bullet) hitting this plane? yes / no
yes (hit)
no : Okay what side of the plane is it on?
Left -> another plane
Right -> another plane

eventually it'll get to an exit leaf and assume no collision

*this is a really simple explanation; it is more complicated than that in many cases
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: XZodia's Plugins

Post by neodos »

XZodia wrote:@Click: Well minecraft is basiscally just a shit load of boxes and we already know how to make collision boxes using the phmo tag (see ICanHazCubes). Therefore, to create a minecraft style map in halo, all we need to do is line up a load of same sized phmo cubes. This could be generated is various ways including procedurally and from an image. We could potentially create all sorts of terrain at the push of a button.
A really cool side of this would be automatic creation of player spawns, weapon placements, vehicle placements and objectives =)
Minecraft actually splits the map in chunks of 16x16x16 cubes but its actually all one mesh for that chunk, with only the outter/visible faces created, when a player adds or removes a cube it basically recalculates the whole mesh data and updates the chunk, all the blocks are in a a single texture/material, so it only counts as one draw call per chunk.

I think it would definitely be cool to try it on Halo 2 & xbox, my guess is it will probably have a hard time with too many boxes.
I am guessing you would spawn these boxes through scnr? as long as you can get enough chunks added without breaking it and if it doesn't have a limit on the number spawnable objects or of physics objects.
XZodia wrote: @NotZachary and Jackson
Phmo (Physics models) are create primarily from a collection of cubes, spheres and planes. Which is used for object to object collision. These primitives are then associated with a rigidbody (also found in the phmo tag) which controls how the object responds to collisions etc

I can't currently comment on bullet collision but I'm fairly sure its triangle based and involves the coll tag.
Yup its a mesh and from what I recall it should be really easy to calculate, its just a convex mesh for most objects.
I am not sure if Halo 2 had the possibility to have multiple convex meshes put together, but a combination of one coll convex mesh + multiple PHMO shapes (cube, cylinder, sphere...) was definitely possible.

The only issue is as always, being able to create the tag data and injecting it into the map without breaking stuff when adding it.

Actually, did anyone finish any working map compiler?
Or can we add reflexives in entity without breaking other tags?

What about "simply" recalculating every tag's offsets instead of recompiling? I know when adding reflexives in entity, it pretty much was doing that, at the time I didn't fully understand and now I probably don't remember enough, but it seemed like the problem was certain plugins being incomplete or wrong, therefore not being able to recalculate all the reflexives and other data's offsets properly, right?
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: XZodia's Plugins

Post by CaptainPoopface »

Neodos, I thought you had a program that let you place and rotate boxes, and then it would generate the scnr data from that. You were going to use it for your remake of Prisoner, but you got discouraged because your cool model of the map would not inject right. I vaguely remember you had to have all the boxes already created in the map and probably spawned in the scnr too, but you could manipulate them in this other program. It may have also fixed their unique ID for system link.

I also recall leaving as many reflexives as possible unknown in the plugin for cloning / injecting more safely, so you are at least partially right about bad plugin offsets bricking the map. By that time, I was so frustrated with SLC and cloning problems that I switched to sharing meta as much as possible, and injecting tags instead of cloning.
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: XZodia's Plugins

Post by Grimdoomer »

Cloning anything in the scenario tag is just asking to shoot yourself in the foot. It's usually the third tag in a map and the maps usually have around 1.5k tags. So you have to correct EVERY tag_block in every tag after scenario, and if you miss one your map will either not load or freeze during game play.

Injecting tags is much safer because they get inserted at the very end, right before the ugh! tag which is always the last tag in the map. As long as your plugins for the ugh! tag and what ever other tags you are injecting are good, your map should work fine.

The placement tag_block's in scenario you guys use to spawn your objects have a maximum number of blocks that can exist in them. For bloc placements it is 1024, other things like weapons, vehicles, machines, it is 200 or less. I have never found anything which suggests the game checks the block counts, it would also be redundant if it did. I would also imagine there are a lot of tab_block's you can get away with loading more than the maximum number of blocks in. However, due to the nature of the programming of the game there are a lot of places where the game is coded to only utilize the maximum number of blocks in a tag_block, and all others will be ignored.
Don't snort the magic, we need it for the network.
Post Reply