I'm new to coding and Celeste modding. I don't know how to add an image as a background image to the game. I thought MTexture might be what I need to accomplish that but I don't seem to understand how to add it to the Gameplay.xml Atlas. I have the correct folder structure as stated on the github document and I also added the image inside the Gameplay folder. I'm not sure if it's possible to add a background image but I thought to ask just in case I'm missing something.
#How does MTexture work?
1 messages · Page 1 of 1 (latest)
Image of what I've got. I know it's not much. xD
How does MTexture work?
I've also tried to search around for a solution in this discord channel, but I couldn't find anything that helped me understand this.
what in c#'s name...
you are trying to input c# code in. in an xml file. which stores structured data.
you got everything wrong
i suggest learning what c# is first before attempting to understand celeste specific types
xml files are not atlases
individual folders inside Graphics/Atlases/ are (when it comes to mods)
(for the record, the easiest way to load a background image for your map is to use a styleground)
at least i hope you mean adding a background to your map
(for the record, the easiest way to load a background image is download loenn)
I know it's not the same, I understand that much. I'm sorry if I upset you a lot. I've mentioned I'm new to coding so I would've at least expected a nicer response than outright disgust.
Styleground as in <img></img> in the Gameplay.xml?
I made my first level in Lonn, I didn't know the editor allows you to easily add images as background images. If that's the case then I might need to look up how.
there is no gameplay.xml
where did you get the hint that there is one
where
please pinpoint the exact place where gameplay.xml is mentioned
https://github.com/EverestAPI/Resources/wiki/Adding-Sprites
This is where I found Gameplay being mentioned here first to add a sprite image. Because I couldn't figure out how to do it and it says "MTextures in Code", I thought I would have to make a Gameplay.xml file and add the code in there.
But I can see that's wrong now. I even misremembered it being in a game.
you're probably misremembering Graphics/Atlases/Gameplay.data
I said I misremembered, so yeah. xD
yeah
the wiki has a page about adding stylegrounds so i suggest taking a look
people can get very far without having to touch code modding
Yeah, I just found that by looking through the wiki.
though for some reason ive seen people still get confused about how to add a styleground
I'm glad because coding is too complicated for me to understand. But please don't attack me next time. I was just trying to understand and ask for help.
It came across as me being stupid for even trying.
apologies
You're fine. You explained yourself and I guess it was miscommunicated and I saw it differently. I accept your apology though. x3
for future reference c# files are supposed to be written in .cs files, not .xml files
also there is a code mod template from which every code mod should start
I can't see the difference between coding types.
xml is data
c# is code
you cannot write a program in xml - it's merely a way to convey structured data
So Celeste uses xml and c# then?
celeste itself is written in c#, yes, it's what drives the game
but structured data, like save files, sprite data and animations, tilesets, etc are stored in xml
Maybe I'll learn that someday. xD
basically c# is capable of doing stuff by itself
xml is not, it needs some program to read it and then do stuff based on it
Okay. Thanks. :D
the reason why xmls are used is because it would be really inconvenient having to edit and recompile the code every time an animation change is done
especially for modders
Yeah, that would be annoying and time consuming.
yeah, in any case, i suggest checking the wiki articles first
..and following their instructions carefully, since many people skip over some important part
That's what I'm doing. I spent over 7 hours last time and just at the end I couldn't figure this thing out. xD
Maybe I got tired after trying and testing the levels for so long.
I did figure out how to add portraits though.
you did put your xml in two subfolders, and specified its path in map metadata, right?
im assuming you want them to be map specific
you shouldn't put the portraits.xml directly in the Graphics folder because everest interprets this as adding a new portrait globally which isn't good
people generally shouldn't be adding portraits globally because this means your portraits will be enabled even if they're not playing your map right now
What do you mean? I put them in Graphics/Atlases/Portraits/(character name)/
Oh you meant the .xml file. I did put that in the Graphics folder because it worked and it's a small level to test everything out anyway.
yeah if you're planning on publishing it i highly suggest not doing that
No one's going to play it, so yeah. More a private thing.
ah then thats fine
Where would I need to add it though if I publish it? In a separate folder next to the Graphics folder? Would that affect anything in the code?
just Graphics/Koops/YourModName/Portraits.xml and specify the path in map metadata, in the portraits xml field
note that this temporarily replaces the vanilla xml, meaning that if you don't copy the vanilla portrait definitions to your xml, they'll be inaccessible
this is good because it's map-specific and doesn't make them loaded everywhere
With vanilla portraits you mean [MADELINE left normal]? And Madeline doesn't work in the new folder?
if you don't copy paste the portraits from vanilla, yeah
yes; madeline, theo, mom, ex, badeline
Okay, I can see how that's better for publishing. I'll make a habit out of it then.
vanilla xmls are directly in Content/Graphics
in general everything in Content can be used as a reference
Okay. I'm just afraid of ruining the base game. xD
well if you do you can always just verify game files and reinstall everest