Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
blackdimund

Modding
Re-scaling a character ($100 bitcoin bounty)

19 posts in this topic

After 10 years I have come back with a modded 360 and want to mod my halo 3 a bit. I used to heavily mod halo 2 long ago, and already got that. I already am able to mod everything, even got the 360 SDK set up with assembly and am able to poke which is great.
I have been trying for hours how to correctly scale a character in halo 3, like this youtuber here
I tried changing many values and found some that actually sort of work, but not near as good as the youtuber did it. I went into mode tag and changed the compression info (changing everything times 0.3)
mode compression bounds.png
It sort of works but not really. At least their feet plant the ground. but their phmo and coll are still from the original bigger one.

mode compression bounds result.png

Here, I found I could simply change this runtime node default scale from 1 to 0.3, and it actually works better.runtime node default scale.png

They look good, and they take coll hits ok (can only shoot where their model is), but their phmo is still the original larger one, and they always stand in midd-air (I guess the middle of the phmo or something)scale but stands high.png

I tried to scale the phmo to the new model size but nothing seems to work. I have been at this for hours and I don't know how to fix it.
I tried changing a lot of values in phmo in assembly but nothing changed ingame. I even put the marine phmo as null in the marine hlmt but they still had a phmo lol. Assembly says its updated with 2016.11.04.19.07.00-master

I found an old se7ensins thread titled "Model Resizing: The Correct Way" but it just tells you to edit phmo values that the marine phmo doesn't even have. 

Anyone have any ideas? Or maybe have any mods with scaled characters I could look at?

 

nothing in phmo.png

Edited by blackdimund

Share this post


Link to post
Share on other sites

Specifically in Halo 3's case:  fWCArEV.png 

 

Cant remember if object arguments look at the "object names" index in the scnr. (well it should work with anything that is an obje)

Edited by Akarias

Share this post


Link to post
Share on other sites
5 hours ago, Akarias said:

Specifically in Halo 3's case:  fWCArEV.png 

 

Cant remember if object arguments look at the "object names" index in the scnr. (well it should work with anything that is an obje)

THANKYOU FOR THIS!

saved me a lot of time and effort of where to find that script. I already found a guide on how to create halo 3 scripts from scratch in assembly, so if this script works, I should be able to figure this out with some research. I assume object would be replaced with whatever I want to resize. Or maybe that's not how it works, I am total script noob and will have to figure this stuff out,

EDIT: or actually looks like the object name goes between the empty quotes

EDIT: yeah that those last statements are showing how much noob I am at scripting. I followed a guide and got a gravity script working, but man manually scripting is difficult. Hopefully I can get the scale one working.

EDIT: yeah I suck at coding but I understand a little bit, object will probably have some sort of name I will need to find, real is a 3.4E +-38 with 6 digits, short is an integer value under 32,767. 

Edited by blackdimund

Share this post


Link to post
Share on other sites

Alright I have learned a little bit and made some progress. It was hell making this script. Assembly crashes completely if something doesn't match up, there are next to none examples of this script being used. I managed to find one buried away though. After many hours of trial and error and understanding how some of this works, I came up with this. It still doesn't do anything in-game though. I guess the object argument needs to be something else. Does the object need to be something like mp_masterchief or something? I don't know how to make it do that. I will keep trying but if anyone could point me in right direction it would help a lot.

hsc script.pngScripts.png

 

larger imgur image for the script expressions

script expressions.png

Edited by blackdimund

Share this post


Link to post
Share on other sites

Type values past 4 mean the opcode value should equal the type value. Also you should check back with existing scripts, because the Value of the first expression of a new line/opcode (so you need it for begin and set_scale) should be the salt/index of the first child expression. Could also remove clutter in your plugin because enums/bitfield/ascii aren't needed.

 

Thats what I can tell from first glance, anyway

Share this post


Link to post
Share on other sites

I'm gonna crazy trying to figure this out. I can't even copy/paste the only object_set_scale function I found from a campaign map (which was hard as hell to find btw). I can't even copy scripts from other multiplayer maps and get them working, assembly just crashes. Everything always crashes. I could only get the gravity script working because it is so simple. If anyone can at least show me how to make a whole campaign map with resized characters and vehicles, I'll pay you $100 in bitcoin. I just want to make a fun campaign mod with everything set small/big.

Share this post


Link to post
Share on other sites

If assembly crashes, its because a expression is invalid / expression group is invalid.

 

Aka it wont run in game and assembly will just shit its self as the scripting side of assembly barely even works at all. There is no exception handling within the script assembler if I remember correctly.

 

