Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - iOtero

Pages: [1] 2
Themes / iomenu, Theme to create the Main System Menu (full)
« on: August 11, 2018, 08:12:22 AM »
iomenu Theme for Systems Menu.

Well, I've still finished it, although basically I only lack the texts of most systems, the system works quite well.

I am Basque and Spanish, so the descriptions texts that appear, of course, are in Spanish.
If I had found the files with the texts in English, i would have put them, but i only found games, not systems.

Attract-Mode 2.4 is needed, with the previous ones it will not work correctly.

You can see it here:

The first menu, the main one, can not be modified or put options, at least that I know, works with the options set by default in the theme layout.

In the following menus, the options to choose are two, if the wheel is hidden or not after a few seconds, and the type of information to be displayed:
  • Basic: that's when the video goes full screen and you see in the lower right corner, some basic data of the system.
  • Complete: It is when the video is placed in the upper right and below the details and system information appear.
  • None: When only the system video appears.
Here you have the theme, the attract.cfg, the plugin, the romlists and the site where I got the videos:!Lw1WnazR!RLgvom45dgsbDZrCofDHWUG9e1Si21zWsewX_vMbwMA

All this is very personalized, but I'm sure you can adapt it to your systems, and if not, you can always ask me to see if I can help you.  8)

And if you think of something interesting to add to the theme, then tell me, to see if it can be done...  :P

Scripting / Pause in the wheel
« on: August 08, 2018, 05:53:19 AM »
With this code the wheel (conveyor) of the layout fades when you stop moving it.

What I want to do is that, between the fact that the wheel stopped moving and that it started to disappear, it will be x milliseconds.

Code: [Select]

first_tick <- 0;
stop_fading <- true;
my_delay <- 600;

function wheel_a_fade_transition(ttype, var, ttime)
if(ttype == Transition.ToNewSelection)
first_tick = -1;

function wheel_a_alpha(ttime)
if(first_tick == -1)
stop_fading = false;

local elapsed = 0;

if(first_tick > 0)
elapsed = ttime - first_tick;

local count = conveyor.m_objs.len();

for(local i=0; i < count; i++)
if(elapsed > 0)
if(i == count/2)
conveyor.m_objs[i].alpha =(255 *(my_delay - elapsed)) / my_delay;
conveyor.m_objs[i].alpha =(150 *(my_delay - elapsed)) / my_delay;

if(elapsed > my_delay)
stop_fading = true;

if(first_tick == -1)
first_tick = ttime;


Any suggestions?

Scripting / Animate flyer from position x,y to position x+400,y+400
« on: August 04, 2018, 09:50:44 AM »
Well, with animate.nut i managed to make horizontal animations:

Code: [Select]
::OBJECTS <- {artwk = fe.add_image("objs/emulators/[Emulator]", flx*0.75, fly*0.005, flw*0.25, flh*0.162)}
local move_artwk1 = {when = Transition.ToNewSelection, property = "x", start = OBJECTS.artwk.x + OBJECTS.artwk.width, end = OBJECTS.artwk.x, time = 1}
local move_artwk2 = {when = When.ToNewSelection, property = "x", start = OBJECTS.artwk.x, end = OBJECTS.artwk.x + (OBJECTS.artwk.width*1.5), time = my_time, delay=my_delay}
animation.add(PropertyAnimation(OBJECTS.artwk, move_artwk1));
animation.add(PropertyAnimation(OBJECTS.artwk, move_artwk2));

and vertically:

Code: [Select]
::OBJECTS <- {surface = fe.add_surface(sw, sh)}
local daframe = OBJECTS.surface.add_image("objs/frames/frame_red.png", 0, 0, sw, sh);
local title = OBJECTS.surface.add_text("[Title]", sx*0.001+1, sy*0.2+1, sw*0.75, sh*0.01);
local move_surface1 = {when = Transition.ToNewSelection, property = "y", start = flh, end = OBJECTS.surface.y, time = 1}
local move_surface2 = {when = When.ToNewSelection, property = "y", start = OBJECTS.surface.y, end = flh, time = my_time, delay=my_delay}
animation.add(PropertyAnimation(OBJECTS.surface, move_surface1));
animation.add(PropertyAnimation(OBJECTS.surface, move_surface2));

And now i want to move an object from the center of the screen to the lower right corner (from position x,y to position x+400,y+400), and i do not know if it can be done.

And it does not matter to me that first it moves horizontally and then vertically or that it goes directly diagonally, but yes, in a single movement of the wheel

Any ideas to do it?

Scripting / Filter when filling an array (Solved)
« on: August 01, 2018, 08:19:57 AM »
This code filled games_db array with ALL the roms in the rom path:

Code: [Select]
// games filter
local dir = DirectoryListing(system_rom_path);

local games_db = [];

// FILTER i do not know how to apply
local sel_game = "GUN";

foreach (dir_name in dir.results)
// strip
local f = txt.loadFile(dir_name);
local aa = [];
local i = 1;
foreach(line in f.lines)
// track
local a = split(line, "\\"); // split path-file for "/"
local title = strip(a.pop().slice(0, -4)); // only filename, without ext
local folder = strip(a.pop());            // path folder

"filename" : line,
"folder" : folder,
"title" : title,


What I need is to just fill in games_db with the rom that contain the string "GUN" in their filename.

Any suggestions?

Scripting / Attract-Mode BUG: Listbox not fade correctly.
« on: July 17, 2018, 10:33:53 AM »
I use this code to fade a listbox after 3.5 seconds:

Code: [Select]
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;

// Listbox
if(my_config["wheel_type"] == "listbox")
::OBJECTS <- {lbx = fe.add_listbox(flx*0.76, fly*0.33, flw*0.20, flh*0.64)}
OBJECTS.lbx.rows = 21;
OBJECTS.lbx.charsize = 24;
OBJECTS.lbx.align = Align.Centre;
OBJECTS.lbx.selbg_alpha = 0;

// Fade Listbox
local move_lbx1 = { when = Transition.ToNewSelection, property = "alpha", start = 0, end = 255, time = 1} 
local move_lbx2 = { when = When.ToNewSelection, property = "alpha", start = 255, end = 0, time = 2500, delay = 3500} 
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx1));
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx2));

But it does not fade correctly.

The rest of the listbox fades correctly, but the selected field in the listbox remains visible.

It seems totally an Attract-Mode bug.

Does anyone know why this happens?

Is there any solution?

Edit: The bug has been confirmed in "Bug Reports" by Oomek. As soon as there is a solution, I will communicate it here.

Scripting / Two functions to create boxes and frames
« on: July 11, 2018, 06:45:40 AM »
It seems to me that AM does not have functions for this, so if someone can be useful, two functions to create boxes and frames:

Code: [Select]
// Two functions to create boxes and frames
// First: Create a white png 1x1 pixels sized. Save as "white_point.png"
// Create a folder named objs in your layout and copy "white_point.png" into it.
// Function draw_box(box_x,box_y,box_w,box_h,box_r,box_g,box_b,box_a,box_s)
// box_x --> The x coordinate of the top left corner of the box (in layout coordinates).
// box_y --> The y coordinate of the top left corner of the box (in layout coordinates).
// box_w --> The width of the box (in layout coordinates).
// box_h --> The height of the box (in layout coordinates).
// box_r --> Set red colour level for the box. Range is 0-255.
// box_g --> Set green colour level for the box. Range is 0-255.
// box_b --> Set blue colour level for the box. Range is 0-255.
// box_a --> Set alpha level for the box. Range is 0-255.
// box_s --> Width of the box shadow (in layout coordinates). Set 0 for no shadow.

function draw_box(box_x,box_y,box_w,box_h,box_r,box_g,box_b,box_a,box_s)
if(box_s != 0)
local bflw = fe.layout.width;
local bflh = fe.layout.height;

local dbox = fe.add_image("objs/sys/white_point.png", box_x+box_s, box_y+box_s, box_w, box_h);

local dbox = fe.add_image("objs/sys/white_point.png", box_x, box_y, box_w, box_h);


// Function draw_frame(box_x,box_y,box_w,box_h,box_r,box_g,box_b,box_a,box_s)
// frame_x --> The x coordinate of the top left corner of the frame (in layout coordinates).
// frame_y --> The y coordinate of the top left corner of the frame (in layout coordinates).
// frame_w --> The width of the frame (in layout coordinates).
// frame_h --> The height of the frame (in layout coordinates).
// frame_r --> Set red colour level for the frame. Range is 0-255.
// frame_g --> Set green colour level for the frame. Range is 0-255.
// frame_b --> Set blue colour level for the frame. Range is 0-255.
// frame_a --> Set alpha level for the frame. Range is 0-255.
// frame_fw --> The Width of the border of the frame (in layout coordinates).
// frame_fh --> The Height of the border of the frame (in layout coordinates).

function draw_frame(frame_x,frame_y,frame_w,frame_h,frame_r,frame_g,frame_b,frame_a,frame_fw,frame_fh)
local dframe1 = fe.add_image("objs/white_point.png", frame_x, frame_y, frame_w, frame_fh);

local dframe2 = fe.add_image("objs/white_point.png", frame_x, frame_y+frame_h, frame_w, frame_fh);

