Chunk Cloning Help

Discuss Halo 2 modding, progress on figuring things out, mapfiles...you know the drill. Cheating discussion not allowed.
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Re: Chunk Cloning Help

Post by grimdoomer »

OneZeroOne wrote:That's it it may also be chunk/reflexives size being wrong, the problem with unused is that some are not unused and if you set these to floats sometimes the app will clone chunk without errors.

Also tags like vehi have shared reflexives with other tags.
It shouldn't matter if your adding chunks because none of the other tags that use that reflexive will use the new chunks. They will only use the first few chunks. So technically it's not wrong, but it's not right either.
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
User avatar
TroyMac1ure





Posts: 29
Joined: Sun Feb 10, 2008 10:39 am

Re: Chunk Cloning Help

Post by TroyMac1ure »

I AM LOOKING COMPLETELY AT THE CONT TAG FOR TESTING.

I did a raw view of the data and the offsets and it looks like it updates the offsets correctly. One thing I need to check is to see if TAGS that corrupt always corrupt the same TAGS. I know that cloning the CONT tag chunk corrupts a couple JPT! tags for sure.

*UPDATE*

I found that when cloning CONT all the tags that get messed up are rare. Each messed up tag has a Meta Size of Zero. I think when the cloner goes to move them, it sees them as being zero bytes large and therefore doesn't move them properly.

