Try out this map
@sylvanas https://www.dropbox.com/s/cmmpsnthrqd9r ... x.w3x?dl=0it was 5 min work, typing out this description took longer than doing it, but still don't expect ENT to autohost it, the plebs will riot
I am going to describe the technical details so that people can understand and do it yourself if you so want to. And maybe give you an understanding of wc3/dota code if you care at all.
First thing: extracted .j file, opened in JASSCraft.
The goal is changing the gold timer to provide gold more slowly, since it's too fast right now. I started by searching for anything that adds gold to the player (PLAYER_STATE_RESOURCE_GOLD) but there were a shitload of them and none that gave 2 or 1 gold directly. Next approach: search for timers. Gave no leads. I guess I am dumb and didn't think to search for periodic triggers, so I did the following instead:
I know that EM changes the value of gold gained, so finding the switch for EM mode should show exactly where the gold gain changes from 2 to 1, and therefore get me the gold gain trigger.
String array WB2 stores each mode string WB2[15] is the slot for easy mode. When -(something) is entered as a mode, WB2 is iterated over by this loop.
Code: Select all
exitwhen z>WD2
if WB2[z]==SubString(DC2,x,y)then
set WC2[z]=true
set z=WD2+1
set DC2=W22(DC2,x,y)
set x=-1
set FQ1=StringLength(DC2)
set y=FQ1
else
set z=z+1
-> checks if mode WB2[z] is entered for all z. If it is, WC2[z] switch set to true, and a lot more stuff happens I have no idea about. But WC2[z] is the part that matters, so WC2[15] is the switch controlling easy mode.
From there we get this declaration
Now variable EM is the switch controlling easy mode
From there, this function is called
The code of function PMI is simple.
Code: Select all
function PMI takes string PNI,boolean PSI returns nothing
if PSI then
call ExecuteFunc(PNI)
endif
endfunction
-> Calls the function specified as first argument if boolean passed in is true.
Now we go to function X42 which is called when EM is active.
Code: Select all
function X42 takes nothing returns nothing
set R0=true
call SetPlayerTechResearched(BO[0],1378889780,1)
call SetPlayerTechResearched(CO[0],1378889780,1)
call SetPlayerHandicapXP(BO[1],1.5)
call SetPlayerHandicapXP(BO[2],1.5)
call SetPlayerHandicapXP(BO[3],1.5)
call SetPlayerHandicapXP(BO[4],1.5)
call SetPlayerHandicapXP(BO[5],1.5)
call SetPlayerHandicapXP(CO[1],1.5)
call SetPlayerHandicapXP(CO[2],1.5)
call SetPlayerHandicapXP(CO[3],1.5)
call SetPlayerHandicapXP(CO[4],1.5)
call SetPlayerHandicapXP(CO[5],1.5)
endfunction
So we see here is where EM gives the bonus xp (50% bonus). Three commands I have no idea about yet: what R0 is, what research 1378889780 is, and what research 1378889780 is. Based on the fact that those 2 researches apply to the computer players, it would seem those are responsible for lowering tower damage. Therefore the last option to find gold gain trigger is this R0.
Finally leading us to this function. This is the trigger that grants gold gain.
Code: Select all
function U31 takes nothing returns boolean
local integer ROI=1
if R0 then
set ROI=2
endif
call SetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[1],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[2],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[3],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[4],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(BO[5],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[1],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[2],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[3],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[4],PLAYER_STATE_RESOURCE_GOLD)+ROI)
call SetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(CO[5],PLAYER_STATE_RESOURCE_GOLD)+ROI)
return false
endfunction
Very well, almost done. Now we perform a search on function U31 to find the timer that grants gold.
Located:
Code: Select all
set EW0=CreateTrigger()
call TriggerRegisterTimerEvent(EW0,0.6,true)
call TriggerAddCondition(EW0,Condition(function U31))
Here we see that it triggers every 0.6 seconds. We change this to 1.0 seconds.
Also this means that technically it wasn't 4 gold per sec, it was 3.3333 gold per sec. not that it really matters.