Jump to content

Daemonjax

Supporter
  • Posts

    267
  • Joined

  • Last visited

Everything posted by Daemonjax

  1. What he meant was: You save before taking a 95% shot. You miss, and think that's BS so you reload. You miss again, so you reload again. Guess what? You miss again. WTF? :D
  2. Sample Size.............: 3 Number of Hits..........: 0 Expected Hit Percentage.: 95.0% Actual Hit Percentage...: 0.0% Running simulation of 1000000 passes on sample data. Please wait... Simulated Hit Percentage: 95.01083% # of Passes that were <= to your Number of Hits: 119 (0.011899999%) So, if all you did was sit there and take 3 95% shots, one million times... then only 119 of those times would you miss 3 times in a row. The simulation was done using SHA-1 as the PRNG. Are YOU that unlucky. Maybe. :P Maybe you shoulda quit while you were ahead? haha... now your luck is going to have to suck for a while to even out!
  3. I already dared dreadylein to add all those consts in that upk as a feature to his modpatcher. ;) It would take some degree of work just to get all the offsets, and I haven't seen a single one changed that had an effect ingame yet. Could be a gigantic waste of time. I just repacked xcomstategygame.upk, so it does work. Number of bytes matched the original uncompressed. If you used Gildor's extractor, then it won't create the package info file... but if you use upkunpack, then it does.
  4. Man, that sucks. I thought that would work, too.
  5. There's advantages and disadvantages to doing it either way. Take a day to decide what you prefer. :D
  6. Whatever language you're best at! :D We'll find a place for you. Unless you mean you have no programming experience whatsoever... then: 1) Java is relatively easy to pick up compared to some other languages 2) You can be our alpha tester :D
  7. Cool, putting up new version which will give better feedback when someone has the same problem you had.
  8. Try changing 26444500 to 0 in the batch file. It's acting like it's not finding the filenames in the exe... setting it to start at 0 will search the entire file. Also, copy paste to here the contents of your \Documents\My Games\XCOM - Enemy Unknown\XComGame\Logs\Launch.log file. Here's what yours should look like, even if no changes need to be made: XCOM SHA Patcher for Executable (XSHAPE) v0.11b xcomgame.upk xcomstrategygame.upk Found 28433408 bytes in Binaries\Win32\XComGame.exe Starting at byte number: 26444500 xcomgame.upk entry found at: 26444932 Found Hash.: B8 2A 4C D3 E8 7B 7A 54 1A 41 51 E4 68 D4 8F 8D A7 20 DB 22 Actual Hash: B8 2A 4C D3 E8 7B 7A 54 1A 41 51 E4 68 D4 8F 8D A7 20 DB 22 xcomstrategygame.upk entry found at: 26444965 Found Hash.: 24 53 5F 9E 9D 21 95 14 79 9B 0F CA 6F B8 89 87 2E 16 53 B3 Actual Hash: 24 53 5F 9E 9D 21 95 14 79 9B 0F CA 6F B8 89 87 2E 16 53 B3 No changes needed to be made. Obviously the hashes will be different from yours, but the point is it found and compared the ones in the exe to the ones in my folder. It isn't doing that for you. Which is... weird. ;) I chose 26444500 because I figured it would work for everyone, and would save some time for people with slow systems... but, 0 should probably work too. I say probably because the search algorithm isn't entirely complete :D hehe. That's why it's beta. Trying to replicate your output... I was able to do it by changing the starting byte to be very near the end of the file: XCOM SHA Patcher for Executable (XSHAPE) v0.11b xcomgame.upk xcomstrategygame.upk Found 28433408 bytes in Binaries\Win32\XComGame.exe Starting at byte number: 28433400 No changes needed to be made. So, change yours to 0 and see what happens. :D If that works, then your exe must be VERY different from mine. Why is that? Found 28419584 bytes in Binaries\Win32\XComGame.exe Your exe is much smaller than mine! Haha. How? Don't answer that :D I know. Umm... I think 28405760 would work for you. If not, try a smaller number or 0.
  9. Well, there may be code in a function somewhere that makes sure a soldier can only get promoted once per mission. Not unreasonable :D
  10. Sounds good! No rush. I'll set up the project on google code tonight. We'll have a beta release by the end of the week :D
  11. Try to stay positive, man. Try not to focus on one particular change that you want so much... it may be impossible until someone else finds the right code to modify.
  12. Try to find a function somewhere that defines the value... since the constant isn't used, we have to dig deeper.
  13. Dear god, man. Start studying! What class is it for?
  14. Can you add the -v switch to xshape.jar in the batch file, and cut and paste the verbose output here? It may give us a clue. @echo off java -jar XSHAPE.jar -v 26444500 pause I'd like to see the expected vs actual hash values. I'm very curious, and I'm sure we'll get this straightened out :D Did you modify the config file? The default should work for you... core.upk xcomgame.upk xcomstrategygame.upk If you removed the line for xcomgame.upk, then it won't check that file at all. If that's not it, I'll need to see the verbose output.
  15. I actually made a tutorial for changing those... at the end I had to say that it didn't work. ;) I'm beginning to think all those constants are there just to f*** with us :D
  16. heheh... interesting :D if(kItem.iCategory != 1 && (kItem.iCategory != 2) && (kItem.iCategory != 3)) { return true; } Is equivalent to: if(kItem.iCategory == 4 || (kItem.iCategory == 5) || (kItem.iCategory == 6)) { return true; } ^ assuming there is a category 4, but whatever. Not that it really matters, but I believe there's actually only 5 categories (1, 2, 3, 5, 6). What's interesting about doing it this way (or just jumping past the first conditional), is now the second conditional actually serves a purpose: if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134)) { return false; } Since item 192 is in category 1... and 133, 134, and 135 are in category 3.... those are now excluded. I believe the second conditional was created before the first conditional was... when they were still testing out ways to make most items sellable. Then they changed their minds, added the first conditional... and then never bothered to remove the second (why bother, when it has no effect). I REALLY would like to know what those four items are... anyone have any ideas? I'm hoping they're the 4 problem items I'd want to exclude because they use no materials. Anyways, the reason you prevented the selling of the infinite starter items is because for those items you allowed the code to continue down to: return m_arrItems[iItem].iCash != -1; Which returns true iff the item has value that isn't -1. Starter items have a value of -1. You're telling me you did that by happy accident? Because that's rather perfect ;) Depending on how it turns out, that may or may not be the right way to do it (we just may want to skip the first conditional altogether), but whatever. Pretty cool regardless. ;) Here's what I'm going to try... Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00000040 C8 35 00 00 4A 16 07 8C 00 84 84 9A 35 B7 02 00 È5..J..Œ.„„š5·.. Changing the 0x07 at offset 0x46 to 0x06 should just skip the first conditional, while leaving everything else alone. Yeah... function bool CanBeSold(int iItem) { local TItem kItem; kItem = Item(iItem); // This is an implied JumpToken; goto J0x8c; kItem.iCategory == 1 || (kItem.iCategory == 2) || (kItem.iCategory == 3); return false; J0x8c: // End:0xd4 Loop:False if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134)) { return false; } return m_arrItems[iItem].iCash != -1; } I can confirm that medkits and scopes are in the list of 4 items that are excluded in the second conditional. I'm willing to bet that arcthrowers, and that first health bonus item are the remaining two. That's a good thing for us. One major problem, however, is that you can sell interceptors for $40. If you have the air/space bonus, however, they only cost $20. So, we'll need to find a way to prevent interceptors from being sold on the grey market. In fact, there are several items which can be used to create nearly infinite cash. I've made a list: ItemBalance=(eItem=eItem_SHIV, iCash=50, iElerium=0, iAlloys=0, iTime=7, iEng=5) ItemBalance=(eItem=eItem_Interceptor, iCash=40, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_Satellite, iCash=100,iElerium=0, iAlloys=0, iTime=20, iEng=5) ItemBalance=(eItem=eItem_IntWeap_I, iCash=35, iElerium=0, iAlloys=0, iTime=7, iEng=5) ItemBalance=(eItem=eItem_IntConsumable_Hit, iCash=10, iElerium=0, iAlloys=0, iTime=0, iEng=5) ItemBalance=(eItem=eItem_IntConsumable_Dodge, iCash=50, iElerium=0, iAlloys=0, iTime=0, iEng=10) ItemBalance=(eItem=eItem_IntConsumable_Boost, iCash=20, iElerium=0, iAlloys=0, iTime=0, iEng=10) EDIT: Actually, don't the last 3 also cost corpses to make? So, we basically have to get this code into that function somehow: if (m_arrItems[iItem].iEng != -1 && m_arrItems[iItem].iAlloys == 0) { return false; } This would care of everything on that list, except interceptors. We'll have to figure out it's item number, which may come down to trial and error. I would check 161 and hope to get lucky. If we can't get the above code into the function, then we'd have to find their item numbers too. Actually, this all seems a little hopeless without being able to increase the size of functions, and perhaps should be left on the backburner until we can do more.
  17. The price information is easily changeable via modpatcher, which is sweet: ; Items ItemBalance=(eItem=eItem_Medikit, iCash=25, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ArcThrower, iCash=35, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_TargetingModule, iCash=20, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ReinforcedArmor, iCash=20, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ChitinPlating, iCash=85, iElerium=0, iAlloys=10, iTime=3, iEng=15) ItemBalance=(eItem=eItem_CombatStims, iCash=50, iElerium=0, iAlloys=5, iTime=3, iEng=15) ItemBalance=(eItem=eItem_MindShield, iCash=150,iElerium=30,iAlloys=10, iTime=7, iEng=35) ItemBalance=(eItem=eItem_Skeleton_Key, iCash=25, iElerium=10,iAlloys=10, iTime=3, iEng=15) ItemBalance=(eItem=eItem_LaserPistol, iCash=10, iElerium=0, iAlloys=10, iTime=2, iEng=10) ItemBalance=(eItem=eItem_LaserAssaultRifle, iCash=25, iElerium=0, iAlloys=15, iTime=3, iEng=12) ItemBalance=(eItem=eItem_LaserAssaultGun, iCash=30, iElerium=0, iAlloys=25, iTime=4, iEng=12) ItemBalance=(eItem=eItem_LaserSniperRifle, iCash=35, iElerium=0, iAlloys=25, iTime=4, iEng=12) ItemBalance=(eItem=eItem_HeavyLaser, iCash=30, iElerium=0, iAlloys=25, iTime=4, iEng=12) ItemBalance=(eItem=eItem_PlasmaPistol, iCash=100,iElerium=10,iAlloys=20, iTime=4, iEng=20) ItemBalance=(eItem=eItem_PlasmaLightRifle, iCash=125,iElerium=15,iAlloys=20, iTime=6, iEng=20) ItemBalance=(eItem=eItem_PlasmaAssaultRifle, iCash=200,iElerium=20,iAlloys=30, iTime=8, iEng=20) ItemBalance=(eItem=eItem_AlloyCannon, iCash=200,iElerium=20,iAlloys=50, iTime=7, iEng=25) ItemBalance=(eItem=eItem_HeavyPlasma, iCash=250,iElerium=30,iAlloys=30, iTime=10, iEng=25) ItemBalance=(eItem=eItem_PlasmaSniperRifle, iCash=250,iElerium=25,iAlloys=30, iTime=10, iEng=25) ItemBalance=(eItem=eItem_BlasterLauncher, iCash=275,iElerium=65,iAlloys=50, iTime=12, iEng=35) ItemBalance=(eItem=eItem_ArmorCarapace, iCash=25, iElerium=0, iAlloys=15, iTime=5, iEng=10) ItemBalance=(eItem=eItem_ArmorSkeleton, iCash=30, iElerium=0, iAlloys=10, iTime=7, iEng=15) ItemBalance=(eItem=eItem_ArmorTitan, iCash=150,iElerium=10,iAlloys=35, iTime=10, iEng=25) ItemBalance=(eItem=eItem_ArmorArchAngel, iCash=200,iElerium=35,iAlloys=50, iTime=14, iEng=35) ItemBalance=(eItem=eItem_ArmorGhost, iCash=250,iElerium=50,iAlloys=40, iTime=14, iEng=40) ItemBalance=(eItem=eItem_ArmorPsi, iCash=400,iElerium=40,iAlloys=20, iTime=10, iEng=30) ItemBalance=(eItem=eItem_SHIV, iCash=50, iElerium=0, iAlloys=0, iTime=7, iEng=5) ItemBalance=(eItem=eItem_SHIV_Alloy, iCash=75, iElerium=0, iAlloys=20, iTime=7, iEng=10) ItemBalance=(eItem=eItem_SHIV_Hover, iCash=100,iElerium=20,iAlloys=30, iTime=7, iEng=20) ItemBalance=(eItem=eItem_Interceptor, iCash=40, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_Firestorm, iCash=200,iElerium=20,iAlloys=40, iTime=14, iEng=20) ItemBalance=(eItem=eItem_Satellite, iCash=100,iElerium=0, iAlloys=0, iTime=20, iEng=5) ItemBalance=(eItem=eItem_IntWeap_I, iCash=35, iElerium=0, iAlloys=0, iTime=7, iEng=5) ItemBalance=(eItem=eItem_IntWeap_III, iCash=35, iElerium=0, iAlloys=25, iTime=7, iEng=10) ItemBalance=(eItem=eItem_IntWeap_IV, iCash=100,iElerium=20,iAlloys=20, iTime=10, iEng=20) ItemBalance=(eItem=eItem_IntWeap_V, iCash=200,iElerium=20,iAlloys=30, iTime=10, iEng=30) ItemBalance=(eItem=eItem_IntWeap_VI, iCash=150,iElerium=20,iAlloys=30, iTime=10, iEng=35) ItemBalance=(eItem=eItem_IntConsumable_Hit, iCash=10, iElerium=0, iAlloys=0, iTime=0, iEng=5) ItemBalance=(eItem=eItem_IntConsumable_Dodge, iCash=50, iElerium=0, iAlloys=0, iTime=0, iEng=10) ItemBalance=(eItem=eItem_IntConsumable_Boost, iCash=20, iElerium=0, iAlloys=0, iTime=0, iEng=10) ItemBalance=(eItem=eItem_Elerium115, iCash=3, iElerium=1, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_AlienAlloys, iCash=2, iElerium=0, iAlloys=1, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_WeaponFragment, iCash=1, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_UFOPowerSource, iCash=75, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_UFONavigation, iCash=40, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_AlienFood, iCash=10, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_AlienEntertainment, iCash=17, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_AlienStasisTank, iCash=10, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_AlienSurgery, iCash=25, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_UFOFusionLauncher, iCash=125,iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedUFOPowerSource, iCash=30, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedUFONavigation, iCash=20, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedAlienFood, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedAlienEntertainment,iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedAlienStasisTank, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedAlienSurgery, iCash=10, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DamagedHyperwaveBeacon, iCash=45, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_SectoidCorpse, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_FloaterCorpse, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_ThinManCorpse, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_MutonCorpse, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_CryssalidCorpse, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_CyberdiscCorpse, iCash=7, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_SectopodCorpse, iCash=10, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_DroneCorpse, iCash=2, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_EtherealCorpse, iCash=15, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_SectoidCommanderCorpse, iCash=10, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_BerserkerCorpse, iCash=5, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_MutonEliteCorpse, iCash=8, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) ItemBalance=(eItem=eItem_FloaterHeavyCorpse, iCash=6, iElerium=0, iAlloys=0, iTime=-1, iEng=-1) The problem with balancing this stuff against engineers and time to build is that: the game doesn't multiply the number of items your building by the time to build. So, it takes the same amount of time to make 1 eItem_ArmorPsi for 400 each, as it does to make 50 of them. We'd have to figure out a way to modify the function that controls the amount of time a build project takes. Otherwise, this would be unbalanced as hell :D Nevermind. It's fine. We just have to exclude certain things... those that don't require any elerium/alloy: ItemBalance=(eItem=eItem_Medikit, iCash=25, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ArcThrower, iCash=35, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_TargetingModule, iCash=20, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ReinforcedArmor, iCash=20, iElerium=0, iAlloys=0, iTime=1, iEng=5) We should try and find out where iCategory is defined... I'd still like to have the number of items in your engineering project multiply the time it takes, but we don't know how to do that yet. KUDOS to tbkiah! Nice mod! :D UPDATE: Here is code that appears to give us a clue... Letting us see which iItems are in what iCategory (maybe): function BuildItems() { m_iCurrentCategory = 1; BuildItem(2, -1, -1, -1, 37); BuildItem(3, -1, -1, -1, 16); BuildItem(4, -1, -1, -1, 54); BuildItem(5, -1, -1, -1, 31); BuildItem(6, -1, -1, -1, 57); BuildItem(7, -1, -1, -1, 45); BuildItem(85, -1, -1, -1, 23); BuildItem(86, -1, -1, -1, 56); BuildItem(76, 25, 7, 5, 32); BuildItem(88, -1, -1, -1, 2, 6); BuildItem(80, 10, 7, 5, 2, 8); BuildItem(99, -1, -1, -1, 17); BuildItem(81, 20, 7, 5, 9, 48); BuildItem(82, 20, 7, 5, 10, 36); BuildItem(79, 85, 7, 10, 47, 18); BuildItem(77, 50, 7, 10, 50, 151, 19); BuildItem(78, 150, 10, 25, 55, 34); BuildItem(192, 25, 20, 20, 7, 15, 3, 55); BuildItem(8, 10, 10, 7, 10, 19, 27); BuildItem(9, 25, 15, 7, 12, 19, 28); BuildItem(10, 30, 25, 7, 12, 20, 29); BuildItem(12, 35, 25, 7, 12, 20, 30); BuildItem(11, 30, 25, 7, 12, 21, 26); BuildItem(13, 100, 10, 20, 10, 20, 22, 40); BuildItem(14, 125, 15, 20, 10, 20, 23, 42); BuildItem(15, 200, 20, 30, 10, 20, 24, 41); BuildItem(16, 200, 20, 50, 12, 25, 27, 43); BuildItem(17, 250, 30, 30, 10, 25, 25, 39); BuildItem(18, 250, 25, 30, 15, 25, 26, 44); BuildItem(19, 275, 35, 40, 15, 40, 30, 38); m_iCurrentCategory = 2; BuildItem(57, -1, -1, -1, 12); BuildItem(58, 25, 15, 10, 10, 14, 10); BuildItem(59, 30, 10, 10, 15, 15, 14); BuildItem(60, 150, 10, 35, 10, 25, 16, 15); BuildItem(61, 200, 16, 30, 14, 35, 18, 9); BuildItem(62, 250, 20, 25, 14, 40, 17, 11); BuildItem(63, 400, 40, 20, 10, 30, 13, 13); m_iCurrentCategory = 3; BuildItem(102, 50, 14, 5, 1, 49); BuildItem(103, 100, 25, 14, 10, 14, 1, 50); BuildItem(104, 200, 30, 30, 14, 20, 5, 1, 51); BuildItem(105, 40, -1, -1, 25); BuildItem(106, 275, 40, 60, 21, 20, 5, 21); BuildItem(107, -1, -1, -1, 66); BuildItem(108, 100, 20, 5, 46); BuildItem(113, -1, -1, -1, 1, 52); BuildItem(115, -1, -1, -1, 53); BuildItem(116, -1, -1, -1, 65); BuildItem(117, -1, -1, -1, 1, 49); BuildItem(118, -1, -1, -1, 50); BuildItem(119, -1, -1, -1, 51); BuildItem(123, 25, 7, 5, 11, 2); BuildItem(124, -1, -1, -1, 4); BuildItem(125, 35, 25, 7, 10, 21, 3); BuildItem(126, 100, 20, 20, 10, 20, 28, 5); BuildItem(127, 200, 20, 30, 10, 30, 33, 0); BuildItem(128, 150, 20, 30, 10, 35, 29, 1); BuildItem(135, 10, 0, 0, 0, 5, 43, 47); BuildItem(133, 50, 0, 0, 0, 5, 44, 20); BuildItem(134, 20, 0, 0, 0, 10, 49, 58); m_iCurrentCategory = 5; BuildItem(171, 3, 1, -1, -1, 14); BuildItem(172, 2, 1, -1, -1, 36); BuildItem(173, 1, -1, -1, 0); BuildItem(191, -1, -1, -1, 40); BuildItem(179, 75, -1, -1, 44); BuildItem(177, 40, -1, -1, 43); BuildItem(175, 10, -1, -1, 46); BuildItem(174, 17, -1, -1, 47); BuildItem(176, 10, -1, -1, 48); BuildItem(178, 25, -1, -1, 49); BuildItem(188, 125, -1, -1, 45); BuildItem(180, -1, -1, -1, 193); BuildItem(189, -1, -1, -1, 51); BuildItem(186, 30, -1, -1, 163); BuildItem(184, 20, -1, -1, 199); BuildItem(182, 5, -1, -1, 199); BuildItem(181, 5, -1, -1, 199); BuildItem(183, 5, -1, -1, 199); BuildItem(185, 10, -1, -1, 186); BuildItem(187, 45, -1, -1, 193); m_iCurrentCategory = 6; BuildItem(144, 5, -1, -1, 52); BuildItem(146, 5, -1, -1, 53); BuildItem(148, 5, -1, -1, 55); BuildItem(149, 5, -1, -1, 54); BuildItem(154, 5, -1, -1, 56); BuildItem(152, 7, -1, -1, 59); BuildItem(156, 10, -1, -1, 61); BuildItem(157, 2, -1, -1, 60); BuildItem(153, 15, -1, -1, 58); BuildItem(145, 10, -1, -1, 65); BuildItem(151, 5, -1, -1, 62); BuildItem(150, 8, -1, -1, 63); BuildItem(147, 6, -1, -1, 64); BuildItem(160, -1, -1, -1, 52); BuildItem(162, -1, -1, -1, 53); BuildItem(164, -1, -1, -1, 55); BuildItem(165, -1, -1, -1, 54); BuildItem(168, -1, -1, -1, 58); BuildItem(161, -1, -1, -1, 65); BuildItem(167, -1, -1, -1, 62); BuildItem(166, -1, -1, -1, 63); BuildItem(163, -1, -1, -1, 64); BalanceItems(); For example, Item 192 appears to be in Category 1. Which is odd, because the second conditional in function CanBeSold(int iItem) checks specifically for items in categories 1 and 3, while it already excluded everything in those categories in the first conditional. Perhaps this code... if(iItem == 192 || (iItem == 135) || (iItem == 133) || (iItem == 134)) { return false; } ... has no real effect? That would be cool, because then we could use that code to exclude 4 items of our choosing. Could we be so lucky and THESE items... ItemBalance=(eItem=eItem_Medikit, iCash=25, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ArcThrower, iCash=35, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_TargetingModule, iCash=20, iElerium=0, iAlloys=0, iTime=1, iEng=5) ItemBalance=(eItem=eItem_ReinforcedArmor, iCash=20, iElerium=0, iAlloys=0, iTime=1, iEng=5) ... are actually items 192, 133, 134, and 135???? That'd be sweet!
  18. My game crashes on startup now: Log: Log file open, 10/21/12 14:18:58 Init: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467 Log: ... running in INSTALLED mode Critical: appError called: Couldn't locate '..\..\Engine\Config\BaseCompat.ini' which is required to run 'XCom' Critical: Windows GetLastError: The system cannot find the path specified. (3) Log: === Critical error: === Couldn't locate '..\..\Engine\Config\BaseCompat.ini' which is required to run 'XCom' Weird right? There's nothing wrong with the basecompat.ini file afaict. Gonna backup all my changed files and let steam try to unf*#@ the game. I'll report back. UPDATE1: 302 files failed to validate. That's odd. ;) UPDATE2: Put everything back the way I like it, and everything works again. Heh... started two new games. First was 50/50 male/females, and the second was 100% females. :D Moral of the story: Sometimes the game just messes up, and you have to reinstall.
  19. Once I determine specifically what bytecode needs to edited, I copy the surrounding hex data into my clipboard. Then I close UE Explorer, and open the uncompressed upk that was previously opened in UE Explorer. Then, I paste the bytecode in my clipboard into the search feature of the hexeditor to find the code in the upk. I make the actual change there, and save the file. Done. All I need to actually do after that point is just run XSHAPE. But, it's nice to re-open the file in UE Explorer to see the change in the decompiled code first. Basically, I don't change the unpacked files. I haven't looked at the meshes or textures. This is one game where I'm not particularly interested in changing those, but maybe someone else can help.
  20. function int GetItemBuildTime(XComGame.XGGameData.EItemType eItem, XGStrategyActor.EItemCategory eItemCat, int iEngineerDays) { local float fBalanceFactor; // End:0x19 Loop:False if(iEngineerDays == -1) { return -1; } // This is an implied JumpToken; //goto J0x52; //eItemCat != 3 || (IsShipWeapon(eItem)); //iEngineerDays = 0; //J0x52: fBalanceFactor = class'XGTacticalGameCore'.default.ITEM_TIME_BALANCE; return int(float(iEngineerDays * 24) * fBalanceFactor); } Changing the second 07 (at location 45) to an 06 gives us that... So it skips all the code I commented out. tbkiah's change probably works as well, too. There's probably a LOT of ways you could change that code to make it read the build times. :D Anyways, the tutorial is up on the previous page for the equal gender ratios.
  21. Hey, windows 7 has a hex calculator, the calculator in the accesories folder has an option in the view menu that says programer. Click that and it turns into a nifty byte calculator. I'ts what I've been usin so far, kinda easier than goin online. Yeah, but can't get float values using that calculator.
  22. Yeah, XSHAPE and modpatcher both modify the exe (each for very different reasons), but they don't touch upk files. If you feel confident in doing the GUI.. if that is where you'd feel most comfortable... then, you can focus on that if you want, of course! :D
  23. Ok... New mod... I'd like equal chances for an xcom soldier to be male or female. Currently, the code is set up to have 33% female soldiers. I know this has been done before by kanet32, but this will be the tutorialized version. :D 1) Uncompress XComGame.upk 2) Open it in UE Explorer 3) Go fishing... find the class: XGCharacterGenerator 4) Click on it, then open up the functions list 5) Click on CreateTSoldier 6) Notice the line: kSoldier.kAppearance.iGender = ((Rand(3) == 0) ? 2 : 1); What this code means is that it rolls a 3 sided die, which results in a random integer number between 0 and 2. If it's a 0, then kSoldier.kAppearance.iGender = 2; Otherwise, kSoldier.kAppearance.iGender = 1; If you'd like to read more about the ? conditional operator: http://www.cafeaulait.org/course/week2/43.html kSoldier.kAppearance.iGender = 2 about 33% of the time, so we want that to be 50%. To do that we need to make the line look like this: kSoldier.kAppearance.iGender = ((Rand(2) == 0) ? 2 : 1); 7) So, we need to realize that we're just changing that 3 into a 2, so that we have Rand(2). Simple, right? 8 ) Instead of looking for a 3, we're going to look for the bytecode of the Rand() function instead. Since there's more than one call to Rand() in the function, we need to make sure we know where the one we're interested in appears in the file. 9) Copy and paste the contents of the decompiled version of the CreateTSoldier function from UE Explorer into a plaintext file. 10) Search the file for the string: Rand 11) We see it comes up 4 times, in the file, and it's the first instance that we're interested in. 12) Go to http://dl.dropbox.com/u/32777109/Games/XCOM%202012/output.txt 13) Hit F3, and search that page for the string: Rand 14) Note that the bytecode for it is A7 15) Start up your favorite hexeditor, and open up the CreateTSoldier.Function file in the \unpacked\XComGame\XGCharacterGenerator\ folder. 16) Search for the hex code A7, and note that there are 4 instances of it in the file. This is exactly what we hoped expected to see. Again, we're interested in the first instance. Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00000170 00 00 45 9A A7 2C 03 16 25 16 02 00 2C 02 01 00 ..Eš§,..%...,... 17) Notice that the next two bytes are: 2C 03 The 03 looks interesting. But what does 2C mean? Well, searching http://dl.dropbox.com/u/32777109/Games/XCOM%202012/output.txt again for 2C gets us: MirrorVectorByNormal Hmm, that's unhelpful.... but, wait, there's another after that... IntConstByte Bingo! So, that bytecode says the next byte is to be treated as an integer. Nice... we Know (with a capital K) we're in the right place now. 18) You could change the 03 to an 02 in this file and just repack. Or you could close UE Explorer, and make the change directely in the uncompressed upk, and skip the repack. Your choice. 19) Reopen the modified upk file in UE Explorer to verify that the change you intended actually happened: kSoldier.kAppearance.iGender = ((Rand(2) == 0) ? 2 : 1); 20) Rename the original file and it's .compressed_save, open the modified uncompressed upk to the \XComGame\CookedPCConsole\ folder, then run XSHAPE. That's it! You're done! SOOOO SIMPLE RIGHT??!! ;)
×
×
  • Create New...