Jump to content

Recommended Posts

Assuming you know how to convert images it's easy. The image should have 64x64 in dimension and then you'll want to add in modmain

Assets = {    Asset("IMAGE", "minimap/myicon.tex"),    Asset("ATLAS", "minimap/myicon.xml"),}AddMinimapAtlas("minimap/myicon.xml")

And in the prefab in question you'll add the follwing

local fucntion fn(Sim) --This already exists in some form    --Stuff that was already here    local minimap = inst.entity:AddMiniMapEntity()    minimap:SetIcon( "myicon.tex" )end

Fantastic! Thanks so much. Im not at my computer and assumed the process would be about that but couldn't test it. Seeing as I wasn't going to be able to till tonight I figured it wouldn't hurt to have someone awesome who knows already confirm things for me. You're the best!

  • Developer

 

Assuming you know how to convert images it's easy. The image should have 64x64 in dimension and then you'll want to add in modmain

Assets = {    Asset("IMAGE", "minimap/myicon.tex"),    Asset("ATLAS", "minimap/myicon.xml"),}AddMinimapAtlas("minimap/myicon.xml")

And in the prefab in question you'll add the follwing

local fucntion fn(Sim) --This already exists in some form    --Stuff that was already here    local minimap = inst.entity:AddMiniMapEntity()    minimap:SetIcon( "myicon.tex" )end

If you ever want to set one of these up as an example, I'll be happy to post it to the guides thread.

If you ever want to set one of these up as an example, I'll be happy to post it to the guides thread.

Sounds like a good idea. I'll summon you when I've done it (or PM you, I don't know what you prefer), will probably not be today though.

Hey, I tried this and it gave me an error saying ')' expected near 'searchlite'

Have any idea what I did wrong?

 

I wish I could tell you, but I followed the instructions and it worked perfectly.

 

Did you create the <myicon>.tex and <myicon>.xml files in the minimap folder of your mod?

I wish I could tell you, but I followed the instructions and it worked perfectly.

 

Did you create the <myicon>.tex and <myicon>.xml files in the minimap folder of your mod?

my post was feb 6th... I've learned alot since then! XD

(in other words I now have a character that has 2 different minimap icons and switches between them when he puts his hat on!!!)

 

Assuming you know how to convert images it's easy. The image should have 64x64 in dimension and then you'll want to add in modmain

Assets = {    Asset("IMAGE", "minimap/myicon.tex"),    Asset("ATLAS", "minimap/myicon.xml"),}AddMinimapAtlas("minimap/myicon.xml")

And in the prefab in question you'll add the follwing

local fucntion fn(Sim) --This already exists in some form    --Stuff that was already here    local minimap = inst.entity:AddMiniMapEntity()    minimap:SetIcon( "myicon.tex" )end

I did this, but it crashes whenever I select my mod! Can you tell me what I'm doing wrong?

Assets = {

    Asset( "ATLAS", "images/saveslot_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/saveslot_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol_silho.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol_silho.tex" ),

    

    Asset( "ATLAS", "bigportraits/ebsol.xml" ),

    Asset( "IMAGE", "bigportraits/ebsol.tex" ),

    Asset("IMAGE", "minimap/ebsolicon.tex"),

    Asset("ATLAS", "minimap/ebsolicon.xml"),

    

    AddMinimapAtlas("minimap/ebsolicon.xml")

}

I did this, but it crashes whenever I select my mod! Can you tell me what I'm doing wrong?

Assets = {

    Asset( "ATLAS", "images/saveslot_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/saveslot_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol_silho.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol_silho.tex" ),

    

    Asset( "ATLAS", "bigportraits/ebsol.xml" ),

    Asset( "IMAGE", "bigportraits/ebsol.tex" ),

    Asset("IMAGE", "minimap/ebsolicon.tex"),

    Asset("ATLAS", "minimap/ebsolicon.xml"),

   

    AddMinimapAtlas("minimap/ebsolicon.xml")

}

 

Take the AddMiniMapAtlas line out of the brackets

 

eg

Assets = {

    Asset( "ATLAS", "images/saveslot_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/saveslot_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol_silho.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol_silho.tex" ),

    

    Asset( "ATLAS", "bigportraits/ebsol.xml" ),

    Asset( "IMAGE", "bigportraits/ebsol.tex" ),

    Asset("IMAGE", "minimap/ebsolicon.tex"),

    Asset("ATLAS", "minimap/ebsolicon.xml"),

}  

 

    AddMinimapAtlas("minimap/ebsolicon.xml")

 

And then make sure the following line is in your <character>.lua

 

inst.MiniMapEntity:SetIcon( "ebsolicon.png" )

 

it should be placed somewhere within local fn = function(inst)

 

eg

local fn = function(inst)

 

-- [other items may be in this area as well]

 

inst.MiniMapEntity:SetIcon( "ebsolicon.png" )

 

end

 

 

Edited by MidrealmDM

Ok, ok. I'm doing what you told me to do, but the minimap icon is just blank. I'm not sure what the problem is. Does it have something to do with where I'm placing the files. At the moment, they're in the images folder. I'll also show you what I've got in terms of what you told me to do.

In the Modmain:

Assets = {
    Asset( "ATLAS", "images/saveslot_portraits/ebsol.xml" ),
    Asset( "IMAGE", "images/saveslot_portraits/ebsol.tex" ),
    
    Asset( "ATLAS", "images/selectscreen_portraits/ebsol.xml" ),
    Asset( "IMAGE", "images/selectscreen_portraits/ebsol.tex" ),
    
    Asset( "ATLAS", "images/selectscreen_portraits/ebsol_silho.xml" ),
    Asset( "IMAGE", "images/selectscreen_portraits/ebsol_silho.tex" ),
    
    Asset( "ATLAS", "bigportraits/ebsol.xml" ),
    Asset( "IMAGE", "bigportraits/ebsol.tex" ),

    Asset("IMAGE", "minimap/ebsolicon.tex"),
    Asset("ATLAS", "minimap/ebsolicon.xml"),
 

    AddMinimapAtlas("minimap/ebsolicon.xml")
}

 

In the Prefab file:

local fn = function(inst)
    
    -- choose which sounds this character will play
    inst.soundsname = "wilson"

    -- a minimap icon must be specified    
    inst.entity:AddMiniMapEntity()
    inst.MiniMapEntity:SetIcon("ebsolicon.png")

 

Somehow, it still refuses to work. This is so frustrating!! :(

Ok, ok. I'm doing what you told me to do, but the minimap icon is just blank. I'm not sure what the problem is. Does it have something to do with where I'm placing the files. At the moment, they're in the images folder. I'll also show you what I've got in terms of what you told me to do.

In the Modmain:

Assets = {

    Asset( "ATLAS", "images/saveslot_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/saveslot_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol.tex" ),

    

    Asset( "ATLAS", "images/selectscreen_portraits/ebsol_silho.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/ebsol_silho.tex" ),

    

    Asset( "ATLAS", "bigportraits/ebsol.xml" ),

    Asset( "IMAGE", "bigportraits/ebsol.tex" ),

    Asset("IMAGE", "minimap/ebsolicon.tex"),

    Asset("ATLAS", "minimap/ebsolicon.xml"),

 

    AddMinimapAtlas("minimap/ebsolicon.xml")

}

 

In the Prefab file:

local fn = function(inst)

    

    -- choose which sounds this character will play

    inst.soundsname = "wilson"

    -- a minimap icon must be specified    

    inst.entity:AddMiniMapEntity()

    inst.MiniMapEntity:SetIcon("ebsolicon.png")

 

Somehow, it still refuses to work. This is so frustrating!! :(

Change png to tex.

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
×
  • Create New...