wc3edit.net
https://forum.wc3edit.net/

[SP+CC] Custom Hero Footies 4.1
http://forum.wc3edit.net/fulfilled-requests-f75/custom-hero-footies-4-1-t36519.html
Page 1 of 1

Author:  Crazy_monkey [ July 21st, 2019, 5:01 pm ]
Post subject:  [SP+CC] Custom Hero Footies 4.1

Map: Custom Hero Footies 4.1

Cheats: single player enabled, custom command "-wins" to change the amount of wins to save, change "-save" to be used any time of the game, not just after you win.

Description: This game was previously published here, but in 4.1 everyones codes, including legitimate ones stopped working.

Cheat Hint: Using wrong code says "Code Gen doesn't work anymore now", also using legitimate code shows score win 0 and message "Codes Cap at 1500 for now.", which wasnt a thing in 4.0c
Also map seems not to have attributes or anything plus no script folder, but Ladics MPQ allows to extract things from it so seems like no DP needed.

Thank you for your work :D

Author:  nuzamacuxe [ July 25th, 2019, 4:38 am ]
Post subject:  Re: [SP+CC] Custom Hero Footies 4.1

Post #1
I got to save and load fine. Explanation how you MUST save to works: For example, if you put 10 wins you must pust 1000 unit kills, if you put 100 wins you must put 10000 unit kills and so on... otherwise your save code won't work.

Crash:
It's related to how many players is in force (di) and other things. So if there's only one player in force di and type any command it'll crash just after that because it'll execute the SA trigger. It's all bound to (SA) trigger, it adds an power up item to a footman and as you may know those kind of unit doesn't supports those kind of items so that's why it crashes.

Use WinMerge or some program which does the same and compare both war3map.j so you'll get it better.

Post #2

Code:
function e_v takes nothing returns boolean
return(he[(1+GetPlayerId(GetTriggerPlayer()))]>(ao[(1+GetPlayerId(GetTriggerPlayer()))]+$A))or(He[(1+GetPlayerId(GetTriggerPlayer()))]>(he[(1+GetPlayerId(GetTriggerPlayer()))]/2))or(32<qe)or(700<px)or(4>qe)
endfunction

he = hero kills
ao = unit kills
He = wins
qe = sr = Di
after that the code puts he as qe. Just follow the conditionaltriggers. (Start from here: call ConditionalTriggerExecute(ub) )
Translation:
It'll return true if: Hero Kills[from trigger player] is greather than unit kills[from trigger player] + 10 or Wins[from trigger player] is greater than hero kills[from trigger player] divided by 2 or 32 is less than qe or 700 is less than px or 4 greater than qe... and as you know, if one statement in an "OR" condition is true, it'll return true and the code gen message will pop up.

Post #3

Code:
set qe=(he[(1+GetPlayerId(GetTriggerPlayer()))]/He[(1+GetPlayerId(GetTriggerPlayer()))])
set px=(ao[(1+GetPlayerId(GetTriggerPlayer()))]/He[(1+GetPlayerId(GetTriggerPlayer()))])


qe = Hero Kills / Wins
px = Unit Kills / Wins

Explaining the save & load system thoroughly:
1) There's no extra check when you have less than 251 wins. But, if you have more than 250, that will takes us till here:

    Code:
    function e0v takes nothing returns boolean
    return(He[(1+GetPlayerId(GetTriggerPlayer()))]>$FA)and(e_v())
    endfunction

2) $FA (hex number) means 250, e_v() means:
    Code:
    function e_v takes nothing returns boolean
    return(he[(1+GetPlayerId(GetTriggerPlayer()))]>(ao[(1+GetPlayerId(GetTriggerPlayer()))]+$A))or(He[(1+GetPlayerId(GetTriggerPlayer()))]>(he[(1+GetPlayerId(GetTriggerPlayer()))]/2))or(32<qe)or(700<px)or(4>qe)
    endfunction

      2.1) What that function above tell us is: HEY, I'M GONNA TATTLE ON YOU IF YOU HAVE:
      he GREATER THAN ao + 10; OR
      He GREATER THAN he divided by 2; OR
      qe GREATER THAN 32; OR
      px GREATER THAN 700; OR
      4 GREATER THAN qe;

3) But what the hell is he, He, ao, px and qe?

    3.1) he = HERO KILLS;
      ao = UNIT KILLS;
      He = WINS;
      qe = HERO KILLS / (DIVIDED BY) WINS;
      px = UNIT KILLS / (DIVIDED BY) WINS.

4) Now you just have to do the maths and enjoy cheating. ;)

Post #4

Ok, found out the issue.

Hero kills for some reason wasn't saving as intended.

Made a new command for help you set it right. Command: -showhk.

Worked:
-wins 500
-hk 5500 (in save function that value is divided by 10.6, so make sure to fill the conditions).
-uk 349000 (in save function that value is divided by 10, so make sure to fill the conditions).

Hero kill must be greater than wins.

The math still the same. ;)

Made some edits to explain it further. You're welcome.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/