local dframe3 = fe.add_image("objs/white_point.png", frame_x, frame_y, frame_fw, frame_h);

local dframe4 = fe.add_image("objs/white_point.png", frame_x+frame_w, frame_y, frame_fw, frame_h+frame_fh);

// Example: Draw two boxes and one frame
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
draw_box(flx*0.3, fly*0.3, flw*0.5, flh*0.5, 175, 175, 175, 255,flw*0.005);
draw_box(flx*0.35, fly*0.35, flw*0.4, flh*0.4, 135, 175, 50, 150,0);
draw_frame(flx*0.35, fly*0.35, flw*0.4, flh*0.4, 255, 0, 0, 255, flw*0.002, flh*0.003);

Scripting / Animate a Shuffle List
« on: June 28, 2018, 03:35:00 PM »
I want to make an animation of a Shuffle List made with the keilmillerjr module.

It is this:

Code: [Select]
// List
if (my_config["wheel_type"] == "list")


local list = Shuffle(10, "text", "[Title]");

list.slots[0].set_pos(flx*0.75, fly*0.17, flw*0.25, flh*0.042);
list.slots[0].charsize = font_list_size;
list.slots[0].align = my_align;

list.slots[1].set_pos(flx*0.75, fly*0.20, flw*0.25, flh*0.042);
list.slots[1].charsize = font_list_size;
list.slots[1].align = my_align;

list.slots[2].set_pos(flx*0.75, fly*0.23, flw*0.25, flh*0.042);
list.slots[2].charsize = font_list_size;
list.slots[2].align = my_align;

list.slots[3].set_pos(flx*0.75, fly*0.26, flw*0.25, flh*0.042);
list.slots[3].charsize = font_list_size;
list.slots[3].align = my_align;

list.slots[4].set_pos(flx*0.75, fly*0.29, flw*0.25, flh*0.042);
list.slots[4].charsize = font_list_size;
list.slots[4].align = my_align;

list.slots[5].set_pos(flx*0.75, fly*0.32, flw*0.25, flh*0.042);
list.slots[5].charsize = font_list_size;
list.slots[5].align = my_align;

list.slots[6].set_pos(flx*0.75, fly*0.35, flw*0.25, flh*0.042);
list.slots[6].charsize = font_list_size;
list.slots[6].align = my_align;

list.slots[7].set_pos(flx*0.75, fly*0.38, flw*0.25, flh*0.042);
list.slots[7].charsize = font_list_size;
list.slots[7].align = my_align;

list.slots[8].set_pos(flx*0.75, fly*0.41, flw*0.25, flh*0.042);
list.slots[8].charsize = font_list_size;
list.slots[8].align = my_align;

list.slots[9].set_pos(flx*0.75, fly*0.44, flw*0.25, flh*0.042);
list.slots[9].charsize = font_list_size;
list.slots[9].align = my_align;

class ShufflePow extends Shuffle
function select(slot)
slot.visible = true;

function deselect(slot)
slot.visible = false;

local my_pointer = my_config["set_marker_rgb"] + ".png";

local pow = ShufflePow(10, "image", "pointers/" + my_pointer);

pow.slots[0].set_pos(flx*0.7498, fly*0.18, flw*0.25, flh*0.026);
pow.slots[1].set_pos(flx*0.7498, fly*0.21, flw*0.25, flh*0.026);
pow.slots[2].set_pos(flx*0.7498, fly*0.24, flw*0.25, flh*0.026);
pow.slots[3].set_pos(flx*0.7498, fly*0.27, flw*0.25, flh*0.026);
pow.slots[4].set_pos(flx*0.7498, fly*0.30, flw*0.25, flh*0.026);
pow.slots[5].set_pos(flx*0.7498, fly*0.33, flw*0.25, flh*0.026);
pow.slots[6].set_pos(flx*0.7498, fly*0.36, flw*0.25, flh*0.026);
pow.slots[7].set_pos(flx*0.7498, fly*0.39, flw*0.25, flh*0.026);
pow.slots[8].set_pos(flx*0.7498, fly*0.42, flw*0.25, flh*0.026);
pow.slots[9].set_pos(flx*0.7498, fly*0.45, flw*0.25, flh*0.026);

