Jump to content

Doom builder 2 recall texture


Recommended Posts

Have Doom builder 2 a option: I choose one texture type in one map and rename all this texture into other texture type - for example change all ADEL_09 into ADEL_10. How can I do it?

Share this post


Link to post
On 4.9.2017 at 3:17 AM, Nevander said:

Is there a way to do this but in a batch? For example...

 

ADEL_09 >> ADEL_10

WALL_02 >> WALA_01

BRICK3 >> CEMENT1

 

etc...

You could do that with SLADE: http://slade.mancubus.net/docs/scripting/md/Examples/ChangeTextures/index.html

 

For the fun of it, here's a bulk texture replacer script for SLADE, based on the example:

 

-- Set textures to use

local textures = {
    ["BFALL1"] = "SFALL1",
    ["BRICK12"] = "BRICK11"
}
-- Get map sidedefs
local sides = App.mapEditor().map.sidedefs

-- Loop through all sidedefs
for i,side in ipairs(sides) do
    for old_texture,new_texture in pairs(textures) do
        -- Replace the middle texture
        if side.textureMiddle == old_texture then
            side:setStringProperty('texturemiddle', new_texture)
        end

        -- Replace the upper texture
        if side.textureTop == old_texture then
            side:setStringProperty('texturetop', new_texture)
        end

        -- Replace the lower texture
        if side.textureBottom == old_texture then
            side:setStringProperty('texturebottom', new_texture)
        end
    end
end

 

Edited by boris

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...