GithubHelp home page GithubHelp logo

shupershuff / diablo2rloader Goto Github PK

View Code? Open in Web Editor NEW
48.0 5.0 8.0 758 KB

Diablo 2: Resurrected launcher for multi-boxing

License: MIT License

PowerShell 97.96% Visual Basic 6.0 2.04%
d2r diablo2resurrected multiboxing d2loader multilauncher d2r-multi-launcher d2r-start diablo diabloii d2r-multibox

diablo2rloader's People

Contributors

never147 avatar shupershuff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

diablo2rloader's Issues

Ability to have accounts launch from separate game install paths

Include the ability to have a particular account open a custom game path install.
This caters for users who want to have separate installs so that game settings are persistent for each account.

Furthermore, investigate whether this can be done in a way that doesn't require duplication of installs to save disk space (eg via symbolic links)

As suggested by never148

stopped working

smth's wrong in $arguments, can't debug.
accounts.csv string looks like this:

1,[email protected],Main,,,pwd!,,-enablerespec -txt -mod mod

the game is being launched and renamed but somehow 'connecting to battlenet' screen is being skipped and i'm being thrown on offline characters tab. switching to online tab results in 'cannot connect to server' dialog.
same options given via shortcut work like a charm:

gamepath\D2R.exe -username [email protected] -password pwd! -address eu.actual.battle.net -enablerespec -txt -mod mod

tested with or without password encryption and timetracking - no difference

Issue with Time Played displaying incorrectly

In some regions (eg German) the display shows incorrectly due to time/date formatting localization settings on Windows.

IE hours and minutes are grouped together as HHMM:00
image

Instead of HH:MM
image

Feedback on TZ info

I saw this new feature so thought I'd give it a go. It throws some errors for me.

Alternatively choose 'r' to refresh, 't' for TZ info or 'x' to quit.: t

 Finding TZ Update Posts....
You cannot call a method on a null-valued expression.
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:426 char:2
+     $TDs = $geturl.ParsedHtml.body.getElementsByTagName("td") | Selec ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Cannot index into a null array.
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:429 char:2
+     $latestpostID = ($AllPostIDs | Sort-Object -Descending)[0]
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:430 char:2
+     $previouspostID = ($AllPostIDs | Sort-Object -Descending)[1]
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

 Finding Current TZ Name...