(The following is taken from Elongation - the first # is the tag number)
It seems to almost always be one (or more) of these tags:
# 3724 [pmov] effects\\objects\\vehicles\\wraith\\turrets\\mortar\\wraith_mortar_charge
# 3913 [jpt!] objects\\vehicles\\banshee\\damage_effects\\banshee_bomb_trigger
# 4050 [jpt!] objects\\vehicles\\h_turret_ap\\damage_effects\\h_turret_ap_trigger

I haven't seen these, but am sure they would be included:
# 521 [effe] effects\\impact\\impact_bullet_small\\soft_organic
# 536 [effe] effects\\impact\\impact_bullet_small\\tough_organic
# 648 [effe] effects\\objects\\weapons\\rifle\\shotgun\\shotgun_empty
# 748 [effe] effects\\impact\\impact_plasma_medium\\soft_organic
# 915 [effe] effects\\impact\\impact_plasma_large\\hard
# 916 [effe] effects\\impact\\impact_plasma_large\\hard_floodflesh
# 919 [effe] effects\\impact\\impact_plasma_large\\hard_metal_thin
# 930 [effe] effects\\impact\\impact_plasma_large\\soft_inorganic
# 931 [effe] effects\\impact\\impact_plasma_large\\soft_organic
# 941 [effe] effects\\impact\\impact_plasma_large\\tough
# 944 [effe] effects\\impact\\impact_plasma_large\\tough_inorganic_plastic
# 1081 [pmov] effects\\objects\\weapons\\grenade\\plasma_grenade\\plasma_grenade_burstmoke
# 1926 [pmov] effects\\objects\\vehicles\\ghost\\medium_electric_discharge
# 2029 [effe] objects\\characters\\masterchief\\flashlight
# 2322 [jpt!] objects\\characters\\dervish\\damage_effects\\dervish_boarding_melee_response
# 2590 [effe] effects\\impact\\impact_bullet_large\\hard_metal_thick
# 2602 [effe] effects\\impact\\impact_bullet_large\\soft_organic
# 2615 [effe] effects\\impact\\impact_bullet_large\\tough_inorganic_plastic
# 2616 [effe] effects\\impact\\impact_bullet_large\\tough_inorganic_rubber
# 2617 [effe] effects\\impact\\impact_bullet_large\\tough_organic
# 2693 [effe] effects\\objects\\weapons\\support_high\\rocket_launcher\\rocket_overpenetrate_glass
# 3028 [jpt!] objects\\weapons\\damage_effects\\dash_melee_response
# 3545 [effe] effects\\objects\\vehicles\\scorpion\\trans_front_medium
# 3546 [effe] effects\\objects\\vehicles\\scorpion\\trans_front_major
# 3584 [pphy] effects\\point_physics\\warthog_antenna_steel

Been bashing through the code for days & days & days now, but I think I was looking in the wrong place. Hopefully with this new find I can finally fix the Chunk Cloner!
User avatar
TroyMac1ure





Posts: 29
Joined: Sun Feb 10, 2008 10:39 am

Re: Chunk Cloning Help

Post by TroyMac1ure »

I'm sure this will please a many people. After a couple weeks of staring at coding and doing this and that and whatever else...

The chunk cloner is fixed!

Expect an updated Entity release very soon. Just need to go through the code and remove all the code I added to debug the Chunk Cloner!!
This means I want to see a few more awesome mods :wink:


For those who care, this is what the problem was:

If you cloned a tag, Entity would take the size of the chunk cloned and add it to the offset of all tags AFTER the cloned tag.
This worked for almost all, except not all the tags were in perfect offset order.
Therefore any tags after the cloned one, that had an offset before the cloned tag would get bricked!

ex:

Code: Select all

TAG#       OFFSET   TAG
------------------------------
3907     41723860 [cont] effects\objects\vehicles\banshee\banshee_bomb
3908     41724356 [effe] effects\impact\explosion_large\banshee_bomb\detonation
3909     41727180 [ligh] effects\objects\weapons\support_high\flak_cannon\flak_cannon_explosion
3910     41727408 [jpt!] objects\vehicles\banshee\damage_effects\banshee_bomb_explosion
3911     41727760 [jpt!] objects\vehicles\banshee\damage_effects\banshee_bomb_impact
3912     41727960 [snd!] sound\vehicles\banshee\banshee_cannon_fire
3913     40867152 [jpt!] objects\vehicles\banshee\damage_effects\banshee_bomb_trigger
3914     41727980 [vehi] objects\vehicles\spectre\spectre
3915     41731504 [hlmt] objects\vehicles\spectre\spectre
4047     41920596 [proj] objects\vehicles\h_turret_ap\weapon\h_turret_ap_bullet
4048     41921656 [cont] effects\generic\contrail\contrial_30_cal
4049     41922088 [jpt!] objects\vehicles\h_turret_ap\damage_effects\h_turret_ap_bullet
4050     41282824 [jpt!] objects\vehicles\h_turret_ap\damage_effects\h_turret_ap_trigger
4051     41922288 [trak] camera\h_turret_ap_d_camera
4052     41922720 [vehi] objects\vehicles\c_turret_ap\c_turret_ap
In the above listing, we can see that
[cont] effects\objects\vehicles\banshee\banshee_bomb (tag# 3907)
comes before:
[jpt!] objects\vehicles\banshee\damage_effects\banshee_bomb_trigger (tag #3913)
[jpt!] objects\vehicles\h_turret_ap\damage_effects\h_turret_ap_trigger (tag #4050)

but the offsets are listed as:
41723860
40867152
41282824

So if we clone "banshee_bomb" (chunk size 64), even though no extra info was written to the file before 41723860, the offsets of the two [jpt!] tags have 64 bytes added to them, making them point to something incorrect.

Not sure if anyone cared for an explanation, but here it is anyways :roll:
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Re: Chunk Cloning Help

Post by grimdoomer »

meh, adding chunks was never a problem for me. When fix the Unused problem and the fact that entity doesn't fix the BSP magic when adding chunks to the BSP tag, then maybe I'll use it.
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
User avatar
TroyMac1ure





Posts: 29
Joined: Sun Feb 10, 2008 10:39 am

Re: Chunk Cloning Help

Post by TroyMac1ure »

grimdoomer wrote:meh, adding chunks was never a problem for me. When fix the Unused problem and the fact that entity doesn't fix the BSP magic when adding chunks to the BSP tag, then maybe I'll use it.
I think this is the Unused problem you are talking of. Otherwise I'm not sure what you mean. If you can give me an example of what errors with Unuseds and what you do to make it error, I will work on it.

I'm not going to start on the BSP chunk addition yet I don't think, but we'll see. It would be nice if we could edit the actual BSP and change the levels instead of using machines, blocs, etc.
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Re: Chunk Cloning Help

Post by grimdoomer »

After I finish converting Uplift to xbox I'm probally gunna take 5 minutes and make a BSP chunk clonner.
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Re: Chunk Cloning Help

Post by Eaton »

So you can clone chunks now without breaking anything?
Image
User avatar
TroyMac1ure





Posts: 29
Joined: Sun Feb 10, 2008 10:39 am

Re: Chunk Cloning Help

Post by TroyMac1ure »

Eaton wrote:So you can clone chunks now without breaking anything?
Yes.

Haven't tested them all, but I did testing with the [CONT] and manage to clone it without breaking any IFPs. I posted this version late last night (dumb move) so now there are a few bugs I'm working out bit by bit, but I have spent so much time trying to figure this one out, that I figure I'll let others tell me what's still broken. My mind is slouching into vacation mode.

Alot of the issues are that I added sections to help me debug the problem and then had to remove them all quickly. The newest bug I found is that I broke the link for the "Save" button in the meta editor, but I should have that fix U/L in the next hour.
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Re: Chunk Cloning Help

Post by Eaton »

TroyMac1ure wrote:
Eaton wrote:So you can clone chunks now without breaking anything?
Yes.

Haven't tested them all, but I did testing with the [CONT] and manage to clone it without breaking any IFPs. I posted this version late last night (dumb move) so now there are a few bugs I'm working out bit by bit, but I have spent so much time trying to figure this one out, that I figure I'll let others tell me what's still broken. My mind is slouching into vacation mode.

Alot of the issues are that I added sections to help me debug the problem and then had to remove them all quickly. The newest bug I found is that I broke the link for the "Save" button in the meta editor, but I should have that fix U/L in the next hour.
You know I was never cloning contrails, right? I was cloning Netgame Equipment chunks in the scenario tag. That's what caused the broken contrails.
Image
User avatar
TroyMac1ure





Posts: 29
Joined: Sun Feb 10, 2008 10:39 am

Re: Chunk Cloning Help

Post by TroyMac1ure »

Eaton wrote: You know I was never cloning contrails, right? I was cloning Netgame Equipment chunks in the scenario tag. That's what caused the broken contrails.
No, but same, same. Issue boiled down to same place. I just cloned 10 Netgame Equipments and no broken IFPs :D
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Re: Chunk Cloning Help

Post by Eaton »

TroyMac1ure wrote:
Eaton wrote: You know I was never cloning contrails, right? I was cloning Netgame Equipment chunks in the scenario tag. That's what caused the broken contrails.
No, but same, same. Issue boiled down to same place. I just cloned 10 Netgame Equipments and no broken IFPs :D
I never got any broken idents either. The contrails just corrupted without warning. Do you notice any glitches or anything different ingame?
Image
User avatar
TroyMac1ure





Posts: 29
Joined: Sun Feb 10, 2008 10:39 am

Re: Chunk Cloning Help

Post by TroyMac1ure »

Eaton wrote:
TroyMac1ure wrote:
Eaton wrote: You know I was never cloning contrails, right? I was cloning Netgame Equipment chunks in the scenario tag. That's what caused the broken contrails.
No, but same, same. Issue boiled down to same place. I just cloned 10 Netgame Equipments and no broken IFPs :D
I never got any broken idents either. The contrails just corrupted without warning. Do you notice any glitches or anything different ingame?
****! I am an idiot who spoke before looking. All I did was fix the broken IFPs. I guess there's a reason why people didn't believe.
Well, back to basics...
Post Reply