Jump to content
  • 0

How did you learn how to script in Epoch ?


Kasrkin

Question

The question is pretty easy.. How did you learn how to script in Epoch ?

 

I'm pretty new here, i got a lot of idea but i'm limited because of my low skill with the Epoch script. I want to learn.. But i don't know how. I found a lot of tutorial but it's more "use this but don't learn how it work" so i'm pretty disapointed here.. I'm not affraid of learning a new programation language, or to learn how a dayz Epoch Work... But i don't know where to start for it. 

 

So, that's my question. How did you learn that ? Do you know how to do anything with your server or did you just take script from there or there and add them to your serv ? 

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Stumbled across this today, might be handy for you (and me, I had the same question):
http://opendayz.net/threads/resources-introduction-to-scripting.11313/

 

 

Side-question: If anyone has an IDE or tool that'll check SQF's for simple errors such as missing semi-colons,

not enough comma's in an array, etc... please post it here.

(I realise we shouldn't be making such simple errors but sometimes you overlook the obvious.)

 

Thanks.

Link to comment
Share on other sites

  • 0

Stumbled across this today, might be handy for you (and me, I had the same question):

http://opendayz.net/threads/resources-introduction-to-scripting.11313/

 

 

Side-question: If anyone has an IDE or tool that'll check SQF's for simple errors such as missing semi-colons,

not enough comma's in an array, etc... please post it here.

(I realise we shouldn't be making such simple errors but sometimes you overlook the obvious.)

 

Thanks.

 

Best tool to do that is Squint

 

http://www.armaholic.com/page.php?id=11817

 

You copy/paste your code in it and tells you everything....like missing private declarations etc.

 

For me scripting was ok....I studied C++ and been doing PHP for the past 10 years, so i can handle it pretty well...Debugging is the real problem.

I dont know if everyone does what i do, or if i am doing it wrong... but in order to write a script it takes me days to debug. For the simple reason that Arma (i think at least) does not have a 'Live' debugger.

Trying to code in the arma editor does not always work for dayz mods. I can do basic scripting there, like check actions and simple things like that....but for multiplayer game....forget it.

 

Basically what i do is this. I write the code, then pack the .pbo, start the server (copy paste the mission file to my %appdata%/Arma OA/mpmissions folder so i dont have to download it when i join) then join the server and test. If you have an error in the code, then you close the server again, fix it, repack, restart, rejoin etc etc....

But this whole thing can take days for a simple script.

For example...i made a mod that you can install a Nitro boost to any vehicle and then activate it from within the vehicle. Took me 2 days to write and debug the whole script, cause of the above reason....but if arma had a live debugger or allow you to edit and run on the fly changes done to your .sqf files, then it would have taken me, like an hour the whole thing.

 

The post that DY357LX did is actually the best thing you could find on the net. Thats what i read as well. Took me about a month to do all that. But same as me...you'll be stuck with debugging in the end.

What you should do is start with simple things in the Editor instead of doing something for dayz. Like spawn a vehicle, write a small function that uses Logic functions and Sensors...Like the safe tradezone area in Epoch.

The coding format in arma editor and dayz functions is a bit different (more like speaking English from 2 different towns. Still the same language but a tiny different).

 

But i cant stress enough what a b***ch debugging is. At one point i was 'that' close to start learning how to hack in arma (with SQF injections) only to inject my code while the server is running and test if the function works well or not, instead of restarting the whole server again.

 

Due to the lack of people actually coding (most are just copy/pasting, and yes, they have no idea how to code), your best chance of getting help is the opendayz forum. Although dont get your hopes up. I was asking for weeks for 'the basic starting way to code in arma'.....so if you ever need help ask here. I think its better to keep this in the forum, so future coders can read this thread.

Link to comment
Share on other sites

  • 0

Oh, i forgot a question, it is the same thing to script in Arma II than to script in Arma III ? Or with the dayz Standalone ? (Even with little difference) or it's totaly different ? 

 

I know that the standalone is not modifiable for the moment.. But we can hope for after ! It would be the same work ?

Link to comment
Share on other sites

  • 0

it is the same scripts for all Arma games and DayZ SA too i guess.

 

anyway what i would suggest if you have no prior knowledge of programming or scriping in general: just learn another well known scripting language first and do not start with ArmA SQF scripts because there is not much info and in the end it doesn't matter much. I always say you learn how to program, everthing else is just syntax so it doesnt matter if you start learning another language because 95% is the same if not more with most languages.

 

that said, you can just learn JavaScript for example, as it is widely used and there are plenty of good tutorials on the web it should make it easier and JavaScript is similar to ArmA script in most ways, it just look a little different as first but that should be no problem. :)

 

also if you do that you have some scipting knowledge outside of ArmA which might be useful for some other things :p

Link to comment
Share on other sites

  • 0

I learned having my own server learning the scripts myself and fooling around. At first i made 100's of mistakes like forgetting the good ol    }; to pardon out certain exec's and what not. After a bit of practice and messing around i caught on quickly.... the layout to script things are FAR easier then if they went JAVA C++ .... you never want that hahaha....

 

Best of luck to you all!

 

 

 

 

 

 

b_560_95_1.png

Link to comment
Share on other sites

  • 0

I have the same question but i guess a little deeper. I have some knowledge of programming in java, javascript, lua using corona for mobile dev. I can adjust to the different syntax but the issue that i have is learning the structure of things. For instance, when do i use the init.sqf in the mission folder rather than execute a code by using the server side pbo. Why some scripts have you add code the server_monitor or to 'description' file in the mission folder. These are the reasons i havent even tried making a script. Does anyone have a good resource for this info or have their own experience with this that could shed some light on my question?

Link to comment
Share on other sites

  • 0

SilentKilla: that's the same for everything: writing the first simple program is not difficult...you find a lot of examples.

But installing the developing environment, getting the first 'Hello World' to show up is (at least for me) the most difficult thing ,)

 

