Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

dekugelschieber

Member
  • Content Count

    28
  • Joined

  • Last visited

  • Medals

Everything posted by dekugelschieber

  1. Hello there, I'm proud to present my first contribution to the Arma 3 Community! As a software developer, I was really excited to play around using SQF. But soon I realized how annoying the syntax can be. Especially for new scripters. So I decided, after writing some scripts to make life easier, like loadout scripts and automatic zeus assignment, to create my own little scripting language which can be compiled to SQF. ASL stands for Arma Scripting Language, is C-like and cleaner than SQF. It adds some comfort to scripting and I intend to add more in the future. Here is an example for an ASL script (for more details visit the GitHub page, link below): #define X 1 // declare a function (allowing optional parameters) func myFunc(_a = 0, _b = 0) { if _a < _b { return "a is less than b"; } else { return "b is less than a"; } } // declare variables var _x = X; var _y = 2; var _someArray = [1, 2, 3]; // assign/access a variable _x = 3; _z = _someArray[2]; // = 3 while true { // call a build in function hint(myFunc(_x, _y)); hint(myFunc()); // with predefinded parameters } ASL is available on GitHub and can be downloaded for Windows and Linux (in fact I developed it on Linux using the experimental build). You can find more details and syntax specification over there. Feedback is welcome. If you encounter any bugs or would like to participate, let me now on GitHub by creating an Issue or a Pull Request. You can also leave me a post here. Examples If you're intersted in seeing more code, I wrote some of my old scripts in ASL: https://github.com/DeKugelschieber/ArmA3-scripts/tree/master/src/sts_mission_template.Altis/scripts/dklib To build it, download ASL and the GUI, select the scripts as input and the mission folder itself (which contains the script folder) as output. GUI There is a graphical user interface which you can use instead of the command line. Just visit the release section on GitHub. The usage is pretty streight forward. Changelog Version 1.2.2 bugfix: deadlock on compiling multile files at once Version 1.2.1 bugfix: new line after while for pretty printing bugfix: build in unary function with multiple arguments Version 1.2.0 better error output concurrent compiling errors are handled per file and won't stop the whole compilation function name check for build in functions simpler syntax for "null" and unary buildin functions Version 1.1.1 arrays can now be declared within expressions code keyword bug fix Version 1.1.0 changed syntax of foreach private function variables default values for function parameters added preprocessor code inlining using new keyword "code" some code and repo cleanup Version 1.0.0 - first release
  2. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Release 1.2.2 bugfix: deadlock on compiling multile files at once Get it on GitHub: https://github.com/DeKugelschieber/asl/releases/tag/1.2.2
  3. Im Grunde gilt das noch. Allerdings schauen wir uns die geistige Reife der Bewerber an, dies gilt für alle da wir keine Personalausweise einfordern ;). Es ist also möglich sich auch mit < 16 Jahren zu bewerben.
  4. (We are a german clan looking for members, so this post is in german :)) Hallo, wir, der sTs, sind ein deutscher Arma 3 Clan. Wir bestehen seit Anfang 2014 und haben seitdem viele Stunden in Arma zusammen verbracht. Jetzt wollen wir endlich größer werden, um neue Möglichkeiten zu haben (größere, längere, schwerere Missionen). Unser Fokus liegt auf COOP Missionen, die wir entweder bauen oder "zeusen". Diese bieten wir 2-3 Missionen pro Woche an, meist eine in der Woche und eine am Wochende. Unterwegs sind wir dabei mit einem großem Mod Packet auf den verschiedensten Arma 2 und 3 Karten mit Fahrzeugen, Helikoptern und Flugzeugen. Wobei wir meistens aber zu Fuß durch den Dreck stiefeln. Uns selbst sehen wir dabei als selbständige Einheit oder Privatarmee. Es gibt Ausbildungen und Trainings, damit du dich besser einfinden kannst. Die Struktur ist hierarchisch mit mehreren Rängen, die durchlaufen werden (nach Dienstzeit und Ausbildung). Unser Vorgehen im Einsatz ist teilweise an das amerikanische, britische und deutsche System angelehnt. Wir bieten eine freundliche und hilfsbereite Umgebung die sich sowohl für Arma Veteranen als auch Anfänger eignet. Unsere jüngsten sind 16, unser ältester auch jenseits der 40. Wir betreiben 2 eigene Server, ein Forum und TS. Für eine Bewerbung solltest du diese Voraussetzungen erfüllen: - mindestens 16 Jahre alt, wir schauen wie Reif du für dein Alter bist ;) - TS und Headset - 1-2 mal die Woche Zeit für eine Arma Mission die zwischen 2 und 3 Stunden dauert - Bereitschaft auch an Trainings teilzunehmen Hier geht es zum Bewerbungsformular: http://join.sts.wtf/ Wir freuen uns dich zu treffen :)
  5. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    I know it has been a long time ago. But I still have this project on my radar. Lately I discovered a deadlock bug when compiling multiple files at once. I' m looking into this, just to let you know.
  6. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Release 1.2.1 bugfix: new line after while for pretty printing bugfix: build in unary function with multiple arguments Get it on GitHub: https://github.com/DeKugelschieber/asl/releases/tag/1.2.1
  7. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    GUI update by 654wak654: Note: place all files in the same directory (asl.exe, asl.gui.exe and types file). The GUI can be found in the release section on GitHub below the current ASL release.
  8. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Release 1.2.0 Changes: better error output concurrent compiling errors are handled per file and won't stop the whole compilation function name check for build in functions simpler syntax for "null" and unary buildin functions So instead of stopping when one file contains an error, it will continue with the other ones and shows the error. Also you won't get the ugly stack trace no more. The error is now one line of information telling you line number and character the error occured. Concurrent compiling means all files are compiled "at the same time", so compiling a large number of files should be faster. But in the most cases not noticable. I haven't managed to get rid of double parentheses for binary build in functions. So build in functions without parmeters or just on one side must now be called like this: shownWatch(); // null function (no parameters) hint("hello world!"); // unary function addItem(unit)("NVGoggles"); // binary function Also if you now try to declare a function that exists as build in, you'll get an compile error: func Hint(str) { // compile error! // ... } Read more on this in the README on GitHub. Download
  9. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Just to let you know, I'm still working on this. 1.2.0 will be released soon :)
  10. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    That sounds pretty damn useful! I'll add that to 1.2.0, issue is created :)
  11. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    For type checking? --- ASL GUI 1.0.0.0 Release! First release of the ASL GUI by 654wak654, which makes it much simpler and comfortable for non technical people to work with ASL. Get it on GitHub: https://github.com/DeKugelschieber/asl/releases/tag/1.0.0.0 --- I also rewrote my radioactive area script: https://github.com/DeKugelschieber/ArmA3-scripts/blob/master/src_asl/sts_mission_template.Altis/scripts/dklib/radioactive.asl
  12. Wir suchen weiterhin :) Hier mal ein paar Auszüge aus unseren Missionen: https://youtu.be/O5x6VgT2ndE https://youtu.be/NvpMQe7odiA https://youtu.be/_vMOvO7AZto
  13. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Thanks for your positive feedback :) I currently build all sqf scripts and test ingame. So that is something that can be improved. The main problem with testing code outside of arma is, that it must be run/validated somehow. To do this I would need to write a SQF parser and some kind of "virtual machine". Pretty complicated. What would be possible is an editor that checks syntax as you type (maybe a sublime plugin). And the ASL compiler tests the ASL syntax you feed in, so many errors will be catched before executing in arma, saving a lot of time. So as it is, I suggest to do the following: 1. create a seperate ASL folder inside your mission folder 2. create some ASL scripts, build folder structure as you like 3. compile it using the ASL folder as input folder and the main mission folder as output 4. now everything will be in place 5. use arma in windowed mode I will look into the frameworks you mentioned, maybe I can adopt some code or have an idea for a better workflow.
  14. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    If you're intersted in seeing more code, I wrote 3 of my old scripts in ASL: Zeus script, adds all in editor placed units to zeus: https://github.com/DeKugelschieber/ArmA3-scripts/blob/master/src_asl/sts_mission_template.Altis/scripts/dklib/zeus.asl Loadout script, sets an arsenal loadout for specified unit, shows how to use inlining (line 37): https://github.com/DeKugelschieber/ArmA3-scripts/blob/master/src_asl/sts_mission_template.Altis/scripts/dklib/loadout.asl Init.asl, compiled to the init.sqf: https://github.com/DeKugelschieber/ArmA3-scripts/blob/master/src_asl/sts_mission_template.Altis/scripts/init.asl This is part of my mission template: https://github.com/DeKugelschieber/ArmA3-scripts/tree/master/src_asl/sts_mission_template.Altis To build it, download ASL and the GUI, select the scripts as input and the mission folder itself (which contains the script folder) as output.
  15. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    The GUI by 654wak654 is released and can be downloaded on GitHub! https://github.com/DeKugelschieber/asl/releases
  16. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Release 1.1.1 The following changes were made: * arrays can now be declared within expressions * code keyword bug fix Example: // arrays within expressions: var newArray = someArray-[1, 2, 3]; // bug fix var compiledCode = code("var helloworld = \"\\"Hello World\\"\";"); // string of helloworld will be: "\"Hello World\"" // before the slashes were kept
  17. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Release 1.1.0! The following changes were made: * changed syntax of foreach * private function variables * default values for function parameters * added preprocessor * code inlining using new keyword "code" * some code and repo cleanup Examples: // use preprocessor #define X 100 var x = X; // new foreach foreach unit => allUnits { // available as unit here (or _x) } // inline code var code = code("hint()(\"Inlined!\");"); code(); // default function parameters func someFunction(_a = 3, _b = 4) { return _a+_b; } var result = someFunction(); // = 7 The preprocessor just works like the original one (since it was good enought) with the some limitations, read the README for more on GitHub. Get it now!
  18. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Thank you, that GUI looks awesome!
  19. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    It depends on your view. Actually programming languages express logic. So SQF can be considered a "real" programming language with its use in Arma. But, good language design looks different. I think they've choosen to stick with SQF due to their small team. I spend 30-40 hours (?) until today. And there is no optimization, no binding to the engine and so on. So it can cost a lot to rebuild that. Still, I don't understand why they haven't choosen an existing language like Lua. I integrated that in one of my C++ projects. Extremly easy and secure. On the other hand we have a reason to work on little projects like this :D Btw. release 1.1.0 is scheduled for 08.11.2015, "ready or not". Means it will be tested and stable, but may not include all features I'd like it to have.
  20. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Well, there are a lot of reasons not to use SQF: inconsistent syntax (see if () ... vs while {} ...) unnecessary keywords (then, do, ...) unnecessary simicolons hard to read access of array elements (select instead of [index]) ... and more. Yes it is subjective. But it depends on your background. If you started programming with Arma, you'll maybe fine with its syntax. But for people like me, coming from a professional software background, it's just annoying. The syntactical style is not convenient and does not feel natural to me. As you may can see from the "documentation" (readme), the Arma Wiki and other scripts stay usable, as most of the build in functions can be easily translated to ASL (line 13 of your example): spawn(2, 1)(myFunc); I also plan more abstraction, like special functions to modify arrays (arrayC = arrayA-arrayB; isn't self explanatory), script entry points, extracting functions out of code to make them global and so on. Hopefully this project will be successful enough to have its own community, explaining and helping out others :)
  21. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    The main reason I started this project was my own dissatisfaction with SQF. So I haven't looked at similar projects. Also, OOS looks much more complicated, which could scare some people of using it. Actually, both can life side by side, OOS for larger projects and developers with more experience/professional background and ASL for smaller little scripts, easy to understand and accessable for everyone. At the end both will result in SQF code, so they stay compatible. @x39 Und nur nebenbei, es wird nicht "nur SQF mit neuer Syntax". Ich plane durchaus einige extra Features um SQF zu abstrahieren. Einiges dafür ist schon drin, z.B. Array Zugriffe, kein manuelles einlesen von Funktionsparametern usw. Was sonst noch genau weiß ich noch nicht, dafür kennen ich mich selbst nicht in den "Untiefen" von SQF aus, aber NeoArmageddon hatte da schon eine gute Idee als Issue erstellt.
  22. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    @654wak654: So issue #9 and #11 are in. Was pretty easy :) And code can now be inlined: // input: var x = code("var y = 5;"); // pass as string // output: x = {y = 5;}; This is useful when calling some of the buildin functions: addEventHandler(_x)("CuratorGroupPlaced", code("spawn(_this, \"ZeusGrpPlaced\")(BIS_fnc_MP);"));
  23. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Issue created :) I guess version 1.1.0 will be a huge improvement with your help. I have to admit that I forgot some things.
  24. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    That's a great idea for 1.1.0 and shouldn't be hard to implement :) I didn't knew about that command, currently parameters are just inserted into the function respecting their name. Your code looks complicated, but I can imagen how to achive it. Thank you!
  25. dekugelschieber

    ASL - Arma Scripting Language (Compiler)

    Sounds great, I will see if I've got time at the weekend.
×