Jump to content

The next Step


dreadylein

Recommended Posts

 

gotta be honest but of all the stuff you ahve mentioned the big one for me would be item build time.... much more significant in gameplay than sex of soldiers for me ;-)

 

how you managed to do that would be very helpful/useful.

 

function int GetItemBuildTime(XComGame.XGGameData.EItemType eItem, XGStrategyActor.EItemCategory eItemCat, int iEngineerDays)
{
local float fBalanceFactor;

// End:0x19 Loop:False
if(iEngineerDays == -1)
{
	return -1;
}
// End:0x52 Loop:False
if(eItemCat != 3 || (IsShipWeapon(eItem)))
{
	iEngineerDays = 0;
}
fBalanceFactor = class'XGTacticalGameCore'.default.ITEM_TIME_BALANCE;
return int(float(iEngineerDays * 24) * fBalanceFactor);
}

 

This is the script for build times...

 

I changes the ||(OR) between != 3 and (IsShipWeapon(eItem))) to a && (AND) and this made it so that all items have the build times located in the INI files. This is just a quick fix, Once we can actually edit scripts, we could simply remove that part of the script and not have to worry about it screwing up any part of the game.. like if something happens to be a ship weapon and be in category 3.

 

 

and this is in XComStrategyGame.upk somewhere?

Link to comment
Share on other sites

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

 

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.

 

 

 

 

Thanks for the detailed response, man I am learning a lot working on this.

 

OK! Im gonna try to do what Im doing the way you guys are doing what you're doing.

Link to comment
Share on other sites

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.

Edited by Daemonjax
Link to comment
Share on other sites

Sorry yea, XcomStrategyGame.upk, under XGItemTree.. GetItemBuildTime

 

this may be beyond me...

 

I see the info in UE Explorer...can see the script..

 

have unpacked XComStrategyGame.... and am at GetItemBuildTIme..

 

wherein are 5 unpacked files... at which point i aint got a clue what to do...edit them in HxD..edit what though? :wallbash:

 

 

 

tried following Daemonjax's methodology from previous pages but hes making leaps that are beyond my ken... might as well be me writing in swahili :facepalm:

Link to comment
Share on other sites

Correct me if i'm wrong, but currently we have no way to modify entire script lines in the X-Com function files, right?

 

Do the mod gurus (i'm looking expecially at you Daemonjax) have any ideas if it's something we will be able to do in the near / distant future?

Link to comment
Share on other sites

Ok, you open GetItemBuildTime function file, which is in the XGItemTree folder. You then copy the first part of the string, and open the decompressed version of xcomstrategygame.upk in the hex editor and use the find function... looks something like this (minus the >< parts i added in to show you the value)

 

DA 35 00 00 9F 1F 00 00 00 00 00 00 D5 35 00 00 00 00 
00 00 00 00 00 00 DA 35 00 00 00 00 00 00 91 03 00 00 
D5 C1 00 00 A2 00 00 00 76 00 00 00 >07< 19 00 9A 00 D8 
35 00 00 1D FF FF FF FF 16 04 1D FF FF FF FF >06<       

 

In thise code i have already changed the values... Deamonjax's method is way better than mine... That last 06 is normally 97, like the first 07, change that number to 06 and it will jump past the IF statement and not use it.

 

Sorry my methods are not very clear, i really don't have much of an idea what i am doing, i just used a couple resources that people put up and fumbled my way through the code.

Link to comment
Share on other sites

Ok, you open GetItemBuildTime function file, which is in the XGItemTree folder. You then copy the first part of the string, and open the decompressed version of xcomstrategygame.upk in the hex editor and use the find function... looks something like this (minus the >< parts i added in to show you the value)

 

DA 35 00 00 9F 1F 00 00 00 00 00 00 D5 35 00 00 00 00 
00 00 00 00 00 00 DA 35 00 00 00 00 00 00 91 03 00 00 
D5 C1 00 00 A2 00 00 00 76 00 00 00 >07< 19 00 9A 00 D8 
35 00 00 1D FF FF FF FF 16 04 1D FF FF FF FF >06<       

 

In thise code i have already changed the values... Deamonjax's method is way better than mine... That last 06 is normally 97, like the first 07, change that number to 06 and it will jump past the IF statement and not use it.

 

Sorry my methods are not very clear, i really don't have much of an idea what i am doing, i just used a couple resources that people put up and fumbled my way through the code.

 

 

Nope, thats great thx tbkiah... the daft bit i was truggling with was wondering where the heck you got the hex string from.... eventually right-clicked to see "view buffer". :facepalm:

 

anyway:

 

http://farm9.staticflickr.com/8325/8109957317_0797a528e5_b.jpg

 

has to be said: you guys rock.

 

time to find a few more bits to break now ;-)

Link to comment
Share on other sites

I double click xhape.bat.... It says Xcom SHA Patcher for Excutable - No changes needed to be made. Press anykey.

 

^^ You messed up somewhere. XSHAPE should have reported that 1 hash file was updated. The only explanation is that one or more of the files you thought you modified actually weren't.

 

Even if you just switched to using the uncompressed upk file, the hash would still need to be updated.

 

I would check if xcomgame.upk.uncompressed_size was actually renamed. XSHAPE will skip files that have a valid <filename>.upk.uncompressed_size.

 

 

Also, download and use the new version of XSHAPE (v.11b), and then you could edit the batch to use the -v switch like so:

 

@echo off

java -jar XSHAPE.jar -v 26444500

pause

 

Ahhh figured out my problem! Or problems! Had some files in the wrong area and dint rename the proper file! poor me!

Buts its all gOodly now! Thanks guys!

Edited by miked79
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...