Jump to content

The next Step


dreadylein

Recommended Posts

Eh, I'm of the mind that if we can already do it with a minimum amount of hex editing, it'd be ridiculous of them to handwring over the possibilities of releasing an editor. Bethesda sure doesn't worry about the admittedly awful things some people do with their modding tools. And Valve practically release the full source of their games.

 

I'm curious what you think they'd be worried about, though. Piracy, I'm assuming? I'm afraid that ship has sailed. And it's captained by a surly, bearded fellow with an eyepatch and a parrot.

 

And, no, pointing out the copyright issue isn't annoying. It honestly hadn't occurred to me. Someone has to read the terms of service so the rest of us don't have to ;). (Not that I didn't read the terms of service, of course. Because I did. Eventually.)

Edited by kanet32
Link to comment
Share on other sites

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

sure, my thoughts were just .. if they give us mod tools, they give us a proper tool for cooking which spits out perfectly viable bytecode, would you do this in a game with a competetiv multiplayer ? :D

 

Na, piracy isnt the point, but if 2k decide that mods hurt their dlc approach, they wouldnt search for us, they would get a stick and poke modenexus for the distrubtion

 

@daemonjax

Look for the uhood sourcecode, its a nice start

Edited by dreadylein
Link to comment
Share on other sites

sure, my thoughts were just .. if they give us mod tools, they give us a proper tool for cooking which spits out perfectly viable bytecode, would you do this in a game with a competetiv multiplayer ? :D

 

Ahh, right. I'm a singleplayer person myself, so I hadn't thought of that. Presumably, they use some kind of anti-cheat techniques... although, now I think of it, I didn't see any Punkbuster install or anything. Hmph, now I'm wondering how they expect that not to turn into a massive, unregulated anarchy... Maybe it's that phone home thing the game does on launch?

Link to comment
Share on other sites

didnt see the homecall do other things then updating inis, but i didnt search for it also :P

Hadnt seen any anti cheat at all yet, well ok, they put the mp vars not in plain sight but that it is, in theory it could be the couse for putting the inis into the binary

Link to comment
Share on other sites

Second modding attempt (and this one actually worked):

 

I wanted to mod the delays on hunkering down and overwatch to something reasonable.

 

Ok, so, XComGame.upk is the file the holds the info for in tactical so I start there.

 

 

1) Uncompress XComGame.upk

2) Open it in UE Explorer

3) Go fishing... find the class: XGAction_Overwatch

4) Click on it and see:

 

class XGAction_Overwatch extends XGAction
hidecategories(Navigation)
notplaceable;

simulated function bool Init(XGUnit kUnit)
{
BaseInit(kUnit);
return CanBePerformed();
}

simulated state Executing
{

Begin:
Sleep(1.75);
CompleteAction();
}

 

5) So, I realize I need to change 1.75. So, I google for a float to hex converter (http://gregstoll.dyndns.org/~gregstoll/floattohex/), and plug that number in and get: 0x3fe00000

6) Now, I open up the class (Executing.State, actually) in my unpacked folder with my hexeditor and see:

 

BC 86 00 00 32 55 00 00 00 00 00 00 A7 86 00 00 
C2 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0C 00 00 00 B0 00 00 00 2D 00 00 00 29 00 00 00 
61 00 1E 00 00 E0 3F 16 1C B2 7F 00 00 16 08 0C 
9A 08 00 00 00 00 00 00 00 00 00 00 32 55 00 00 
00 00 00 00 FF FF 00 00 53 00 02 00 00 14 00 04 
00 00 00 00 00 00 00

 

7) Near the middle you'll see E0 3F... that's the float 1.75 in little endian (backwards ;) ) format.

8 ) Using the same online calculator, I calculate the float 0.25 as hex, which gives: 0x3e800000

9) So, if I change the E0 3F to 80 3E, I'll change 1.75 to 0.25

10) I make the changes to the uncompressed .upk, save, rename the original file and it's .compressed_save, run XSHAPE, and then I was done.

 

* I basically repeated the above for hunkering down, which was unpacked as class: XGAction_HunkerDown

 

I must say, I'm having fun with my shortened delay on overwatch and hunkering down. :D Hope that helps someone else.

 

