Jump to content
Sign in to follow this  
BennettWHU

Scripting problems

Recommended Posts

Before I start, I would like to point out I'm new to the DayZ community. I've been playing for about eight months now and I've opened my own private server. With the latest update, DayZ 1.8 has brought a lot of changes to game play. There are scripts I would like to implement to my server, but I don't know the first thing about how to do it. I've opened a DayZ 1.8 mission.pbo file in PBO Manager. Whenever I add the code to the init.sqf and save it via Notepad ++, I close it, re-open the file and it's gone back to its original state. I've looked on the forums for help and most script threads mention "pack", "re-pack", "extract". I'm a noob to this stuff. Can someone help me out? I need a detailed explanation on how to do these things. Any help is appreciated.  

 

 

The main aim for my server scripts are;

 

Auto Re-fuel

Vehicle strip parts (However i believe this code is already in the init.sqf file but is commented out)

change loading screen

Share this post


Link to post
Share on other sites

When you want to edit something in the .pbo's make sure to unpack them when you want to edit them. When you only open them and then edit the .sqf's it might not be saved in the .pbo's.

Share this post


Link to post
Share on other sites

Hello.

 

I cant write a tutorial here on how you edit your mission to add auto refuel and such, but im more than happy to show you the basics so tutorials can guide you through the rest.

 

A ) Ok so lets start, Unpacking your Files.

1) So firstly get yourself some PBO manager which you seem to have done, but for reference here is a Link.

 

2) Go ahead and unpack your Mission PBO using this method: http://puu.sh/4GXYL.jpg

 

3) One you have done this you will get a folder version of your mission, go in there where you can edit your Mission.

 

(Optional)

 

4) You can now change where the mission file is called from to allow you to edit the local mission, bare in mind this will make your mission file bigger.

 

5) Open Init.sqf and on line 16 it will say:

#include "\z\addons\dayz_code\system\mission\init.sqf"

and change it to:

#include "init2.sqf" 

6) Now create a new file with the local mission code, original 1.8 code can be found here: http://pastebin.com/Q9DhUVzA

 

7) Once this is done it should look like this : http://puu.sh/4GYlA.png | http://puu.sh/4GYmw.jpg

 

(This is useful if there are scripts that require scripts to be edited in the old mission file system.)

 

8) Now once everything is saved, delete the old Mission.PBO, right click on the mission folder you have been editing and press "PBO Manager/ Pack Into PBO". http://puu.sh/4GYte.jpg

 

9) Upload and your good to go.

 

 

B )How To Change Server Loading Screen:

 

1) Create an image 2048x1024 in Res as this is the image size the server uses, it must be in either .JPG or .PAA, i would recommend .JPG as its more common.

 

2) Now open your mission file using the system i just showed you, and open "description.ext".

 

3) On line 14 change this line:

loadScreen = "\z\addons\dayz_code\gui\loadingscreen.paa";

And change it to:

loadScreen = "Splash.jpg"; 

4) Add this image to your mission folder, and rename it "Splash.jpg".

 

5) This will now call the new mission Load Screen.

 

6) Pack your mission up and your good to go.

 

 

 

I really hope this helps, it took a little while to write.

 

Lots Of Love, 

 

-D7

  • Like 4

Share this post


Link to post
Share on other sites

Your reply is brilliant. Thank you. Why do I need to change the init to init.sqf2? Also what is local mission file?

Share this post


Link to post
Share on other sites

Hello.

 

I cant write a tutorial here on how you edit your mission to add auto refuel and such, but im more than happy to show you the basics so tutorials can guide you through the rest.

 

A ) Ok so lets start, Unpacking your Files.

1) So firstly get yourself some PBO manager which you seem to have done, but for reference here is a Link.

 

2) Go ahead and unpack your Mission PBO using this method: http://puu.sh/4GXYL.jpg

 

3) One you have done this you will get a folder version of your mission, go in there where you can edit your Mission.

 

(Optional)

 

4) You can now change where the mission file is called from to allow you to edit the local mission, bare in mind this will make your mission file bigger.

 

5) Open Init.sqf and on line 16 it will say:

#include "\z\addons\dayz_code\system\mission\init.sqf"

and change it to:

#include "init2.sqf" 

6) Now create a new file with the local mission code, original 1.8 code can be found here: http://pastebin.com/Q9DhUVzA

 

7) Once this is done it should look like this : http://puu.sh/4GYlA.png | http://puu.sh/4GYmw.jpg

 

(This is useful if there are scripts that require scripts to be edited in the old mission file system.)

 

8) Now once everything is saved, delete the old Mission.PBO, right click on the mission folder you have been editing and press "PBO Manager/ Pack Into PBO". http://puu.sh/4GYte.jpg

 

9) Upload and your good to go.

 

 

B )How To Change Server Loading Screen:

 

