Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

As there is no fix in sight I wrote a script which will do the download, organize the pictures and so on. Problem is, that it won´t load the pictures in the background. It has to download all before starting the game. The script will ask for your waifu name, then download the files, then start the game and this will ask for your waifu name again. Just type the same name and it should work. Hopefully.

If you want to use it just copy the text from https://pastebin.com/Dt4yZmzy into a .ps1 file (e.g. start.ps1). Now place this file in the root of the game where waifu_solitair.exe is located. Run the script by either double clicking or right clicking and pressing run (I have no idea anymore what the default is) and enjoy. 

It can take a while, but at least it works.


PS: @cwdogflip This game is really a very neat idea. Good job :)

PPS: If you want to use other sites/tags you can do that by changing the links in the script. Tags should be easy as just $main_url_base has to be changed, but for sites you have to figure out the regexes and so on for yourself ^^

For example if you not only want explicit images just remove '+rating%3aexplicit' from the $main_url_base.

(+1)

I would just like to add that in order for gelbooru to work u will need to add the tags together with the name.

e.g: morgana_(league_of_legends)

Thanks for mentioning the issue.

Should be fixed here: https://pastebin.com/47HvJPkF

Thanks for trying but your script plainly doesn't work. it throws off a red error too fast then dies. After a zillion tries i could screenshot it, it said that "execution of scripts is disabled in this system." and even though i try a few things on google, nothing worked.

Also i can't find the command to run this file straight through powershell since the shortcut way likes to die before i can humanly read the message.

(1 edit)

That is because the execution policy on your system is set to restricted. I forgot that this is the default, sorry about that. Also the script needs an update, because gelbooru changed their auto complete url.


Execution Policy:

If you want to run it and don't want to change the system settings to allow all scripts to be run (which I would not advise if you do not need it), then create a .bat file (e.g. start.bat) in the folder with the start.ps1 script.

Open it with any plain editor like good old notepad and paste this script:

powershell -executionpolicy RemoteSigned -File "start.ps1"

Which will set the execution policy for this one instance of powershell and make the script runnable.


Update:

Here is the updated version of the script to accept the auto completes in a JSON format.

https://pastebin.com/vmzTytxA

(1 edit)

Well, thank you for replying, now we're getting somewhere but not quite there.

I followed your instructions, with your most up to date script and i got this error:


The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, 
function, script file, or operable program. 
Check the spelling of the name, or if a path was included, 
verify that the path is correct and try again.
At C:\waifu_solitaire v2.0.0\waifu_solitaire\v2.0.0\start.ps1:83 char:37
+             $img = Invoke-WebRequest <<<<  $Matches[1] -OutFile $out_path
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I did some digging and turns out the Invoke-Webrequest was removed from Powershell 5. 

This guy seemingly have recreated the function itself, but when i tried to implement it a quick red message would appear and crash the cmd, can't debug, too fast. Maybe you have better tools:

https://github.com/cloudbase/unattended-setup-scripts/blob/master/FastWebRequest...

No, Invoke-WebRequest is present in version 5 (I am running 5.1 and it is still there). I found a post where it is explained, that the alias wget is deprecated in 5.1, but the original function is still there.

The only time where Invoke-WebRequest would not be present for you would be if you ran version 2 or lower. This is only the case on Windows 7. You can check this if you run a powershell window (Just type powershell into your windows search or press the Windows Key + R, type powershell and run it).

There type the command:

$PSVersionTable.PSVersion

If this shows for the Major column a version lower than 3 you are running on an old version and a solution for you would be to update your version here then it should run. 

As much as I want to fix this game I really don't want to find workarounds for web requests and Json parsing in version 2.0. I did this at one point for other stuff and it is a pain in the arse :P . (Also the version 2 on my system is somehow busted and I would either need to reinstall windows, setup a windows 7 VM or something similar just to test stuff.)

(+1)

Ah. I forgot to mention. I RUN Windows 7.  I don't like Win 10 since it uses way more of my Ram

I take it that this is a limitation of my own S.O., right?

Welp. Thank you for trying so hard in that case. We got so close tho.

Windows 7 just does not ship initially with the latest powershell but with the link here, you can download the installation for the newer powershell. This is the link for the installation to powershell 5.1 for Windows 7.

You don't have to update your OS just for that :)

I apologise as I do not wish to bother you any further however I've followed your steps on windows 10 and tried to run it but end up with this error and I really love this game

Invoke-WebRequest : The remote name could not be resolved: 'https'  At D:\;)\waifu_solitaire\v2.0.0\start1.ps1:82 char:25  +             $response = Invoke-WebRequest $url  +                         ~~~~~~~~~~~~~~~~~~~~~~          + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException          + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand   Invoke-WebRequest : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At D:\;)\waifu_solitaire\v2.0.0\start1.ps1:88 char:38  +             $img = Invoke-WebRequest $Matches[1] -OutFile $out_path  +                                      ~~~~~~~~~~~          + CategoryInfo          : InvalidData: (:) [Invoke-WebRequest], ParameterBindingValidationException          + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeWebRequestCommand 

Im not proficient in powershell script however I believe this line 

($response.Content | Select-String -Pattern 'js-pop" id="p.\d*" href="(.*?)"' -AllMatches) 

Is returning null

It's hard work when you're flying blind.   Nice effort thinking ahead to guess where user might have the problem.    Many don't.  Kudos.