Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Script to automate the download of white-rabbit's Co-op Dwarfmode  (Read 8930 times)

flbr

  • Bay Watcher
    • View Profile

Updated to DFPlex v0.2.1

I've been working on a small script to automate white-rabbit's awesome plugin to allow multiplayer DF, and though I posted a link to my script in the comments I've been advised to consolidate the info for it.

Here's white-rabbit's post
And here is the download for my script (for windows 10, x64 bit)

To use it just drop it into the place where you want it to download df and run it, but make sure not to have
  • df_47_04_win.zip
  • dfhack-0.47.04-r1-Windows-64.zip
  • dfplex-v0.2-Windows64.zip
  • df\
  • dfplex-v0.2-Windows64\
in the same directory. (you also shouldn't have spaces in the names of the parent directories)

Run the script, and when it asks for your graphics and color choice just type in the name of the graphics/color you want.
Then you should be good to go!

Spoiler: Dependencies (click to show/hide)

« Last Edit: November 23, 2020, 10:45:40 pm by flbr »
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #1 on: April 28, 2020, 10:40:51 pm »

I probably should've mentioned earlier that the file deletion in your script didn't work for me. Empty folders from the dfterm expand-archive remained. Announcements.txt.txt didn't replace announcements.txt. Not sure if it was a permissions issue or what.

For Windows 7/8 users, you'll need to update Powershell to 5.1: https://www.microsoft.com/en-us/download/details.aspx?id=54616
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

flbr

  • Bay Watcher
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #2 on: April 30, 2020, 11:53:11 am »

The announcements problem should be fixed (just a typo on my part) and I'll continue to try and figure out that deleting problem
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

flbr

  • Bay Watcher
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #3 on: May 05, 2020, 05:29:18 pm »

Aw yeah, now you can select your desired graphics and color set in the command line  8)
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

white-rabbit

  • Bay Watcher
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #4 on: May 06, 2020, 01:30:56 pm »

Aw yeah, now you can select your desired graphics and color set in the command line  8)

ooooh, very cool.  8)
Logged

flabort

  • Bay Watcher
  • Still a demilich, despite the 4e and 5e nerfs
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #5 on: May 18, 2020, 08:17:27 pm »

New version of patch, ready to update script?
Logged
The Cyan Menace

Went away for a while, came back, went away for a while, and back for now.

flbr

  • Bay Watcher
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #6 on: May 23, 2020, 06:38:49 pm »

Updated! I keep getting a `Connection error`, but I'm not sure if that's just me, so let me know how it's working for you
« Last Edit: May 23, 2020, 06:56:36 pm by flbr »
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

troycall

  • Escaped Lunatic
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #7 on: May 27, 2020, 12:33:41 am »

I also get "connection error", I'm hosting on Windows 10 x64.

I used firefox and it worked for localhost/lan, I also used google chrome which worked for none of them, and I used edge which worked for lan/localhost
But over the internet it doesn't work, even though like I said I forwarded the ports, the page loads but it says "connecting" then just says retry.

After further investigation, it seems the windows build never "attaches" to the port 1234, even if you change that port to any other port, it never attaches to that specific port, by attach I mean it never "Listens" to that port.

Note that i port forwarded and everything correctly, and I double checked so it's not a firewall or port forward issue, the issue is for Windows, the application never attaches to the secondary port, which by default is 1234. the [STATICPORT] attaches correctly though, which is port 8000 by default.

Logged

troycall

  • Escaped Lunatic
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #8 on: May 28, 2020, 02:44:51 am »

fibr mind updating this to the latest DFPlex version? would be awesome if you can.
Logged

flbr

  • Bay Watcher
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #9 on: May 31, 2020, 08:34:25 pm »

Should be good to go!
« Last Edit: June 17, 2020, 11:52:03 pm by flbr »
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

Jmz2020

  • Escaped Lunatic
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #10 on: July 26, 2020, 01:34:29 am »

Thanks for the hard work - one small issue, you have a typo in the script on line 25:
PowerShell Expand-Archive -Force -Path "%CD%\dfplex-v0.2-Windows64.zip" -DestinationPath "%CD%"
should read
PowerShell Expand-Archive -Force -Path "%CD%\dfplex-v0.2.1-Windows64.zip" -DestinationPath "%CD%"

Keep up the good work
Logged

wooks

  • Bay Watcher
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #11 on: August 11, 2020, 01:48:53 pm »

The top file structure you place this into needs to not have spaces since the bat doesn't sanitize the file path for them.

It also doesn't display the colorFileNames correctly when it prompts for a color like it does with the tile set names. Pardon my ignorance, but I don't know what its asking me for exactly.
To future readers: you can just type "default" its referencing a file inside of the DFplex download dfplex-v###-###\hack\www\colors

Oddly, although the colors come through fine in the dwarf fortress instance, in the browser plugin they seem green-washed for some reason. Perhaps you could fix that by adjusting this color parameter.
« Last Edit: August 11, 2020, 05:26:03 pm by wooks »
Logged
In a game like Dwarf Fortress, going to the wiki being cheating is like saying bringing a parachute is cheating for skydiving.
"Has it been 4 days? Better check if my penis is still there again."

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #12 on: August 11, 2020, 06:29:10 pm »

To future readers: you can just type "default" its referencing a file inside of the DFplex download dfplex-v###-###\hack\www\colors

Oddly, although the colors come through fine in the dwarf fortress instance, in the browser plugin they seem green-washed for some reason. Perhaps you could fix that by adjusting this color parameter.

I think the vanilla DF colors are "curses", not "default".
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #13 on: August 13, 2020, 06:30:20 pm »

Reposting this here:
Create a text file containing the following, and save it as restart.bat in your DF directory:
Code: (restart.bat) [Select]
:restart
start /wait cmd /c "Dwarf Fortress.exe"
goto restart

Open restart.bat instead of Dwarf Fortress.exe on the server. This restarts DF any time it closes, until the restart.bat command prompt window is closed. I think you'll have to wait until the opening animation finishes, because IIRC trying to skip it via browser causes the game to freeze.

For automatically restarting the server if it crashes. I'll leave it to somebody else to post a Linux/Mac equivalent.

Maybe somebody could write a DFHack script that skips the opening animation and loads directly into the fort, to avoid people messing with stuff.
« Last Edit: August 13, 2020, 06:32:41 pm by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

pope34

  • Escaped Lunatic
    • View Profile
Re: Script to automate the download of white-rabbit's Co-op Dwarfmode
« Reply #14 on: March 01, 2021, 01:09:28 pm »

Yo reworked your code to not have dependencies anymore, you can put quotations around things to allow folders to have spaces as well. Removed those textures and color thingys, they seemed to cause light stability issues. Only works in windows 10 cause it utilizes the tar command.
https://drive.google.com/file/d/1zaP4Uu6sopx3N7ZgkPK8UghHBDT269X9/view?usp=sharing
Logged