Problems solved so far In order of appearance. This does not count for problems solved via PM.
●Adding more music
●Changing single player portal colors
●Fixing title screen Mario when changing a character (without the Character Loader mod)
●Changing the title of the game (the title bar)
●intermission.ogg lagging the game (replace "static" with "stream")
●Changing single player Mario colors
●Changing default Portal colors
Re: Mari0 Help Thread
Posted: 29 Sep 2013, 00:20
by HugoBDesigner
I think the colors are predefined in rgblist.lua, if I remember correctly.
To add more music to the editor, go to editor.lua and change this line:
And add to the list the musics you want AFTER "custom" (it's better add after "custom" so you don't have to do a giant work trying to change the custom music settings).
Add the musics you want to the "sounds" folder, and add it's name (without .ogg) to this list (on musicloader.lua):
Thank you so much! :D
Now to get my other million problems solved...
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 03:29
by Qcode
...
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 05:43
by HugoBDesigner
Qcode wrote:I also think a good addition to this would have a list of people (similar to the criticism and question mega threads in Twatter) who would be comfortable with answering modding questions. Like if someone wanted some one on one help, or if they wanted to ask a modder how they achieved a certain effect in their mod, they can be asked here.
I'd be willing to be added to the list if you were to create it.
I'm not as good as Qcode with lua, but I've already made a mod with customizable stuff and new entities and a game from scratch, so I think I'd be qualified to this list too :)
I'll make a list.
If anyone else is willing to be on the list, then just post here or PM me.
In that case, I'll ask Qcode this.
Mari0Maker wrote:Also, how can I fix this bug? I changed my character (without the character loading mod), and this happens on the title screen:
Anyone know how to fix this?
How can I add an entity from another mod?
How can I remove the delay from the Coin Block (? Block)?
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 19:56
by Qcode
...
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 20:02
by Mari0Maker
The first problem is that I changed the character from Mario, to Luigi (without the Character Loading mod), and the sprite stays as Mario, with the hat above his head, and an invisible space in the center of his body.
The delay problem is this: I'm adding the NSMB Coin Block as the texture, and it looks weird with the delay. There is a delay on the main sprite of the Coin Block (the first texture from the left of the coinblock).
And I'll try the entity trick. :)
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 22:08
by Mari0Maker
New problem. If I change the music for "intermission.ogg", the game doesn't boot up. The intermission music I chose is a lot longer than the original.
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 22:33
by Qcode
...
Re: Mari0 Modding Help Thread
Posted: 29 Sep 2013, 22:36
by Mari0Maker
Qcode wrote:I can't reproduce your intermission.ogg problem. I changed it to the underworld music and it still booted up. It would help if you posted a .love file.
Lagged for me at the start for about 20secs, but then booted up.
I think that'll be fine. Thanks!
Re: Mari0 Modding Help Thread
Posted: 30 Sep 2013, 03:31
by Mari0Maker
How can I make this feature: when you enter the Konami Code, it has the possibility of playing one song, or another, or another different one.
And I don't want to use songs already included in Mari0, I want it to use new ones I add to the game.
Re: Mari0 Modding Help Thread
Posted: 30 Sep 2013, 03:56
by HugoBDesigner
Mari0Maker wrote:How can I make this feature: when you enter the Konami Code, it has the possibility of playing one song, or another, or another different one.
And I don't want to use songs already included in Mari0, I want it to use new ones I add to the game.
Like playing a random sound? Easy (I think).
First of all: put the sounds you want in the "sounds" folder.
Go to main.lua, to the function love.load.
Add to the music lists the musics you want. If you call them with something like konami1sound, konami2sound, konami3sound and so on, they'll be easier to be loaded in the future.
They are loaded like this:
if key == konami[konamii] then
konamii = konamii + 1
if konamii == #konami+1 then
if konamisound:isStopped() then
playsound(konamisound)
end
gamefinished = true
saveconfig()
konamii = 1
end
else
konamii = 1
end
if key == konami[konamii] then
konamii = konamii + 1
if konamii == #konami+1 then
if konamisound:isStopped() then
local randomsound = math.random(THE NUMBER OF SOUNDS YOU HAVE FOR THIS)
playsound(_G["konami" .. tostring(randomsound) .. "sound"])
end
gamefinished = true
saveconfig()
konamii = 1
end
else
konamii = 1
end
In this example, you'd have 3 sounds, so it'd be like this:
if key == konami[konamii] then
konamii = konamii + 1
if konamii == #konami+1 then
if konamisound:isStopped() then
local randomsound = math.random(3)
playsound(_G["konami" .. tostring(randomsound) .. "sound"])
end
gamefinished = true
saveconfig()
konamii = 1
end
else
konamii = 1
end
I hope that's what you want, and I hope it works :)
Re: Mari0 Modding Help Thread
Posted: 30 Sep 2013, 22:41
by Mari0Maker
HugoBDesigner wrote:
Mari0Maker wrote:How can I make this feature: when you enter the Konami Code, it has the possibility of playing one song, or another, or another different one.
And I don't want to use songs already included in Mari0, I want it to use new ones I add to the game.
Like playing a random sound? Easy (I think).
*code_oh_goodness_please_help*
Yep, I think that is what I want. I'll try it out, and say if it worked or not.
EDIT: Does anyone know the bitrate (kbps) of the sounds in Mari0?
The name of my other konami sound is "konami2", and for the value of the random sounds, I put "2".
This is what I mean by the value of the random sound:
The name of my other konami sound is "konami2", and for the value of the random sounds, I put "2".
This is what I mean by the value of the random sound:
Also, have you added/changed the already existing konami sound to be "konami1sound"? Because if not then the game might crash again...
Re: Mari0 Modding Help Thread
Posted: 03 Oct 2013, 04:41
by TripleXero
I need help doing something based on time, and I can not figure out how to do it at all. Not os.date things, like doing something after a certain amount of time passes
Re: Mari0 Modding Help Thread
Posted: 03 Oct 2013, 05:08
by HugoBDesigner
TripleXero wrote:I need help doing something based on time, and I can not figure out how to do it at all. Not os.date things, like doing something after a certain amount of time passes
Why not use love.update(dt) then?
Dt adds 1 to a certain value on each second, so, to get the amount of time passed, just add to love.update(dt): timepassed = timepassed + dt
But don't forget to add timepassed = 0 to love.load(). I'm not sure if it is necessary, but it is better if you add: dt = math.min(.1/6, dt)
Re: Mari0 Modding Help Thread
Posted: 03 Oct 2013, 05:55
by TripleXero
Thank you, I couldn't figure out how dt even worked before. One more thing, is there a way to cut off decimals without rounding it up? Like 132.9432552 to 132
Re: Mari0 Modding Help Thread
Posted: 03 Oct 2013, 06:13
by Camewel
math.floor
it's like you're not even trying
Re: Mari0 Modding Help Thread
Posted: 03 Oct 2013, 06:24
by TripleXero
The time thing I honestly had no clue, with math.floor, I did try that and thought it wasn't working, but it had been because of something I changed earlier and didn't realize would affect it
Re: Mari0 Modding Help Thread
Posted: 04 Oct 2013, 11:35
by Maurice
Then you should learn how to debug.
ie throw print()'s all over your code. It's what I do at least.
Re: Mari0 Modding Help Thread
Posted: 04 Oct 2013, 12:51
by Camewel
or use love.graphics.print if you're on some awful OS that doesn't allow the console
Re: Mari0 Modding Help Thread
Posted: 04 Oct 2013, 23:25
by alesan99
How to make 2 walking frames for the goomba. This isn't answering a question asked here but it is asked in some other places.
SHOW TUTORIAL
1.Make the Image (Or use the one below)
Put in Mari0 (Duh)
2. Change Main.lua
You have to change it so LOVE can detect the image's new width and number of frames. Main.lua Line 362
goombaimage = love.graphics.newImage("graphics/" .. graphicspack .. "/goomba.png")
goombaquad = {}
for y = 1, 4 do
goombaquad[y] = {}
for x = 1, 2 do
goombaquad[y][x] = love.graphics.newQuad((x-1)*16, (y-1)*16, 16, 16, 32, 64)
end
end
Change "for x = 1, 2" to "for x = 1, 3" because that's the amount of frames there are horizontally.
Then change "((x-1)*16, (y-1)*16, 16, 16, 32, 64)" to "((x-1)*16, (y-1)*16, 16, 16, 48, 64)" because that's the amount of pixels horizontally.
It should end up like this:
goombaimage = love.graphics.newImage("graphics/" .. graphicspack .. "/goomba.png")
goombaquad = {}
for y = 1, 4 do
goombaquad[y] = {}
for x = 1, 3 do
goombaquad[y][x] = love.graphics.newQuad((x-1)*16, (y-1)*16, 16, 16, 48, 64)
end
end
if self.t == "goomba" then
if self.quad = goombaquad[spriteset][1] then
self.quad = goombaquad[spriteset][2]
else
self.quad = goombaquad[spriteset][1]
end
Is it possible to change the default colors of the Portal colors? Like for example, set Player 1's portals to Blue and Green, Player 2's to Orange and Yellow, etc.
Re: Mari0 Modding Help Thread
Posted: 25 Oct 2013, 10:01
by Automatik
Yes it's possible:
Go to about Line 1099 in main.lua
You have this:
-------------------
-- PORTAL COLORS --
-------------------
portalhues = {}
portalcolor = {}
for i = 1, 4 do
local players = 4
portalhues[i] = {(i-1)*(1/players), (i-1)*(1/players)+0.5/players}
portalcolor[i] = {getrainbowcolor(portalhues[i][1]), getrainbowcolor(portalhues[i][2])}
end
You have to modify the assignment of portalhues, given that it must be a value between 0 and 1 and:
0: red
0.125: orange
0.175: orange
0.25: light green
0.375: green
0.5: cyan
0.675: blue
0.75: purple
0.875: pink
(You can try in-between value, these are just examples)
So for example:
-------------------
-- PORTAL COLORS --
-------------------
portalhues = {}
portalcolor = {}
for i = 1, 4 do
local players = 4
portalhues[i] = {(i-1)*(1/players), (i-1)*(1/players)+0.5/players}
if i==1 then portalhues[i]={0.675,0.375} end -- Player 1 blue & green
if i==2 then portalhues[i]={0.125,0.175} end -- Player 2 orange & yellow
portalcolor[i] = {getrainbowcolor(portalhues[i][1]), getrainbowcolor(portalhues[i][2])}
end
Re: Mari0 Modding Help Thread
Posted: 27 Oct 2013, 21:22
by Mari0Maker
Thank you, Auto!
Re: Mari0 Modding Help Thread
Posted: 03 Nov 2013, 02:36
by Mari0Maker
How can I make music loop from a certain point? For example, a song has a intro. This way, the song can loop properly.
A good example of this would be Mario Kart Wii.
Re: Mari0 Modding Help Thread
Posted: 03 Nov 2013, 15:30
by BobTheLawyer
Mari0Maker, I'd make it into two music clips. Where the intro would start repeating, instead, go to the new clip, which then repeats.
I can't give you the code atm.
Are you looking at Bowser's Castle? We might be looking at the same music.
Re: Mari0 Modding Help Thread
Posted: 03 Nov 2013, 20:48
by HugoBDesigner
Mari0Maker wrote:How can I make music loop from a certain point? For example, a song has a intro. This way, the song can loop properly.
A good example of this would be Mario Kart Wii.