I have already exported the war3map.a, war3map.t, and war3map.u files using Ladik's MPQ editor and imported them into a new warcraft map letting me play around with those values. I also know that the raw code for the unit using this upgrade is "hcas", the main building. The upgrade is not actually researched per se but is upgraded by buying a special tome from the building that then has a trigger raise the level of the upgrade.
I wish to set the maximum allowed levels of upgrade from 25 to 50.
I have attempted to include the full trigger below, please let me know if I missed a part, still not an expert on Jass
Code: Select all
function Trig_FYTSJ_Actions takes nothing returns nothing
set udg_integer13=GetPlayerTechCountSimple('R000',Player(9))
if(Trig_FYTSJ_Func002C())then
call DisplayTimedTextToForce(GetPlayersAll(),5.00,"TRIGSTR_1516")
else
call ForForce(GetPlayersAllies(Player(9)),function Trig_FYTSJ_Func002Func001A)
call
DisplayTimedTextToForce(GetPlayersAll(),5.00,(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+":Upgraded the
Hokage's Hall,Reward: All Stats +10"))
call ModifyHeroStat(bj_HEROSTAT_STR,GetTriggerUnit(),bj_MODIFYMETHOD_ADD,10)
call ModifyHeroStat(bj_HEROSTAT_AGI,GetTriggerUnit(),bj_MODIFYMETHOD_ADD,10)
call ModifyHeroStat(bj_HEROSTAT_INT,GetTriggerUnit(),bj_MODIFYMETHOD_ADD,10)
endif
endfunction
function Trig_FYTSJ_Func002C takes nothing returns boolean
if(not(udg_integer13>=25))then
return false
endif
return true
endfunctionfunction Trig_FYTSJ_Conditions takes nothing returns boolean
if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true))then
return false
endif
if(not(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER))then
return false
endif
if(not(GetItemTypeId(GetManipulatedItem())=='I01U'))then
return false
endif
return true
endfunction
set udg_trigger409=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger409,EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(udg_trigger409,Condition(function Trig_FYTSJ_Conditions))
call TriggerAddAction(udg_trigger409,function Trig_FYTSJ_Actions)
P.S. yes I tried changing the 25 in the trigger to 50, and while that lets me keep buying the upgrade after 25, the defense of the mail hall does not rise past what it was at lvl 25.
Also if u know how to change the effect per upgrade that would be great, I don't know how to import that into world editor.