Page 3 of 12

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 7:48 am
by BoehserOnkel
fast and good tables always thx - the best :)

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 8:38 am
by FauDrei
Thanks for fire rate cheat in 3.0 :)

Uploading GOG version of your 3.0 table...

BTW, I think Gunner:GetMaxRange (not ClientWeapon:get_MaxRange) is the right weapon range function to hack... and watch out - you are out of pBack space ;)

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 2:55 pm
by Recifense
@FauDei,

You are right. But:

Gunner:GetMaxRange: That's the one I mensioned before (two functions with the same name).
ClientWeapon:get_MaxRange: This should be used as well. This one gives the visual affect when, for instance, you are guiding a tank to make a barrage at a certain place (the dot-line with a circle at one end).

Thank you for adapting the script for GOG release.

Cheers!

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 4:05 pm
by FauDrei
Ah, I see...

So ClientWeapon:get_MaxRange hack gives you option of "manual long range shooting" and Gunner:GetMaxRange hack enables "automatic long range shoting" and we need them both.

...as for dual functions with the same name: the first function float GetMaxRange() with no arguments calls the second function float GetMaxRange(ServerUnit target) and I suppose we should hack the just first one. Since CE natively evaluates address of the first function - I reckon we are good to go. I would know how and where to "piggyback" this function, but I am not sure how to implement player check and other required nongamebreaking checks.

In case that I am wrong and we need the second one - we can always use something like ([Link]):

Code: Select all

{$lua}
if syntaxcheck==true then return '' end

if (LaunchMonoDataCollector() == 0) then
  error("no mono")
end

