Kalishnikov Posted October 19, 2012 Share Posted October 19, 2012 Yeah, it's showing Rand(4), but I haven't allowed Steam to patch my game yet so that could be the reason. I had a very bad experience with Empire: Total War and rebalancing during my first campaign. I've been looking through the bytecode info you posted and I'm not sure how you reversed the ratio. I tried editing the following line and the changes appeared correctly in UE Explorer, but the game crashed immediately. 45 9A A7 2C 04 16 25 16 02 00 2C 02 01 00 26 19 2E C6 48 I swapped 2C 02 and 26, hoping that wouldn't throw anything off. Is there a list of bytecodes for operators? Simply swapping == to != would help immensely. Link to comment Share on other sites More sharing options...
kanet32 Posted October 19, 2012 Share Posted October 19, 2012 (edited) Haha, yeah, it's a bit complex. See, the way conditionals seem to work in compiled UnrealScript is that the condition is a fixed size, and then the "true part" and "false part" are both preceeded by a (I think little-endian) integer indicating the number of bytes those parts are. That's what the "02 00" preceeding "2C 02" means. It's saying there's two bytes for that part (the true part). I actually tried swapping THOSE as well, but had no luck. Since I couldn't figure out why that didn't work, what I ended up doing was, like you said, changing the == to != (simply change 9A to 9B, those bytecodes can be found in the Native Tables I mentioned in the post you're talking about) to reverse the ratio, or changing the 04 to 02 to get a 50/50 ratio. If you want to save some time, I can just give you my already-modified files. Since DaemonJax has released the XSHAPE tool, you won't have to trust my executable if you don't want. Others might find them handy, too--it's not quite as good as being able to set it yourself in a config file, but I figure these are roughly the ratios people want most. This version fixes the gender ratios to 50%/50%. I included the modified executable, but if you want to play it safe you can also use DaemonJax's XSHAPE tool to get the same result. While if you, like me, want to spite the developers for not making it 50/50 in the first place, this version reverses their bias, making it 2:1 in favour of women. EDIT: Oddly enough, I just looked in the native tables again, just to be sure I was right about 9A/9B, and the operators actually appear twice in there: in one spot, == is F2 and != is F3; in another, == is 9A and != is 9B. I'm guessing it has something to do with the way parameters can be arranged. Different parameters require different bytecodes. (Like maybe if it's a fixed-size constant it gets one bytecode, and if it's the return value of a function call it gets another.) At any rate, 9A and 9B are the ones I used, so if you want to do it yourself that should work for you. Edited October 19, 2012 by kanet32 Link to comment Share on other sites More sharing options...
Kalishnikov Posted October 20, 2012 Share Posted October 20, 2012 Thanks for the info! Still getting crashes, but I guess that's a sign that I need to reinstall and start using some version control for my files. Hopefully I'll have time to mess around this weekend and find a ratio that works well for my ironman classic run. Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 Are you getting crashes using my modified files? I guess the changes in the patch must have been extensive enough to cause incompatibilities between the two versions. If you're using UltraEdit to make the changes, that's what I used, and it has some really bizarre behaviour when hex-editing. Pasting doesn't replace selected bytes, it inserts before them. Also, when you right-click and go to "Insert/Delete Bytes," that function's parameter is taken in bytes, NOT in nybbles, as I initially thought. (And, frankly, as I think is intuitive, since that's how hex is represented.) Thinking back, I'm pretty sure that's why my attempt to swap the 02 00 2C 02 and the 01 00 26 didn't work. I was copy/pasting, assuming it would replace the selected bytes. I really need to find a better hex editor. Anyway, now I've thought about it I'm kind of baffled that they apparently changed 25% to 33% in that patch. I mean, that's hardly a substantial change. If they saw people were annoyed at how few female soldiers there are, the logical thing to do would be to make it 50%. The difference between 25% and 33% wouldn't be noticeable. (And, indeed, wasn't, in my case.) It's kind of like if soldiers were twice as likely to come from Egypt than the other countries, and then they quietly went in and changed it so they were only 1.9x as likely. Link to comment Share on other sites More sharing options...
Kalishnikov Posted October 20, 2012 Share Posted October 20, 2012 Ok, things are working now. I tried manually editing the SHA-1 values and that worked for my old .upk files but not the samples you uploaded. I probably messed something up with XSHAPE or just my java install, but that can wait until later. I think I'll just hunker down and finish my campaign this weekend so I can make sure I'm working on up-to-date files in the future. I won't mind a 50/50 ratio once someone mods in male characters that don't look like they're on steroids, but for now I'm happy with 90/10. Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 Good show. Yeah, I think it's probably just a combination of my samples being incompatible with your version, and maybe a change that was made to the executable that's preventing XSHAPE from working perfectly. And, totally with you on the dumb models. XCOM is a lovely game--though I have my quibbles with some bits--which makes those models a bizarre error on the part of the design team. It's especially strange since the models for the female characters are some of the least dumb I've seen in games recently. I'm pre-emptively calling "Bioware syndrome," where they get so many things mostly right that it makes the disastrously bad things look even worse by comparison. Link to comment Share on other sites More sharing options...
Puerkl8r Posted October 20, 2012 Share Posted October 20, 2012 (edited) I hope somebody at some point makes a GUI editor with all the tweaks in it, I'd love to change some things, like this for instance, but I'd rather not go poking around large complex config files to do it, that the lightest mistake could totally screw up the game. Edited October 20, 2012 by Puerkl8r Link to comment Share on other sites More sharing options...
dirk45 Posted November 6, 2012 Share Posted November 6, 2012 I concur. Even though I always make back-ups it still wigs me out changing stuff that I don't fully comprehend. I need more lady-soldiers than roided out space marine rejects, this is a fact. Link to comment Share on other sites More sharing options...
kanet32 Posted November 6, 2012 Share Posted November 6, 2012 If it helps, I figured out why my altered executable wasn't working for some people. Turns out, the pre-order version of the game has a different executable than the post-order version. Something to do with the pre-order bonuses, presumably. So, unfortunately, if you didn't have a pre-order version of the game, the executable I uploaded wouldn't've worked for you anyway. XSHAPE really should still work for everyone, though, so as long as you're willing to trust XSHAPE (which is open-source) you should be safe to use my XComGame.upk. Just in case people are actually using my modded files, I'll post updated ones when the next patch comes. I have a friend who has a non-pre-order version of the game, so I can probably get both versions of the executable so it'll work for (hopefully) everyone. Everyone playing it on Steam, anyway. Link to comment Share on other sites More sharing options...
RazorsharpLT Posted November 6, 2012 Share Posted November 6, 2012 I've already made the same request, mostly because of the way the male soldiers look (AKA gears of war style hulks) The regular "civilian" soldiers look soo much better than their xcom male counterparts. Lets hope fireaxis makes those moding tools! Or if anyone has any other ideas, would be really pleased to know. Link to comment Share on other sites More sharing options...
Recommended Posts