Jump to content

Help with oval portrait (select screen and ingame), and "head equipment" avatar??


Recommended Posts

KLEI broke all of my downloaded mods with their latest updates. They did something new, and my characters no longer use their proper oval portraits. Not in game and neither at select screen. They have also broken the "head equipment" background screen. It now says "Thingamabob" instead.

What code can I use and in which "file" in each seperate mod to fix the mods for myself?

PS: I attached a screenshot of two of the glitches. I didnt screenshot select screen, but same issue there.

glitch.png



EDIT::::::::::

I added the code below to a broken character (borrowed the code from Myth Word mod), and it fixed the select screen portrait. However not the ingame issues posted in screenshot above. The code was added to a seperate lua file in scripts. All I did was change "monkey_king" to respective names for another broken mod. 

Myth world had more code to fix the other issues but it crashed for me. This code is the only one that doest crash, but unfortunately doesnt fix ingame issues posted in my screenshot, it just fixes select screen oval portrait...

--------------

AddSimPostInit(function(inst)
    local SetOvalPortraitTexture = GLOBAL.rawget(GLOBAL,"SetOvalPortraitTexture") 
    if SetOvalPortraitTexture ~= nil then
        GLOBAL.SetOvalPortraitTexture =  function(image_widget, character,...)
            if character == "monkey_king" then
                image_widget:SetTexture("bigportraits/monkey_king_none.xml", "monkey_king_none_oval.tex")
                return false            
            else
                SetOvalPortraitTexture(image_widget, character,...)
            end
        end
    end
end) 

 

-----------

Edited by NamelessName
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...