^^^ I'd like to see more tutorials like this on here ;)

Edited by Daemonjax
Link to comment
Share on other sites

 

6) Now, I open up the class in my unpacked folder with my hexeditor and see:

 

BC 86 00 00 32 55 00 00 00 00 00 00 A7 86 00 00 
C2 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0C 00 00 00 B0 00 00 00 2D 00 00 00 29 00 00 00 
61 00 1E 00 00 E0 3F 16 1C B2 7F 00 00 16 08 0C 
9A 08 00 00 00 00 00 00 00 00 00 00 32 55 00 00 
00 00 00 00 FF FF 00 00 53 00 02 00 00 14 00 04 
00 00 00 00 00 00 00

 

7) Near the middle you'll see E0 3F... that's the float 1.75 in little endian (backwards ;) ) format.

 

 

Thanks Daemonjax for all your efforts, really making it easy for the rest of us.

 

I'm getting a little stuck using your post above as a guide, specifically on the part in quote tags above. I have XComGame.upk uncompressed with the decompress tool on Gildor's homepage and also unpacked into a folder with the unpack/repack tool you suggested in another thread. I have opened in UE Explorer but when I open the XGAction_Overwatch.Class with my hex editor I see:

 

bd 86 00 00 00 00 00 00 e1 7f 00 00 00 00 00 00
a8 86 00 00 00 00 00 00 ff ff ff ff ff ff ff ff
00 00 00 00 00 00 00 00 09 00 00 10 ff ff 02 00
00 00 01 00 00 00 31 3a 00 00 00 00 00 00 a7 86
00 00 12 00 80 00 92 fe ff ff 32 55 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00
00 00 64 54 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 32 55
00 00 00 00 00 00 aa 86 00 00

 

... and therefore I can't find the float 1.75 in hex for me to change. This is also what UE Explorer shows in the View Buffer option for XGAction_Overwatch. Am I missing something? If you can help some more that would be awesome.

Link to comment
Share on other sites

That's weird, right? Try using gildor's extract tool, instead of the other unpacker.

 

What does the code look like in the class view in UE Explorer? Does it say 1.75 there?

 

Are you using this explorer? http://eliotvu.com/portfolio/view/21/ue-explorer

 

 

EDIT: Actually, it's not so weird... my bad. You'll want to open the executing.state file in those respective folders for the classes :D

 

e.g \unpacked\XComGame\XGAction_Overwatch\Executing.State

 

simulated state Executing
{

Begin:
       Sleep(1.75);
       CompleteAction();
}

Edited by Daemonjax
Link to comment
Share on other sites

That's weird, right? Try using gildor's extract tool, instead of the other unpacker.

 

What does the code look like in the class view in UE Explorer? Does it say 1.75 there?

 

Are you using this explorer? http://eliotvu.com/portfolio/view/21/ue-explorer

 

Yep using that explorer. The code is identical in UE Explorer so I'm following up to that point no problem (see below). You can also use View Buffer in UE Explorer which is showing me the same as what my hex editor is on the unpacked class file so I assume that isn't the problem. :shrug:

 

class XGAction_Overwatch extends XGAction
hidecategories(Navigation)
notplaceable;

simulated function bool Init(XGUnit kUnit)
{
BaseInit(kUnit);
return CanBePerformed();
}

simulated state Executing
{

Begin:
Sleep(1.75);
CompleteAction();
}

 

Edit: Perfect, thanks Daemonjax :biggrin:

Edited by Aidopunko
Link to comment
Share on other sites

I got it to WORK! :D

 

HELL YEAH!

 

Thanks for this extremely neat tutorial DeamonJax(and all the others that helped to point out programs ec.).

I was able to pull it off! :D

*muhahahahaha*

I may mod my game even further now...

 

So does anyone else want to get rid of that Sniper-Overwatch bug(its taking ages...)? :devil:

 

EDIT:

If anyone wants to look for words instead of numbers: Text to Hex Converter

EDIT3: Or is that rather useless(wasnt able to find the word "sleep" in XGAction_HunkerDown)?

 

EDIT2:

If you get the hang of it... the workflow is quite fast. :thumbsup:

Edited by Caiman
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...