You do realise how much work it is to do without a proper script editor? It's a bit of a pipe dream you got there. None the less I'll see if I can add support for it in my hack-job build of assembly. (The build with BlamHammer's unfinished weirdness bodged into it. I'll only spent a hour at most because who the hell mods on an xbox anymore)

 

Edit actually I got a better but very bad idea. just make a volume the size of the entire map and return all objects in that volume :v: you can then return objects by their type to filter out any unwanted and dangerous results. A far better idea is to setup a vollume for each BSP and when a BSP gets loaded you can rescale objects accordingly. this shouldn't cause too much lag or crash the game.

(Check out the existing zoneswaps)

Edited by Akarias

Share this post


Link to post
Share on other sites

I did this a while back that may do what you want, would have to track the edits down though.

 

Share this post


Link to post
Share on other sites
2 hours ago, Akarias said:

If assembly crashes, its because a expression is invalid / expression group is invalid.

 

Aka it wont run in game and assembly will just shit its self as the scripting side of assembly barely even works at all. There is no exception handling within the script assembler if I remember correctly.

 

You do realise how much work it is to do without a proper script editor? It's a bit of a pipe dream you got there. None the less I'll see if I can add support for it in my hack-job build of assembly. (The build with BlamHammer's unfinished weirdness bodged into it. I'll only spent a hour at most because who the hell mods on an xbox anymore)

 

Edit actually I got a better but very bad idea. just make a volume the size of the entire map and return all objects in that volume :v: you can then return objects by their type to filter out any unwanted and dangerous results. A far better idea is to setup a vollume for each BSP and when a BSP gets loaded you can rescale objects accordingly. this shouldn't cause too much lag or crash the game.

(Check out the existing zoneswaps)

I probably have no idea how to make it happen. I'll try looking around and see if I can figure something out though. 

 

32 minutes ago, Lord Zedd said:

I did this a while back that may do what you want, would have to track the edits down though.

 

I got excited and followed the 2 edits made in the video, nothing changed for me though. I'll keep poking around see if anything happens.

 

 

thanks for the help guys

Share this post


Link to post
Share on other sites
1 hour ago, blackdimund said:

I got excited and followed the 2 edits made in the video, nothing changed for me though. I'll keep poking around see if anything happens.

 

 

thanks for the help guys

Yeah I modified the game code to use those 2 values from the video. I need to find the code edits to replicate it (I got lots of folders with lots of text files to dig through), then you'd just run the modified xex and it will work like you see there.

Share this post


Link to post
Share on other sites
8 hours ago, Lord Zedd said:

Yeah I modified the game code to use those 2 values from the video. I need to find the code edits to replicate it (I got lots of folders with lots of text files to dig through), then you'd just run the modified xex and it will work like you see there.

Ah ok that explains why I couldn't get anything working. I wish I knew half of what you do about modding you seem to be able to do so many things. If you happen to see any of your text files on how to transfer animations between characters, let me know that too, I saw that amazing video as well. I'll still pay you that bounty too man!

Share this post


Link to post
Share on other sites

GUYS I found Zedd explaining his scaling code, he even shows a pic of what he changed in code, how do I replicate this? Is this hex of the default.xex or something? This MUST show how to do it, right?!? Or is this some sort of assembly edit?

EDIT: yep I saw someone editing a default.xex and it's definitely from that. I will be working on this and update when I get something working.

EDIT: confusing, this could take a while

EDIT: here is the code I copied from the picture (hopefully not mistyped). If knows how, would be great if this was added to a non tu ultimate halo 3 xex like this. from what I understand, I have to use IDA with some plugins to open the xex and read from it, then somehow from that, be able to modify a working xex with a hex editor. Feels a bit over my head but I will still give it a shot.

code before: http://i.imgur.com/ssc8mBg.png

code after: http://i.imgur.com/3OwLUsJ.png

code typed out:

Quote

before
823367C0 81630000        lwz r11,0(r3)
823367C4 2F0BFFFF        cmpwi cr6,r11,65535     ; 0FFFFh
823367C8 4D9A0020        beqlr cr6
823367CC 556A1B78        rlwinm r10,r11,3,13,28
823367D0 3D60827F        lis r11,-32129     ; 827Fh
823367D4 816B0F8C        lwz r11,0F8Ch(r11)
823367D8 7D4A5A14        add r10,r10,r11
823367DC 814A0004        lwz r10,4(r10)
823367E0 814A0040        lwz r10,40h(r10)
823367E4 2F0AFFFF        cmpwi cr6,r10,65535     ; 0FFFFh
823367E8 4D9A0020        beqlr cr6
823367EC 554A1B78        rlwinm r10,r10,3,13,28
823367F0 7D6A5A14        add r11,r10,r11
823367F4 816B0004        lwz r11,4(r11)
823367F8 816B003C        lwz r11,3Ch(r11)
823367FC 2F0BFFFF        cmpwi cr6,r11,65535     ; 0FFFFh
82336800 4D9A0020        beqlr cr6
82336804 3D608202        lis r11,-32254     ; 8202h
82336808 C00B22EC        lfs fr0,22ECh(r11)
8233680C D0030058        stfs fr0,58h(r3)
82336810 4E800020        blr

