Help with Editor modding
-
- Posts: 15
- Joined: 07 Jan 2014, 22:45
I'm a new here, and I tried every possible way I know. So if someone can help or make this mod, I'll be glad.
I need to change the background color option in the editor and add the option to load images as background (similar to the custom background image), for example the dropdownbox will contain the following Grass, Sky, Water. And if I choose Grass a specific image will load, If I choose Sky, another specific image will load.. and so on.
EDIT: it like the Hat loader mod but for backgrounds
I need to change the background color option in the editor and add the option to load images as background (similar to the custom background image), for example the dropdownbox will contain the following Grass, Sky, Water. And if I choose Grass a specific image will load, If I choose Sky, another specific image will load.. and so on.
EDIT: it like the Hat loader mod but for backgrounds
welcome to the forums!
custom backgrounds are already in the game; the portal background is just the default
to add custom backgrounds place the image you want in the mappack folder and rename it 'background1'
if need more help please visit this thread
custom backgrounds are already in the game; the portal background is just the default
to add custom backgrounds place the image you want in the mappack folder and rename it 'background1'
if need more help please visit this thread
-
- Posts: 15
- Joined: 07 Jan 2014, 22:45
I knew that already, I wanted this option:
to have the option to load some pre-defied backgrounds.
to have the option to load some pre-defied backgrounds.
- Mr.Q.Marx?
- Posts: 849
- Joined: 15 May 2012, 18:35
Not sure I see the point. However not sure I need to.
First off make a folder full of the overlays you want it to have in 'graphics'.
Next open the editor.lua
If you're in Vanilla a.k.a. Standard Mari0 1.6 line 28 should read:
Under that line add
Then around line 418 you'll see:
so add:
Go ahead and test that and you'll see you have made a dropdown menu next to the colour one. You can't use it yet though.
Around 500 there is a line that says
Under add
Near the bottom after:
add in
You now have a dropdown. I'm bored, if someone else wants to tell him how to load the images please do.
First off make a folder full of the overlays you want it to have in 'graphics'.
Next open the editor.lua
If you're in Vanilla a.k.a. Standard Mari0 1.6 line 28 should read:
Code: Select all
guielements["backgrounddropdown"] = guielement:new("dropdown", 17, 85, 6, changebackground, background, "blue", "black", "water")
Code: Select all
guielements["backgroundoverlaydropdown"] = guielement:new("dropdown", 100, 85, 6, changebackgroundoverlay, overlay, "none", "grass", "sky", "water")
Code: Select all
guielements["backgrounddropdown"]:draw()
Code: Select all
guielements["backgroundoverlaydropdown"]:draw()
Around 500 there is a line that says
Code: Select all
guielements["backgrounddropdown"].active = true
Code: Select all
guielements["backgroundoverlaydropdown"].active = true
Code: Select all
function changebackground(var)
background = var
guielements["backgrounddropdown"].var = var
love.graphics.setBackgroundColor(backgroundcolor[var])
end
Code: Select all
function changebackgroundoverlay(var)
backgroundoverlay = var
guielements["backgroundoverlaydropdown"].var = var
end
-
- Posts: 15
- Joined: 07 Jan 2014, 22:45
you understood correctly actually I already done things similar to this ;). I'm only stuck on loading images as background.. I need some codes similar to loading custom images.
- Mr.Q.Marx?
- Posts: 849
- Joined: 15 May 2012, 18:35
You know that it would pretty much be sure to be incompatible with standard Mari0 yeah?
-
- Posts: 15
- Joined: 07 Jan 2014, 22:45
what you mean? I just want this for myself, I won't share the mappack in this state. Once I finish, I will normally import the custom background then I may share it here.