Jump to content

Putting a Modded Character in a different order in the select screen.


Recommended Posts

Hello, everyone.

I'm trying to add Winona to DS and I want to reorganize the order on which she appears, by default any and all modded characters will appear at the end of the list in the character select screen. I want, if possible, to add Winona between Wigfrid and Webber. Does anyone know how I can do that?

Thanks for the help!

Edit 1: I tried using:

table.insert(ROG_CHARACTERLIST, "winona")

in modmain.lua but it made the character be locked for some reason and the silhouette was that on Wilson's instead of Winona's

Link to comment
Share on other sites

function GetActiveCharacterListForSelection()
    local list = MAIN_CHARACTERLIST

    if IsDLCEnabled(REIGN_OF_GIANTS) then
        list = JoinArrays(list, ROG_CHARACTERLIST)
        if IsDLCEnabledAndInstalled(CAPY_DLC) then
            list = JoinArrays(list, SHIPWRECKED_CHARACTERLIST)
        end
        if IsDLCEnabledAndInstalled(PORKLAND_DLC) then
            list = JoinArrays(list, PORKLAND_CHARACTERLIST)
        end         
    end
    if IsDLCEnabled(CAPY_DLC) then
        if IsDLCInstalled(REIGN_OF_GIANTS) then
            list = JoinArrays(list, ROG_CHARACTERLIST)
        end
        if IsDLCEnabledAndInstalled(PORKLAND_DLC) then
            list = JoinArrays(list, PORKLAND_CHARACTERLIST)
        end        
        list = JoinArrays(list, SHIPWRECKED_CHARACTERLIST)
    end

    if IsDLCEnabled(PORKLAND_DLC) then
        if IsDLCInstalled(REIGN_OF_GIANTS) then
            list = JoinArrays(list, ROG_CHARACTERLIST)
        end
        if IsDLCInstalled(CAPY_DLC) then
            list = JoinArrays(list, SHIPWRECKED_CHARACTERLIST)
        end
        
        list = JoinArrays(list, PORKLAND_CHARACTERLIST)
    end

    for i=#list,1,-1 do
        for t,rchar in ipairs(RETIRED_CHARACTERLIST)do
            if rchar == list[i] then
                table.remove(list,i)
            end
        end
    end        

    return JoinArrays(list, MODCHARACTERLIST)
end


function GetActiveCharacterList()
    return JoinArrays(GetOfficialCharacterList(), MODCHARACTERLIST)
end

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...