Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: treme on March 30, 2022, 07:08:24 AM
-
Hello, first I apologize for any spelling mistakes, I don't speak English very well and I'm using a translator.
After knowing how Attract mode works as well as I could, I wanted to go on to make a Theme to learn a little more.
I have made some to see how the nut file works and all that and I have managed to make some, simple but functional
Now I was trying to do something, which I can't make it work, because from the menu an image appears in the background of the system that is selected, the problem is that if I change the system, the background image doesn't change and What I want is for it to change, if I'm in the megadrive system, a megadrive comes out in the background, but if I change to the nintendo system, a nintendo comes out in the background
If someone can tell me how this can be done, I would appreciate it, if you need anything, whether it is the layout.nut or how I have the files placed, please tell me and I will put it
Thank you very much
-
The best way of doing this, is to find a skin that does what you want, and then have a look at the nutfile to see how it is done.
I just checked one of mine, and this should be similar to what you want it to do
if ( my_config["big_art"] == "Snap" )
{
local snap = fe.add_artwork("snap", flx*0, fly*0, flw, flh);
snap.preserve_aspect_ratio = false;
}
Just replace the snap for background or what other artwork you want.
It should all change when you switch to a new system, just make sure you have the following
Emulator : Sega Megadrive
Artwork : Sega Megadrive.jpg .png etc
If you have named it wrongly such as Sega Mega Drive.jpg then it will not show, so check your spellings and images.
However, a nut file would help as well, just to see what you are trying to do, as long as it is in English that is.
Regards
Mark
-
Thank you very much, I tried what you explained to me, but either I didn't place it where I should or it didn't work for me.
In the end I got it without placing the command you gave me, more or less I had it right, I just had to change something and it worked.
Now I will continue investigating how to put background music and place icons that move
Greetings
-
Yeah sorry, I did not post the full thing needed to get it up and running, it was just a snippet of what you need, and also just to make sure that your background or whatever images you have are named the same as your emulator or display.
The icons moving as just gif files I would believe.
Background music I believe that Kent's theme has BGM so take a look at his nutfile on how to add BGM. I personally do not use it as I have the sound of videos being played, so it is something that I have not even considered.
http://forum.attractmode.org/index.php?topic=3917.0
Regards
Mark
-
Thank you very much, the music thing in the main menu is more than anything because I have put images and there is only one image left, for the systems I usually use the sound of the video snaps.
I'll take a look at the link and Kent's theme.
Thanks
-
you can just use magic tokens,
local background = fe.add_image( "artwork/[DisplayName]", 0, 0, 1920 ,1080 );
"artwork" is refrencing a folder in your layout with images that are named the same as your display ie: nes.png
read the Layouts.txt file in the main folder, lots of good stuff...