HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Banana's thread on editing .slks and changing priority

04-10-2007, 01:13 AM#1
Banana
I posted at this thread and was told to post my own thread.

Basically, I'm trying to modify two things:

1) Make rock tiles unwalkable.

2) Replace a jagged cliff model with a straigth cliff model, as replacing textures does nothing to change the model.

When I posted in that thread, I had issues with getting the map to load the slk. If I'm understand the history, it used to be possible with RoC editors but when TFT came out, Blizzard prolly modified so imported .slk no longer has priority over the default .slks.

If I inject my edited .slks into War3.mpq, editor will crash. However, it does work if I inject into War3Patch.mpq, since logically, Patches must have the highest priority (if anything else had higher priority, it would be impossible to patch if there was a horrible bug, correct?).

But that would mean if anyone is to use the map correctly, they'd have to inject the edited slk as well. Surely there is a way to modify the priority so it would give the map's own mpq's slks higher priority? Or maybe there's another workaround to get the edited slk loaded via script?

TIA.
04-10-2007, 03:11 AM#2
Earth-Fury
Start with dungon as a base tileset and modify the 2 cliff tiles. Over-ride the textures for cliffs with these paths:
ReplaceableTextures\Cliff\Cliff0.blp
ReplaceableTextures\Cliff\Cliff1.blp

As for making rock unwalkable, extract:
war3x.mpq/TerrainArt/Terrain.slk
and edit it. Then place your edited version here: (will affect all maps you edit till you move it.)
C:/.../Warcraft III/TerrainArt/Terrain.slk

Its possible to edit SLKs in notepad, but thats a pain. Try Excel or Open Office. (SLKs are data tables)

As you've read the other thread, you should know why editing it works ;)

Edit: Also, this belongs General Dev. And use WEU's map creator (not the actual World Editor Mod it comes with) to make a new map with the tiles you want, but the dungon cliff tiles.
04-10-2007, 03:13 AM#3
Vexorian
1) grim extension pack from pitzermike, included in the newgen pack is able to change pathability of tiles for you.

You may also use a trigger
04-10-2007, 03:31 AM#4
Banana
Earth-Fury, Thanks for the tips. I think my first post may have been confusing because I was describing what I was trying to accomplish, when my problem is something else.

The issue I want to resolve is:
Quote:
Originally Posted by Banana
When I posted in that thread, I had issues with getting the map to load the slk. If I'm understand the history, it used to be possible with RoC editors but when TFT came out, Blizzard prolly modified so imported .slk no longer has priority over the default .slks.

If I inject my edited .slks into War3.mpq, editor will crash. However, it does work if I inject into War3Patch.mpq, since logically, Patches must have the highest priority (if anything else had higher priority, it would be impossible to patch if there was a horrible bug, correct?).

But that would mean if anyone is to use the map correctly, they'd have to inject the edited slk as well. Surely there is a way to modify the priority so it would give the map's own mpq's slks higher priority? Or maybe there's another workaround to get the edited slk loaded via script?

Note that I already injected my edited slks into war3.mpq as you suggested, but this crashes WE. War3Patch.mpq works for me. But the point is to make the map (with the edited slk) portable, if that is possible.

Vex: Thanks so much but I have a Mac so unless someone is eager to re-compiling the pack, I'm SOL. Mind pointing me to a good example of trigger modifying pathability, especially without using doodads or anything that would substantially hit the performance.
04-10-2007, 03:44 AM#5
Earth-Fury
At least on windows, the editor prioratizes local files (which means files put in C:/.../Warcraft III/, your WC3 install directory) over archived files. So for a file like TerrainArt/Terrain.slk, which can be used at 'compile' time for a map to make things work diffrently, you should just be able to use a local version. (pathing is generated at save-time, not run-time)

As for cliffs, my solution was a rather good one i think ;) Start with a tileset that has all strait cliffs, or one strait and one jagged. (like sunken ruins, dalaran, ext) Then, by importing textures to over-ride the tiles and cliff images for that tilesets cliff tiles, you gain the desired mix of cliffs. (you could, for example, have cityscape and dalaran city-cliffs in the same map)

I don't think you can get a map-imported CliffTypes.slk to work at all. (thus the absense of more then 2 cliff types per map on battle.net)
04-10-2007, 03:51 AM#6
Banana
Wait. You're telling me that not all tilesets uses one straight, one jagged? I thought every tileset *must* have one straight and one jagged...

*zips to try the dungeon tileset out*

Thanks for letting me know that map-imported .slk may not be feasible. I assumed that if one could modify the priority assigned, one could get the map-imported .slk to take precedence.

Update: I tried the Dungeon tileset, but it does indeed have a straight and jagged cliff model and thus didn't solve the problem. Any other suggestions?
04-10-2007, 04:50 PM#7
maximilianx
one straight one jagged on ever map?

this is not true.

lorderon summer winter and fall have two jagged =o

pretty sure theres no tileset with two straight.
04-11-2007, 01:45 AM#8
Banana
Maximillianx- Thanks. I will have to tell TheHelper.net to update their tutorial as that's where I got the idea that every tileset must have one jagged and one straight.

Vex: I tried to trigger the pathability, but no go.
Collapse JASS:
function Trig_Pathability_Actions takes nothing returns nothing
    set udg_MinX = GetRectMinX(GetPlayableMapRect())
    set udg_MinY = GetRectMinY(GetPlayableMapRect())
    set udg_MaxX = GetRectMaxX(GetPlayableMapRect())
    set udg_MaxY = GetRectMaxY(GetPlayableMapRect())
    set udg_PresentX = udg_MinX
    loop
        exitwhen udg_PresentX > udg_MaxX
        set udg_PresentY = udg_MinY
        loop
            exitwhen udg_PresentY > udg_MaxY
            set udg_TempPoint = OffsetLocation(GetRectCenter(GetPlayableMapRect()), udg_PresentX, udg_PresentY)
            if ( GetTerrainTypeBJ(udg_TempPoint) == 'Lrok' ) then
                call SetTerrainPathableBJ( udg_TempPoint, PATHING_TYPE_WALKABILITY, false )
                call DisplayTextToForce( GetPlayersAll(), "Pathing is Off!" )
                call RemoveLocation (udg_TempPoint)
            else
                call RemoveLocation (udg_TempPoint)
            endif
            set udg_PresentY = udg_PresentY + 1
        endloop
        set udg_PresentX = udg_PresentX + 1
    endloop
    call SetWaterBaseColorBJ( 100, 100, 100, 100.00 )
endfunction

//===========================================================================
function InitTrig_Pathability takes nothing returns nothing
    set gg_trg_Pathability = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Pathability, 0.05 )
    call TriggerAddAction( gg_trg_Pathability, function Trig_Pathability_Actions )
endfunction

This does absolutely nothing as far as I can. You can see I put in a debug line to indicate if pathing was modified, and I never got the text to display in the game. What am I doing wrong here?

Earth-Fury: What I find odd is that if there is indeed a priority system in place, it would mean one only needs to modify the file where priority is stored and change the priority of .slks from local mpqs to maps' mpq then it'd load correctly, no?