1) Create an image 2048x1024 in Res as this is the image size the server uses, it must be in either .JPG or .PAA, i would recommend .JPG as its more common.

 

2) Now open your mission file using the system i just showed you, and open "description.ext".

 

3) On line 14 change this line:

loadScreen = "\z\addons\dayz_code\gui\loadingscreen.paa";

And change it to:

loadScreen = "Splash.jpg"; 

4) Add this image to your mission folder, and rename it "Splash.jpg".

 

5) This will now call the new mission Load Screen.

 

6) Pack your mission up and your good to go.

 

 

 

I really hope this helps, it took a little while to write.

 

Lots Of Love, 

 

-D7

 

I have tried following your steps on the splash screen and when I log into my server, it tells me "could not find "Splash.jpg"

Share this post


Link to post
Share on other sites

I have tried following your steps on the splash screen and when I log into my server, it tells me "could not find "Splash.jpg"

This means you got the directory wrong, send me your mission PBO in a PM and ill see whats up.

Your reply is brilliant. Thank you. Why do I need to change the init to init.sqf2? Also what is local mission file?

The reason you need to change it to init2.sqf is because in the new patch they made the old mission file part of the DayZ Patch, so all that mission file does is tell the server to read your dayz files and launch them from there, if you add the init2.sqf and paste the code i said, it will use the old mission system, some scripts require you to edit things in this file, for example changing the comiples.sqf, so changing it to the init2.sqf system allows you to change that.

tl;dr it allows you to do more scripts easyer.

Edited by Dienark7

Share this post


Link to post
Share on other sites

This means you got the directory wrong, send me your mission PBO in a PM and ill see whats up.

The reason you need to change it to init2.sqf is because in the new patch they made the old mission file part of the DayZ Patch, so all that mission file does is tell the server to read your dayz files and launch them from there, if you add the init2.sqf and paste the code i said, it will use the old mission system, some scripts require you to edit things in this file, for example changing the comiples.sqf, so changing it to the init2.sqf system allows you to change that.

tl;dr it allows you to do more scripts easyer.

 

Thank you. You seem to have a lot of knowledge about this kind of stuff, mate. Do you know why Rocket took out the debug monitor and if it is possible to put it back into the game? 

Share this post


Link to post
Share on other sites

Thank you. You seem to have a lot of knowledge about this kind of stuff, mate. Do you know why Rocket took out the debug monitor and if it is possible to put it back into the game?

He took it out because it wasnt needed, there looking for new ways to show blood level, zombie kills and such, plus the journal looks nice, it was only a temporary thing.

But yes you can re add it.

either the original or a custom one.

Share this post


Link to post
Share on other sites

He took it out because it wasnt needed, there looking for new ways to show blood level, zombie kills and such, plus the journal looks nice, it was only a temporary thing.

But yes you can re add it.

either the original or a custom one.

 

Do you know any where I can get a custom one? 

Share this post


Link to post
Share on other sites

Here is the one i use on my main hive server.

 


 

At the bottom of your init.sqf or init2.sqf at the bottom add this: 

[] execVM "Debug.sqf";

then make a file in your mission pbo and call it "debug.sqf".

In that file add the following code:

http://pastebin.com/baW3hQVi

Fell free to look into that file and change a few things to your servers taste.

Edited by Dienark7

Share this post


Link to post
Share on other sites

Here is the one i use on my main hive server.

 


 

At the bottom of your init.sqf or init2.sqf at the bottom add this: 

[] execVM "Debug.sqf";
then make a file in your mission pbo and call it "debug.sqf".

In that file add the following code:

http://pastebin.com/baW3hQVi

Fell free to look into that file and change a few things to your servers taste.

 

 

That is brilliant. I'm just trying to working out how to make the zombies alive part go away and how to make a toggle option for debug. 

Share this post


Link to post
Share on other sites

That is brilliant. I'm just trying to working out how to make the zombies alive part go away and how to make a toggle option for debug.

 

As far as getting rid of the zombies alive thing is concerned, do as follows:

 

Find this line: (Line 19)

 

<t size='1' font='Bitstream' align='left'>Zombies (alive/total): </t><t size='1' font='Bitstream' align='right'>%9/%8</t><br/><br/>

And change it to this:

 

<!-- <t size='1' font='Bitstream' align='left'>Zombies (alive/total): </t><t size='1' font='Bitstream' align='right'>%9/%8</t><br/><br/> -->

 

Quick Note to the Moderators:

I hope you dont mind us continuing this conversation in here, reason i havnt just switched to PM's is incase anyone else is wondering how to do this and stumbles across it.

Edited by Dienark7
  • Like 1

Share this post


Link to post
Share on other sites

Quick Note to the Moderators:

I hope you dont mind us continuing this conversation in here, reason i havnt just switched to PM's is incase anyone else is wondering how to do this and stumbles across it.

Agreed, it's much better to keep troubleshooting discussions public because it then becomes a good reference for other peeps =)

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×