But here you already have example scripts and the whole game is scripted. You can have a look in all the code available. There are a few things you need to know like a page with available commands (easy to find in google: arma2 scripting commands) and how to make files from the servers .pbo files custom to your mission to change them (which is needed and explained in nearly any mod/script released here).

The rest is as Sandbird and the others said: trying to change a few things and in my opinion reading here in the forum. Not everything is what you need/want but at specific times you need something and remember that you've already read siomething similar.
What helps me a lot is a tool like FileSeek which allows you to search for strings in a folder (with subfolder) for all occurences. So if you want to know where a specific variable has been set I search for this in dayz_server / dayz_code and my mission and that also helps to understand the context a bit (but it's still really difficult to me to be honest).

 

I totally agree to Sandbird that I've never used any scripting way/language where it is so difficult and time consuming as here (and I (idiot) upload the changed files first via ftp to my server even that I've recognized long ago already that the difference in scripting for my linux server should be in most parts the same as under windows, hehe...this behaviour is wrongly trained and I blame BIS for that.)) ).

 

I don't really need a debugger but here I often recognize an error while testing and this tiny little error caues a lot of other things to go bad. It's not only the one place where the error occurs which is not working. Yesterday I had a problem with 2 local variables I just used wrongly written in my debug monitor (just in a diag_log)...both names written wrongly in my output but the consequence was that nothing was saved into the db anymore. I could not delete a plotpole or other builds I did, removing debries on the street was working but they stayed there (did not vanish after completion) and a few other things. How should one know what causes all of this, hm. This here is the only thing where I've recognized something like this so far and have many years of scripting experience privately and in business. Ok, I am not a real developer but if that's really needed, the whole environment is crap ;)

 

Here are some useful links in the first post (one is german but there is an english download a bit below):

http://hx3.de/editing-scripting-167/scripting-arma2-16949/

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...