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.


Messages - dukpoki

Pages: [1] 2 3 4
1
Scripting / Re: System List possible?
« on: May 18, 2018, 09:21:33 AM »
@dukpoki Is gaving me an error , "the index -2 does not exist"

Here's a full sample code that should work if you follow the template.  You have to of course, adjust/add more systems accordingly to the total amount on your setup as this code only for a total of 5 systems.  To do that, you simply add/insert more "case" systems along with the "break".  A good rule of thumb is to alphabetize it as AM automatically assigns display numbers that way.  Also make sure your systems listed in your attract.cfg are in alphabetical order as well.  And finally make sure the first 2 and last 2 systems on the list have the same +/- displaytotal in the corresponding lines.  So if you are adding more systems then delete the +displaytotal's I have in Atomiswave & Dreamcast and also the -displaytotal's in Genesis & Mame.  Then once you've added all your systems apply those +/- exactly in the same order/way.

Code: [Select]

local displaytotal = fe.displays.len();  //the total system number

 ::OBJECTS <- {

system1= fe.add_text("",47,48,300,40)
system2= fe.add_text("",47,90,300,40)
system3= fe.add_text("",47,132,300,40)
system4= fe.add_text("",47,174,300,40)
system5= fe.add_text("",47,216,300,40)

}


function transition_callback(ttype, var, ttime)
{
    switch ( ttype )
    {
        case Transition.ToNewList:
case Transition.StartLayout:
case Transition.ToNewSelection:
case Transition.FromOldSelection:
            switch ( fe.list.name )
            {             
case "Atomiswave":
local display1 = fe.displays[fe.list.display_index - 2 + displaytotal].name;
local display2 = fe.displays[fe.list.display_index - 1 + displaytotal].name;
                local display3 = fe.displays[fe.list.display_index].name;
                local display4 = fe.displays[fe.list.display_index + 1].name;
local display5 = fe.displays[fe.list.display_index + 2].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
break;

        case "Dreamcast":
local display1 = fe.displays[fe.list.display_index -2 + displaytotal].name;
local display2 = fe.displays[fe.list.display_index - 1].name;
                local display3 = fe.displays[fe.list.display_index].name;
                local display4 = fe.displays[fe.list.display_index + 1].name;
local display5 = fe.displays[fe.list.display_index + 2].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
    break;

case "Gamecube":
local display1 = fe.displays[fe.list.display_index - 2].name;
local display2 = fe.displays[fe.list.display_index - 1].name;
                local display3 = fe.displays[fe.list.display_index].name;
                local display4 = fe.displays[fe.list.display_index + 1].name;
local display5 = fe.displays[fe.list.display_index + 2].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
break;

        case "Genesis":
local display1 = fe.displays[fe.list.display_index - 2].name;
local display2 = fe.displays[fe.list.display_index - 1].name;
                local display3 = fe.displays[fe.list.display_index].name;
                local display4 = fe.displays[fe.list.display_index + 1].name;
local display5 = fe.displays[fe.list.display_index + 2 - displaytotal].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
break;           

        case "Mame":
local display1 = fe.displays[fe.list.display_index - 2].name;
local display2 = fe.displays[fe.list.display_index - 1].name;
                local display3 = fe.displays[fe.list.display_index].name;
                local display4 = fe.displays[fe.list.display_index + 1 - displaytotal].name;
local display5 = fe.displays[fe.list.display_index + 2 - displaytotal].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
break;

            }
break;
    }

}

fe.add_transition_callback("transition_callback" );


2
Scripting / Re: System List possible?
« on: May 17, 2018, 01:25:18 PM »
Got it working.

Code: [Select]

 ::OBJECTS <- {

system1= fe.add_text("",47,48,300,40)
system2= fe.add_text("",47,90,300,40)
system3= fe.add_text("",47,132,300,40)
system4= fe.add_text("",47,174,300,40)
system5= fe.add_text("",47,222,300,40)

}

function transition_callback(ttype, var, ttime)
{
    switch ( ttype )
    {
        case Transition.ToNewList:
case Transition.StartLayout:
case Transition.ToNewSelection:
case Transition.FromOldSelection:
            switch ( fe.list.name )
            {             
case "Atomiswave":
local display1 = fe.displays[fe.list.display_index - 2].name;
local display2 = fe.displays[fe.list.display_index - 1].name; //previous display
        local display3 = fe.displays[fe.list.display_index].name; //current display
        local display4 = fe.displays[fe.list.display_index + 1].name; //next display
local display5 = fe.displays[fe.list.display_index + 2].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
OBJECTS.frame.file_name = "images/frames/Default_frame.png";
break;

        case "Dreamcast":
local display1 = fe.displays[fe.list.display_index - 2].name;
local display2 = fe.displays[fe.list.display_index - 1].name; //previous display
        local display3 = fe.displays[fe.list.display_index].name; //current display
        local display4 = fe.displays[fe.list.display_index + 1].name; //next display
local display5 = fe.displays[fe.list.display_index + 2].name;
OBJECTS.system1.msg = display1;
OBJECTS.system2.msg = display2;
OBJECTS.system3.msg = display3;
OBJECTS.system4.msg = display4;
OBJECTS.system5.msg = display5;
        OBJECTS.frame.file_name = "images/frames/Default_frame.png";

        break;
            }
break;
    }

}

fe.add_transition_callback("transition_callback" );


Make sure to add all your systems/displays by adding more "cases".

EDIT:  Has problems with the beginning and the end of the list.  I'm not sure how to make it loop.  Will research.

EDIT 2:  Found a very rough workaround.  You have to subtract or add the total index number which you can use fe.displays.len() to find.
So for example if you have a list of 10 systems then for the first system you need to -2, -1, 0, +1, +2 but make sure the first two formulas you are adding 10 to it.  So the formula will be (-2 + 10) and (-1 + 10).  That way the end result is the number that is at the end of the list 8 and 9 respectively and not negative numbers.  Because you the display index will never be a negative number.

For example i am doing this:
Code: [Select]
                local displaytotal = fe.displays.len();

//excerpt code below
case "Atomiswave":
local display1 = fe.displays[fe.list.display_index - 2 + displaytotal].name;
local display2 = fe.displays[fe.list.display_index - 1 + displaytotal].name;
                local display3 = fe.displays[fe.list.display_index].name;
                local display4 = fe.displays[fe.list.display_index + 1].name;
local display5 = fe.displays[fe.list.display_index + 2].name;
break;

3
Scripting / Re: System List possible?
« on: May 15, 2018, 10:56:45 PM »
You may refer my theme. It is similar you want  :)
http://forum.attractmode.org/index.php?topic=2211.0

Hey man, thank you so much!  Btw, that's a very nice theme.  So I've been messing with it for the past hour and I can't seem to isolate the list to a certain number of systems (instead of showing them all).  You're code is too advanced for me. :P

I've done some more digging with much trial and error and i've come up with something like this (example):

Code: [Select]
function on_transition( ttype, var, ttime )
{

local display1 = fe.displays[fe.list.display_index - 1].name; //previous display
local display2 = fe.displays[fe.list.display_index].name; //current display
local display3 = fe.displays[fe.list.display_index + 1].name; //next display

local sys_text1 = fe.add_text (display1, 100, 200, 600, 100); //note: can use sys_text#'s to fe.add_image if I wanted images instead of text
local sys_text2 = fe.add_text (display2, 500, 200, 600, 100);
local sys_text3 = fe.add_text (display3, 1000, 200, 600, 100);

}
fe.add_transition_callback( this, "on_transition" );

The only problem i'm facing with this is the transition callback isn't working properly.  Every time I switch back and forth between displays, the previous text does not disappear and instead overlaps each other.  Any ideas on this?

4
Scripting / System List possible?
« on: May 15, 2018, 10:02:37 AM »
Quick question.

I know you can add a game list with fe.add_listbox() but is there a way to add a system list?  Alternatively request the name of a previous system or next system with an offset value?   I'm trying to create a theme where you use up and down to swap between games and then left and right to swap between systems i.e. a dual list.

here's an example of what i'm trying to do:



So in the pic, it will show the 2 prev systems and the 2 next systems on screen.  Pressing right would shift "Saturn" to the center arrow cursor and the list will refresh with an updated 2 prev and 2 next systems.

5
Themes / Re: Capcom Diamondplate Horizontal Layout
« on: March 20, 2018, 06:54:35 PM »
Yeah just include it in your package or alternatively link the helper module and list it as a requirement.  It really doesn't matter either way because all the modules here are free to use for everyone and they are created in mind for helping people develop better themes.

6
General / Re: AutoHotkey with AttractMode
« on: March 08, 2018, 07:59:38 PM »
So uh, in my emulator config in AM I'm supposed to run the .ahk script, right?

No.  You simply load the ahk script separately before launching AM.  You can create a batch file to run the script and launch AM together if you wanted a one click solution.

7
General / Re: AutoHotkey with AttractMode
« on: March 08, 2018, 12:20:22 PM »
Code: [Select]
#SingleInstance force

Loop
{
    WinWait, ahk_exe Demul.exe
Sleep, 6000
Send {Alt down}{Enter down}
                Sleep 100
                Send {Alt up}{Enter up}
    WinWaitClose
}

Replace "Demul.exe" with your emulator of choice's exe.  Then replace "6000" with a value that is closer to the speed your emulator launches and has focus.

8
General / Re: Demul does not work with AM, or does it?!
« on: February 14, 2018, 01:54:50 AM »
I use

-run=naomi -rom=[name]

for Naomi roms

and

-run=dc -image="[rompath]\[name].gdi"

for DC isos

and

-run=awave -rom=[name]

for Atomiswave roms

Works perfectly on my end.

9
Themes / Re: Lollipop Chainsaw Theme Pack [v1] [Release] [16x9 only]
« on: February 14, 2018, 01:01:40 AM »
video link is not working

Sorry about that.  It's fixed now.

10
Themes / Lollipop Chainsaw Theme Pack [v1] [Release] [16x9 only]
« on: February 13, 2018, 12:26:27 PM »
[ Preview ]

YT Video





[Recommended Requirements]

Flyers/Boxart
Videosnaps
Romlist Metadata (see below for instructions)


[ FAQ / Instructions ]

To install system selector images:

Copy image files from "Lollipop Selector/menu-art/snap" to "AM/menu-art/snap".
Rename files as needed to match your systems.  To do this go to "AM/romlists" and use those naming schemes.
If you need custom system logos, then request me.

To setup horizontal navigation:

A) Recommended method: Set option to "Proper" under "Horizontal Navigation".  Go to AM Config->Controls-> and remap the "Left" to "Prev_Game" and "Right" to "Next_Game".  This allows you to control the theme with L/R for switching between games and U/D to switch between displays.  I usually map a home/display button to Triangle on a psx joypad and L1/R1 as Prev_Letter/Next_Letter.  Although you can customize how you want it.  Going this route is bug free.

B) Alt Method: Set option to "Buggy" under "Horizontal Navigation".  Make sure Prev_Game and Next_Game are not re-mapped from Method A.   Doing this method does not globally change the binds so that vertical themes cannot be used in conjunction.  However, it is extremely buggy.  See this thread for explanations.  This method is not recommended but I am leaving it in because it may be helpful for some.



To create Romlist Metadata:

When you generate a romlist in AM, under "Info Source/Scraper" select "thegamesdb.net".  This will generate a romlist with most fields filled out.  Works 90% of the time.  You can fill in the rest manually by going to your "AM/romlists" folder and manually filling out the txt files.  The categories that are pertinent to this theme are "Year", "Manufacturer", "Category", and "Players".  The Region is under "Title".

To properly display Region metadata:

I use the Redump naming scheme for my roms (outside of Mame).  They usually go like this:
Megaman (USA)
Rockman (Japan)
Rockman (Japan) (Translated En)

You can either name your sets in this scheme.  Or alternatively rename the "Title" category to this scheme in your system.txt in the "AM/romlists" folder.

Also for aesthetic purposes, you should Config->General->Hide Brackets in Game Title to "Yes".

To set or create custom icons for the Button Panel:

There are extra icons in "Lollipop Chainsaw Theme/images/panel" folder that you can set as custom buttons.  They are named "_unused".  Just rename them to their replacement names.  Example:  If you want to use Xbox A button instead of the Psx X button,  then rename "_unused_xbox_a.png" to "panel_select.png".   You can also change the color of the icon by modifying the layout.nut.  (Go to Button Panel->Button Panel Icons and change the RGB values there).  It's very easy to create your own but if you need me to create some more custom buttons, then request me.

Will there be a 4x3 version? and why not?

Unfortunately this theme is 16x9 only.  I personally don't think my themes are great for the smaller 4x3 aspect because when I design the theme, I'm trying to maximize the use of the open space.


[ Known Issues ]

-For the main theme (not the menu theme), the alternate Carrier list does not look or behave like I envisioned.  The Conveyor mod does however.  This is mostly because I am a noob at coding.  Check this thread for more info.

-Tagging Favorites do not work.  I've left it in the options if someone wants to analyze the code and see if they can fix it.  (I've tried but I cannot figure it out)


[ Download ]

Version.1


11
General / Re: Inverted controls?
« on: February 12, 2018, 02:16:47 PM »
Found an older thread that has the same problem I'm bringing up.  Unfortunately there's no real solution except the hybrid remap Prev/Next workaround which does not allow theme specific control. 

12
General / Re: Inverted controls?
« on: February 11, 2018, 10:13:44 PM »
keilmillerjr:

Well naturally, i'm trying to map up and down as well so they can be utilized as "prev_display/next_display" so it behaves like default settings on a vertical theme (i.e. right to go forward one game, and down to go forward one system).  But this breaks the config menu.  If you only want left and right, and not up and down, then I can see it working.  The only other issue is, if you go this route then you can't use a mix of both horizontal and vertical themes for different systems.  You'd have to stick to one type of layout so the buttons are universally the same across all systems.

It's really not that huge of a deal.  I just figured there would be a more ideal solution readily available but I guess it just doesn't exist.  I guess for the most part I'll stick to trying your method (and sticking to a single theme) because the working code I found is very buggy.

13
General / Re: Inverted controls?
« on: February 10, 2018, 05:30:29 PM »
Regarding BlackThief07's working code, there is one huge flaw in it.  When you cycle left or right per game with a single press, the videosnap changes properly with the selected game.  However, if you hold the left or right button and it spins over multiple games, then the moment you let go and it lands on the selected game, the videosnap is playing the one previous game from the selected one.

Here is a video demo of it happening: https://www.youtube.com/watch?v=H3KhbTAw2m8&feature=youtu.be

MegaMan6 and Metal Gear show up properly with single clicks.  But when you long scroll to Ninja Gaiden, the videosnap is of Punchout playing.  You can see in the video the same thing happens to River City Ransom, where Prince of Persia is instead playing after a long single scroll.  This is with Horizontal Scrolling enabled in the Display Options.  When you turn it off, then this problem disappears but then you can't scroll through the games with "left" or "right" anymore and instead must use the "up" and "down" keys.


I don’t know. I have no issues at all using LEFT and RIGHT for game navigation, so maybe I don’t understand.

Are you saying you can use the left and right keys in the theme and then hit tab and use the same left and right properly in the config menus?  Because I can't.  Unless there's a specific code implemented (like the Blackthief07's code) into the theme, every time I try to re-bind the left and right keys to prev_game and next_game, the default bindings for left and right gets overwritten/erased (like the picture I posted previously) so that the left and right do not work in the config menus.

What horizontal theme are you using?  Mind posting a snap of your button config file that works with that theme?

14
General / Re: Inverted controls?
« on: February 07, 2018, 03:17:59 PM »
Finally figured it out.

ArcadeBliss Info Overload Theme and setting Horizontal Navigation to On = Does not work
Newstation Theme and setting Horizontal Navigation to On = Does not work
ArcadeBliss and newstation custom mix and setting Horizontal navigation to ON = Does not work

ArcadeBliss and newstation custom mix mod by Blackthief07 (dubbed "AnimatedWheel") = WORKS

If you want to find AnimatedWheel by Blackthief07 it's in the Arcadebliss/Newstation Custom Thread, Reply#63.

15
Scripting / Re: Need coding help on Carrier module
« on: February 02, 2018, 09:52:46 PM »
Thanks for the good advice Jedione.  I just sent him a PM.

Pages: [1] 2 3 4