Invoke-WebRequest : <script type="text/javascript">location.replace("/derror
/deleted/diablo2resurrected/minor");</script>
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:435 char:12
+     $geturl = Invoke-WebRequest $url
+               ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:
   HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.Power
   Shell.Commands.InvokeWebRequestCommand
You cannot call a method on a null-valued expression.
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:436 char:2
+     $divs = $geturl.ParsedHtml.body.getElementsByTagName('div') | Sel ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

 Finding Next TZ Name...
Invoke-WebRequest : <script type="text/javascript">location.replace("/derror
/deleted/diablo2resurrected/minor");</script>
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:445 char:10
+     $geturl=Invoke-WebRequest $url
+             ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:
   HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.Power
   Shell.Commands.InvokeWebRequestCommand
You cannot call a method on a null-valued expression.
At D:\Users\m\Desktop\Diablo2RLoader\D2Loader.ps1:446 char:2
+     $divs =$geturl.ParsedHtml.body.getElementsByTagName('div') | Sele ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

 Translating Korean to English...

 Current TZ is:
 Next TZ is:

 Accurate as of: 6:52 AM

Press Enter to continue...:

Worked the first time when loading one character

Hi there,

Thanks for the work. When first setting it up and launching it, I just went in with my #1 acc. It worked. I then tried tabbing to the loader to open #2. That one "timed-out" when connecting to battlenet sending me to the offline screen. The issue isn't the one of "wrong credentials" because now my #1 does the same (the one I already got in-game with on its own).

Tried launching it through the bnet client, it asked for a capcha and ten the regular way worked.

The loader-way, even with 1 or 2 acc's, doesn't. Is this just a matter of temp ban/cool-off period for logging in without the client?

Function to kill open handles

I would like to just have a plain function call like 'k'
which kills all open handles
I have one account I have to sign in manually due to 2fa
and afterwards I want to start the other account
when I start manually and then start 1 in the script
, it will not kill all open handles before launching 1

Format Exception in Line 199

Hello,

the if clause in line 199 throws an exception which might have something to do with locales. I am using Windows 11 with german system locale. Script continues just fine, but the auto update column in stats does not get updated in the stats.csv due to the exception.

It says something like "the string is not a valid datetime"

exception

To reproduce I did this:

exception2

Cheers!

Not an issue but to say thank you!

Hey, @shupershuff

THIS IS NOT AN ISSUE, JUST TO SHOW GRATITUDE!

Thanks for this amazing repo that you've made, amazing quality code, comments for modifying it and overall performance.

Wish you all the best, cheers!

Provide instructions on setting execution policy

When the script is ran for the first time on my machine I get an error

PS D:\Users\m\Desktop\Diablo2RLoader\Diablo2RLoader-main> .\D2Loader.ps1
.\D2Loader.ps1 : File D:\Users\m\Desktop\Diablo2RLoader\Diablo2RLoader-main\D2Loader.ps1 cannot be loaded because
running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\D2Loader.ps1
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

I can set the permission like so, but it seems like a potential risk.

PS D:\Users\m\Desktop\Diablo2RLoader\Diablo2RLoader-main> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

Following this, there is a message

PS D:\Users\m\Desktop\Diablo2RLoader\Diablo2RLoader-main> .\D2Loader.ps1

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run D:\Users\m\Desktop\Diablo2RLoader\Diablo2RLoader-main\D2Loader.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"):

Perhaps the README.md should contain advice on how to configure this? Possibly with a safe config or a warning

One of the game windows close after switching back and forth between window

I followed setup procedure as follows:

  1. Before trying this script I followed the simple process explorer routine, without success.
  2. While trying to debug the issue:
  • I went through the readme and went through all the configurations in the xml and csv files.
  • I run the script from an administrator VS code.
  • I enabled multiple instances on battle net.

The script continues to run and I can reopen the closed account. The error doesn't usually occur on the first switching of windows, it's usually when I try to bring the characters to the same place or interact. I didn't find any log files or uncaught exceptions.

Basically, I just want to give my HC sorc some BO. :P

Let me know if I can provide you with anymore details.

image

Issue with Region display

With the introduction of the revised window naming, this has broken the main menu screen from showing the correct region per account. This means if you're across multiple regions, the menu will just show the same region across all accounts.

Error when opening loader

This doesn't appear to affect the usability of the loader (for me) but I thought I'd log a report so you can assess. See attached image and video for error. It happens before the refresh to get into the menu.

Screenshot 2023-08-28 180135

Recording.2023-08-28.180547.mp4

Refresh default action

Feature request! Possibly simple one. Could you please make refresh the default action in the main prompt? So select 1-N for account id, t for tz, x for exit, enter to refresh.

For extra points perhaps refresh every minute? ๐Ÿ˜ฌ๐Ÿค”

Thanks!

Issue with windows 11?

Hello,

I use the script on my main rig with windows 10 and on a notebook with windows 11.
On the main rig it works just fine. on the notebook with windows 11 it starts the first instance but trying to open the second one results in the script just tabbing into the first one and doing nothing.

I think it used to work under windows 11 before but i tried back to version 1.8.1 with no success.

You got any idea?

BR

Discord push to talk seems to get captured by window

I think this is due to the D2R instance running in admin mode? Starting discord in admin mode doesn't seem to fix. I think starting D2r in non-admin would fix but have not tested.

I have tested launching regularly through launcher does fix it.

I believe the actual launched instances of d2r don't need to be admin? Just the script itself. I assume they are inheriting admin mode from the script...

failing switching to account settings

  1. 3 accounts, id-name: 1-master, 2-slave, 3-slave2
  2. place 4 settings.json to ANYMOD game directory: settings.json, settings1.json (resolution scale 100), settings2.json (resolution scale 50), settings3.json (resolution scale 50)
  3. additional game launch attributes:
    $arguments = (" -username " + $script:acct + " -password " + $script:PW +" -address " + $Script:Region + " -mod ANYMOD -txt -enablerespec ").tostring()
  4. enable setting choice option in script cfg.
  5. run script. i'm selecting acc 1 (master), getting prompt that setting file is being used from acc 3 (slave2), while actual settings are from last closed game (for ex. resolution scale set to 100).
  6. run script. i'm selecting acc 2 (slave), getting prompt that setting file is being used from acc 3 (slave2), while actual settings are from last closed game (for ex. resolution scale set to 100)
    image

great job with TZ tracker

especially with parcing shitty site's pages.
but why don't use API instead?
check it out:
https://d2runewizard.com/integration

{"terrorZone":{"zone":"Blood Moor and Den of Evil","act":"act1","lastReportedBy":{"displayName":"Hazel-rah","uid":"811795758"},"lastUpdate":{"seconds":1685112700,"nanoseconds":58000000},"reportedZones":{"Blood Moor and Den of Evil":9},"highestProbabilityZone":{"zone":"Blood Moor and Den of Evil","act":"act1","amount":9,"probability":1}},"providedBy":"https://d2runewizard.com/terror-zone-tracker"}

Profiles for my profiles

So I really like the different settings option! What might be really cool is if I could choose which settings profile to use when opening an account. So, I have 3 accounts, 3 separate settings files, but I only have 2 different types of settings. 1 for full screen detailed graphics and 1 for windowed low graphics. Sometimes I switch which account is the one using the high graphics and the others use the low. It would be cool if I could choose that in the loader. So perhaps another field in the account file with the default settings profile number and a question when loading, similar to the realm one, for selecting the profile at load. I guess you could have an option in the defaults to turn this question off if you don't use the feature.

Thanks!

Is there a set way to open a windowed account on a specific spot?

For instance, I run a dual monitor setup. I play HC. So having my BO barb up in a windowed mode on the 2nd monitor is how I do my sheeez.

Can it be automated to launch there? Maybe by pixel, so you can place it yourself?

I'm sorry if there's a better place for suggestions.

Move Config options to a separate config file

Move config options to a separate config file to allow the script to be overwritten (with new releases) without disrupting end users configs each time.

As suggested by never148.

Feature Idea, Voice Alarms for DClone

So I just discovered that PowerShell can talk to you:
$voice = New-Object -ComObject Sapi.spvoice
$voice.rate = 0
$Region = "NA"
$voice.speak("d clone inbound on $region")

Might look into adding this as an optional, configurable feature for S5 Ladder.

Feature request for custom CMD line per account

Received a request via DM to add capability for custom CMD lines per account for folks who want to use NoHD mod on some accounts but not the primary. Custom CMD lines to be moved to accounts.csv instead of the single entry in config.xml

Issues with the Asia server

Hi, first of all - great script. Helps so much with multiple instances.

The problem:
Connecting to the Asia server doesn't work. After the game starts, it tries to connect to battle.net and it says "cannot connect to server". If run from the official Battle.net app it works fine. Some people on various Discord groups mentioned that other similar scripts don't work either so it's likely something on Blizzard's end. Not sure if anything can be done from the script itself but reporting just in case.

Cant verify your account error

Hello I've set up the launcher and it works fine. But when I add a 4th account it always puts me the msg cant verify your account with that information I double checked if I typed everything correct but even after double checking I cant find the issue.

Tune up ingame settings.json a little bit.

Line 2614 doesn't work properly while using mods in cfg file:
$SettingsProfilePath = ("C:\Users\" + $Env:UserName + "\Saved Games\Diablo II Resurrected\")
This leads to default game path, while given mod directory is stored in accounts.csv
So default settings.json file will always be used and other accounts settings files will always be owerwritten.

Tried to fix it myself but no idea how to parse CustomLaunchArguments from accounts.csv.

Issue switching to any realm besides NA

Using parameters, every time i try to log on to EU or AS, it will say this account is locked due to suspicious activity. I have to go and get security code for email. I dont have MFA on any of these accounts. Have no issues running them on NA server. Did I miss something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.