#How does MTexture work?

1 messages · Page 1 of 1 (latest)

deep crater
#

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.

#

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.

analog bridge
#

what in c#'s name...

analog bridge
#

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)

slate kayak
#

(for the record, the easiest way to load a background image for your map is to use a styleground)

analog bridge
#

at least i hope you mean adding a background to your map

rigid ermine
#

(for the record, the easiest way to load a background image is download loenn)

deep crater
# analog bridge xml files are not atlases

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.

deep crater
deep crater
analog bridge
#

where did you get the hint that there is one

deep crater
#

On the documentation.

#

And other games that have it.

analog bridge
#

please pinpoint the exact place where gameplay.xml is mentioned

deep crater
#

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.

GitHub

Celeste modding resources collected and maintained by the community. Feel free to submit a PR or edit the wiki. - EverestAPI/Resources

analog bridge
#

you're probably misremembering Graphics/Atlases/Gameplay.data

deep crater
#

I said I misremembered, so yeah. xD

analog bridge
#

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

deep crater
analog bridge
#

though for some reason ive seen people still get confused about how to add a styleground

deep crater
analog bridge
#

that wasn't meant as an attack

#

i just haven't seen anything like this before

deep crater
#

It came across as me being stupid for even trying.

analog bridge
#

apologies

deep crater
#

You're fine. You explained yourself and I guess it was miscommunicated and I saw it differently. I accept your apology though. x3

analog bridge
#

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

deep crater
#

I can't see the difference between coding types.

analog bridge
#

xml is data

#

c# is code

#

you cannot write a program in xml - it's merely a way to convey structured data

deep crater
#

So Celeste uses xml and c# then?

analog bridge
#

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

deep crater
#

Maybe I'll learn that someday. xD

analog bridge
#

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

deep crater
#

Okay. Thanks. :D

analog bridge
#

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

deep crater
#

Yeah, that would be annoying and time consuming.

analog bridge
#

yeah, in any case, i suggest checking the wiki articles first

#

..and following their instructions carefully, since many people skip over some important part

deep crater
#

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.

analog bridge
#

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

deep crater
#

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.

analog bridge
#

yeah if you're planning on publishing it i highly suggest not doing that

deep crater
#

No one's going to play it, so yeah. More a private thing.

analog bridge
#

ah then thats fine

deep crater
#

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?

analog bridge
#

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

deep crater
#

With vanilla portraits you mean [MADELINE left normal]? And Madeline doesn't work in the new folder?

analog bridge
#

if you don't copy paste the portraits from vanilla, yeah

analog bridge
deep crater
#

Okay, I can see how that's better for publishing. I'll make a habit out of it then.

analog bridge
#

vanilla xmls are directly in Content/Graphics

#

in general everything in Content can be used as a reference

deep crater
#

Okay. I'm just afraid of ruining the base game. xD

analog bridge
#

well if you do you can always just verify game files and reinstall everest