Modding SF4 for PC (No DLC Unlocks!)

searching for a pointer table or anything of that nature…
position 1
#BCM starts at 7A6CF0



2342434DFEFF30000000070045001000
0000000000000000300000008C050000
A8050000241A0000381B0000B81B0000


lets look more closely
at #BCM + 24



30000000
8C050000
A8050000
241A0000
381B0000
B81B0000


4 bytes, as before, a short pointer table?
30000000 (7a6d20) -
points to where I believe the section where move motions are defined starts, right after the last (?) element in the pointer table is (B81B0000)
8C050000 (7a727c) -
1420 decimal… and it points to near the start of the triangle jump region… looks like another VERY SHORT pointertable?



F81B0000
001C0000
0D1C0000
171C0000
211C0000
301C0000
351C0000

A8050000 (7a7298) -
1448 decimal… 24 bytes of unknown numbers


4000101002000300000000006666A63F0000000000000000

this inspired me to search for 3Fa66666, the number that i FUCKING SEE EVERYWHERE IN THIS FILE I just realized… and 99% of the search results bring up brawl+ hacking stuff LOL. I’m suddenly wondering if this number 3fa66666 has any significance somehow? Perhaps the reason for the weird looking numbers is that this is a 4 byte floating point number of some sort? It would explain the odd behaviors of it. I remembered stuff about floating point numbers being fucking weird to the point of me not understanding at all how they’re implemented. they have like the inability to express integers accurately and all that crap… now that you mentioned that they don’t behave correctly, you’re right, changing the “3f” to “4f” should not create a increase of more than 10x
searching for “3fa66666 float” in google brings up http://www.smashboards.com/showthread.php?t=204677 where

AHA MOTHERFUCKERS, no wonder we see these same fucking numbers in every fucking part of the file just in opposite endian and it didnt seem to scale linearly. well i guess brawl players are good for something.
anyway back to this.
immediately following this section is the 76-byte length repeating pattern that is the region i used to create triangle jumps and similar concepts. should be 67 blocks unless i’m off by one in one direction or another.

241A0000 (7A8714) -
276 bytes worth of what looks like more pointers. that means 69 pointers… maybe I’m 2 off on how many blocks there are in the previous section lol??

edit: looks like it is pointing to the readable text stuff below starting at like “5LP” and stuff…

381B0000 (7A8828) -
128 bytes worth of what looks like pointers, meaning 32 of them. if this points to something i can’t figure out what though

B81B0000 (7A88A8) -
64 bytes worth of pointers… meaning 16 of them. edit: points to “GROUND AIR_V AIR_F” etc

this is followed immediately by

the = in “G=SHOT_EX” may be the result of me experimenting early on several months ago to see if it would break the game and i forgot to revert it? not sure lol.
this is probably not part of the same pointed to thing though.

and then about 330 bytes of numbers that appear to be counting upward, edit: fucking with this section by copying and pasting it around is causing various jumping moves to stop working… also standing hk has been replaced by fake kick. perhaps this is where moves that aren’t just standing/crouch moves are handled (jumping, followups (messiah kick demon flip wall dive etc), fake kick) are handled?

and then

and then the end of the file stuff

btw you know before you mentioned this stuff i never even thought of the idea of a file using pointers… i’ve used it plenty of times in all sorts of applications in programming just file formats were kind of new to me.

im having real trouble trying to get any kind of hook in regarding getting moves to cancel :confused: in cancelable moves youll see lines like this:

0301 0000 0600 0000 0000 0040 0600 0000

where any value other than 0600 for the 4th byte will make it not cancel. try pasting that into where it looks like it should go in a non-cancelable move though and all you get is a move with no hitbox and itll play the death sound or something instead of the usual grunt when you do the move. i dunno…

i THINK the value at 0x38 in a move block points to that 8 byte repeating block later on (for example in ryu’s 2hk CDCC CC3D CDCC CC3D CDCC CC3D CDCC CC3D CDCC CC3D CDCC CC3D 0300 0000 CDCC CC3D CDCC CC3D CDCC CC3D CDCC CC3D CDCC CC3D CDCC CC3D) but i cant seem to put the same block at the end of the file and point to it without the game just crashing :confused:

8C050000 (7a727c) -



F81B0000
001C0000
0D1C0000
171C0000
211C0000
301C0000
351C0000

F81B0000 (7A88E8) - points to “HADOKEN” etc.
001C0000 (7A88F0) - points to “FIRE_HADOKEN” etc.
so basically these point to HADOKEN FIRE_HADOKEN TATSUMAKI SYORYUKEN SHINKU_HADOKEN DASH BACK_DASH. I’m going to have to guess that these are the internal names for the motions

edit: based on the lack of this information in BCM regarding move “specialness” or “superness”, we understand the functionality every block of data here except for that short 328 bytes @ 7a8ae0…
it’s probably possible to make the conclusion that a list of possible moves a move can be canceled to is included in each move’s section in BCA. move meter cost may be there too? unless this is in these 328 bytes, but i don’t understand how they COULD BE here in only 328 bytes but i’ll screw with it.

edit: wow something related to cancelling is here… copying and pasting part of the same chunk from ken’s file (the section isn’t the same size in ryu or kens btw) made random stuff dash cancellable… pretty much everything that was focus cancellable before i think
random normals, tiger shots, f.lk can be kara canceled into dash. on the other hand i cant do tiger knee anymore at all or do f.rh… wait jumping upback and holding upback and pressing rh causes teleport to the ground and f.rh. i think i made ub+rh be the input for f+rh… i dont even know. forward jump roundhouse doesnt do anything at all… wait shit now i found that i can do tiger knee while neutral jumping or forward jumping (it teleports to the ground ofc). but only then
just found close roundhouse 1st hit -> cancel to f.rh “target combo”.
focus attacks on the other hand AREN’t dash cancelable anymore

this is wacky
i dont think anything that wasn’t SOMEHOW cancelable before became cancelable though

regular special+super cancels still work like normal
the data i used


06000700080009000A000B000C000D000E000F001100130014001500
16002300240026002A002B002C002D002E002F003000310036003700380039003A003B003C003D003E003F00400044001700180019001A001B001C0032003300
340035001D001E001F0020002100220032003300340035001D001E001F0020002100220032003300340035002A002B002C002D002E002F003000310036003700
380039003A003B003C003D0040002A002B002C002D002E002F003000310036003700380039003A003B003C003D0040002A002B002C002D002E002F0030003100
36003700380039003A003B003C0041003A003B003C00410028002900280029002500260027000100030005000600100012000100030005000600100012000100
030005000600100012000100030005000600100012000100030005000600100012000100030005000600

edit: most likely conclusion is that i made dashing count as a super or a focus? without the meter cost though lolw

Thanks!

lol things are getting crazy

okay if you set 7a8be4 from 2800290028002900 to some other stuff focus cancels to that other stuff instead of to dashes i dont really know the system at all still though

edit: well every 2 bytes is a number that points (?) to a move a category of moves can cancel into.

i’m guessing that somewhere in the animation data or similar it has 2 pointers that point to the start and end of the list of numbers it can cancel into from here or something similar

these seem to correspond to an index in the 76 byte stuff… to test this theory I looked for something that it is not possible to combo into in the 76 byte region. I thought of ultra so i went and found it as the 61st one, or rather 3D. I replaced a 39 with 3D, and suddenly, C.mk ultra cancels and combos (14 hits !)… so we need to find where it points to this list of stuff in the animation now.
2a00 - lp tiger shot
2b00 - mp tiger shot
3000 - hk low tiger shot
3100 - ex low tiger shot
3800 - hp tiger upper
3900 - ex tiger upper
3C00 - hk super
3d00 - ultra
4100 - focus cancel (costs 2 bars)
2800 - f dash
2900 - b dash

edit: setting byte 138 in c.lp (d401 default) to ff01 sagat makes his ko scream on the startup

edit: starting to wonder if perhaps theres another more relevant section in BCA?

edit: nooooo we already know about all the sections in BCA?

WE’RE MISSING SOMETHING
this shit drives me crazy when i hit a wall like this
we have to figure out exactly what the fuck is going on in the individual animations.

Has anyone found a way to edit the character select? I want to change the character placements and such.
You can edit the skin it self but the characters will still stay in place.

