Author Topic: Creating subcategories with a password to lock access  (Read 165 times)

VPlay

  • Newbie
  • *
  • Posts: 2
    • View Profile
Creating subcategories with a password to lock access
« on: May 14, 2020, 10:39:36 AM »
Hi everyone.

Please forgive my lack of knowledge here.

I have been trying to figure out how to add a subcategory to my PC Games category so that I can have an 18+ section that cannot be entered without a pasword so I can lock my kids out of inappropriate games.

I want it so that I go into PC Games (or other systems) and have a "Kids" category with the likes of roblox, minecraft, fortnite etc then an "18+" category with all my gory (heads go pop, yummy drugs, and violence) games that can only be entered with a password.  I know I can launch lock the games individually with password through rocketlauncher but I want to go further and instead have password to enter the subcategory itself so the video snaps (etc) and game titles cannot be seen without it even though the display title (18+) is visible in the main category.

Is there anyone who knows how to do this?

I would be very grateful if someone can point me int he right direction as I think this kind iof feature (if not already available) would be of great benefit to those of us with kids/family who use our systems and will make attract mode even better I believe.

Many thanks in advance, as for all the past hard work and community contributions that have made this what it is today.

hermine.potter

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
Re: Creating subcategories with a password to lock access
« Reply #1 on: May 15, 2020, 03:14:25 AM »
Don't know a solution as desired.
Probably this might do it for you:

1) the pc game or the game launcher already contains an age restriction / parental control.
for example Steam contains a family option


2) create a filter in AM with games less 18 AND set the button for 'Next Display' to a combination of simultane buttons:

goto AM folder > romlists > choose the textfile of your emulator system > enter at the end of your 18 games 18 (this is the column for Rating)

start AM > press TAB key > Displays > choose your emulator system > Add filter > enter a name (like KIDS) > Add rule > Target : Rating > Comparison : does not equal > Filter Value 18

start AM > press TAB key > Controls > Next Filter > Remove Input

start AM > press TAB key > Controls > Previous Filter > Remove Input

start AM > press TAB key > Controls > Next Filter > Add Input > press for example three, four buttons simultane

set all your emulator systems to KIDS filters

every time you exit AM, AM saves last state (which filter was choosen last time). So you need this final step:
goto AM folder > right mouse button on file : attract.am > set write protection


3) create a filter in AM with games less 18 AND remove Input for Next Filter/Previous Filter AND use KONAMI Code Plugin for filters menu

goto AM folder > romlists > choose the textfile of your emulator system > enter at the end of your 18 games 18 (this is the column for Rating)

start AM > press TAB key > Displays > choose your emulator system > Add filter > enter a name (like KIDS) > Add rule > Target : Rating > Comparison : does not equal > Filter Value 18

start AM > press TAB key > Plug-Ins > KonamiCode > Enabled : Yes > Code Sequence : for example : up, up, up, down, down, up > Action : filters_menu > Up control : Up > Down control : Down

start AM > press TAB key > Controls > Next Filter > Remove Input

start AM > press TAB key > Controls > Previous Filter > Remove Input

if you press up, up, up, down, down, up you'll get a menu of filters

set all your emulator systems to KIDS filters

every time you exit AM, AM saves last state (which filter was choosen last time). So you need this final step:
goto AM folder > right mouse button on file : attract.am > set write protection

« Last Edit: May 15, 2020, 03:31:56 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualb

VPlay

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Creating subcategories with a password to lock access
« Reply #2 on: May 15, 2020, 08:55:15 AM »
Thank you hermine.potter for taking the time to help me with this and being so detailed, very much appreciated and freakin awesome.

I will have a crack at this later, thanks again.

hermine.potter

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
Re: Creating subcategories with a password to lock access
« Reply #3 on: May 18, 2020, 12:25:17 AM »
One Note:
attract.exe could import romlists and filters too.
Have a look at this:

-create a textfile with 18 rating (for example display1_KIDS.txt and display2_KIDS.txt).

-create the following batchfile (depending of your emulator/display names):
Code: [Select]
@echo off

cd "C:\attract\"
attract.exe --import-romlist C:\display1_KIDS.txt display1 --output display1 --import-romlist C:\display2_KIDS.txt display2 --output display2 --filter "Rating not_equals 18"

cd "C:\attract\"
START attract.exe

-create a second windows account for your kids

-create there a shortcut to this batch-file

if you start the batch file, AM import specific games and filter/remove all adult games
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualb

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1112
    • View Profile
Re: Creating subcategories with a password to lock access
« Reply #4 on: May 18, 2020, 03:43:10 AM »
It wouldn't be hard to write code to skip a certain display, and show it with a keypress. Wire one of your service buttons to your key encoder. Don't give keys to your kids.

Kids found the nude games on my megatouch last week. Had to use service button to disable then with osd menu. Can literally do same thing with attract.

hermine.potter

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
Re: Creating subcategories with a password to lock access
« Reply #5 on: May 20, 2020, 12:58:05 AM »
squirrel is not my language ^-^
could somebody code a password/pin plugin please?



I'm using autoit and have programmed a similar tool in my office, depending which USB stick is connected.

-You have to check the Device Instance Path in device manager.
For example my 8GB-USB-Stick has : USB\VID_058F&PID_6387\14121700024754

-modify your romlistfile with 18 rating and mark all adult games
for example my amiga-romlistfile : C:\attract\romlists\amiga.txt

-copy rename this romlist-file, so there exists two files.
for example for my amiga system : amiga.txt and amiga_COMPLETE.txt

-create this autoit script and compile it (depending to your paths):
Code: [Select]
; Original Script from here :
; https://www.autoitscript.com/forum/topic/155213-detect-usb-devices-connected/?tab=comments#comment-1121434
$vObjWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\cimv2")

$vObjItems = $vObjWMI.ExecQuery('SELECT * FROM Win32_USBHub')
If IsObj($vObjItems) Then
For $vObjItem In $vObjItems
if $vObjItem.DeviceID == "USB\VID_058F&PID_6387\14121700024754" Then
sleep(300)
ShellExecute('C:\attract\attract.exe', ' --import-romlist C:\attract\romlists\amiga_COMPLETE.txt amiga --output amiga -c "C:\attract')
sleep(300)
ShellExecute('C:\attract\attract.exe', '-c "C:\attract"')
Exit
Else

EndIf

Next
sleep(300)
ShellExecute('C:\attract\attract.exe', ' --import-romlist C:\attract\romlists\amiga_COMPLETE.txt amiga --output amiga --filter "Rating not_equals 18" -c "C:\attract')
sleep(300)
ShellExecute('C:\attract\attract.exe', '-c "C:\attract"')
EndIf

the autoit-script checks, if specific usb-device is connected:

if not connected : a romlistfile for display amiga is created - read from file amiga_COMPLETE.txt - all adults games (18) are removed - replace existing amiga.txt - attract.exe starts with all romfiles for kids

if connected : a romlistfile for display amiga is created - read from file amiga_COMPLETE.txt - not games are removed - replace existing amiga.txt - attract.exe starts with all romfiles
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualb