Jump to content

DayZ Steam Workshop Scripts


fjamieson

Recommended Posts

These scripts are based off of the example scripts on the TCAdmin Wiki page (https://help.tcadmin.com/Workshop_Browser) for Arma 3.

 

With a little help from Luis (Thanks a bunch), I have made the following scripts for DayZ.

 

DayZ_WS_Install.txt - for the post install operations

DayZ_WS_Uninstall.txt for the post uninstall operations.

 

I have added comments to explain some of my logic... Also added some additional checking which, honestly should not be needed, but users will be users and can get 'delete' happy when things don't work!!

 

There is still one thing I need to finish (may be someone where can help): :-)

On the Uninstall script: currently I do not delete the .bikey file because there is a chance the user has installed several mods written by the same developer and they all use the same .bikey file name. So, I need to figure out a way to parse the @<mod folder>/keys folders after the Uninstall' and verify that all the .bikey files for the remaining mods are in place (copy missing file if necessary).

 

If there are any suggestion to improve the efficiency of the code, please let me know.. I am finally getting back into 'programming' after a 20 year absence from it.

 

Hope you find them useful

 

 

PS: Also have Ark and Conan Exiles scripts. The Ark script is only a GameUserSttings.ini file update. Will post if anyone is interested.

DayZ_WS_Install.txt

DayZ_WS_Uninstall.txt

Link to comment
Share on other sites

  • 4 months later...

Hi Fjamieson

 

thanks for these scripts but I cant get them to work, they download, but they dont move the files or create anything in the commandline, I suspect it has something to do with the Variables

 

# Setup variables

servertag="Server"

mods=""

 

So, I create them but not sure exactly what is needed, do I create a variable called mods with default value "" and do I tick anything under advance? Like Script paramater ?

 

Same with commandline do just put a -mod in command line or should I be adding -mod=![something]

 

Thanks for the script otherwise

Link to comment
Share on other sites

I have updated the scripts. Will post updated ones soon

Have separate scripts to handle mods tagged as 'mod' and 'server' , so that they update to the appropriate commandline options. problem being some mod authors/dev tag their mods incorrectly in the Steam Workshop. Mods that go client and server should be tagged as "Mod" and server ONLY as 'Server, but they are tagging the client/server mods as 'Mod,Server' which complicates things.

 

Also, have a separate script that sets the variables on Install/Reinstall. They are not initialized by default.. learned this the hard way.

 

Will also update the 'in-script' comments/documentation.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks I even ended up using them for Arma, they are great, just one question is there anyway it could be modified that it adds any new mod it installs to the BACK of the commandline list? Right now if you install a mod it adds the new @MOD to the front of the line, so each and everytime a mod is added you need to edit the commandline manually cause iwth DAYZ most mods require a mod called CF and online community and it has to be first, so yes after you install a new mod, you need to move them again to the front.

Link to comment
Share on other sites

Rislem,

 

The change should be:

if (mods.find(';') != -1) :
   ThisService.Variables["Mods"]=mods + ":" + String.Format("@{0}", ModName)
else :  
  if len(mods) > 0 :
     ThisService.Variables["Mods"]=mods + ";" + String.Format("@{0}", ModName)
  else :
     ThisService.Variables["Mods"]=mods + String.Format("@{0}", ModName)

 

The reason I added them to the start is to ensure people read the documentation and  check their commandline after installation and do not blindly add mods and then wonder why they have issues.

I know it is a pain....

 

 

Link to comment
Share on other sites

New scripts:

DayZ_CS_......txt files are install/ininstall scripts for mods that have the Tag: Mod in them

DayZ_S_...txt - files are install/uninstall scripts for mods that are SERVER ONLY, that have a Tag: Server in them

DayZ_VarReset.txt - is called on creation and reinstall to initialize the variables needed.  Found that if you don't do this.. things get a little screwy

 

When a user runs a Workshop install/uninstall I call both the DayZ_CS and DayZ_S scripts (install or uninstall as needed).  Yes, they can be rolled into one, but makes for a long script and a pain in troubleshooting.  Will work on a combined script at some point!  The only caveat is that some authors/devs Tag their mods "Mod,Server" which is not good...  no real way around this as it is hard to tell what is a client/server mod and what is server only.

DayZ_CS_Install.txt DayZ_CS_Uninstall.txt DayZ_S_Install.txt DayZ_S_Uninstall.txt DayZ_VarReset.txt

Link to comment
Share on other sites

On 3/2/2020 at 12:27 PM, fjamieson said:

New scripts:

DayZ_CS_......txt files are install/ininstall scripts for mods that have the Tag: Mod in them

DayZ_S_...txt - files are install/uninstall scripts for mods that are SERVER ONLY, that have a Tag: Server in them

DayZ_VarReset.txt - is called on creation and reinstall to initialize the variables needed.  Found that if you don't do this.. things get a little screwy

 

When a user runs a Workshop install/uninstall I call both the DayZ_CS and DayZ_S scripts (install or uninstall as needed).  Yes, they can be rolled into one, but makes for a long script and a pain in troubleshooting.  Will work on a combined script at some point!  The only caveat is that some authors/devs Tag their mods "Mod,Server" which is not good...  no real way around this as it is hard to tell what is a client/server mod and what is server only.

DayZ_CS_Install.txt 2.48 kB · 0 downloads DayZ_CS_Uninstall.txt 3.23 kB · 0 downloads DayZ_S_Install.txt 2.49 kB · 0 downloads DayZ_S_Uninstall.txt 3.23 kB · 0 downloads DayZ_VarReset.txt 91 B · 0 downloads

So what Event is needed for DayZ_VarReset?

Link to comment
Share on other sites

  • 9 months later...
  • 2 months later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 162 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use