// Sound
function fade_transitions(ttype, var, ttime) {
switch (ttype) {
case Transition.ToNewSelection:
case Transition.ToNewList:
local Wheelclick = fe.add_sound("pointers/clic.mp3")
return false;


To animate a normal ListBox, i use objects, as in this example, which makes it disappear on the right after 5 seconds:

Code: [Select]
// Listbox
if (my_config["wheel_type"] == "listbox")
::OBJECTS <- {lbx = fe.add_listbox(flx*0.75, fly*0.2, flw*0.25, flh*0.8)}
OBJECTS.lbx.rows = 27;
OBJECTS.lbx.charsize = font_list_size;
OBJECTS.lbx.sel_style = Style.Bold;

// List Text Align
if (my_config["set_align"] == "centre") OBJECTS.lbx.align = Align.Centre;
if (my_config["set_align"] == "left") OBJECTS.lbx.align = Align.Left;
if (my_config["set_align"] == "right") OBJECTS.lbx.align = Align.Right;

local my_delay = 5000;

local move_lbx1 = { when = Transition.ToNewSelection, property = "x", start = OBJECTS.lbx.x + OBJECTS.lbx.width, end = OBJECTS.lbx.x, time = 1 }
local move_lbx2 = { when = When.ToNewSelection, property = "x", start = OBJECTS.lbx.x, end = OBJECTS.lbx.x + OBJECTS.lbx.width, time = 595, delay=my_delay }
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx1));
animation.add(PropertyAnimation(OBJECTS.lbx, move_lbx2));

Well, i would like the Shuffle List to do the same, but i do not know how.

keilmillerjr, please tell me if it can be done or not, thank you.

Themes / Help with the language.
« on: June 18, 2018, 02:19:36 PM »
Using the Spanish language in Attract-Mode, when the name does not have special characters, it looks good:

They see the title and the flyer perfectly.

But if it bears some special character, typical of the Spanish language, as in the following case, the title is perfectly read (including the special character), but it does not read the flyer, whose name on the hard disk also carries the special character.

Can someone tell me why this happens and how to solve it?

Thanks in advance.

Themes / Layout background design
« on: June 17, 2018, 02:08:33 AM »
I am preparing a layout with the following backgrounds:

I know I'm not very good at this ... But here there are very good people in it.

That's why I ask for your help, to see if you can suggest any combination of colors or alternatives to the design of mine.

What can not be modified are the measures or the margins, otherwise I would have to modify all my code and that is not desirable.

Thanks in advance for your help.

How to change the keys up and down for left and right in one theme layout and only for that?

I work in a layout with a coverflow (with "conveyor_helper" ;) ), and to go from game to game i use, as in the other layout, up and down.

IWould it be possible to set an option to change the keys in ch.CoverFlow of conveyor_helper?

Yhe best would be to use left and right, but i do not know how to define that in attrac-mode without changing it in the rest of layouts.

Sorry for my very bad english,  :-[

Scripting / Need help to display an array when you press a button.
« on: June 11, 2018, 08:15:11 AM »

This code works perfectly:  :D

Code: [Select]
class PlayList

show_text = fe.add_text("[Title]", flx*0.230, fly*0.001, flw*0.360, flh*0.490);
show_text.charsize = 20;
fe.add_signal_handler(this, "on_show")

function on_show(shw)
if (shw == "custom4")
return true;
return false;

local pl = PlayList();

My problem is that i can not get the content of an array[], which contains several data, instead of [Title].  :'(

I tried this (without it working, of course):    :-[

Code: [Select]
class PlayList

for(local i=0; i<player_list.len(); i++)
player_list.push(fe.add_text("", text_x/2, text_y+(i*30), text_wide-text_x, 0));
player_list[i].align = Align.Left;
player_list[i].font = "anaheim";
player_list[i].charsize = font_list_size;

fe.add_signal_handler(this, "on_show")

function on_show(shw)
if (shw == "custom4")
return true;
return false;

player_list[] is the array in question...

General / Help to compile attract-mode in windows 10 64bits
« on: June 03, 2018, 04:09:53 AM »
I have followed these steps of without error messages:

Install MSYS2

In the MSYS2 console:

Code: [Select]

pacman --needed -Sy bash pacman pacman-mirrors msys2-runtime

pacman -S git mingw-w64-x86_64-toolchain msys/make mingw64/mingw-w64-x86_64-sfml mingw64/mingw-w64-x86_64-ffmpeg mingw64/mingw-w64-x86_64-libarchive

git clone attract

cd attract

And when I run make, it gives me these errors (my system is Spanish):

Code: [Select]
$ make
/bin/sh: pkg-config: no se encontró la orden
/bin/sh: pkg-config: no se encontró la orden
/bin/sh: pkg-config: no se encontró la orden
make: pkg-config: No se encontró el programa
make: pkg-config: No se encontró el programa
flags: -Wl,--subsystem,windows -O2 -DNDEBUG -Iextlibs/miniz -Iextlibs/audio/include -D__STDC_CONSTANT_MACROS  -Iextlibs/expat -Iextlibs/squirrel/include -Iextlibs/sqrat/include -Iextlibs/gameswf
mkdir -p obj
Compiling obj/fe_base.o...
make: g++: No se encontró el programa
make: *** [Makefile:457: obj/fe_base.o] Error 127


no se encontró la orden --> the order was not found

No se encontró el programa --> The program was not found

I need help, please.

Scripting / Wrong code
« on: June 02, 2018, 02:37:59 AM »
In my layout this code works perfectly:

Code: [Select]

// Hand Held
local artwork = fe.add_image("hh/[Emulator].png", flx*0.52, fly*0.4,  flw*0.260, flh*0.462);
artwork.preserve_aspect_ratio = true;

// Boxart
local box = FadeArt("boxart", flx*0.52, fly*0.6,  flw*0.130, flh*0.231);
box.preserve_aspect_ratio = true;
box.trigger = Transition.EndNavigation;

But if I add these modifications ("Watch & Game" is an emulator), it does not work:

Code: [Select]

local myboxart = "[Emulator]";

if (myboxart == "Watch & Game")
// Boxart
local box = FadeArt("boxart", flx*0.52, fly*0.6,  flw*0.130, flh*0.231);
box.preserve_aspect_ratio = true;
box.trigger = Transition.EndNavigation;
// Hand Held
local artwork = fe.add_image("hh/[Emulator].png", flx*0.52, fly*0.4,  flw*0.260, flh*0.462);
artwork.preserve_aspect_ratio = true;

Could someone tell me what I'm doing wrong?

Thanks in advance.

Themes / LCD Theme final version 08/2018
« on: May 27, 2018, 05:56:41 AM »
LCD Theme for Attract-Mode 2.4
Final version 08/2018

Designed for All Systems

It carries:

  • 42 Icons for the categories or genres of games.
  • 15 Animated Markers (and one static: Frame).
  • 137 System Logos.

You can choose:

  • Set the selector type: arc wheel, vertical wheel, list, listbox or all randomly.
  • Select the animated marker of the list: Frame, Bub, Cacodemon, Donkey, Imp, Lara, Marco, Mario, Megaman, Pac-man, Radiation, Rayman, Spiral, Sun, World, Ying-Yang or all randomly.
  • Set the alignment of the lists: left, right or centre.
  • Set how to hide selectors: move or fade.
  • Time of a wheels transition (in milliseconds).
  • The time(in milliseconds) that it takes for the wheels and lists to hide. Set to 0 for not hide.
  • Use marquees or show System in the up right lcd.
  • Set Artwork above the icons frame: Flyers, Wheels or none.
  • Use System Logos or not.
  • Use the icons of the genres of games or not (the genre is always indicated with text).
  • Set the icons laguage of the genres of games: english or spanish.
  • Use scanlines in display screen or not.
  • Display a clock with local time or not.

With the last Attract-Mode version, customizing individually for each system (display).

For those interested in the shuffle lists and their animations, see my new code, more refined than the previous one, reducing its size very significantly.

Well, you better see it:

LCD with wheel and all disabled:

LCD with list and all activated:

And, if you're interested, you have it here:!2slxRbSD!OCVCPafQetIEwE5m9Q8hqq6D_UcMcQ3XmQ0n-bzlqGg

Themes / roboesp theme, in spanish.
« on: May 27, 2018, 05:18:50 AM »
Many spanish fans pass through this forum, so here i leave the theme "roboesp", which is based on the original omegaman robospin.

It has, among others, the following changes:

- All texts and options are in Spanish.
- Changed some wallpaper options.
- Changed the spinwheels system for another that occupies less screen and has more options.
- Changed the system of using wheels or marquees.
- You can choose the number of wheels per type of spinweel (vertical or curve).
- You can choose the number of lines when you choose the list of games instead of the spinwheel.
- You can choose the alignment (justification) of the list of games (left, right, center).
- Eliminated the random color system (sometimes colors came out that did not show anything).
- Removed the icons that were used to indicate the category and the manufacturer of the games.
- Removed the pointers that indicate the wheel (this is not the Hyperspin, although it seems a lot).
- New information system only text, with the name or all data.
- The front of the marquee is painted black before using the marquee, so that transparent marquees can be used.
- The logo of the system used is always visible (there are 129 logos available).

Two screenshots:

 if you like it or want to try it, here it is:!3h8USbYQ!fEKv0K1LOevAO3wgJErxT8a8t1RctKjgok3ckv32ows
 If there was much interest in it, i could do the translation into english, but, in principle, i have no intention.

Pages: [1] 2