| 08-06-2004, 07:20 PM | #181 | |
Quote:
The one this thread was made for.. if there was a newer one there would've been a whole new topic for it. Get it here: http://umswe.wc3campaigns.com/weu/main.html |
| 08-07-2004, 03:31 AM | #182 |
Is it possible to edit a map size to more than 256 x 256 AFTER map creation????? I really don't want to have to do my terraining all over again....... |
| 08-07-2004, 03:34 AM | #183 | |
Quote:
How do I find and get rid of a blizzard.j file? |
| 08-07-2004, 04:05 AM | #184 | |
Quote:
Check the import manager. |
| 08-07-2004, 09:37 AM | #185 |
Thrall: you have to close the color tag with the |r preset. OneWinged4ngel: currently it's not possible to resize the map later. Shadow_killer: If the map can't be opened by the weu enhancer then it is probably corrupted or saved in a newer format that the program doesn't recognize. Demonfaze: I'll investigate your problem. |
| 08-10-2004, 03:31 AM | #186 |
okay thanks. it gets kind of annoying every time i need to edit or whatever on it b/c i have to disable all the advanced triggers then open in WE. |
| 08-12-2004, 02:03 PM | #187 |
First off some news about the progress of the next version. I've finished the new create map and editor settings screens, they are already fully functional, new I'm working on the edit map/protection stuff. Here's a pic of the settings tab: ![]() The standard imports will save you a lot of work if you have to import the same files into several maps. I'm sure the modders will be interested in the new possibilities to modify the editor. See some interesting ini-file-entries here: ![]() As you can see, you can add custom editor versions that will be selectable in the dropdown box (on the first screen-shot). You'll be able to specify custom files that should be used by the editor. For custom models, skins, ai files, music ... editor entries will automatically be generated and custom JASS functions will automatically be added to the GUI. By default there will be the Classic (=UMSWE basically) and Advanced (=WEU basically) editor versions but you can add as many custom versions for your own mod or total conversion. FIX FOR THE HERO SAVE TRIGGERS: As many of you can't wait for the next version and want the hore save code problems fixed I decided to post a temporary fix here, which can be implemented pretty easily into your maps. (this fixes the problem with heros above level 140 and also some other reported minor problems) What you need is the following code snippet: Code:
function RestoreHeroDataNew takes string S, player P, boolean storedLoc, location Loc returns nothing local integer X local integer Y local integer UnitType local unit U local integer XP local integer Life local integer Mana local integer Gold local integer Lumber local integer Index = 34 local integer Counter = 1 local integer Level local integer Abilcount = 0 local integer TempCode local integer skillctr = 0 local string pname set S = DeleteCharFromString(S,"-") set S = RegainCode(RegainCode(S)) if udg_zz_SaveLoadSettings[6] then set pname = GetPlayerName(P) if GetLength(pname) < 5 then set Counter = 5 - GetLength(pname) set pname = SubStringBJ(pname,1,GetLength(pname)) loop set pname = pname + "Q" set Counter = Counter - 1 exitwhen Counter <= 0 endloop set Counter = 1 else set pname = SubStringBJ(pname,1,5) endif if SubStringBJ(S,1,5) != pname then call DisplayTimedTextToPlayer(P,0,0,5,"Wrong player profile") return endif set UnitType = IdString2DebugIdInteger(SubStringBJ(S,6,9)) else set UnitType = IdString2DebugIdInteger(SubStringBJ(S,1,4)) endif if storedLoc then if udg_zz_SaveLoadSettings[0] then if udg_zz_SaveLoadSettings[6] then set X = CodeStr2Int(SubStringBJ(S,15,17)) set Y = CodeStr2Int(SubStringBJ(S,18,20)) else set X = CodeStr2Int(SubStringBJ(S,10,12)) set Y = CodeStr2Int(SubStringBJ(S,13,15)) endif set X = X * 100 set Y = Y * 100 set X = X - 50000 set Y = Y - 50000 if udg_zz_SaveLoadSettings[6] then set Index = 21 else set Index = 16 endif else if udg_zz_SaveLoadSettings[6] then set Index = 15 else set Index = 10 endif set X = 0 set Y = 0 endif call CreateNUnitsAtLoc(1,UnitType,P,Location(I2R(X),I2R(Y)),90) else call CreateNUnitsAtLoc(1,UnitType,P,Loc,90) if udg_zz_SaveLoadSettings[6] then set Index = 15 else set Index = 10 endif endif set U = GetLastCreatedUnit() if udg_zz_SaveLoadSettings[6] then set XP = CodeStr2Int(SubStringBJ(S,10,14)) else set XP = CodeStr2Int(SubStringBJ(S,5,9)) endif call SetHeroLevelBJ(U,XP,false) if udg_zz_SaveLoadSettings[1] then set Life = CodeStr2Int(SubStringBJ(S,Index,Index + 1)) + 1 set Mana = CodeStr2Int(SubStringBJ(S,Index + 2,Index + 3)) + 1 set Index = Index + 4 if Life > 100 then set Life = 100 endif if Mana > 100 then set Mana = 100 endif endif if udg_zz_SaveLoadSettings[2] then call SetHeroStr(U,CodeStr2Int(SubStringBJ(S,Index,Index + 1)),true) call SetHeroAgi(U,CodeStr2Int(SubStringBJ(S,Index + 2,Index + 3)),true) call SetHeroInt(U,CodeStr2Int(SubStringBJ(S,Index + 4,Index + 5)),true) set Index = Index + 6 endif if udg_zz_SaveLoadSettings[3] then set Gold = CodeStr2Int(SubStringBJ(S,Index,Index + 3)) set Lumber = CodeStr2Int(SubStringBJ(S,Index + 4,Index + 7)) set Gold = Gold * 10 set Lumber = Lumber * 10 call SetPlayerStateBJ(P,PLAYER_STATE_RESOURCE_GOLD,Gold) call SetPlayerStateBJ(P,PLAYER_STATE_RESOURCE_LUMBER,Lumber) set Index = Index + 8 endif if udg_zz_SaveLoadSettings[4] then loop if SubStringBJ(S,Index, Index) != "X" then call UnitAddItemToSlotById(U,IdString2DebugIdInteger(SubStringBJ(S,Index, Index + 3)),Counter - 1) set Index = Index + 4 else set Index = Index + 1 endif exitwhen Counter == 6 set Counter = Counter + 1 endloop endif if udg_zz_SaveLoadSettings[5] then loop set Counter = 0 if CodeStr2Int(SubStringBJ(S,Index, Index)) > 0 then set Level = CodeStr2Int(SubStringBJ(S,Index, Index)) set TempCode = IdString2DebugIdInteger(SubStringBJ(S,Index + 1,Index + 4)) set skillctr = skillctr + 1 call SaveRestoredSkillcode(TempCode,skillctr,U) loop call SelectHeroSkill(U,TempCode) set Counter = Counter + 1 exitwhen Counter == Level endloop set Index = Index + 5 else set Index = Index + 1 endif set Abilcount = Abilcount + 1 exitwhen Abilcount == 5 endloop endif if udg_zz_SaveLoadSettings[1] then call SetUnitLifePercentBJ(U,I2R(Life)) call SetUnitManaPercentBJ(U,I2R(Mana)) endif set bj_lastCreatedUnit = U endfunction function SaveHeroData takes unit U, player P returns nothing local integer Id = GetUniqueEinheitsnummer(U) local string Code = "" local integer XP local integer X local integer Y local integer Life local integer Mana local integer Agi local integer Str local integer Int local integer Gold local integer Lumber local integer Uid local string Final local string pname local integer Counter = 0 if IsUnitType(U,UNIT_TYPE_HERO) == false then return endif if udg_zz_SaveLoadSettings[6] then set pname = GetPlayerName(P) if GetLength(pname) < 5 then set Counter = 5 - GetLength(pname) set pname = SubStringBJ(pname,1,GetLength(pname)) loop set pname = pname + "Q" set Counter = Counter - 1 exitwhen Counter <= 0 endloop else set pname = SubStringBJ(pname,1,5) endif set Code = pname set Code = Code + DebugIdInteger2IdString(GetUnitTypeId(U)) else set Code = DebugIdInteger2IdString(GetUnitTypeId(U)) endif set XP=GetHeroLevel(U) if XP>99999 then set XP=99999 elseif XP<1 then set XP=1 endif set Code=Code+Int2CodeStr(XP,5) if udg_zz_SaveLoadSettings[0] then set X = R2I(GetUnitX(U)) set Y = R2I(GetUnitY(U)) if X < - 50000 then set X = - 50000 endif if X >= 50000 then set X = 49999 endif set X = X + 50000 if Y < - 50000 then set Y = - 50000 endif if Y >= 50000 then set Y = 49999 endif set Y = Y + 50000 set X = X / 100 set Y = Y / 100 set Code = Code + Int2CodeStr(X,3) set Code = Code + Int2CodeStr(Y,3) endif if udg_zz_SaveLoadSettings[1] then set Life = R2I(GetUnitLifePercent(U) - 1) set Mana = R2I(GetUnitManaPercent(U) - 1) if Life <= 0 then set Life = 0 endif if Mana < 0 then set Mana = 0 endif set Code = Code + Int2CodeStr(Life,2) set Code = Code + Int2CodeStr(Mana,2) endif if udg_zz_SaveLoadSettings[2] then set Str = GetHeroStatBJ(bj_HEROSTAT_STR,U,false) set Agi = GetHeroStatBJ(bj_HEROSTAT_AGI,U,false) set Int = GetHeroStatBJ(bj_HEROSTAT_INT,U,false) if Agi > 99 then set Agi = 99 endif if Str > 99 then set Str = 99 endif if Int > 99 then set Int = 99 endif set Code = Code + Int2CodeStr(Str,2) set Code = Code + Int2CodeStr(Agi,2) set Code = Code + Int2CodeStr(Int,2) endif if udg_zz_SaveLoadSettings[3] then set Gold = GetPlayerState(GetOwningPlayer(U),PLAYER_STATE_RESOURCE_GOLD) set Lumber = GetPlayerState(GetOwningPlayer(U),PLAYER_STATE_RESOURCE_LUMBER) if Gold > 99999 then set Gold = 99999 endif if Lumber > 99999 then set Lumber = 99999 endif set Gold = Gold / 10 set Lumber = Lumber / 10 set Code = Code + Int2CodeStr(Gold,4) set Code = Code + Int2CodeStr(Lumber,4) endif if udg_zz_SaveLoadSettings[4] then set Code = Code + TertiaryStringOp(UnitItemInSlotBJ(U,1) != null,DebugIdInteger2IdString(GetItemTypeId(UnitItemInSlotBJ(U,1))),"X") set Code = Code + TertiaryStringOp(UnitItemInSlotBJ(U,2) != null,DebugIdInteger2IdString(GetItemTypeId(UnitItemInSlotBJ(U,2))),"X") set Code = Code + TertiaryStringOp(UnitItemInSlotBJ(U,3) != null,DebugIdInteger2IdString(GetItemTypeId(UnitItemInSlotBJ(U,3))),"X") set Code = Code + TertiaryStringOp(UnitItemInSlotBJ(U,4) != null,DebugIdInteger2IdString(GetItemTypeId(UnitItemInSlotBJ(U,4))),"X") set Code = Code + TertiaryStringOp(UnitItemInSlotBJ(U,5) != null,DebugIdInteger2IdString(GetItemTypeId(UnitItemInSlotBJ(U,5))),"X") set Code = Code + TertiaryStringOp(UnitItemInSlotBJ(U,6) != null,DebugIdInteger2IdString(GetItemTypeId(UnitItemInSlotBJ(U,6))),"X") endif if udg_zz_SaveLoadSettings[5] then set Uid = GetUniqueEinheitsnummer(U) set Code = Code + Int2CodeStr(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill1[Uid],U),1) set Code = Code + TertiaryStringOp(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill1[Uid],U) > 0,DebugIdInteger2IdString(udg_zz_HeroSkill1[Uid]),"") set Code = Code + Int2CodeStr(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill2[Uid],U),1) set Code = Code + TertiaryStringOp(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill2[Uid],U) > 0,DebugIdInteger2IdString(udg_zz_HeroSkill2[Uid]),"") set Code = Code + Int2CodeStr(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill3[Uid],U),1) set Code = Code + TertiaryStringOp(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill3[Uid],U) > 0,DebugIdInteger2IdString(udg_zz_HeroSkill3[Uid]),"") set Code = Code + Int2CodeStr(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill4[Uid],U),1) set Code = Code + TertiaryStringOp(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill4[Uid],U) > 0,DebugIdInteger2IdString(udg_zz_HeroSkill4[Uid]),"") set Code = Code + Int2CodeStr(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill5[Uid],U),1) set Code = Code + TertiaryStringOp(GetUnitAbilityLevelSwapped(udg_zz_HeroSkill5[Uid],U) > 0,DebugIdInteger2IdString(udg_zz_HeroSkill5[Uid]),"") endif set Final = ColorHeroCode(AddScores(AssembleCode(AssembleCode(Code)))) call DisplayTimedTextToPlayer(P,0,0,180,Final) endfunction Go to your weu install folder, and in Stuff\ you will find Functions.txt Open it and search for the function RestoreHeroDataNew and replace it by the new function above. Then browse for the function SaveHeroData and replace it by the second function from the above snippet. Now all new created maps with advanced triggers will have the correct functions. To fix already created maps, simply open them in the world editor, open the trigger editor and click on the map name in the upper left. Then you should see all the advanced functions (the same functions you have already seen in Functions.txt). There again search for the two above-mentioned functions and replace them. This is a temporary fix until the new version arrives. |
| 08-16-2004, 06:30 AM | #188 |
Got some unwanted spaces in that code: Example: Code:
call SetPlayerStateBJ(P,PLAYER_STATE_RESOURCE_LUMBER,Lu mber) Gives tons of error on map save. One more thing, the save code needs something else put in it. I didn't notice it until just now, but the code cannot save high level abilities. I'm not sure above which level exactly, but when trying to initialize save when the hero has an ability of level 10, the code does nothing. |
| 08-16-2004, 06:10 PM | #189 |
will your update work with the 1.17 patch? |
| 08-16-2004, 07:43 PM | #190 |
Since 1.17 isn't even an official patch yet... I don't think he'll be adding anything in for 1.17, although I do believe it will work for 1.17. |
| 08-18-2004, 03:13 PM | #191 |
how could u be so sure.. its a large patch and theres editor changes and stuff |
| 08-18-2004, 03:36 PM | #192 | |
Quote:
|
| 08-25-2004, 03:23 PM | #193 |
I found something in the save code function you might wanna add. Abilities with levels in the double digits will not save. So you can save a level 9 ability fine, but a unit with a level 10 ability will not even save. |
| 09-01-2004, 10:24 PM | #194 |
Im not shure if anyone covered this but i have cheched the box for advanced triggers and the show advanced trigger functions box in the editor setings then go to my map and i go to triggers and "advanced" isnt there but the cust script is and so are the variables... did i miss a step? if u can help thanks! |
| 09-02-2004, 01:33 AM | #195 | |
Quote:
Are you running the World Editor Unlimited or are you trying to run the normal World Editor? |