after
8249569C 81630000        lwz r11,0(r3)
824956A0 2F0BFFFF        cmpwi cr6,r11,65535     ; 0FFFFh
824956A4 4D9A0020        beqlr cr6
824956A8 556A1B78        rlwinm r10,r11,3,13,28
824956AC 3D60827F        lis r11,-32129     ; 827Fh
824956B0 816B0F8C        lwz r11,0F8Ch(r11)
824956B4 7D4A5A14        add r10,r10,r11
824956B8 814A0004        lwz r10,4(r10)
824956BC 816A001C        lwz r11,1Ch(r10)
824956C0 2F0B0002        cmpwi cr6,r11,2
824956C4 419A000C        beq cr6,824956D0
824956C8 C00A0020        lfs fr0,20h(r10)
824956CC 4800000C        b 824956D8
824956D0 3D608202        lis r11,-32254     ; 8202h
824956D4 C00B22EC        lfs fr0,22ECh(r11)
824956D8 3D60827F        lis r11,-32129     ; 827Fh
824956DC 816B0F8C        lwz r11,0F8Ch(r11)
824956E0 814A0040        lwz r10,40h(r10)
824956E4 2F0AFFFF        cmpwi cr6,r10,65535     ; 0FFFFh
824956E8 4D9A0020        beqlr cr6
824956EC 554A1B78        rlwinm r10,r10,3,13,28
824956F0 7D6A5A14        add r11,r10,r11
824956F4 816B0004        lwz r11,4(r11)
824956F8 816B003C        lwz r11,3Ch(r11)
824956FC 2F0BFFFF        cmpwi cr6,r11,65535     ; 0FFFFh
82495700 4D9A0020        beqlr cr6
82495704 D0030058        stfs fr0,58h(r3)
82495708 4E800020        blr
 

 

Edited by blackdimund

Share this post


Link to post
Share on other sites

Just thought id put this out as public knowledge, but trying to return an entire BSP of obje' is a bad idea; so much so that my old RGH2 falcon kicked the bucket during the process. Lol. 

Edited by Akarias

Share this post


Link to post
Share on other sites
1 hour ago, Akarias said:

Just thought id put this out as public knowledge, but trying to return an entire BSP of obje' is a bad idea; so much so that my old RGH2 falcon kicked the bucket during the process. Lol. 

Nooooo, I am so sorry I have been the cause of ruining your rgh xbox. I didn't imagine my journey to find this mod would kill someone's rgh

Share this post


Link to post
Share on other sites

Wow the legendary gamecheat13 replying to my topic! But guys, I had someone well versed in reverse engineering console game engines help me out with implementing zedd's code, and after a night of getting high together and some failed attempts, we got it working, and he got his bitcoin. Thankyou guys for all the help, and especially a big round of applause to Akarias for frying his 360 for the cause. Eventually I will release a full campaign but it will probably take a little while. Especially since I have to go through every object spawned and give it a scale of 1, since most start with 0. After about 6 hours of work I got a pretty good 30% downsized warthog with good physics, tires, and fixed the warthog back bumper physics (that bumper is a spawn of satan that did not want to fix itself when scaled). It may not look like much and looks like an easy rescale, but I had to completely redo a lot of floats to get it driving this well. Also, zedd's scaling video shows which values to edit, but actually the unknown is not where he showed, I had to check the plugins line and sure enough, 0x1C is actually in a different spot. Here is some extremely crappy video of it working. I like how the antenna is the original, makes it look like a mini RC car or something. Forgot to resize the rifle for the vid but whatever.

 

Edited by blackdimund

Share this post


Link to post
Share on other sites

Been busy but congrats for getting the older code working I guess?

Share this post


Link to post
Share on other sites
15 hours ago, Gamecheat13 said:

Send me your map lol

Sorry i dont have a patch, I was poking script changes and reloading the map.

 

I think I added an extra number to one of the volumes x y z extents and it just gave up after triggering the filter script :v

 

Edit: you could just take an existing vollume and check and put it into your own script entry, it will save you most of the work.

Edited by Akarias

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0