A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Differences in Engine between obje class tags

Author Topic: Differences in Engine between obje class tags (13 messages, Page 1 of 1)
Moderators: Dennis

DeadHamster
Joined: Jun 8, 2014


Posted: May 2, 2017 03:44 PM    Msg. 1 of 13       
There are several tags that all share the obje class; Bipeds, Vehicles, Scenery, Equipment, Weapons.

But they all have differences as well. For example; Scenery items won't sync locaton over a netcode whereas for vehicles will, Light Fixtures with collision will stop projectiles but not players (shield doors). Bipeds and Vehicles are units so they will sync whether or not they're alive (health itself doesn't sync, but alive/dead does).


Do you guys know any other ways that the engine treats these tag types differently?


JadeRifter
Joined: Dec 20, 2015

I'm a real light sleeper, Childs.


Posted: May 2, 2017 06:52 PM    Msg. 2 of 13       
Quote: --- Original message by: DeadHamster
There are several tags that all share the obje class; Bipeds, Vehicles, Scenery, Equipment, Weapons.

But they all have differences as well. For example; Scenery items won't sync locaton over a netcode whereas for vehicles will, Light Fixtures with collision will stop projectiles but not players (shield doors). Bipeds and Vehicles are units so they will sync whether or not they're alive (health itself doesn't sync, but alive/dead does).


Do you guys know any other ways that the engine treats these tag types differently?


I may be wrong on this one, but I thought device machines also counted as an object. It let me attach them. Devices also have the capacity for moving platforms with working physics (ie you won't slide off it), where as moving scenery doesn't. I also thought that the alive/dead state for vehicles does not sync to clients.


DeadHamster
Joined: Jun 8, 2014


Posted: May 2, 2017 07:19 PM    Msg. 3 of 13       
Quote: --- Original message by: JadeRifter
Quote: --- Original message by: DeadHamster
There are several tags that all share the obje class; Bipeds, Vehicles, Scenery, Equipment, Weapons.

But they all have differences as well. For example; Scenery items won't sync locaton over a netcode whereas for vehicles will, Light Fixtures with collision will stop projectiles but not players (shield doors). Bipeds and Vehicles are units so they will sync whether or not they're alive (health itself doesn't sync, but alive/dead does).


Do you guys know any other ways that the engine treats these tag types differently?


I may be wrong on this one, but I thought device machines also counted as an object. It let me attach them. Devices also have the capacity for moving platforms with working physics (ie you won't slide off it), where as moving scenery doesn't. I also thought that the alive/dead state for vehicles does not sync to clients.


The health of vehicles does not, but I was under the impression alive/dead does and that's how the host-determining scripts worked.

Yes! Device Machines also have the obje class. However I believe that you were slightly off there; the platforms can move vertically without falling off but characters do not stay attached when the platform moves horizontally. I could definitely be wrong about that however, I just remember seeing a post where someone tried to get a horizontal elevator to work by attaching the biped to the device machine.

Another tag using the obje class are Device Controls and Garbage. I'm curious if the engine has any peculiarity when it comes to the collision of garbage tags.


JadeRifter
Joined: Dec 20, 2015

I'm a real light sleeper, Childs.


Posted: May 2, 2017 07:42 PM    Msg. 4 of 13       
Quote: --- Original message by: DeadHamster
Quote: --- Original message by: JadeRifter
Quote: --- Original message by: DeadHamster
There are several tags that all share the obje class; Bipeds, Vehicles, Scenery, Equipment, Weapons.

But they all have differences as well. For example; Scenery items won't sync locaton over a netcode whereas for vehicles will, Light Fixtures with collision will stop projectiles but not players (shield doors). Bipeds and Vehicles are units so they will sync whether or not they're alive (health itself doesn't sync, but alive/dead does).


Do you guys know any other ways that the engine treats these tag types differently?


I may be wrong on this one, but I thought device machines also counted as an object. It let me attach them. Devices also have the capacity for moving platforms with working physics (ie you won't slide off it), where as moving scenery doesn't. I also thought that the alive/dead state for vehicles does not sync to clients.


The health of vehicles does not, but I was under the impression alive/dead does and that's how the host-determining scripts worked.

Yes! Device Machines also have the obje class. However I believe that you were slightly off there; the platforms can move vertically without falling off but characters do not stay attached when the platform moves horizontally. I could definitely be wrong about that however, I just remember seeing a post where someone tried to get a horizontal elevator to work by attaching the biped to the device machine.

Another tag using the obje class are Device Controls and Garbage. I'm curious if the engine has any peculiarity when it comes to the collision of garbage tags.


The host detection script worked because clients don't receive info about the name of objects on the server, an object's value while despawned is -1.

(if (!= (unit_get_health host_vehicle) -1)
(set is_host true))

So this checks if the health of host_vehicle is not -1, meaning it's spawned. The server would give you 1 while the client would give you -1, giving you a mechanism to differentiate them.

Destructible vehicles don't work because clients don't receive the state of destroyed vehicles. It can however tell if the vehicle is despawned.

Device Machines do have the capacity to move players horizontally, I'm sure about that. Animated scenery can not move players horizontally, nor can vehicles.


sparky
Joined: Jun 27, 2009


Posted: May 8, 2017 08:38 PM    Msg. 5 of 13       
My response here does not answer your question directly, but the differences are related to the memory tables in which they are stored. It's nice to know that you are still interested in the game engine's behavior after all these years. Didn't you contribute something to the MGM community years ago, back when Altimit01 was working on Eschaton?


DeadHamster
Joined: Jun 8, 2014


Posted: May 9, 2017 12:05 PM    Msg. 6 of 13       
Quote: --- Original message by: sparky
My response here does not answer your question directly, but the differences are related to the memory tables in which they are stored. It's nice to know that you are still interested in the game engine's behavior after all these years. Didn't you contribute something to the MGM community years ago, back when Altimit01 was working on Eschaton?


Helped mapping out collision tags, was one of Alt's main PC beta tester. I was actually delighted to go into 0.8.1 recently and see my name in the credits.

I learned how to write programs from Alt. Him and Modzy taught me RealBasic, which is what I still use now.


lolslayer
Joined: Mar 21, 2015

https://www.youtube.com/watch?v=uMHbAKvPJkU


Posted: May 9, 2017 04:48 PM    Msg. 7 of 13       
Quote: --- Original message by: DeadHamster
Quote: --- Original message by: sparky
My response here does not answer your question directly, but the differences are related to the memory tables in which they are stored. It's nice to know that you are still interested in the game engine's behavior after all these years. Didn't you contribute something to the MGM community years ago, back when Altimit01 was working on Eschaton?


Helped mapping out collision tags, was one of Alt's main PC beta tester. I was actually delighted to go into 0.8.1 recently and see my name in the credits.

I learned how to write programs from Alt. Him and Modzy taught me RealBasic, which is what I still use now.


He actually even mentioned you in a video of his, calling you a good friend of his :)

https://youtu.be/5onHFKlJQ_Y?t=4m55s
Edited by lolslayer on May 9, 2017 at 04:49 PM


DeadHamster
Joined: Jun 8, 2014


Posted: May 9, 2017 05:58 PM    Msg. 8 of 13       
Quote: --- Original message by: lolslayer
He actually even mentioned you in a video of his, calling you a good friend of his :)

https://youtu.be/5onHFKlJQ_Y?t=4m55s
Edited by lolslayer on May 9, 2017 at 04:49 PM


I know it's corny and all but that definitely made my day.

That program he mentioned, Illudium Q-36 Explosive Space Modulator, I recently fixed it maybe 2 years back. It moves all the spawn points in the map to a single location, so that you could relocate them easier with Sparkedit.


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: May 9, 2017 10:39 PM    Msg. 9 of 13       
Ah the nostalgia feels.


I'll keep it simple and say I wouldn't be here if it weren't for Ally and Maniac1000.



<3


DeadHamster
Joined: Jun 8, 2014


Posted: May 10, 2017 02:49 AM    Msg. 10 of 13       
Quote: --- Original message by: DeadHamster
I learned how to write programs from Alt. Him and Modzy taught me RealBasic, which is what I still use now.



Got back home and found an old log of my AIM conversations I keep on an old PC I use as a file server, snipped a few interesting bits;

http://www.mediafire.com/file/jgxrtqm38lsefj3/altimit01.txt

http://www.mediafire.com/file/vurgyodqx4o4aqg/modzy.txt


Both conversations are from 2009;

First one is Alt teaching me MapMagic so I could make Illudium

Next one is the conversation between me and Modzy that led to Eternal Lightning, the first heavily leaked Map Deprotector I know of.

There used to be a really thriving community, not only in Custom Edition mapping but in mods for the PC version. Long gone are the days.



Eh: btw, Here's the source code to Eternal Lightning. With Great Power Comes Great Responsibility.


dim f as folderitem

dim br as binarystream

f=getopenfolderitem ("")

if f <> Nil then
br=f.openasbinaryfile(true)
br.littleEndian=true

br.position=16
dim indexoffset as int32
indexoffset=br.readint32

br.position=indexoffset

Dim MapMagic As Int32 = br.ReadInt32 - 40 - IndexOffset

br.Position = IndexOffset + 12

dim TagCount as integer
TagCount = br.ReadInt32


dim taglist as int32

taglist=indexoffset+40

br.position=taglist

br.write("rncs")

br.position=taglist+16


Dim ProtectedStringOffset as int32= br.readint32-mapmagic

dim n as integer

//Tee hee. Not my code. Sorry, I really didn't feel like re-writing all of this in a different way, and since you gave me the code it would've been silly to do everything my own
//getting the same results. Total credits to you for this app.
N=0
While N <> TagCount
br.Position=IndexOffset+&h34+(N*&h20)
Dim TagID As Int32 = br.ReadInt32
Dim TagNameOffset As Int32 = br.ReadInt32-MapMagic

If TagNameOffset = ProtectedStringOffset then
br.Position=br.Position-4
br.WriteInt32 br.Length+MapMagic
br.Position=br.Length
br.Write(Hex(TagID))
br.WriteInt8 00
end

N=N+1
wend

br.Close

MsgBox "The Gods Have Spoken"

//end of your code.












end if


sparky
Joined: Jun 27, 2009


Posted: May 10, 2017 05:18 PM    Msg. 11 of 13       
There might be fewer published community efforts of the various Halo communities, but the sharing of information has increased.

Quote:
br.position=
br.Position =

RealBasic is case insensitive. If you feel like it, could you maybe get in touch with Modzy and fix Eschaton 0.8.1.1 to rid it of crashing bugs?

The reason Eternal Lightning works based upon your posted code is because the data is predictable and its order of tag pathname strings unaltered. ...Anyway, tag pathname strings help establish attribution for purposes of keeping track of credit in what was done. It is not yet used in a sophisticated manner, but I intend to do so.

"Map Magic" is actually the address pointer to the data in memory. This is used because map data is distributed in memory -- the SBSP is placed further from the tags index section. All of those numbers circa 0x40000000 to 0x40440000+ you see -- unless they are unrelated float values -- are pointers in the memory of the loaded Halo game program. If you are interested in that, I've done some videos on my halomodtesters YouTube channel and Wizard has his Phasor Lua Memory Offsets which is enlightening. Phasor uses instruction signatures rather than hardcoded offsets, especially since there are changes between 1.0.9 and 1.0.10 of the game.

Edited by sparky on May 10, 2017 at 05:41 PM

From my notes:

Quote: Converting between HEK format tags and Map files and memory:

HEK tag files are compiled into map files, and map files are parsed into memory.
Halo uses (one or more pages) of the memory address range 0x40000000 - 0x41B40000, inside which it stores memory tables and map data.
0x40440000 is where the tags index of the currently-loaded map file is stored. The sbsp is loaded in the remaining bytes between the end of the tag data and 0x41B40000, aligning the sbsp data to end at 0x41B40000, so that its last "CA" bytes are found at the end of the memory address range, and there is left zero-byte padding between the end of the tag data and the start of the sbsp data.
Note that after a time while a map is loaded into memory, (probably) the OS will divide the memory region in the padding bytes into two pages instead of one, so that the sbsp data fits in its own next memory page, separately from the more dynamic memory tables (and tags index and map tags) memory.
The header of a map (at least some of its information) is stored at 0x40000000. After that are memory tables until 0x40440000 which has the rest of the map data, starting with the "tags" index.
The map "tags" index is where tags are referenced by tag ID. Each entry in the "tags" index contains in this order: the full tag class triplet, the incremental tag ID, a pointer to the tag pathname string of that tag, and a pointer to the tag's metadata, followed by 8 bytes of zero for a total entry size of 32 bytes. All compiled tags have their dependencies (infTagReference's) within them updated to cite the referenced tags using tag ID. Right after the index of tags comes all the tag pathname strings, in little endian byte order (not reversed), ASCII, and null-terminated as usual.
The only strings that are reversed between HEK tag format and a map file on disk and in memory are the four-character tag class IDs. All other strings are left in original byte order.
Map files contain the header, the footer, the sbsp data, the tags index, the tag pathname strings, and then the tags data. The last tag indexed is the sbsp tag, and its metadata is also last in the tag data. Converting from tag to map involves collecting all referenced tags and all base tags (globals.globals and some tagc references and UI tags of predefined tpns for example), listing them them with the scnr tag first and the sbsp tags last, giving them tag IDs thereby and listing their unique tag pathname strings, then writing the header information to 0x40000000, the tags index followed by the tag metadata starting at 0x40440000, and skipping to sbsp-data-length-bytes before 0x41B40000 and writing the sbsp data up to that address. Converting from memory to map is the reverse of this, and extracting a tag from memory is as simple as parsing the tags index and referencing by tag ID or tpns. Converting from memory to map is constructing a header and footer using the information at 0x40000000, taking the sbsp data before 0x41B40000 (without ending "CACA" bytes), taking verbatim the tags index and tpns list and tag data, and putting all that in that order into a .map file.

Edited by sparky on May 10, 2017 at 06:16 PM

In that conversation text file with Altimit01, he points out that the tags index entries don't end in 8 bytes of zero but with a 32-bit bitmask value and unused four bytes. The actual purpose could be determined by looking at Tool or the game.
Edited by sparky on May 10, 2017 at 06:20 PM
Edited by sparky on May 11, 2017 at 04:32 PM


DeadHamster
Joined: Jun 8, 2014


Posted: May 10, 2017 07:47 PM    Msg. 12 of 13       
Quote: --- Original message by: sparky

There might be fewer published community efforts of the various Halo communities, but the sharing of information has increased.

RealBasic is case insensitive. If you feel like it, could you maybe get in touch with Modzy and fix Eschaton 0.8.1.1 to rid it of crashing bugs?



No Interest.

Eschaton is not one piece of code. It's dozens and dozens by different authors, all translated and strung together by Alt.

Some of these packages were Halo related, most were not. There were packages for the scrolling interface, packages for exporting/importing/converting JPEG/PNG files, others resizing and optimizing jpeg/png files on import. There were packages for rendering the BSP, etc. etc.

There's another part of the AIM log with Modzy where me and him discuss how hard deciphering Eschaton source code was. That was the 0.4 version of the source, he didn't even have rebuilding yet.

So yeah, No Interest.


But I wouldn't turn down a copy of the 0.8.1 Source Code.


sparky
Joined: Jun 27, 2009


Posted: May 11, 2017 04:36 PM    Msg. 13 of 13       
I asked Modzy several years ago to incorporate my information into Eschaton, and so it's only his work on bringing 0.8.1 to 0.8.1.1 that introduced bugs. That's what I mean; if you are still in contact with him, it would be helpful to have either or both of you figure out how to get 0.8.1.1 into a viable usage state.

 

 
Previous Older Thread    Next newer Thread





Time: Sun July 23, 2017 8:42 PM 250 ms.
A Halo Maps Website