function reEscape(s)
  local escPatChars = [[().%+-*?[^]]
  s = s:gsub('.', function(c) if escPatChars:find(c, 1, true) then return '%'..c end end)
  return s
end

function findMethodAddrBySignature(classname, methodname, signature, check)
  local method = findMethodBySignature(classname, methodname, signature, check)
  if method ~= nil and method > 0 then
    return mono_compile_method(method)
  end
end

function findMethodBySignature(classname, methodname, signature, check)
  assert(type(signature) == 'string', "invalid signature")
  signature = "^"..reEscape(signature:gsub(";", ","))
  local class = mono_findClass('', classname)
  if type(class) ~= 'number' or class == 0 then return nil end
  local methods = mono_class_enumMethods(class)
  if type(methods) ~= 'table' or #methods < 1 then return nil end
  if check then  print('check:'..methodname..": <"..signature.."> vs ") end
  for i = 1, #methods do
	if methodname == methods[i].name then
	  local sign = mono_method_getSignature(methods[i].method)
	  if check then print("  >> <"..sign..'>') end
	  if sign:match(signature) then
	    return methods[i].method
	  end
	end
  end
end
{$asm}
...and call it withing our script with something like:

Code: Select all

{$lua}
if syntaxcheck==true then return '' end
secondGunnerGetMaxRangeFunction = findMethodAddrBySignature('Gunner', 'GetMaxRange', 'ServerUnit')
{$asm}
What do you think? (and, of course, many thanks for your work)

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 5:31 pm
by Akulio
All my units turn elite with god-mode. Is this intentional? If so can i disable it somehow? Thank you.

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 8:16 pm
by Recifense
@FauDrei,

Thank you for the tip. But I will prefer to keep the script the way it is.

@Akulio,

Hi moy drug,

It is the "Guess What" of one of the releases. Someone asked for it and I decided to add it to GM. But it can be added as a different feature.

You can edit the script and remove the line "mov [rdi+00000088],al" at "_MonUnitCopy".

Cheers!

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 8:27 pm
by Akulio
Recifense wrote:
Wed Aug 16, 2017 8:16 pm
@FauDrei,

Thank you for the tip. But I will prefer to keep the script the way it is.

@Akulio,

Hi moy drug,

It is the "Guess What" of one of the releases. Someone asked for it and I decided to add it to GM. But it can be added as a different feature.

You can edit the script and remove the line "mov [rdi+00000088],al" at "_MonUnitCopy".

Cheers!

Thank you mon ami. No need to change the table, i'll tinker with it myself. ;)

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Wed Aug 16, 2017 10:39 pm
by srattex
Unfortunately, after the last two updates I'm unable to click in order to activate the script...Any ideas?

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Thu Aug 17, 2017 7:17 am
by FauDrei
srattex wrote:
Wed Aug 16, 2017 10:39 pm
Unfortunately, after the last two updates I'm unable to click in order to activate the script...Any ideas?
Steam or GOG version of the game?

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Thu Aug 17, 2017 11:53 am
by jkollss
srattex wrote:
Wed Aug 16, 2017 10:39 pm
Unfortunately, after the last two updates I'm unable to click in order to activate the script...Any ideas?
The same problem in my GOG version. I don't know why, but "ServerUnit:GetSightRange" offset changes from launch to launch on my system.
So, I added to script:

Code: Select all

//define(MOSR,ServerUnit:GetSightRange+0237) // original offset
define(MOSR,ServerUnit:GetSightRange+024A) // my offset
The real offset you can take from disassemble window at address "ServerUnit:GetSightRange" and look for AOB for MOSR.

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Thu Aug 17, 2017 4:55 pm
by srattex
@FauDrei
I have the steam version

@jkollss
Can you upload your fix?

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Thu Aug 17, 2017 6:48 pm
by Ali
Recifense wrote:
Sat Aug 12, 2017 2:38 pm
Hi guys,

Here is my contribution for "Sudden Strike 4" version 1.00.19037. The table contains a script with the following features:

Code: Select all

===========================================
 Game Title    : Sudden Strike 4
 Game Version  : 1.00.19037
 Game Sponsor  : PATRONS
 Process Name  : SuddenStrike4.exe
 Relevant Info : Unity Engine/64bits/WWII-RTS
 Script Version: 3.0
 CE Version    : 6.7
 Release date  : 15-Aug-2017
 Author        : Recifense
 History:
 12-Aug-2017: First Release
 13-Aug-2017: Fix FUR and some side-effects. (s1.1)
 14-Aug-2017: Fix + Added 2 more features (Sight Range/Weapon Range) (s2.0)
 15-Aug-2017: Removed Weapon Range (s2.1)
 15-Aug-2017: Added 2 more features: Reshot and Reload time (s3.0)
 Features:
 - God Mode              [1]
 - Full Unit Resources:  [2]
   - Fuel
   - Ammo(es)
 - Minimum Prestigy      [3]
 - Unit Sight Range (x4) [4]
 - Weapon reshot Time    [5]
 - Weapon reload Time    [6]
 - Some Pointers
===========================================
[1] For human player's units only;
[2] For human player's units only;
[3] Minimum amount = 670 (human player only);
[4] Minimum = default X 4 (human player only);
[5] Maximum = 1.0 (human player only) (usually = 2.2-10);
[6] Maximum = 1.0 (human player only) (usually > 7);
===========================================
[USAGE]
 - Run CE 6.7 or greater;
 - Run the GAME;
 - Load game process "SuddenStrike4.exe" via CE;
 - Load this Table;
 - Start or load a game;
 - Activate the main script  by clicking on its box [X];
 - Now Activate the script of each cheat you want to use;
 - Go back to the game and have fun.
[NOTE]
 - Before closing the game, deactivate the MAIN SCRIPT or close CE.
===========================================
HOTKEYS:
- See each table entry
===========================================
[WARNING]
- This table is meant to be used in single player games.
===========================================
[INFO]
Tested on Win10 64bits
===========================================
Have fun!
The features are DISABLED by default. See [USAGE] above;

Note: The scripts use the CE command ASSER and will not load if it is incompatible with the running game version.

After downloading the table, copy it to the "My Cheat Table" folder.

It is for CE 6.7 or greater

Cheers to All, specially to my Patrons!


Please please i want to active the cheat it won't active just the information activate but not the cheat why please help i use WINDOWS 7

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Fri Aug 18, 2017 4:45 pm
by Recifense
Ali wrote:
Thu Aug 17, 2017 6:48 pm
Please please i want to active the cheat it won't active just the information activate but not the cheat why please help i use WINDOWS 7
Hi Ali,

Is your game Steam, GOG or retail?

Could you please describe the steps you follow to use the table?

Cheers!

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Fri Aug 18, 2017 5:19 pm
by RaDeX
It will only activate when you are IN-GAME

Re: Sudden Strike 4 v1.00.19037 (GM and More) 2017-Aug-15

Posted: Fri Aug 18, 2017 9:42 pm
by srattex
I was in-game and it didnt activate :(