Version 01.00.00.05 Changes
-new key "InputAsOneValue" which allows max 8 Byte big input fields
-new key "InputAsBigEndian" works together with "InputAsOneValue" and treats the value in big endianess
-new key "InputAsString" which allows to enter texts. Length of text is restricted to number of ?? in modified string
-typo in hacks.yr.ini fixed
\Edit
a few code examples
Code:
[TestString]
Name=Input as String
Description=Allows to enter a string (max length 11 chars)
Type=
Offset=0x012345
Original=01 02 03 04 05 06 07 08 09 10 11
Modified=?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
InputAsString=yes
[TestOneValue]
Name=Input as one value
Description=all 8 bytes are used as a single value
Type=
Offset=0x012345
Original=01 02 03 04 05 06 07 08
Modified=?? ?? ?? ?? ?? ?? ?? ??
InputAsOneValue=yes
- have to set InputAsString=yes for it to work, can be included in Info menu item.
- was expecting, if maps01.mix is made maps.mix, InputAsString will fill up 00 00 for extra space,
but it leaves old values making it maps.mixix. How to input 00 00 as text?
Can the program take an array from ini and show dropdown with short description for cases which
have several Modified= for a single Original=. Cases like starting units change from area guard to
guard/hunt etc.
Also wanted to point out that AutoTargetNeutral (TS) can clean up civilians, cars, trains etc. also. QUICK_EDIT
i'll add the fill up with 00 in the next version.
Right now you could only create another Offset/Original/Modified block with 00's on the modified entry to erase any old value and insert it before the input block.
i'd have to come up with a new key that allows a list of byte values and matching combobox-text-value
e.g.
InputList=6A 0A / Area Guard, 6A 0B / Guard
would be comma-separating for the list elements enough?
is / a good separator for byte/text values? _________________ SHP Artist of Twisted Insurrection: Nod buildings
Can take idea like NodeCount defs in sp maps, so that you don't have to parse 2 different separation
chars in a single line and get array size also. That will give one line per modified entries. Any delimiter
that is not commonly used like | or # is better than comma or slash.
Or [Modified] or <Modified> and sub-entries. QUICK_EDIT
Then the Modified=?? ?? would still allow you to enter manual values
the others would appear in a combobox as preset values
Leaving away Modified=?? ??, you will only have the combobox and no manual value entry. _________________ SHP Artist of Twisted Insurrection: Nod buildings
What in the name of insanity is this? I FRICKING LOVE THIS LOGICCCC!!!!!!!!!!!!OOOOOOOOHEEAWWWWWWWWWWWYAAAAAAAAAAAAAAAAAWWWWWW PEW PEW PEW PEW BOOM BOOM BOOM!! Nice I love this!!!! Ferriswheel bomb, Dive bomb. New Logic discovered thanks to Kenosis
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Tue Jul 01, 2014 2:12 pm Post subject:
Lin Kuei Ominae wrote:
I'll restrict it to 8 bytes. This is a 64bit value and bigger than any variable the game uses and it can still be handled fine by the numericupdown control.
Parasite03 wrote:
There can be values like 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90. I am not joking.
That would be very stupid.
a) no variable has such a high value range
b) instead of one super long input, you can still split that into several smaller 8 byte blocks
So no, such a case won't be included.
Actually, that's an obvious "remove operation" hack. Those seem quite logical. Isn't there support for "boolean hacks" (enable/disable some function) that simply do more extensive hacks, like changing such a range of bytes? _________________ QUICK_EDIT
Version 01.00.00.06 Changes
-InputAsString fills rest of the string with 00 Bytes if new string is shorter than maxlength
-[Refresh List] also loads the modifications file again before updating the list
-new key(s) "PresetList#" (# being any char) show combobox with preset values if one or more of the keys are present (Format: PresetList#= Bytes | ComboboxText )
-new key "ExternalDataFile" allows to set a path/filename to a file with binary data, that is written at the given offset
-new key "InsertExternalData" = yes/no specifies if the ExternalData is inserted rather than overwriting existing bytes
-links in the "List of Changes" text can be clicked to be opened in default browser
-latest hacks.yr.ini included
Actually, that's an obvious "remove operation" hack. Those seem quite logical. Isn't there support for "boolean hacks" (enable/disable some function) that simply do more extensive hacks, like changing such a range of bytes?
Just set
Modified= 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
in the ini, to remove such a long set of bytes.
For the manual input dialog it is just restricted to 8 bytes, as this is the biggest number the system can handle.
When you want manual input on more bytes then you can only use InputAsString or set InputAsOneValue=no, so you have that many separate input fields in the dialog. _________________ SHP Artist of Twisted Insurrection: Nod buildings
On ExternalDataFile
- functionality works as expected. Out of bound offset also fills 00 and it takes MB sized files also.
- better not to use Modified= for this entry. Original= and Executable= are not expected as files
are meant to be large.
- UI does not need Set Original in upper frame and Original:/Modified:/Executable: in bottom.
Could show file name instead
- insert would mismatch higher offsets in ini and this change could not be reverted back. May be
it could be made as a tool on the menu than to put in the ini.
Others
- by default it takes InputAsOneValue=yes unless InputAsOneValue=no is given.
- 125% dpi problem, could use some space beneath the dropdown
ExternalData is primarily meant for exe pros like Hyper, who could this way insert a block of free bytes into the exe and fix in the same step all addresses to offsets that point after that included code block by using the additional offset/original/modified groups.
I doubt this is used very much, but i'll look into fixing the mentioned issues.
Should it have InputAsOneValue=no by default, like for versions before update 05?
damn dpi setting, i hate this.
Does anyone know a reliable way to turn on/off a row/column on a TableLayoutPanel? Right now i simply set height=0 to disable unnecessary elements (the elements are also set .enabled=false) and set height=25 to enable them again. And obviously the fixed value of 25 is bad due to different sizes in different dpi settings.
I would really like to avoid any stupid code that looks like
-find out current dpi setting
-height=25*dpi.size
to compensate the different sizes. _________________ SHP Artist of Twisted Insurrection: Nod buildings
If applying ExternalDataFile with insert, breaks other ini entries then having separate ini files
for pre and post would be the way to go. Unlike other entries, this could not be reverted back
to original and Modified/Original/Executable becomes optional. Can't think of having 2 or more
of them with insert in a single ini.
Complexity increases if chunk is exported to a file before update or a .bak of original exe file
is saved, as there are boundary conditions and sequence of applying hacks is a user choice.
So I felt, it could be a tool in the menu which can take inputs of filename and offset and provide
this functionality. It is up to you.
InputAsOneValue=yes by default applies to all, including more than 8 bytes. It won't be a problem
if it was not applying little endian or if we have InputAsLittleEndian and set to no be default. Also
not compatible with PresetList# with set to yes and no for InputAsString.
Not important but can have PresetList01 multiple times representing different combo entries.
For dpi, can try few pixels gap for UI elements like an empty border. Type filter dropdown does not
have this problem. QUICK_EDIT
So I felt, it could be a tool in the menu which can take inputs of filename and offset and provide
this functionality. It is up to you.
I think i'll keep it in the ini. Makes things easy and compact and no need to add extra work for something that isn't used much anyway.
E1 Elite wrote:
InputAsOneValue=yes by default applies to all, including more than 8 bytes. It won't be a problem
if it was not applying little endian or if we have InputAsLittleEndian and set to no be default.
I'll make InputAsOneValue default to no again.
Though if someone writes in the ini
Modified=?? ?? ?? ?? ?? ?? ?? ?? ??
which are 9 bytes and has InputAsOneValue=yes set, then it is his own fault for not reading the first post
E1 Elite wrote:
Also not compatible with PresetList# with set to yes and no for InputAsString.
What has the endianess to do with InputAsString and PresetList?
Can you show an ini example where you found this issue?
PresetList works fine for me with InputAsString=yes
E1 Elite wrote:
Not important but can have PresetList01 multiple times representing different combo entries.
yeah, it doesn't matter at all. Every line that starts with "PresetList" is added.
You can also write
PresetList=
PresetList=
PresetList=
or
PresetListWingDangDudel=
and the values are added
E1 Elite wrote:
For dpi, can try few pixels gap for UI elements like an empty border. Type filter dropdown does not
have this problem.
Type filter is always there and not programatically turned visible on/off depending on some ini setting.
Thus the tableLayout in which the type filter is embedded is doing automatically the stupid dpi resizing.
On the input window however, interface elements are enabled/disabled, made visible/invisible depending on the ini.
And for that the TableLayoutPanel gets programatically new rows, columns and different buttons/textboxes/labels etc added or removed. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Didn't realise InputAsOneValue=yes was by default in 1006 at that time. InputAsString=no and
PresetList for more than 8 bytes was showing 0. It is fine with 8 bytes or less. QUICK_EDIT
Version 01.00.00.07 Changes
-InputAsOneValue defaults to no
-[Info] dialog shows list of keys, their datatypes and default values
-new key "Warning" which shows the text in the "List of Changes" in bold red
-all latest inis adjusted to use Warning key when necessary, InputAsOneValue when necessary, some typos fixed
-hacks.ini for TS has new hack "Remove hardcoded values"
-hacks.ini for TS has for the starting units behaviour hacks (human & ai) the presetvalues defined (*)
(*) for the list i took the possible names directly from the exe. I haven't tested if the corresponding values and these settings really work. You can see a (Not tested) on them.
But since Sleep, Guard and Area Guard match with their values the order at which they appear in the exe, i assume the others follow the same ordering. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Also Known As: ZivDero Joined: 23 Jul 2013 Location: Russia
Posted: Wed Jul 02, 2014 5:27 pm Post subject:
In bold red? Doesn't look bold enough... _________________
DarkVen9109 wrote:
What in the name of insanity is this? I FRICKING LOVE THIS LOGICCCC!!!!!!!!!!!!OOOOOOOOHEEAWWWWWWWWWWWYAAAAAAAAAAAAAAAAAWWWWWW PEW PEW PEW PEW BOOM BOOM BOOM!! Nice I love this!!!! Ferriswheel bomb, Dive bomb. New Logic discovered thanks to Kenosis
as posted before, this tool is not meant for the common naive newbie who just selects blind all the available hacks and applies them.
If he doesn't read and understand what he is doing, then a bigger and more bold warning won't help either.
btw, thank you all for accepting this tool that quick and providing new hacks and inis. _________________ SHP Artist of Twisted Insurrection: Nod buildings
It is for RA2 v1.006 game.exe. RA2 adds player counts like (2) to the end of MP map names in the
map selection screen when they come from a custom *.pkt file (like from *.mmx). This is to disable
that functionality.
Additional WW map's name refer to plain strings without player count and user made maps might
be referring to such plain strings in ra2.csf, which differs from the ones defined in missions.pkt. So,
string table editing is needed to bring them to same format, if this fix is used.
It is sufficient to change one character in the related strings in the game.exe:
Offset : 0x003F38F8
Original : 4D
Modified : 00
Offset : 0x003F39E4
Original : 25
Modified : 00 QUICK_EDIT
Another three patches for hacks.yr.ini (One written by Iran, the second written by Iran for RA2, and ported by me for YR, the third is written by me.)
Code:
[DisableStartup]
Name=Disable startup loading screen
Description=This patch disables loading and displaying the loading screen, which substantially speeds up game start up time
Link=http://xwis.net/forums/index.php/topic/179490-yr-no-startup-loading-screen-patch
Type=YR
Offset=0x12C5F3
Original=E8 A8 4C 00 00
Modified=90 90 90 90 90
[EnableGSpeedInCampaign]
Name=Enable the gamespeed slider in campaign
Description=Normally it's only possible to change the game speed in the campaign by running the game with the -SPEEDCONTROL command line argument. This patch removes the check whether you supplied the -SPEEDCONTROL arg and always enables the option.
Link=http://xwis.net/forums/index.php/topic/179625-patch-to-force-campaign-gamespeed-option-to-be-enabled-in-ra2
Type=YR
Offset=0x12f949
Original=74 07
Modified=90 90
[AllowHiResMode]
Name=AllowHiResMode always enabled
Description=AllowHiResMode will always be enabled, regardless of the value in RA2MD.INI
Type=YR
Offset=0x1fa960
Original=74 05
Modified=90 90
Checked, it is a bug when typing in decimal format for InputAsOneValue=yes. It is considered as a hex
value and its decimal equivalent is computed if the byte limit permits. Scroll arrows for both DEC/HEX
work correctly and typing the number in HEX also work correctly. Saving is fine. QUICK_EDIT
I'll fix the bug next week when i have access to the source code again.
Thanks for the bug report. _________________ SHP Artist of Twisted Insurrection: Nod buildings
there are now also cases like this possible
with multiple Offset sharing same Original/Modified value
Code:
[ApplicationName]
Name=Application Name
Description=The displayed name of the application (visible on the taskbar, in the task manager and in the title bar when playing in windowed mode).
Type=TS
Offset=0x00072568
Offset=0x001FF2C2
Offset=0x001FF2C9
Offset=0x001FF2DA
Offset=0x001FF3AC
Offset=0x001FF3B3
Offset=0x001FF3C4
Offset=0x001FF4ED
Offset=0x002861F1
Offset=0x00286216
Offset=0x0028621B
Offset=0x002862BE
Offset=0x002862C3
Original=84 89 6F 00
Modified=C0 7F 71 00
[ApplicationName]
Name=Application Name
Description=The displayed name of the application (visible on the taskbar, in the task manager and in the title bar when playing in windowed mode).
Type=TS
Hack1=HackA
Hack2=HackB
Hack3=HackC
Hack4=HackD
Hack5=HackE
Hack6=HackF
Hack7=HackG
Hack8=HackH
Hack9=HackI
Hack10=HackJ
Hack11=HackK
Hack12=HackL
Hack13=HackM
yes, that's a valid hack i got from Bittah. Will be included in next version.
I added support now for multiple Offsets sharing same Original/Modified values for easier implementation and less text in the ini. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Version 01.00.08.00 Changes
-new key "Group" allows to group hacksections and show them grouped together in ModExe
-[Tools] menu added, [Edit ini] option moved there as subelement
-new function [Reference Calculator] added to [Tools] menu
-Bugfix: decimal value was treated like hexadecimal in input dialog
-Update: If only Offset is specified, Original and Modified will be used from the next possible set value
(Allows to easier set multiple Offsets sharing same Original/Modified values, by specifying Original/Modified only on the last Offset)
-latest hacks.yr.ini from Glukv48 included. Group keys added to the sections for better ordering
-improved hacks.ini for ts included (Bittah added a huge list of hacks to modify the filenames of game specific files, which can be also used to now use them in subfolders like DTA and TI use it already)
Big thanks to Bittah for the hacks and bug testing.
A short note about the reference calculator:
The reference calculator (ref.calc.) is a tool which is meant to find the reference of a given offset for a string.
The formula to find the reference which is included in the ref.calc. is the following:
Reference=Inverse.Endianess ( Offset + 0x400000 )
You can also use the ref.calc. to quickly find the places in the exe, that contain a certain hex value, by writing the hex value in the Reference input control. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Feedback:
- Edit ini could have launched its associated program instead of notepad.
Ref.calc
- usage of reference calculator could come with an example or more description in Info tab. Top offset
label could be confused with a hex offset in the exe.
- it could have been easier if it listed all the offsets for say word EXPAND.
- it allows 8 bytes in offset but crashes if more than 4 bytes are given in reference field
- doesn't save window position for ref.calc QUICK_EDIT
Some people have a corrupt registry and if ini is not associated with anything, then nothing starts. Every windows PC has notepad by default, thus it's quite sure it opens.
It was not meant to be used as an ASCII search tool, but only for searching numeric values. Especially the places in the exe, that have the address stored that points to a certain string.
Example:
The string "Rules.ini" is placed at offset 00 2F E0 8C in the exe.
In game.exe the references to the rules.ini string don't use the direct address. They use the value that you get when you use the ref.calc.
In this example the references use 8C E0 6F 00.
The formula is like this:
00 2F E0 8C + 00 40 00 00 = 00 6F E0 8C -> reversed = 8C E0 6F 00
If you now search in game.exe for the value 8C E0 6F 00, you'll get 2 results/places for this value. (other strings can have only 1 or even more places that point to it)
So if you want to change the rules.ini string and move it to a different place (usually a big block of 00 bytes in the exe) which allows the string to be longer, you have to change the references that point to the place of the strings location.
Since this is quite a lot of work when doing it manually, you can use ref.calc. See attached picture.
Offset: the place where you found the string in the exe
Reference: the calculated value that is used 1-n times in the exe to point to this string
Reference hits Listbox: the Offsets in the exe, where the Reference number was found. You can now use these values to create a modexe hack, that changes the values at these places, to now point to the new place where you moved the string.
Since different names/strings are stored on different places, and each can have a different number of references in the exe that point to it, you can use ref.calc. to make the work easier.
This way you don't have to do all the calculation and searching manually.
E1 Elite wrote:
- doesn't save window position for ref.calc
It's not that elaborate coded. It's just a simple window that opens on a button click. Right now you can also open it a 2nd 3rd or n-th time.
Version 01.00.08.01 Changes
-Bugfix: ref.calc. doesn't crash anymore on very high values in the Reference input field
ref.calc. is primarily using uint (4byte) values. If you enter bigger values it switches to long (8byte) mode.
Maximum is long and not ulong, since the whole logic for filestream operations works only on long too. But I doubt there is any single file as big as 9.223.372.036.854.775.807 byte which is about 8 ExaByte. (at least not in the next 10-20 years)
Since different names/strings are stored on different places, and each can have a different number of references in the exe that point to it, you can use ref.calc. to make the work easier.
This way you don't have to do all the calculation and searching manually.
I think that the disassembler is better suited for this purpose. But ref.calc can still find their application. QUICK_EDIT
Disassembler can be quite complicated, especially for those who never used it before. So i think for someone like Bittah who knew the formula and just wanted to create the hacks in a quick way, this was easier/faster done.
btw, do you know if the formula is the same for RA2/YR too?
Do you have to add there 0x400000 as well?
If not, maybe the tool should have this value in an editable text field, instead of hardcoded into the formula. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Fri Oct 10, 2014 4:34 pm Post subject:
Lin Kuei Ominae wrote:
true ini format would only bloat up the ini and make it less well readable for a program like this
What's better? This short pseudo ini
or this bloated true ini format
and then imagine another section is mixed in between these making it really messy.
Well, seeing as I use my own ini library for all my ini needs, which can't read duplicate keys in one section, I'd use true ini format. In fact, for my .mrf generator, the internal format looks pretty much exactly like your example of true ini format there.
But I shortened it to something like this, with the sub-section headers generated from the original section name + a fixed string (in this example, "hack") + a number:
Checked again, one byte change at both offsets is enough to make it work. Your fix works for additional map
names only, not for the names coming from missions.pkt. That is why string table editing (ra2.csf) is needed to
make it consistent. QUICK_EDIT
@LKO: I suggest removing the [NegativeArtDamage] hack that I added; apparently it causes desyncs (the desync will happen a few seconds after any unit moves). _________________ QUICK_EDIT
Checked again, one byte change at both offsets is enough to make it work. Your fix works for additional map
names only, not for the names coming from missions.pkt. That is why string table editing (ra2.csf) is needed to
make it consistent.
Even if you change the names in the string table the maps will have player counts after them, this applies to maps loaded from an mmx mix. QUICK_EDIT
Even if this hack was perfect, I was never inclined to use it. In RA2, with 125% dpi font setting on Win7,
many long map names go off the listbox and part of the name + player count are not visible. As the .pkt
list is ordered, I haven't felt the need to even use ResHacker and correct the UI. QUICK_EDIT
@LKO: I suggest removing the [NegativeArtDamage] hack that I added; apparently it causes desyncs (the desync will happen a few seconds after any unit moves).
I've kept it but put it into a new group "Flawed hacks" into which i also put Leveled Projectiles.
This way someone can still experiment with it and the exe pros can see which hacks still need improvements.
I've uploaded the zip again with new hacks.ini and hacks.yr.ini included.
hacks.yr.ini has a few new hacks from the research forum included
-launcher remover
-blowfish remover
-movie check disabler
-map check disabler _________________ SHP Artist of Twisted Insurrection: Nod buildings
Even if this hack was perfect, I was never inclined to use it. In RA2, with 125% dpi font setting on Win7,
many long map names go off the listbox and part of the name + player count are not visible. As the .pkt
list is ordered, I haven't felt the need to even use ResHacker and correct the UI.
Then stop using DPI scaling for the game... It causes many bugs from what I've heard. QUICK_EDIT
I spent sorting ra2\yr hacks, add a link to some hacks (which had their own topic, but did not have a reference to it), redid hack AllowHiResMode (copied from Ares, it should give the best result)
I also corrected the two hack (they did not have a tag InputAsBigEndian, because of what they were difficult to use from the UI):
Map previews' position and size Changing the screen resolution in the menu
Aslo, I added a few new hacks:
Windowed mode with no frame of the window
Changes action for button "Movies And Credits"
Disables dialog when exit the game
And finally, most of these break-ins have been ported for RA2
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum