Jump to content
RealModScene
kira125

Co-Op And Multiplayer Filters

Recommended Posts

Hello again here is my 2 additional filters for Aurora
before anything i want to tanks
swizzy because he give me the main script i just add the TID and the name xP
bot of them are basic scripts who add games by is TID

there are alot of games but
there are missing games because i didnt play all xboxs games (but they can be added)

Script One
 
Co-Op: shows only Co-Op campaign games includes xbox 360 xbox classc arcades kinect and indies
(all game can be played betewen 2 or 4 players in the same xbox in campaign mode)
this will not show for example fighting games
 
Script Two

Multiplayer: Shows all game can be played betewen 2 or 4 players in the same xbox
includes xbox 360 xbox classc arcades kinect and indies
 

To make them work you need to place them in aurora/media/scrpts/UserFilters
you can use your pc or aurora filemanager (if you use the last one you need to restar aurora to make the filters appear)
 

 

i thinks thats all here is the link for the filtrers


https://mega.co.nz/#!8ZclFYYb!fm81toFLXVmsZiVLQg5uMyzoIWbu-F8Mm1yN1HOgFog


If you want to add a TID to the list just reply the Game, TID and if its for co-op list or multiplayer list

 
also i do find this in swizzys topic and try it but there was alot of missing games like borderlands 2 zombie apocalypse and others thats why i made the topic and the filtrers


GameListFilterCategories.User["Only Local Co-Op Games"] = function(Content)
minco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0x00FF0000), 16)
maxco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0xFF000000), 24)
return ((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2))
end

  • Like 2

Share this post


Link to post
Share on other sites

The only reason my script would fail is if the gameinformation cannot be downloaded from xbox.com for some reason or it hasn't been parsed out correctly...

Share this post


Link to post
Share on other sites

Link is dead. Can you fix it please?

https://github.com/Swizzy/AuroraScripts/blob/master/Media/Scripts/UserFilters/OnlyLocalCoop.lua

This is the script it originated from, to make it check for specific TitleID's all you have to do is change line 4 to:

return (((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2)) or Content.TitleID == 0xTitleID)

Where you replace "0xTitleID" with the TitleID as displayed by Aurora (NOTE: it must begin with "0x"!)

Share this post


Link to post
Share on other sites

Hi kira125.

 

Is it possible you could share your 'Script one' again please?

 

Swizzy I understand this script originates from yours, so thank you. I'm currently using yours, but as it appears it shows ALL multiplayer games, it would be great to get another script to filter for just co-op campaign games as kira125 made here (now AOL).

Share this post


Link to post
Share on other sites

kira125 is missing in action again. Calling kira125, come in please :)

 

Swizzy I'm trying to amend your script myself to add missing games, but not having much joy. Here is my amended line 4....

 

return ((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2)) or Content.TitleID == 0x584109D2)

 

I've clearly gone wrong because the script disappears from Aurora's user scripts menu. I can confirm it still has correct extention of '.lua'. Can you spot the mistake please? Also can I use the 'or' command continuously so as to add many more games?  I basically want to create several different filters that will filter for 'local co-op' and 'local multiplayer' etc. Would the above script edited to include various TitleID's be the most suitable script, or would the following script be better suited please...

 

http://www.realmodscene.com/index.php?/topic/5309-i-need-new-user-script-to-aggregate-the-title-ids-you-want/

 

Ideally we will hear back from kira125 as I have no experience with script and it's sounds like he's already made two great scripts, but failing that I will give it a shot.

 

@ kira125, if you do wish to share scripts again, it would be a great if you could post under 'spoiler' tag (as you did above with Swizzy's original script), as then they would be continuously available for all. This would avoid possibility of download links being lost again. Either way it would be great if you could share again, because as proven above I am a numbtie when it comes to scripting, so if left to me, I could end up taking my eye out! 

 

Thank you

  • Like 1

Share this post


Link to post
Share on other sites

kira125 is missing in action again. Calling kira125, come in please :)

 

Swizzy I'm trying to amend your script myself to add missing games, but not having much joy. Here is my amended line 4....

 

 

I've clearly gone wrong because the script disappears from Aurora's user scripts menu. I can confirm it still has correct extention of '.lua'. Can you spot the mistake please? Also can I use the 'or' command continuously so as to add many more games?  I basically want to create several different filters that will filter for 'local co-op' and 'local multiplayer' etc. Would the above script edited to include various TitleID's be the most suitable script, or would the following script be better suited please...

Count the number of ( vs. ) ;) a quick look suggests there's a missing ( at the start

Share this post


Link to post
Share on other sites

Thanks man, I'll give this a go. With regards to adding more TItleID's, as above would this be the best script, or would the other one you posted be more suitable please? If I were to use this script, can I simply keep adding "or Content.TitleID == 0xTitleID)" for each game, or is there a shorter method, like for example...

 

or Content.TitleID == 0xTitleID, 0xTitleID, 0xTitleID, 0xTitleID)

Share this post


Link to post
Share on other sites

if ((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2)) then

return true

end

return (Content.TitleID == 0x584109D2 or Content.TitleID == 0x584109D3 or Content.TitleID == 0x584109D4 or Content.TitleID == 0x584109D5)

etc.

Share this post


Link to post
Share on other sites

Thanks Swizzy but still unable to get any script working to show extra games I've  added. Can you take a look please and see where I'm going wrong?

 

Script attempt 1...

 

GameListFilterCategories.User["Only Local Co-Op Games"] = function(Content)
minco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0x00FF0000), 16)
maxco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0xFF000000), 24)
return (((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2)) or Content.TitleID == 0x584109D2)
end

 

Script attempt 2...

 

GameListFilterCategories.User["Only Local Co-Op Games1"] = function(Content)
minco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0x00FF0000), 16)
maxco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0xFF000000), 24)
if ((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2)) then
return true
end
return (Content.TitleID == 0x584109D2 or Content.TitleID == 0x41560901 or Content.TitleID == 0x4541084C or Content.TitleID == 0x454108D8)
end
 
 
I'm also curious what "minco" and "maxco" refers too please?
 
Thank you

Share this post


Link to post
Share on other sites

Thanks Swizzy but still unable to get any script working to show extra games I've  added. Can you take a look please and see where I'm going wrong?

I'm also curious what "minco" and "maxco" refers too please?

 

Thank you

minco and maxco are Minimum Co-Op and Maximum Co-Op the amount of players supported for local co-op

run this once:

 

GameListFilterCategories.User["Only Local Co-Op Games1"] = function(Content)
	minco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0x00FF0000), 16)
	maxco = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0xFF000000), 24)
	if ((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2)) then
		return true
	end
	print(string.format("0x%X", Content.TitleID))
	return (Content.TitleID == 0x584109D2 or Content.TitleID == 0x41560901 or Content.TitleID == 0x4541084C or Content.TitleID == 0x454108D8)
end
Then check the log, you should see a large number of entries with "0x...." in the log output, if you have trouble understanding the log, pastebin it and i'll check for you

Share this post


Link to post
Share on other sites

Thank you, but the problem is not with your original script, that is working just fine and is returning games, but not all co-op games within my library. As such I'm trying to add those missing games/title ID's manually, but this is where the problem start, as the games/title id's I've added to the script are not being returned.

 

Games/title ID's I've added in this example...

 
0x584109D2
0x41560901
0x4541084C
0x454108D8
 
 
All of which are added to the extra part of the script...
return (Content.TitleID == 0x584109D2 or Content.TitleID == 0x41560901 or Content.TitleID == 0x4541084C or Content.TitleID == 0x454108D8)
end
 
 
Those four games however are not being returned, ie are not displayed when script is run, so appears there is something wrong with this part of the script perhaps?
 
 
I tested your amended script as above, but no games are returned using this, and log just reported same error over and over...
{ "time" : "18:27:05.951", "thread" : "0xF9000048", "type" : "warning", "filter" : "ContentScripts", "message" : "Filter Failed to Execute:  game:\\Media\\Scripts\\UserFilters\\Test1.lua:7: bad argument #2 to 'format' (number expected, got nil)" }
 
I fear things are becoming more complicated than they need to, no doubt my fault as I'm not the best at trying to explain. Basically while the original script does return some co-op games, it doesn't return all co-op games. I understand this is not fault of script, as it can only return games if number of player data is exists. As such I'm trying to return missing games by manually adding their title id's to the original script, but those manually added games are not being returned. I know nothing of scripting, but I'm sure what I'm trying to do is very basic for any one who knows script, so if anyone can see error, correct error and supply working script, that would be very much appreciated. I say anyone, because I'm sure Swizzy must need a break once in a while from dealing with such noobs like your's truly :)
 
Alternatively perhaps I can amend the database using SQliteBrowser, if indeed the database includes 'number of players' which the scrips 'minco' and 'maxco' picks up on? I THINK the number of players is presented under the heading 'GameCapsOffline'. I would assume if the offline number of players were say '2 players' the entry would therefore be '2', however, entries here are either '0', or long string of numbers ranging from 8-14 digits, so I have no idea. If number of players is not par of the database, where exactly is this data please? If I can find that and amend/added number of player data, then perhaps the script will work without the need to added individual title ID's.

Share this post


Link to post
Share on other sites

Ok, based on that, the problem is quite simple, it's supposed to be "TitleId", not "TitleID" (lower case D at the end)

Share this post


Link to post
Share on other sites

Sweet Moses! That fixed it! Thanks Swizzy! :thumbup:

 

That takes care of co-op script, so now I'd like create second script to return 'multiplayer' please. Is it just a case of replacing 'minco' & 'maxco' part of the script? If so do you know the script references for minimum player and maximum player please?

Share this post


Link to post
Share on other sites

Sweet Moses! That fixed it! Thanks Swizzy! :thumbup:

 

That takes care of co-op script, so now I'd like create second script to return 'multiplayer' please. Is it just a case of replacing 'minco' & 'maxco' part of the script? If so do you know the script references for minimum player and maximum player please?

There are several flags you need to check, there's online, offline, co-op etc. etc. they're all tested in these 2 scripts:

https://github.com/Swizzy/AuroraScripts/blob/master/Media/Scripts/UserSubtitles/CapabilitiesOffline.lua

https://github.com/Swizzy/AuroraScripts/blob/master/Media/Scripts/UserSubtitles/CapabilitiesOnline.lua

Share this post


Link to post
Share on other sites

Thank you. With regards to the co-op script, is there a command I can use to omit certain titleid please?

if (Content.TitleId == 0x<TitleID>) then

return false

end

The way the filters work is that you return true (show) or false (hide)...

The way if statements work is, if the expression evaluates to true, it'll do whatever you tell it to do within that "block", so "then .... end" is what gets run when the expression between "if" and "then" evaluates to true, having "return false" will make it return that value and stop running the script :)

Share this post


Link to post
Share on other sites

.....I'm back! :)

 

Ok so trying to sort script to show local multiplayer, but so far no luck. Script won't show up within Aurora so I've gone wrong somewhere, but where?

 

Script attempt 1

GameListFilterCategories.User["Multiplayer"] = function(Content)
minimum = bit32.band(Content.CapabilitiesOffline.LowPart, 0x000000FF)
maximum = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0x0000FF00), 8)
if ((minimum > 1 or minimum == 1) and (maximum > 2 or maximum == 2)) then
return true
end
 
Script attempt 2 - This is just a straight copy of link you sent me. No idea what needs to be changes (if anything)? I tried replacing the %i-%i with numbers to represent min/max players, but that didn't work.

GameListSubtitles["OfflinePlayers"] = function(Content)
minimum = bit32.band(Content.CapabilitiesOffline.LowPart, 0x000000FF)
maximum = bit32.rshift(bit32.band(Content.CapabilitiesOffline.LowPart, 0x0000FF00), 8)
return string.format("Offline Players: %i-%i", minimum, maximum)
end
 
Also with regards to the co-op script (and guess this one too), if I want to increase max players, so for example I want script to return all co-op games 1-4, which number do I need to change please? I changed to...
 
if ((minco > 1 or minco == 1) and (maxco > 4 or maxco == 4)) then
 
....yet somehow the number of games returned decreased? Shouldn't that return all games with co-op 1-4 players? What's the difference between "maxco >" and "maxco =="?
 
Help me oh wise one!

Share this post


Link to post
Share on other sites

Attempt 1 misses one "end" you have to tell it where the function ends aswell, not just the if ;)

Attempt 2 is a Subtitle, it's used in the Details menu and shows information only...

You're limiting it to only showing games with a maximum of 4 or more players by changing it to 4... not the other way around...

maxco > 4 means: maxco <--- variable > <--- greater than 4 <--- 4: true if maxco have a value greater then 4

maxco == 4 means: maxco <--- variable == <--- equals <--- 4 <--- 4: true if maxco is exactly 4

<--- above is to point out what the explanation that follows is for...

Share this post


Link to post
Share on other sites

Ah yeah missing the 'end' thank you.

 

Right sooo with regards to trying to get script to return ALL local co-op games, so that it returns all 2, 3 or 4 player local co-op games,  I should just leave minco and maxco as you originally intended correct?

 

((minco > 1 or minco == 1) and (maxco > 2 or maxco == 2))

 

I original interpreted that as 'return if minimum player is 1 and maximum player is 2', but if I've understood your above explanation correctly, what it actually instructs is to 'return if minimum player is 1 or greater, and maximum player is 2 or greater'. Is this correct?

Share this post


Link to post
Share on other sites

Ah yeah missing the 'end' thank you.

 

Right sooo with regards to trying to get script to return ALL local co-op games, so that it returns all 2, 3 or 4 player local co-op games,  I should just leave minco and maxco as you originally intended correct?

 

 

I original interpreted that as 'return if minimum player is 1 and maximum player is 2', but if I've understood your above explanation correctly, what it actually instructs is to 'return if minimum player is 1 or greater, and maximum player is 2 or greater'. Is this correct?

Yep, exactly :)

The script depends on what can be gathered from xbox.com tho, so if the information isn't available there, or for whatever reason isn't matching it won't work right... (Aurora downloads and parse that information to the Database)

Share this post


Link to post
Share on other sites

All starting to make sense, thanks for your patience.

 

Yeah I know the script is only as good as the info from Xbox.com, and that's the whole reason why I've been amending it so as I can add all the missing games (there was a lot missing).

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...