i found where it controls what cancels how, in c.mp, 340 bytes in, change 06 to 08, then @ 348, 06 to 08.
now instead c.mp is dash cancelable like a focus attack and nothing else cancels. i dont know exactly what it is with the numbers though, still doesn’t tell us how to add new ones ??.. dunno.

not that i know of. we’re mostly working on gameplay modding here
theres the people that do the texturing stuff in the sf4 subforum they might know but thats really a completely different topic

it may be possible… (in fact i hope so, i hope that one day it is possible)

alright. yeah I just downloaded a hex editor so im going to mess around with the character select file, see if I can get something to work.

You guys should get piecemontee involved in this because he knows a bit about the 3D animations.

It could be that the values are compositions of bit fields, and each bit represents a certain property. That would complicate things slightly.

ah that could actually be it, i’ll try that idea.
i haven’t figured out how the game know how big the list of canceling things is though, there’s no pointers to each thing

i’ve been working on a program that will do some basic editing is what i’ve been doing for the past few days, i’ll post something if i actually have results with it

also lol sirlinfan your vids got on gootecks.com

(and somehow mine still got ignored oh well)

Is it possible to extract the character portraits from SF IV PC files? I’m looking for the Seth portrait but don’t have SF IV PC installed to fiddle around with the files.

Any help would be most appreciated.

Does anyone know how to edit the character selection box portraits?

and

i will repost a previous response to someone else for both of these:

[media=youtube]CjlGBEo63Vc[/media] gen uses his secret technique to destroy ryu’s dick

[media=youtube]-kvLlLgX58c[/media] example of cancelling to ultra, many other things are possible

I apologize if this has already been answered before somewhere, but does anyone know how to disable the menu and score interface shown at the end of a match so I can take screenshots of the character win poses without them in the way?

little perl script for obtaining animation locations MUCH MUCH MUCH MUCH easier


#/usr/bin/perl -w
use strict;
use warnings;

print "----------------------------------------------------------------------
";
open(IN,"SGT.cmn.emz");
binmode(IN);

# debugging mainly
sub printadd {
	my $a = shift;
	return $a . " - " . sprintf("%x",$a);
}

# loc, amount, buffer
sub sread {
	# bad programming here but whatev
	seek(IN, $_[0], 0) or die "seek:$!";
	read(IN, $_[2], $_[1]);
}

# endian stuff
sub convert {
	return unpack("V", shift);
}

# (start, end). returns array.
sub slurptable {
	my ($s, $e) = (shift,shift);
	my $buffer = "";
	my @out;
	my $i = 0;
	
	while($s < $e) {
		sread($s, 4, $buffer);
		$buffer = convert($buffer);
		if($buffer != 0) {
			$out[$i] = $buffer;
			$i++;
		}
		$s += 4;
	}
	return @out;
}

my $buffer = "";
my $pointer = 0;

sread(0x48, 4, $buffer);

my $bac = convert($buffer);
print printadd($bac) . " - header BAC
";

sread($bac, 256, $buffer);

#print $buffer . "
";

$bac += rindex($buffer, "#BAC");
print printadd($bac) . " - actual BAC
"; # 779040

# get animation table
sread($bac + 12, 4, $buffer);
$pointer = convert($buffer);
my $addanimation = $pointer+$bac;
print printadd($bac + 12) . " - pointer to animation table
    contents - " . printadd($pointer) . " or " .  printadd($addanimation) . "
";

# get end of animation table
sread($bac + 16, 4, $buffer);
$pointer = convert($buffer);
my $addname = $pointer+$bac;
print printadd($bac + 16) . " - pointer to name table
    contents - " . printadd($pointer) . " or " .  printadd($addname) . "
";

# get hit table start (so know end of name table)
sread($bac + 20, 4, $buffer);
$pointer = convert($buffer);
my $addhit = $pointer+$bac;
print printadd($bac + 20) . " - pointer to hit table
    contents - " . printadd($pointer) . " or " .  printadd($addhit) . "
";

my @animtable = slurptable($addanimation, $addname);
my @nametable = slurptable($addname, $addhit);

# not slurping the hit table for now except for the first value.
# get hit table start (so know end of name table)
sread($addhit, 4, $buffer);
$pointer = convert($buffer);
my $firsthit = $pointer+$bac;
print printadd($addhit) . " - hit table first value
    contents - " . printadd($pointer) . " or " .  printadd($firsthit) . "
