how to change upgrades in a protected map

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

afis
Junior Member
Posts: 26
Joined: June 22nd, 2009, 3:47 pm

how to change upgrades in a protected map

Post by afis »

I want to change the number of levels available to an upgrade in Naruto Castle defense.

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.
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: how to change upgrades in a protected map

Post by naturesfury »

besides the trigger, you also need to change the actual upgrade in World Editor so that upgrades beyond lvl 25 exist and you can set what those upgrades do/has
afis
Junior Member
Posts: 26
Joined: June 22nd, 2009, 3:47 pm

Re: how to change upgrades in a protected map

Post by afis »

Well I figured that much, but the map itself is protected so I can't open it in world editor directly.
as I said before I moved some of the files by extracting with an mpq editor and importing, but I don't know which file contains the upgrade data, that is the reason I am asking.
naturesfury
Forum Spammer
Posts: 610
Joined: March 30th, 2009, 9:02 pm

Re: how to change upgrades in a protected map

Post by naturesfury »

triggering-editing-f68/guide-format-explanation-of-w3m-and-w3x-files-t7080.html
explains the wc3 files

deprotection-cheating-f64/deprotecting-tools-a-guide-how-to-deprotect-any-map-t16357.html
tells you how to deprotect a map

since this wasn't a request, I'm assuming you want to learn how....so those links will help o.o