Firegraft offset guide

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
User avatar
Posts: 52
Joined: Fri Feb 01, 2013 7:02 pm

Firegraft offset guide

Postby bajadulce » Fri Jun 12, 2009 6:32 pm

Fed up with downgrading and especially wanting the NO-cd feature that post 1.15.1 offers, I set out to find the offsets for 1.16.1. With anything new, it was very foreign and confusing, but soon finding these offsets was easy. So I put together a small laymans tutorial on how to find these on your own. The ones below are taken from PEAI. If the mod needed a certain exe edit, I found the offset. Those that are missing simply weren't needed in the mod. If for whatever reason you can't figure this out, then post your question or request and I or others will help.

Simple tut on finding exe edits:
Here is a simple technique I have been using to find these in Ollydbg. The steps and procedures have been overly simplified, but many if not most known exe edits can be found using this layman technique.

Example 1.15.1 > 1.16.1 exe edit for scanner sweep unit create:
1.15.1 = 91Offset=0x65360

In ollydedbg SCv1.15.1:
goto expression 00465360 (right-click or ctrl-G) and make note of the code.
now scroll up a bit and the code may or may not change.


If the code changes, then take note of how much the address has changed. In the example shown above it has changed from ..360 to ..35f. Using windows calculator converting hex to decimal, this is shown to be a difference of 1. You will use this value later.

mov ecx,21 is the code you will be searching for in 1.16.1. You may need to search for a different neighboring line if the code isn't something as generic as this. Just take note of its position in relation to the original. Take note of the surrounding code as well as a search may yield more than one result.

In 1.16.1 goto an expression somewhere in the general area of known 1.15.1 (00465360) expression. I picked (0464000). This is so the search will find the area we are searching for easier. Search for command (right-click or ctrl-f) mov ecx,21 and take note of the address 00464f5f. The surrounding code also matches that of the 1.15.1 surrounding code in the 2nd picture. If it doesn't, skip to the next mov ecx,21 command until you find the correct area.


Add the value you found in step2 if any to 00464f5f to get 00464f60. Go to that expression and you will see that the code matches the original in step1.

This is your 1.16.1 offset.
Posts: 4
Joined: Fri Jun 12, 2009 1:38 am

Postby Mauron » Sat Jun 13, 2009 4:15 am

Great stuff! :wub:

I'm slowly working on confirming these EXE edits, but I haven't found any that are wrong yet. How are you finding these so fast? You should make a tutorial. Are you using ArtMoney and CheatEngine?

I'll try to expand a little more on this with my own technique as well.

First, .FGD files are plain text files. Here's the first two entries of 115b.fgd:

Code: Select all

0Entry=Game,Starting Units,Starting Buildings,Zerg
0Hint=Initial Zerg Building

1Entry=Game,Starting Units,Starting Buildings,Terran
1Hint=Initial Terran Building

Now, let's start by breaking down the obvious. Each listing is preceded by a number, apparently a unique ID to each of them. Then there are a few categories that each one has. Entry, Hint, Offset, Size, Type, and VarType. Some also have Change, IsSigned, IsLong, Next, and Prev.

  • Entry: A comma deliminated list of four items, used to form the tree view and label. It appears to be "Main group, subgroup, entry, edit value".
  • Hint: Text displayed in the hint box.
  • Offset: A memory offset, probably added to the MemBase value (Found at the top of the FGD file. I'll explore that next.).
  • Size: Size of the value in bytes.
  • Type: Const (Where you enter a value), Code (The one I checked was an enabled/disabled dropdown), and Jump (Also an enabled/disabled dropdown.
  • VarType: [s]Unsure. Either 1 or 2.[/s] Setting this value to 1 makes Firegraft receive plain integers. A value of 2 seems to signal to Firegraft that this EXE edit uses a unit id # for its value, and makes it display a drop-down list of units instead of an input box.
  • Change: Appears to be byte(s) overwritten in Code and Jump options.
  • IsSigned: Almost certainly whether or not the value is signed (can be negative) or not.
  • IsLong: Almost certainly whether or not the value is long (a memory type.
  • Next:

    [s]Seems to be the next entry index in menus with multiple options (See starting workers to see what I mean).[/s] Marks the EXE edit number of the next EXE edit in a group of "linked" EXE edits. Linked EXE edits will usually only be meaningful when their values are the same, and therefore Firegraft will attempt to synchronize their modified values for you. To turn off this behavior, uncheck the "Use EXE edit links" option below the list of available EXE edits.
  • Prev: [s]Same as above, but for previous entry.[/s] Marks the EXE edit number of the previous EXE edit in a group of linked EXE edits.
Posts: 51
Joined: Sun Mar 23, 2008 5:39 am

Postby a_of_s_t » Sat Jun 13, 2009 4:24 am

Thanks! Now I can update the Plugin Template for 1.16.1. :D
Posts: 51
Joined: Sun Mar 23, 2008 5:39 am

Postby a_of_s_t » Sun Jun 14, 2009 8:37 pm

Mauron wrote:Are you using ArtMoney and CheatEngine?
If your looking for changes in offsets just between patches, use ollydbg. ArtMoney and CheatEngine works best for finding offsets that you know you can change while in game.

Mauron wrote:You should make a tutorial.
Posts: 51
Joined: Sun Mar 23, 2008 5:39 am

Postby a_of_s_t » Mon Jun 15, 2009 6:17 am

The main use of ollydbg is the breakpoint option which you can use to see when codeis accessed. Though, it freezes my computer sometimes, be sure to memorize the hot keys for the untoggle option.
User avatar
Posts: 2
Joined: Wed Jun 24, 2009 12:46 am

Postby Whiplash » Thu Jun 25, 2009 12:54 am

This is some really interesting stuff, I might look into using some of it for my mod campaign depending on if I need more advanced exe edits.
Posts: 2
Joined: Sun Jun 28, 2009 8:23 am

Postby Horst » Thu Jul 09, 2009 11:29 am

Can anybody release his 1161.fgd or at least the offsets he has found out and tested?

I need the morph hack for my mod but just don't get is by myself with those assembler-stuff.

So if anyone found it out please post the offsets... And thanks alot

In the 1161.fgd file, paste entries 0-2 in, and change the offset values. (The attached version already has these.)
Where do I find this attached file? Perhaps I am blind but I only found the downgrader-zip file on your post.
Posts: 2
Joined: Sun Jun 28, 2009 8:23 am

Postby Horst » Fri Jul 10, 2009 4:25 pm

Thank you. I found out how to do it having zerg building/morphing units - and it works great now. I've done my litte mod so far: found SC is a great and balanced game so I've only added the opportunity to train/warp/morph some of the heroes from the SC+BW campaign.
Because of this my mod is working fine with Racine's Rebels Final + Entropy.

Thanks alot to all the folks out there working on starcraft mods/tools to provide more fun to all the nerds that never getaway from SC.

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 3 guests