";

print "------------------------------------
";
print "length of animtable -  " . scalar(@animtable) . "
";
print "length of nametable -  " . scalar(@nametable) . "
";

my $length = scalar(@nametable);
push(@nametable, $firsthit - $bac);

for(my $i = 0; $i < $length; $i++)
{
	sread($nametable[$i]+$bac, $nametable[$i+1]-$nametable[$i], $buffer);
	$buffer =~ s/\x00+$//;
	$buffer = $i . ". " . $buffer;
	$buffer .= " "x(30-length($buffer));
	print $buffer . printadd($animtable[$i] + $bac) . "
";
}

print printadd($nametable[199]);
# cleanup
close(IN);


example for sagat:


----------------------------------------------------------------------
7835640 - 778ff8 - header BAC
7835712 - 779040 - actual BAC
7835724 - 77904c - pointer to animation table
    contents - 696 - 2b8 or 7836408 - 7792f8
7835728 - 779050 - pointer to name table
    contents - 3420 - d5c or 7839132 - 779d9c
7835732 - 779054 - pointer to hit table
    contents - 6144 - 1800 or 7841856 - 77a840
7841856 - 77a840 - hit table first value
    contents - 100016 - 186b0 or 7935728 - 7916f0
------------------------------------
length of animtable -  199
length of nametable -  199
0. STAND                      7842684 - 77ab7c
1. CROUCH                     7842960 - 77ac90
2. STAND2CROUCH               7843264 - 77adc0
3. CROUCH2STAND               7843600 - 77af10
4. STAND2JUMP                 7843872 - 77b020
5. JUMP                       7844240 - 77b190
6. JUMP2STAND                 7844752 - 77b390
7. STAND2JUMP_F               7845056 - 77b4c0
8. JUMP_F                     7845424 - 77b630
9. JUMP2STAND_F               7845936 - 77b830
10. STAND2JUMP_B              7846240 - 77b960
11. JUMP_B                    7846608 - 77bad0
12. JUMP2STAND_B              7847120 - 77bcd0
13. TURN_STAND                7847424 - 77be00
14. TURN_CROUCH               7847696 - 77bf10
15. TURN_WALK                 7848000 - 77c040
16. FORWARD                   7848272 - 77c150
17. BACKWARD                  7848672 - 77c2e0
18. DASH                      7849072 - 77c470
19. BACKDASH                  7849712 - 77c6f0
20. STAND2GUARD               7850320 - 77c950
21. GUARD_STAND               7850592 - 77ca60
22. GUARD2STAND               7850864 - 77cb70
23. CROUCH2GUARD              7851136 - 77cc80
24. GUARD_CROUCH              7851440 - 77cdb0
25. GUARD2CROUCH              7851744 - 77cee0
26. BOUND_UPWARD_L            7852048 - 77d010
27. BOUND_UPWARD_M            7852480 - 77d1c0
28. BOUND_UPWARD_H            7852944 - 77d390
29. BOUND_DOWNWARD_L          7853408 - 77d560
30. BOUND_DOWNWARD_M          7853792 - 77d6e0
31. BOUND_DOWNWARD_H          7854224 - 77d890
32. DOWN_UPWARD               7854656 - 77da40
33. DOWN_DOWNWARD             7854840 - 77daf8
34. RISE_UPWARD               7855032 - 77dbb8
35. RISE_DOWNWARD             7855424 - 77dd40
36. RISE_UPWARD_STUN          7855744 - 77de80
37. RISE_DOWNWARD_STUN        7856032 - 77dfa0
38. B_DOWN_UPWARD             7856336 - 77e0d0
39. B_DOWN_DOWNWARD           7856520 - 77e188
40. THROW_MISS                7856712 - 77e248
41. THROW_GUARD               7857072 - 77e3b0
42. STUN                      7857312 - 77e4a0
43. STUN_RECOVER              7857568 - 77e5a0
44. GUARD_HL                  7857760 - 77e660
45. GUARD_HM                  7857864 - 77e6c8
46. GUARD_HH                  7857976 - 77e738
47. GUARD_ML                  7858088 - 77e7a8
48. GUARD_MM                  7858200 - 77e818
49. GUARD_MH                  7858312 - 77e888
50. GUARD_LL                  7858424 - 77e8f8
51. GUARD_LM                  7858536 - 77e968
52. GUARD_LH                  7858648 - 77e9d8
53. GUARD_CL                  7858760 - 77ea48
54. GUARD_CM                  7858872 - 77eab8
55. GUARD_CH                  7858984 - 77eb28
56. DAMAGE_HL                 7859096 - 77eb98
57. DAMAGE_HM                 7859208 - 77ec08
58. DAMAGE_HH                 7859320 - 77ec78
59. DAMAGE_ML                 7859432 - 77ece8
60. DAMAGE_MM                 7859544 - 77ed58
61. DAMAGE_MH                 7859656 - 77edc8
62. DAMAGE_LL                 7859768 - 77ee38
63. DAMAGE_LM                 7859880 - 77eea8
64. DAMAGE_LH                 7859992 - 77ef18
65. DAMAGE_CL                 7860104 - 77ef88
66. DAMAGE_CM                 7860216 - 77eff8
67. DAMAGE_CH                 7860328 - 77f068
68. DAMAGE_HJ                 7860440 - 77f0d8
69. DAMAGE_MJ                 7860648 - 77f1a8
70. DAMAGE_LJ                 7860856 - 77f278
71. DAMAGE_UPPER              7861064 - 77f348
72. DAMAGE_LOWER              7861192 - 77f3c8
73. DAMAGE_ASHIBARAI          7861304 - 77f438
74. DAMAGE_KUZURE_S           7861776 - 77f610
75. DAMAGE_KUZURE_C           7862080 - 77f740
76. BLOW_HL                   7862384 - 77f870
77. BLOW_HM                   7862576 - 77f930
78. BLOW_HH                   7862768 - 77f9f0
79. BLOW_VL                   7862960 - 77fab0
80. BLOW_VM                   7863168 - 77fb80
81. BLOW_VH                   7863376 - 77fc50
82. BLOW_SL                   7863584 - 77fd20
83. BLOW_SM                   7863808 - 77fe00
84. BLOW_SH                   7864032 - 77fee0
85. 5LP                       7864256 - 77ffc0
86. 5MP                       7864944 - 780270
87. 5HP                       7865632 - 780520
88. 5LK                       7866256 - 780790
89. 5MK                       7866944 - 780a40
90. 5HK                       7867696 - 780d30
91. 5LPF                      7868544 - 781080
92. 5MPF                      7869232 - 781330
93. 5HPF                      7869872 - 7815b0
94. 5LKF                      7870496 - 781820
95. 5MKF                      7871184 - 781ad0
96. 5HKF                      7871824 - 781d50
97. 2LP                       7872672 - 7820a0
98. 2MP                       7873328 - 782330
99. 2HP                       7874016 - 7825e0
100. 2LK                      7874688 - 782880
101. 2MK                      7875376 - 782b30
102. 2HK                      7876064 - 782de0
103. 8LP                      7876704 - 783060
104. 8MP                      7877184 - 783240
105. 8HP                      7877664 - 783420
106. 8LK                      7878144 - 783600
107. 8MK                      7878624 - 7837e0
108. 8HK                      7879104 - 7839c0
109. 9LP                      7879639 - 783bd7
110. 9MP                      7880160 - 783de0
111. 9HP                      7880640 - 783fc0
112. 9LK                      7881088 - 784180
113. 9MK                      7881536 - 784340
114. 9HK                      7882016 - 784520
115. THROW_F                  7882496 - 784700
116. THROW_B                  7883008 - 784900
117. THROW_F_ATTACK           7883520 - 784b00
118. THROW_F_DAMAGE           7884368 - 784e50
119. THROW_B_ATTACK           7884640 - 784f60
120. THROW_B_DAMAGE           7885120 - 785140
121. 6LK                      7885408 - 785260
122. 6HK                      7885952 - 785480
123. 6HP                      7886528 - 7856c0
124. 5HK_FEINT                7887168 - 785940
125. R5LP                     7887320 - 7859d8
126. R5LPF                    7887840 - 785be0
127. R2LP                     7888464 - 785e50
128. R2LK                     7888976 - 786050
129. R5LK                     7889536 - 786280
130. R5LKF                    7890048 - 786480
131. SAVING_MAX2              7890560 - 786680
132. SAVING_MAX               7891616 - 786aa0
133. SAVING2                  7892696 - 786ed8
134. SAVING3                  7893248 - 787100
135. EX_SAVING                7893808 - 787330
136. APPEAL_01                7894976 - 7877c0
137. APPEAL_02                7895344 - 787930
138. APPEAL_03                7895648 - 787a60
139. APPEAL_04                7896112 - 787c30
140. APPEAL_05                7896560 - 787df0
141. APPEAL_06                7896848 - 787f10
142. APPEAL_07                7897120 - 788020
143. APPEAL_08                7897568 - 7881e0
144. APPEAL_09                7897936 - 788350
145. APPEAL_10                7898352 - 7884f0
146. SHOT_L                   7898752 - 788680
147. SHOT_M                   7899600 - 7889d0
148. SHOT_H                   7900448 - 788d20
149. SHOT_EX                  7901296 - 789070
150. G_SHOT_L                 7902272 - 789440
151. G_SHOT_M                 7903168 - 7897c0
152. G_SHOT_H                 7904064 - 789b40
153. G_SHOT_EX                7904960 - 789ec0
154. KNEE_L                   7905984 - 78a2c0
155. KNEE_L_LAND              7906928 - 78a670
156. KNEE_M                   7907216 - 78a790
157. KNEE_M_LAND              7908160 - 78ab40
158. KNEE_H                   7908448 - 78ac60
159. KNEE_H_LAND              7909376 - 78b000
160. KNEE_EX                  7909664 - 78b120
161. KNEE_EX_LAND             7910768 - 78b570
162. UPPER_L                  7911040 - 78b680
163. UPPER_L_LAND             7912096 - 78baa0
164. UPPER_M                  7912304 - 78bb70
165. UPPER_M_LAND             7913344 - 78bf80
166. UPPER_H                  7913552 - 78c050
167. UPPER_H_LAND             7914592 - 78c460
168. UPPER_EX                 7914800 - 78c530
169. UPPER_EX_LAND            7915952 - 78c9b0
170. TIGER_GENOCIDE_L         7916160 - 78ca80
171. TIGER_GENOCIDE_M         7918048 - 78d1e0
172. TIGER_GENOCIDE_H         7919936 - 78d940
173. UC_GENOCIDE              7921824 - 78e0a0
174. UC_GENOCIDE_HIT          7923200 - 78e600
175. UC_GENOCIDE_hoken        7924480 - 78eb00
176. UC_GENOCIDE_LAND         7924832 - 78ec60
177. VFX_TIGRE_L              7925040 - 78ed30
178. VFX_TIGRE_M              7925632 - 78ef80
179. VFX_TIGRE_H              7926224 - 78f1d0
180. VFX_G_TIGRE_L            7926816 - 78f420
181. VFX_G_TIGRE_M            7927296 - 78f600
182. VFX_G_TIGRE_H            7927776 - 78f7e0
183. VFX_TIGRE_EX             7928256 - 78f9c0
184. VFX_G_TIGRE_EX           7929040 - 78fcd0
185. DEMO_START               7929632 - 78ff20
186. DEMO_START_LEGACY        7930000 - 790090
187. DEMO_ROUND_WIN_KO        7930272 - 7901a0
188. DEMO_ROUND_WIN_KO2       7930560 - 7902c0
189. DEMO_ROUND_WIN_KO3       7930944 - 790440
190. DEMO_ROUND_WIN_KO4       7931328 - 7905c0
191. DEMO_ROUND_WIN_TO        7931744 - 790760
192. DEMO_ROUND_LOSE          7931984 - 790850
193. DEMO_MATCH_WIN           7932208 - 790930
194. DEMO_CONTINUE            7932464 - 790a30
195. DEMO_SUCCESS             7932544 - 790a80
196. DEMO_GAMEOVER            7932704 - 790b20
197. DEMO_BOSS_TARGET         7932864 - 790bc0
198. DEMO_RIVAL_SGT           7932944 - 790c10
100016 - 186b0