#arma3_tools
1 messages ยท Page 30 of 1
yeah frontend stopped responding to mouse, keyboard still works partially
can't alt f4
just checking for updates now
it isn't latest
I also had that at work. But VS updates fixed it
In the mean time just show me the code ^^
player addAction ["test simul write", {
params ["_target", "_caller", "_actionId", "_arguments"];
player removeAction _actionId;
[] spawn {
for "_i" from 0 to 1000 do {
"test.rpt" ofstream_write "sched1";
};
};
[] spawn {
for "_i" from 0 to 1000 do {
"test.rpt" ofstream_write "sched2";
};
};
}];
player addAction ["test many files", {
params ["_target", "_caller", "_actionId", "_arguments"];
player removeAction _actionId;
for "_i" from 0 to 10 do {
(format["test%1.rpt", _i]) spawn {
for "_i" from 0 to 1000 do {
_this ofstream_write "sched1";
};
};
};
}];
First action works fine. Second action crashes.
Not in my code though, in arma exe
(update fixed VS)
oh inside arma ๐ค hmpf
and before it writes out to the next file :/
actually i will remove all the actual code that does things and check
That was my initial thought too, but it reuses the same 11 files.
You can have 10000 handles, but files might be limited by other things, like the runtime.
ah yeah, true
it doesn't reopen the files with new handles anyway it just looks them up in a hashmap if they are already open
FYI the problem was some kind of conflict with reshade. Removing that (or using the latest version instead) and the problem goes away.
AFAIK no
but you should test it
arma might surprise here
Alright - thanks
afaik it searches for first non-whitespace char. Which a number is
Alright - have to test this at some point then ๐ค
Does somebody happen to know whether
#define ONE foo
#define TWO(ONE) ONE
TWO(bar)
expands to foo or rather to bar?
That is: Are the macro arguments searched and replaced before the macro expansion in a macro body?
Well I know armake preproc would print bar
That's what I'd expect. But I'm not so sure if Arma is behaving as expected in this casse ๐ :
same for SQF-VM
i would expect the same with arma though
There's still hope, that we don't have to fix our stuff
Honest question: why are you asking human beings about their opinion on your code instead of running it yourself using the interpreter and knowing the result for sure?
Because maybe someone has tested that already and knows the answer.
There are enough weird people here that, that might be possible
True but there are also enough possible weird questions that I find it improbable that you'll find people who know the answer to yours. Especially that they may be mistaken.
Running your code in arma is not only much faster than asking but also much much more reliable
The reason being that I posted that question from my Laptop which doesn't have Arma installed. So there's no running and checking it ingame. Plus what Dedmen said โ
But I switched computer now and gonna test ingame
Okay so testing resulted in the following:
- Above example does indeed expand to
bar
- Macro names starting with numbers are invalid
- same applies for argument names
so nothing has to be fixed in SQF-VM
@glossy inlet though ... think you got some lil task then to do ๐ค though ... armake is not scoped to replicate arma 1:1 i think ๐ ๐
Added the info to the respective BIKI-page as well. Feel free to pretty things up ^^
https://community.bistudio.com/wiki/PreProcessor_Commands
Does anyone here mod? Like factions and vehicles
You are in the creative editing section. Everyone besides #arma3_editor and #arma3_scenario does mod
@sick verge You'll probably find that behaviour in every preprocessor
Pretty normal
True that
Though Arma has always been... Special
So I wouldn't rely on Arma doing it the same way every other sane program does ๐คท
๐
armake doesn't need to recreate the mistakes
If it's outputting foo then I'd say that's a mistake
Like how Arma crashes/kills itself on nested ifdefs. There is absolutely no reason to replicate that mistake in armake
No, but if not ARMA, it should conform to something like cpp
I need to conform what Arma does. Even if arma allows things that cpp doesn't
Need to minimum allow what arma does, and maybe more.
Wheras SQF-VM has to either error or atleast throw a warning if something happens that Arma can't do
Which means in this example, it should output bar ๐ ?
ye
It also does
Relyable in sqf-vm and arma
For now, there is no known issue in sqf-vm
That would act different in arma
Thanks to intensive testing of ppl ๐
Though... Still... I should Start creating some unit test for sqf-vm
To find Regressions more easy
But then again... That would require reconfiguring the ci related crap that also still is pending other things
What I want to say with that: if you want to prepreprocess your stuff, use sqf-vm
Or armake
And avoid arma PP at all costs
If someone needs some preprocessor test-cases ( @nocturne basin and/or @glossy inlet ?): I assembled a repo with a bunch of them. See #production_releases
is it possible to make a file stream handle accessible to other functions? (specifically in cpp)
what do you mean? In C++ a (file) stream is an object, so you can pass a pointer to it to some other function if you need, if that's what you ask for
or I think you can inherit from the stream class and add other methods to it, so that you can do myFileStream.doMagic(123);
If call the function to open the stream, how would I make it available everywhere regardless? I understand it's an object. But I need to write to the stream whenever needed.
Just to be sure, you are talking C++ and its streams, right? Not C and its file handles for instance
You can do it like this
Statically have your stream somewhere like ifstream inputStream;, open the file.
Then just make whatever global functions you need, make them receive a pointer to ifstream as parameter: void doMagic(ifstream* stream, int number);
Inside the function you can do like stream.write(...) or whatever you need
and when you need to doMagic, pass the pointer to stream like doMagic(&inputStream, 123);
Him, yes cpp file streams.
I will see about this, does if stream act like the flag for open? Open file for input?
what do you mean? IIRC in C++ ifstream is for reading from file, ofstream is to writing to file, and fstream when you need both
Right, the open function with ofstream has three flags, one for writing, reading, and then one for pruning data upon opening.
IDK what happens when you try open an ifstream for output ๐คท or the other way
Hmm.
Ifstream only input then?
http://www.cplusplus.com/reference/fstream/ofstream/open/
Ofstream can do both
IDK then ๐ซ maybe in some C++ books they explain better when yo use them, honestly these 5 levels of inheritence they use for streams confuse me a lot
I honestly have no idea either. But it seems to fit the needs for now
do you need output now? ofstream works for output for sure, that's what I know
Yes, just output for now.
If I am ever going to need read input though, I would like to use a json or x ml parser instead. This is possible yes?
I guess you would have to either write parser yourself or find a ready one
use stream to read file contents into string or whatever the parser accepts, then pass the string to parser?
I've seen some config parses just get the length of data from file and then read every line and index the data. Is that good practice?
IDK, not sure, honestly I never wrote such things
I'd guess it's better to read file into RAM for faster access, but then it's same idea, you have a index of the current character just like you can have the same thing for an array in RAM
These two let you get/set index of current character to read/write
http://www.cplusplus.com/reference/ostream/ostream/seekp/
http://www.cplusplus.com/reference/ostream/ostream/tellp/
By default C++ stream read/write operations work through buffers actually anyway, so my statement for reading whole file into RAM is not entirely valid
Explain to me what you mean by buffers, from what I understand buffers are reserved memory blocks for data. Thus for each read/write operation the data is stored in a new buffer yes?
But none of that gets finalized until the stream is closed?
I think it's smth like this: there is a buffer associated with every ofstream object. You can set buffer size to whatever you need. Default one is some amount of kilobytes, don\t remember exactly. When you do ofstream.write several times, it stores output data to buffer and doesn't perform actual hard drive write until the output buffer is full. Or you can tell it to perform the write by doing ofstream.flush() command. It also flushes when you close the file, or when your program terminates. It's really transparent to you, and for your general purpose program you shouldn't care much about it or see it affect anything.
So the buffer size gets adjusted after each output? I don't think I will fill it as you say, but how would I know that it's full?!
no, buffer size is fixed for all writes, point is to write to hard drive in bigger pieces of data, not in many small writes
Ah. Buffer is fuller faster with smaller bits with quicker intervals?
well it's like, cost of writing to hard drive is 10+dataSize*0.01 (not real numbers, just example), so you combine many many small writes into a big write to minimize impact of this 10 constant
but you really don't need to care much about it, as I said, ofstream does everything for you, you can however adjust buffer size if you really need.
Ok, that makes sense. Sorry for question overload. Exciting stuff.
then actually the hard drive itself has some sort of buffer/cache built it... which is transparent for us again ๐ค
Does that differ any from what you were talking about?
no, just making my point about another system (actual hard drive in this case, not an abstract 'file'), which also has a buffer/cache, which works in a similar way, but this time it's an actual chip on HDD, which receives data before its being written to HDD's magnetic disks
https://en.wikipedia.org/wiki/Disk_buffer
there are lots of caches/buffers everywhere in our IT all work based on similar ideas
Makes sense.
@wind coral for json parser I can recommend "nlohmann json", I use that everytime I need json. I think you just give it file path and it does the rest
XML is kind of a chore to work with. And also such a inefficient format.
I've come to love YAML that I used in intercept-database. Btw I use yaml-cpp for yaml. It's very easy to use
+1 on nlohmann json
Just found this site
https://learnxinyminutes.com/docs/yaml/
https://learnxinyminutes.com/ It has so many things. And well explained too.
Even has a Mega crashcourse on C++. Someone should make a pull request for SQF ๐ (https://github.com/adambard/learnxinyminutes-docs)
Someones It could be you 
so in xcam, while placing objects i found something i really like (garbage can) , but uhhh how do i get the name of it so i know where to find it in the A3 folder instead of just using the whole folder ?
Via debug console
typeName cursorTarget
Execute that while looking directly at it
(if it doesn't work directly in XCam you might have to play the mission with a normal unit and doing the same again)
Will say OBJECT how is this helpful?
@exotic mesa point at it type utils 2 in debug console then type cursorobject in search it will give you config for it with info in which addon it is
Woops then I remembered the command wrongly
anyone here ported/imported custom fonts to A3?
whats the problem?
as far as i know, you just need to render them to a texture
and then you are done
Sure, I did
Yes, the build in tool works fine
Keep other languages in mind though ๐
(non-roman font)
is there a way to move meshes across all LODs in Object Builder
found the answer to my question (Points > Transform 3D > Move > Check "Apply to all lods")
Okey I'm far enough in my latest project to grapple feedback and ideas.
ArmaScriptCompiler, Offline compiler for SQF scripts powered by SQF-VM that compiles scripts to bytecode and then loads directly from bytecode ingame, basically moving all the preprocessing and compiling to pbo pack time, instead of Arma start time.
My first test sped up my Arma start by about 8 seconds with only ACE/CBA.
Just speeding up start time is boring ofc.
So I added a script optimizer to it that also optimizes the generated assembly and causes all pre-compiled scripts to also execute faster in-game. (gimme all those fps!)
Things like resolving simple math expressions like 5*5 at compiletime. Or a more efficient representation of arrays n such.
If anyone has ideas of what script commands can also be resolved at build time, and what other optimizations can be done feel free to open tickets
https://github.com/dedmen/ArmaScriptCompiler/blob/master/src/optimizer/optimizerModuleConstantFold.cpp#L38-L134
That's damn impressive!
so... since you can also make your own SQF commands, maybe optimization can be searched for here as well, for instance you could make a command which runs code fixed amount of time without querying the iterator variable in SQF, although for ... from ... to ... probably already does it ๐คท
there is not really much more you could do then before
code which runs fixed amount of time? what does that have to do with optimization?
well, in some processors they have a command which is dedicated to run a piece of commands needed amount of iterations, without doing decrement, compare with threshold, branch part with commands, but it's kind of built in one command and being performed automatically by the CPU core, to reduce exec time of some tight loops; that's just an example that came to my mind
Only optimization idea I had that would involve new commands, is replacing a forEach loop that doesn't use the forEachIndex with my super fast custom forEach implementation
part with commands That's already not the case.. that check is done in engine
yeah ok then, maybe there is some area which can be accelerated like that, im only not sure which area ๐ค
well actually this is not much different compared to intercept concept itself, it's not really related to SQF compiler
How can I use a user input with a data type of std::string in std::find when iterating through a vector? It would seem there is no vector data type for strings, only integers doubles and floats?
Example code?
vector type for strings -> std::vectorstd::string
Hold on.
lets go and falls
๐ฎ
std::string userInput;
std::cin >> userInput;
std::vector<std::string> userInputIndex = std::find(cmdLib.begin(),cmdLib.end(),userInput);
no suitable user-defined conversion from "__gnu_cxx::__normal_iterator<char **, std::vector<char *, std::allocator<char *>>>" to "std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string>>" exists
std::find doesn't return a vector
Oh wait
it returns iterator
Correct
what is cmdLib?
std::vector<std::string> cmdLib {"test","test"};
what I wanted to do is find a matching string based on the user input, so find the index of the matching string in vector and then use that as parameters for a function
std::find returns iterator
to get index std::distance(cmdLib.begin(), yourFoundIterator)
std::unordered_map or std::map
He's not mapping anything tho
iterators are used for essentially "combing" the array though yes?
what I wanted to do is find a matching string based on the user input, so find the index of the matching string in vector and then use that as parameters for a function
but he will be doing soon
iterators are basically pointer to a element in container
The problem ultimately that I am having is that it won't compile at all,
conversion from โ__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >โ to non-scalar type โstd::vector<std::__cxx11::basic_string<char> >โ requested
Compiler throws this, can't get itterator.
As I told you
it returns a iterator
you are trying to get a vector. vector != vectorIterator
std::vector<std::string>::iterator userInputIndex = std::find(cmdLib.begin(),cmdLib.end(),userInput);
or just
auto varname = std::find(cmdLib.begin(),cmdLib.end(),userInput);
OH!
Ok, now I have this bot bob that can find stuff in files for you.
auto variablename =
Somehow my thinking ability decreases while I'm at work ๐ค


Anybody here willed to participate in the sqf-vm Project to add testing to the cmake?
Would be neat if I do not have to Figure out that testing stuff myself
are you using any test framework now?
some have deeper integration, otherwise you can always fallback to just running an exe and checking the status code
enable_testing()
add_test( testname exename arg1 arg2 ... )
Literally nothing right now
What is wrong with using auto? Too much memory allocation?
who said it? nothing is wrong with using auto
even better you will learn to appreciate auto&&
&& flag for read only?
no it is a universal reference
auto was the best idea someone had ... It makes code refactoring more efficient and saves space as well. And since it's all sorted during compile time you do not need to worry about performance differences. Only if you want to specifically implicitly downcast something you need to write out the actual data type
Somebody has been reading Meyers!
Almost always auto ๐
Only if you know what is under the hood otherwise it will be driving blind
Almost know what you're doing
@dawn palm when i run moveobject is there any reason why the following happens to my RVMATs?
////////////////////////////////////////////////////////////////////
//DeRap: P:\vn\structures_f_vietnam\usarmy\fort\data\vn_b_tower_01.rvmat
//Produced from mikero's Dos Tools Dll version 7.19
//https://armaservices.maverick-applications.com/Products/MikerosDosTools/default
//'now' is Mon Apr 15 13:45:12 2019 : 'file' last modified on Mon Apr 15 13:45:12 2019
////////////////////////////////////////////////////////////////////
#define _ARMA_
class Stage0
{
texture = "vn\structures_f_vietnam\data\metal\metal_sheet_01_co.paa";
texGen = "0";
};```
- adding a commented banner to the top causes my other non-mikero tools to report errors (caused by remarks in rvmats)
is this banner any use? if not, can it be removed from moveobject?
- why does it add
#define _arma_to the rvmat?
- all our RVMATs are deliberately encoded with tga
is there a reason you automatically replace them with paa in the moveobject process?
I just ran moveobject on two folders in my project and now every single rvmat has these unwanted changes in it
- It's not any use. You can remove it if you want. But also you should get the non-mikero tools fixed that complain about that. comments are valid in rvmat
- it's useless. But all of mikeros config stuff does that
when we receive a model from an artist and begin to encode it, we do some basic checks, and one of them is to check that he has included tgas of all relevant textures. converting the rvmat to use paa instead, basically undermines this check.
is it possible to not have moveobject make that change?
trying to enforce standards across a large team, i'd prefer to be able to control this kind of thing better
thanks!
pboproject takes care of tga -> paa if I remember correctly
even inside p3d and rvmat
If you have source files. I'd recommend just using notepad++ replace in files to replace file paths in bulk
#define _ARMA is there to differentiate between code destined for arma versus _XBOX versus _OFP. The binary result is different for all three.
#define _ DAYZ will produce a slightly differnt binarry code in the near future.
the defaullt binary output for rapify is (currently) arma, so the define is un-necessary, but it's foolish not to document what the code is for.
There's no way on god's earth I am stupid enough to try and edit text files. Eg alterting file/paths in text.
for that reason, parmfiles such as rvmats are binarised and then it becomes a very easy translation of this\ to that\, with no possibility of making mistakes in interpretation.
the binarise process itself automatically converts tga or png to paa since tga and png have no meaning at all to the engine. Neither my tools nor bi's have any difficulty in understanding that a (dot)paa file in source text might be an alias for source.tga or source.png
when moveobject converts the file back to text, be glad, that it embeds comments declaring how it was made.
The same comments apply to config.cpp
as Dedmen as said, if all you are altering is rvmat files, then a text editor can be a better option. Anything more, needs a lot more sophistication.
@quick fog use regex plus cmd line for removal of undesired code
//.*
//.*
//.*
//.*
////////////////////////////////////////////////////////////////////
#define _ARMA_
$
\.paa$===.tga
we use powergrep, but winGrep has cmd line support too. or some linux tools
just to explain i am using moveobject as a simple way to rename paths inside models and rvmats that are unbinarized source files
so i really want to keep the .tga format and to not add loads of unwanted comments
I usually do that manually with e.g. Notepad++
https://youtu.be/GJCBq_y2TgU SQF-VM integration into Arma.Studio works fine
I don't understand, do you mean that it is constantly re-compiling as you type and highlighting errors?
it is constantly parsing the CST
which alllows to build folding groups and highlight errors
(it for now is really just the quick way to do all of that as it just takes a fraction of a second)
proper error reporting would have to be done, using different analyzing stuff
as stuff like unused variables is out of scope for SQF-VM and needs to be analyzed as a whole anyways
did mikeros tools change name from maverik to bytex?
Mike Andrew is that real Mikero's name?
I'm plastering my patreon link on all my projects now. And already got a patron, so I'm not doing it for free anymore
well ... no option for me ๐
@glossy inlet You got 2 patrons
One was a donation. Not a follower thing
maybe I should start a Patreon xD
"I occasionally work on tools and haven't done anything very important for some time now"
charge for ACEX Sitting ๐ช
I don't do important things either :D
Does anyone really? Everyone basically just does the nieche thing that they like to do
that's what's modding is about
and why I think Patreon and any kind of donations are most suited for it
Got a Paypal link in my stuff for ages
3 donations in total iirc
I guess the question is why have the platform for distribution change? They appear from the outside to just have been a change of brand name with not differences except I have to now email to get my reinstall license sent to me
@sour bluff contact them best on their discord
tools update:
Improved version of dewrp split function (credit @azure silo )
+fixed errors introduced when updating for dayZ
+split is now also usable via deWrp(gui)
+different layout and more logical naming conventions for resulting pbos and folders
@glossy inlet I don't do important things either :D Getting a PBR shader in-game would be pretty important.
That's just another nieche thing that is fun for me and might benefit a few people.
That said I forgot to put my patreon onto my shader upload ๐
Well, until you started fiddling it hadn't occurred to me that it might be so (relatively) straight-forward to find applicable source. Now I think it's something that absolutely should be pursued as a working in-game enhancement. Obviously best if you can cajole BIS into adding it - but even if not.
Don't want to step on your toes while you're working it but wouldn't mind having a go at some point if BIS don't come to the party (and you're still not keen).
I think it's not hard to make an Intercept addon that returns an SQF variable size in bytes?
Like nBytes ["test", 123] will return 65 or something like that ๐ค
I would like to know how much my data occupies in memory, and how much it occupies in a serialized form when I send it with remoteExec for instance, if I neglect the amount of non-payload of the packets
You wonโt know how much data will be sent over network, because it has some simple compression as well
Arrays were horrible until someone optimised them.
You can convert everything into string and send that, then you would know how long by counting the chars
Not really sure why would you want to since you can already monitor traffic as admin with admin command
I'm having some trouble with PboProject. I'm trying to crunch an addon with a reference to a default suitpack. I believe the filepath is correct and i have the requiredAddons, but I get Missing File Summary cfgWeapons.hpp : \A3\Characters_F\Common\Suitpacks\suitpack_blufor_soldier
in the outputs
I think it's not hard to make an Intercept addon that returns an SQF variable size in bytes?
@cinder meteor that's not how that works.
fixed the issue above. I used addon builder instead if anyone else has this problem
So, although that specific issue is fixed (the suitpack works in game) addon builder can't read my .paa files. I tried altering the list of files to copy directly (changed *.paa to .paa) which did not work and eventually returned to the default list. I also tried binarizing texures to no effect. then I tried to set an addon prefix, which caused a buld failure. Is there any way to get .paa's to work in addon bulder?
also, are there any alternatives to addon builder and PboProject?
here is the path I used for the texture D:\XXX\XXX\XXX\Arma 3\@GMRE\Addons\@GMRE\@GMRE\GM-Retextures\addons\Data\gmre_nor_m75.paa and here is path I used in cfgVehicles hiddenSelectionsTextures[] = {"\@GMRE\@GMRE\GM-Retextures\addons\Data\gmre_nor_m75.paa"}; hope this helps
If youโre using addon builder and have not specified a pboprefix the cfgvehicles path should be relative to the folder youโve selected for packing
Currently it looks like youโre trying to reference folders in your arma install
Lets say your selecting the folder โGM-Retexturesโ as source in Addon Builder
The you should use
hiddenSelectionsTextures[] = {"\GM-Retextures\addons\Data\gmre_nor_m75.paa"};
Assuming thats whats your folder structure looks like BEFORE packing
that's not how that works.
How does it work then? It should have some static struct size + dynamic size payload (4 bytes for number, or some variable amount of bytes for string). No?
I didn't study Intercept data types much so I just assume things
Thanks M242
One variable might aswell be 0 bytes + name length
You can have 5000 variables, which all point towards the same 16 byte value. So saying that each one of these 5000 variables is 16 bytes big, would be wrong in the end
Allright I understand what you mean. Does SQF do this a lot? I thought that it only happens for arrays. For instance if I create many variables that are equal to myNumber, and myNumber is myNumber = 123;, do these other variables also store referenced until I modify their values? ๐ฎ
every variable in SQF is a reference
not just arrays
myNumber = 123; Even there. myNumber is only a reference, into the value stored in the compiled CODE
So if you wanna know how big myNumber is there.
"myNumber" 8b + 8b length.
Let's say 64bit.
Variable is 8b vtable, 8b pointer to name, 1b readonly, 8b vtable, 8b pointer to data.
data is part of the piece of CODE, not of the variable myNumber. So all you have in size is variable name + overhead.
And if you want it for network/serialization stuff, all the overhead won't be serialized anyway so all that info is useless to you
What you'd need is a command to serialize the variable (binarize it) and see how big that will be.
But even that doesn't tell you how big the network load is, as network does some fancy compression and packing.
What I can tell you though is that serialized arrays are terrible.
https://gist.github.com/dedmen/ca48564fd9cbf9a50dad147a5d40066e
This is json serialized version of [date,"string",{code},true]
So... when I loop "_i" from 0 to 100 and missionNamespace setVariable [format ["variable_%1", _i], myNumber];, does it allocate new data for all 100 variables or still point to the data myNumber was pointing at?
I am wondering because I have many variables which are equal to some other variable in missionNamespace (number or string)
something to note: points to the same data
That's good to know, thanks!
thanks @scenic canopy! also I meant to say cfgWeapons ๐ฌ I hope that doesn't make a difference here
no difference
I don't even know if I told people here that I'm working on this.
Progress on my ScriptCompiler/Optimizer project powered by SQF-VM
Arma game start in CBA_fnc_preStart
With: 2.67s
Without: 10.44s
ace_interact_menu_fnc_render inside medical submenu average runtime:
With: 2.39ms
Without: 4.48ms
CBA_fnc_compileFunction average runtime
With: 507.85us
Without: 4.37ms
preStart speedup comes from compileFunction speedup, which comes from loading pre-compiled script from bytecode instead of actually having to compile it at game start.
interact menu speedup comes from script optimizer
8 second faster game start (could probably push up to 12 seconds if i include BI functions)
And the ace interact menu example executes twice as fast.
That's very cool! How did you speed up the render function twice?
I mean, what was the most contributing factor to boost its performance?
Actually. I didn't enable all optimizations
with all optimization the render is 2.12ms average. Seems like online optimization doesn't do as much as the offline variant
The Optimizer is speeding it up. Mainly by removing commands that can already be evaluated at compile time.
For example I replace calls to true/false commands by constants, or calls to else by an array, or I also do math operations that have constants as parameters at compiletime.
For example if you write _x = 5*5 Arma would re-calculate that 5*5 every single time it executes.
I just make it evaluate once at compiletime and just write down _x=25 instead
The more instructions in the code, the slower it get's.
One of the main things is probably optimizing array creation.
[1,2,3]
would be
push 1
push 2
push 3
makeArray 3
But I optimize it to just
push [1,2,3]
Turn 4 instructions into a single one.
Similar to {code1} else {code2}
would be
push {code1}
push {code2}
callBinary else
And executing a script command is especially slow.
I turn that into
push [{code1}, {code2}]
That's pretty interesting, thanks!
I have experimented with circular buffer for script scheduler, it would handle anything you throw at it and no choke
once script is done just take from start and push to end? instead of resorting every frame?
cant remember exactly but think got rid of sorting completely
was awhile ago
oh and added dynamic script execution time allocation instead of 3ms, it speeded up the scripts too
dynamic? based on a fps target?
based on script share in simulation. Again cant remember exactly. it was always allocating exactly the same percentage regardless of FPS. Because with better CPU and higher FPS 3ms per frame is better % share for script than with lower FPS one, So lower end PC not only process script slower they get less % share of simulation for script. Unfair system designed to reward faster processors
Would have been nice to have these improvements in the actual game but no one will touch it especially now.
I would ๐ But I don't care about scheduled
Yeah you are not BI programmer and even if you were, you would probably not be allowed
Mikero Tools Update
A large number of small improvements to various tools. Some of which are only mentioned here to give credit to the persons requesting code updates.
dll:
wrp module:
+fixed potential crash from divide by zero if crappy cell sizes in wrp (credit icebreaker)
+uncompressed quadtrees are now 'warnings are errors' (credit @dusky dune )
config.cpp:
+checks for illegal characters (such as spaces) in requiredAddon names (credit @dusky dune)
makepbo module:
+checks for 2gig limit to any pbo (credit terran makers channel)
pboProject:
+deletes png (not tga) once paa has been created (credit terran makers channel)
+added option in setup to NOT automake other pbos when making wrps (credit @floral skiff )
+enabled encryption for vbslite
+fixed encryption key for Xbox Elite (credit somesquad@email)
+lists cmdline to ouput log for rapify, binarise, makepbo, and texheaders to determine source of some user errors
dewrp: substantial improvements to splitting wrp layers into separate pbos (credit @azure silo )
pboDeps: listed output text is now in full unicode (not utf8)
eliteness: ongoing improvements for dayZ decodes. 'Better' wrp and odol displays generally
linux: merged @surreal wolf improvements or fixes to my mistakes.
@obsidian kayak
My tools have never been known to lie. The file in question does not exist in the folder you specified. Your folder name of GM-Retextures is probably the cause.
addon breaker will make you a pbo no matter what errors you have (because it doesn't look for any)
my tools will NOT make a pbo if you have any error at all.
using addon breaker when you have errors and then asking why, it doesn't work, is not a sensible way to approach things. Although I recognise you assumed my tools were at fault. In this case, they are not.
@dawn palm is deWRP limited with regards to output when using the -O option? Mondkalb ran deWRP -O on the GM terrain for me so I can index it for ALiVE, however, the file is incomplete (at about 50MB). I guess he could have closed it out before it finished, but just wanted to check to see if there would be any issue with map/file size.
I am not aware of any issues with any of the listing options that are available. Large/Very Large object counts will of course splat a lot of data and could take some time to complete.
200,000 trees after all are 200,000 lines of text.
any improvements on the shadow lod issue generated by binarize?
What was that again?
binarize generated a duplicate shadow lod which triggered pboproject warning while validating lods, or something like that ๐
that's your issue
shadowBuffer lods should not be inside your model
OB displays them as shadowLod 1000+
Binarize generates them. You can't
In case anyone is making Intercept plugins. There will be a API update today onto API version 2.
Version 1 plugins can't be loaded by version 2 intercept.dll so you have to update/recompile your plugins.
Plugin template has already been updated, basically only update api_version() and the submodule
https://github.com/intercept/intercept-plugin-template/commit/8b610cb6b3d25bc45eccc97b34c5cb8a608a648b
The changes are already on master branch, releases on github/steam workshop will trickle in now.
@glossy inlet problem is that it blocks building islands without warnings if they depend on say CUP ๐ฆ
Well someone has to fix the broken p3d files
even worse with islands depending on older mods which are no longer maintained at all since they will never be fixed
oh, ok so I just need to update the intercept submodule?
first I thought that some interface between intercept and client plugins has been changed
nvm I see it now
There are new functions in the interface now.
You can create compound types now. To create commands that can take two or more different types.
I'm using that for my bytecode loader, preprocessFile now returns a special type that is special type, but also STRING, such that it still acts as string if you try to use it that way, even though it really isn't
Oof.. finally done.
Recompiling and publishing a dozen projects is too much work :U I should probably get proper CI going ๐
@scenic canopy duplicated LODs is a warning AFAIK. no problem with pboproject nor makepbo here
I don't like warnings ๐
since other things slips through without "warnings are errors"
well his tools are rather expressive - hence we postprocess those with regex to keep it to the relevant info
@glossy inlet I'm testing Qubes to see if I can setup CI work environments for separate projects to flip between easily and backup/share them. I want to start throwing together different intercept powered load tests(have intercept spawn in AI, make AI do things, monitor performance) into some sort of automated workflow and get some regression testing going, via containers, on developing missions :)
qubes seems like it could be really neat for keeping work environments between different between different projects clean, I tend to get too much clutter
No problems in our intercept addon, all works fine with the new Intercept version ๐
I don't quite understand @sacred flume what do you want to do with AI through Intercept?
I use the builtin Arma autotest functionality on GPU VMs, works fine
I'm going to run a variety of tests on a dedicated server to judge what it is capable of doing as far as AI are concerned
what situations it is capable of handling
useful for mission design
things like, the cost of group sizes, datasharing, difficulty settings(unit awareness checks), pathfinding
as far as why intercept....I just feel like doing it in that
I also want to create an AI management system via Intercept plugin for a new mission
so I'll be able to test and reuse code
It's cool, but cost of all SQF commands stays the same as I know ๐ค
It's same execution time minus the time SQF itself takes (SQF is super slow)
its not done for a speedup, but for versatility of having a c++ environment that can use external libraries
"(SQF is super slow)" no
Well yes.. But the slow part of SQF is gone in intercept
the instructions and all that is slow. Intercept doesn't do that
the instructions and all that is slow yes that's what I meant I think
like, the VM part of it?
@cinder meteor sqf commands are implemented in C++. What is usually slow is the scripting language that actually calls those C++ (sqf) commands
that's what I meant, yes, everything that happens between these calls of native functions
the content of native functions stays just as fast.
Just the sqf overhead is gone in intercept
the cost of group sizes, datasharing, difficulty settings(unit awareness checks), pathfinding
group sizes? I am not sure what is meant here
datasharing - I think this is nice to have in C++ because, for instance, you can have a database of known targets and you can iterate through them very fast and reveal them throughrevealcommand to AI units you need
unit awareness checks - same rules apply here (the cost of native function calls is dominant)
pathfinding - this one is actually interesting, I guess you need to extract data about objects (map objects and roads) into your .dll somehow, and to probe the game world you will need to use the same commands as we have in SQF, unless there is some other way. Actually the new 'calculate path' command added in 1.93 can be useful to you
Maybe you can share your results in #arma3_ai later, it would be interesting to see what you get
"Actually the new 'calculate path' command added in 1.93 can be useful to you" not really. It just spawns a AI and tells it to go somewhere, we could already do that in the past
Well at least you can see what path it is going to take before it takes it which could be useful
The pathCalculated eventhandler is the new cool thing
calculatePath is just a shorthand for something that you could also do manually
Well I havenโt played with it but the AI created to which you attach EH is supposed to get auto deleted
it is more about determining average load of AI pathfinding en masse, in groups, etc. If you have multiple AI in a group, in formation, I believe the pathfinding cost may be greater to keep them in formation. Need a variety of tests to judge actual effect in different situations @cinder meteor as well as determining what a particular machine can handle if one were to move to a different server and then change mission values.
how many AI can be used in any particular situation, and what are the various costs of different AI settings that can be traded.
group that into a set of tests that can be run on any new machine, or on any update that might effect them, or with any mod added, etc
Allright, I get the idea now, although it's a bit in the territory of the profiler, because it has some sections corresponding to AI I think
Sqf as language is nice - Stockholm syndrome
Just because you understand (because you know the language's internals) why a language requires you to jump through hoops to do anything doesn't meant that it should. Understandable design != good design! ๐
Only x39 could try and push such a retarded line.
Technically he's right, all the control structures are operators
What really bothers me with sqf is that lower scopes can see variable values of upper scopes - in the case of calling code!
That is not bothering you if you understand that there is no code
Code is some magical thing more or less
All this magic around it makes it unintuitive imo
Wait what? It bothers you that child scopes have access to variables set in parent scopes? What languages donโt do that? @cinder meteor
I meant when you call something, make a function call
does function call see all the variables he was called from in C ??
ofc it doesn't?
but as I understand SQF must do that, otherwise if, switch, while, and other control structures will not see them
Call is the same as if (true) {...} it is not a function call
oh allright, let me say it this way, lack of function calls bothers me in SQF, does it sound correct?
It is just unconditional entering of child scope
Spawn is the closest to it
It creates separate scope
I recently had some potential errors being hidden because of this. So I had an object handle unpacked into a wrong variable through params, but I could still access the object through expected variable name - because this variable existed in upper scope.
Think of call as lambda with env captured by reference
@orchid shadow you can still see privates from the caller's scope
But not modify them
AFAIK private only prevents that you accidently overwrite a variable from the calling scope by using a variable with the same name. This doesn't prevent the child scope from seeing its parent's variables. And I don't think that it restricts the write access to them
Yes you are quite right, i'm so glad that i put SQF down.
...and then you read some code and realize that it relies on variables being passed to code like that...
You can see privates from callers scope
Wut?
Exactly what I have said...
func0 = {
params ["_a"];
private _c = "snackbar"; // Let's make a private variable here
["cookie"] call func1; // Let's make a function call
};
func1 = {
params ["_b"];
[_c, _b] // Let's see if we can access the private _c variable from the caller function
};
[354] call func0;
And it returns: ["snackbar","cookie"]
Wanted to ping you at SQF-VM discord but you were not there ๐
You can modify _c in func1 and that is child scope not callers scope, your example doesnโt show seeing from callerโs scope
Where was _c created then?
In callerโs scope
Isn't it called caller's scope? Like scope of the one that calls? No? I might have called it wrong then
Yeah
So, func1 can see privates created in func0, that's what I mean
Yeah it can and this is true for most languages, I feel like we are going in circles from yesterday
Is it true for C?
Yeah you can modify vars in parent scopes from child scopes
I don't quite understand what we are arguing about, you are aware of the fact that I am talking about function calls ๐คท
I think you hung on the idea that call actually calls different scope entirely like spawn when in fact it adds another scope to current stack
The is no function call in sqf forget it
Yes, I understand what call does, and I am just saying that I do not like it. If it was like that in function calls in other languages, it would be strange.
What we end up with is:
There are no control statements - only operators
There are no function calls - only adding to the current stack
๐
Is it true for C?
No
void funcA()
{
int c; // local 'private' variable
funcB("cookies");
};
void funcB(Asciiz *str)
{
c++; // funcB has no knowledge of 'c'
[blah, blah] call whatever
is a function call which approximates in languages worth bothering with
void whatever(type blah1, type blah2);
Yes I know that it's not true for C, that was my point, but thanks anyway ๐
i know it was your point. which seems to me missed.
you've been misled into believing:
+sqf doesn't have functions.
+(most) languages have scope as defined by sqf
+sqf doesn't have functions.
except that it's being called a function everywhere on the wiki, although it's not a function like in typical programming languages due to how scopes work
agreed.
No
Yes, we were talking about scopes
you've been misled into believing:
+sqf doesn't have functions.
+(most) languages have scope as defined by sqf
๐คฆ
Please do support your claims with actual examples
Starting with sqf functions
Is it true for C?
https://ideone.com/kzXVVV
Come on man, I was talking about calling functions right from start
What really bothers me with sqf is that lower scopes can see variable values of upper scopes - in the case of calling code!
calling code means function call
not in sqf
anyway forget it
Not touching this subject again
@cinder meteor This is the closest what sqf "function" call can be compared to https://ideone.com/wyt5yx
Cool, thanks
It's quite beyond my C++ knowledge ๐ [&](int j){std::cout << i << " - " << j; }(30);
you're welcome
spawn is the real call Sparker! Everyone switch to using spawn now! ๐
never
Every script I make has at least one contition while {true} and one onEachFrame
Fite me
๐ฑ
do you even lift bro?
@dawn palm would it be possible for PboProject to not clear Data\ folder from .png files only Layers\ folder
it would have to be a little more sophistcated than that as wrp layers are not necessarily in a layers\ folder. It's merely a convention.
Can you give reasons for keeping png? they aren't normally edited or changed (versus tga)
I will alter pboPro in setup to optionally delete png, wrp, or no wrp.
Well while it's not the best format for textures I for one sometimes use it because it's faster to preview.
pboProject updated to optionally delete png after conversion to paa in the setup panel
The option is generic and while intended, is not restricted to map making.
I think there is no way to automate mode publishing to Steam Workshop, right?
through some .bat file or whatever
There is
CUP is doing it on their CI server
No idea how though. Might aswell just be an auto-clicker that clicks on the buttons in publisher ๐
lol
wuuuuht
If you can trigger script on some windows server with steam running with logged account you can automate stuff.
Google got me here: https://community.bistudio.com/wiki/Arma_3_Publisher and it had no mentions of the CLI :/ (or I am blind)
Thanks for the info!
As we're talking about automation. What would be best way to run "something" on my own machine via CI on GitHub?
For GitLab I just have my own runner in powershell mode with which I can run tagged jobs to eg run publisher arma autotest etc..
Is there any CI for GitHub that allows something like that?
To answer my own question... it seems it's possible to mirror github repo via gitlab to run ci with their runners: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/github_integration.html
@cinder meteor we also have a python script that publishes the mod to workshop. I can search for what it is doing exactly if you're interested
Thanks, I will probably figure it out after I was guided to the proper wiki page
BI's Arma 3 Publisher, steamcmd or custom built
BI's Arma 3 Publisher or any SteamWorks based requires a Steam client to be running
steamcmd can run on its own
if you want to use steamcmd you'll have to create a metadata.vdf describing your changes
i.e. app id, item id and which folder to push
@neon flax jenkins would be one example
@cinder meteor will your CI be running steam client or not?
hmm probably @crisp gull or @fickle void knows better
arma 3 publisher and steam client needs to be running within the same desktop session otherwise steamworks connection will fail
If appveyor has a package for it
Or I guess we can make one
Or we do it on circleci
if you don't host the CI runner yourself it's probably a lot easier to use steamcmd
as it's intended to be used headless
I could host one actually, just depends on how much effort it saves us
i dont really want to publish on steam all git versions and so keep the publish manual
depends on how fancy steam guard you're using ๐
we deploy all our SFP mods to internal Dev Build for each and every commit
Well I would publish with a separate steam account anyway
and then manually decide when to deploy publically
But yeah I don't think we need to automate it anyway
(dev build being on steam)
Scripting it would be nice though
metadata.vdf
"workshopitem" {
"appid" "107410"
"publishedfileid" "12345"
"contentfolder" "C:\dev\armamods\@banana"
}
script.bat
SteamCMD.exe +login %USERNAME% %PASSWORD% +workshop_build_item c:\dev\armamods\metadata.vdf +quit
that's it
you could of course also update title, description, images, changelog etc
just add it to the metadata file
here's the official steamworks docs for uploading via steamcmd, https://partner.steamgames.com/doc/features/workshop/implementation#SteamCmd
the only issue is that you can't set/modify any tags using steamcmd - at least I haven't found any way to do it
is there a way to upload missions via cmd too, or is its version too old?
good question, haven't tried ๐ค
we mostly use our own steamworks tool, since other games like Squad don't provide any tooling for that outside unreal editor gui ๐
I'd guess it might need a tag, but that can be set on initial upload
kinda hate the Eden upload..
I've tried to update mission via steamcmd. It uploaded it fine but arma cant run it.
Also this site: https://steamworkshop.download returns Steam Api doesn't return the URL to download the file, the same message appears usually for mods.
It looks like it wants you to upload single file not folder, however I don't even see method for single file upload in Steam SDK. ๐ค
steam web api does not expose mods, only missions
yeah but I've uploaded it as mission
probably needs a tag
then after my steamcmd upload its borked ๐
initial upload was via eden
updated with this vdf:
"workshopitem" {
"appid" "107410"
"publishedfileid" "1738820367"
"contentfolder" "C:\Users\filip\Documents\_PROJEKTY\steamcmd_upload\content\"
"changenote" "Test.
Test."
}
if field is missing from vdf is it removing tags?
Do you know how I can get whole api result for workshop item to view tags?
steamworks
Eh, I have only node on my pc right now.
it's a c++ sdk from valve
I know.
either that or their undocumented APIs such as protobuf
This looks promising: https://github.com/greenheartgames/greenworks ๐
eh. Could you maybe check tags of some mission item when you will have time then?
I don't want to install VisualStudio or smth just for that.
https://steamcommunity.com/sharedfiles/filedetails/?id=956023082 has the following tags,
"multiplayer"
"scenario"
"dependency"
"tanoa"
mods have mod and whatever categories they are in
Thanks!
Can you check that https://steamcommunity.com/sharedfiles/filedetails/?id=1738820367
^ - it's borked by my cli upload
"singleplayer"
"scenario"
"vr"
๐ค
maybe the crucial thing is to upload it is "as file" not as folder.
But I don't even see a method for that in Steamworks SDK docs.
Thanks anyway! I will try to experiment with it, maybe I will take a look at SDK example project.
the new ISteamUGC API can only represent folders of files
the old API were only files
I guess someone from BI would be able to help us.
I think it was mentioned somewhere that mission uploads use the old API
ExtractPbo failing after install with missing DePbo.dll error... readme says ther eshould be a spare .dll in the install folder... none exists..?!
Anyone got a magic wand to fix it for me ๐
did you install extractpbo AND depbo? they are seperate installers
oh really, that would explain it
user error ๐
lol now a deogg64 error
im guessing thats a seperate install too?
probably
Yup, all working now. Thanks again for your continued help to my various questions.
whats the approach to analyze perf bottlenecks in sqf code when talking about missions/game modes? aka much scheduled code in looping threads (game handling/AI management)
diag.exe with debug.log to check for runtime exceeding code, or Dedmen's perf debugging
or some stats framework to determine frequent ran code, or long execution time code
dedmen's tool is nice
mh? I made a tool?
"with debug.log to check for runtime exceeding code" I think that only logs freezes?
scheduled code is a chore to profile
Couldn't figure out a good way
you can do everything in missions in unscheduled too
and threads don't exist in SQF, you should just have as few never-ending scripts as possible
thread not in the literal sense but in the design meaning. game modes have to do certain tasks on a regular basis
there is only so much you can do event based
unscheduled doesn't need to mean event based
(last instruction at ...\#testweaponsmagazines.vr\fillThisCreate.sqf:8)
Script ...\dumpConfig_v2_mbfileio.VR\init.sqf took 203.8 ms (10.0 ms allowed)
(last instruction at ...\dumpConfig_v2_mbfileio.VR\aiocfg_mbfileio.sqf:48)```
there are a few more, plus for fsm
where does the time allowed come from tho
some arbitrary defaults set by BI
Sounds more like it just logs when you execute a slow command, otherwise the script would suspend before it hits the limit?
well its a rough indicator from what i understand. not more, not less
for scheduler I have 'invented' this thing
https://forums.bohemia.net/forums/topic/216745-a-tiny-script-to-measure-sqf-scheduler-load/
it can make sense if you want to measure smth like a a delay it would take for some script to get through the queue of all the running scripts running in the scheduler
there is only so much you can do event based
see dedmen's answer
game modes have to do certain tasks on a regular basis
nothing stopping you from doing that in unscheduled and being able to properly analyze performance
If you absolutely want scheduled for some reason (like you can't break computation into frames easily), I have been using the following pattern for a while: you create a thread with a message loop, that does work according to incoming messages, then you create a 'timer' that sends a message to this thread, The 'timer' also checks that previous message has been processed. This way you can divide your whole thing into threads, but also keep some function calls scheduled and synchronous to each other. @vague shard
so having read all pages about scheduled and unscheduled again i still have some things unclear to me:
- the 3ms limit is for all scheduled scripts at the same time, right? (not per script)
- does scripts in scheduled really get equal share for execution as some pages suggest (seems unlikely to me)
- does more code in unscheduled impede scheduled code in any way? say very excessive amount of code in unscheduled
- can too much processing in unscheduled lower fps? is it in a separate OS thread, or does it have to share execution time per frame with AI, sound, general simulation, etc?
- less fps, means more time per fps - does it mean more code can be handled in unscheduled with lower fps? (or more importantly less in high fps)
- while-do/waitUntil(?)/trigger are not checked per frame from what i recall - how does the engine check when to do the next execution? put a time stamp in the scheduler when to check next (
time > _nextExecution) - same for sleep? what about uiSleep?
- what does startPreloadingScreen do in terms of scheduled vs unscheduled?
- is the main argument to use unscheduled to be independent of scheduled env delay (due to poorly written code by 3rd party)
how does scheduled and unscheduled get shown in the diag? is both get shown at all, and if so, is it separated?
https://community.bistudio.com/wiki/File:Performance_Profiling_03.png
or do you have to use https://forums.bohemia.net/forums/topic/211626-arma-script-profiler/ to do so
+ does more code in unscheduled impede scheduled code in any way? say very excessive amount of code in unscheduled
you can bring the whole game to a halt with too much code in unscheduled environement - so I would say yes
the 3ms limit is for all scheduled scripts at the same time, right? (not per script)
There is a queue of scheduled scripts to run every frame, once one suspends or ends it goes to the next, till the 3ms are over.
does scripts in scheduled really get equal share for execution as some pages suggest Well if you start executing at 2.99ms of the 3ms limit you do execute, so you are pushed to the back of the queue for next frame, but you barely can execute anything.
So no, not equal share.
does more code in unscheduled impede scheduled code in any way? no
say very excessive amount of code in unscheduled Well you'd freeze the game or kill your fps. But scheduled scripts get their 3ms per frame, even if you now have less frames.
can too much processing in unscheduled lower fps? if you freeze the game.....
is it in a separate OS thread nothing script is seperate.
so unscheduled extends the frame length and thus can freeze even when it takes extremely long
Yes. It's not scheduled, you have to take care of scheduling yourself if you want that, and write code to be as fast as possible
like A3 has some multi threading but its limited mainly to some AI subtasks and sounds stuff from what i recall. most is in the main thread, or has this changed by now?
does it mean more code can be handled in unscheduled with lower fps unscheduled in general can handle more code because of the missing "are the 3ms already over" check that scheduled does constantly.
while-do/waitUntil(?)/trigger are not checked per frame from what i recall waitUntil might, trigger every 0.5 seconds.
how does the engine check when to do the next execution? http://sqf.ovh/ite/2018/01/21/ITE-the-scheduler.html
same for sleep? what about uiSleep? sleep adds a item to the callstack, when the engine executes the script the next time the script just says "nah, not ready, suspend me again" uiSleep is exactly the same as sleep in that regard. If the script get's pushed to the end of the queue with 0.00001s of sleep left, then you have bad luck and your 1 second sleep might aswell turn out to be 5 minute sleep.
what does startPreloadingScreen do in terms of scheduled vs unscheduled? preloading screen? you mean loading screen? loading screen increases the 3ms limit to 50ms per frame. Changes nothing for unscheduled.
is the main argument to use unscheduled to be independent of scheduled env delay (due to poorly written code by 3rd party) Yes. If you want your script to execute now, instead of in 3 minutes you gotta use unscheduled.
how does scheduled and unscheduled get shown in the diag? is both get shown at all, and if so, is it separated? there is one place to show scheduled scripts. siScr in diag. Unscheduled is split between the different eventhandlers that can trigger it
thanks a lot Dedmen and 4d3a5852!
now one would do heavy computational stuff rather in scheduled (entity creation, nearXXX checks, etc) - unless you need immediate follow-up, right?
You could. Or you could just do it intelligently in unscheduled
just spawn one entity per frame.
schedule your nearX check to run every 0.5 seconds
yeah good code design is most important in the first place
is there some sense what is expensive otherwise? (i know also the config reads, what about AI manipulation)
most efficient should be math and probably reading data from namespaces/internal states
and how about 2d rendering (UI/menus) vs 3d
everything that just sets a flag or something is cheap. Like AI manipulation.
you are not doing 2d/3d rendering, the graphics engine does that
config reads are considered slow yes
so create marker, create UI element is in itself still cheap? only the loading of texture isnt ?
would it be feasible to get a meaningful execution complexity overview (so rough classes of slow/medium/fast) with diag_codePerformance per sqf cmd?
diag_codePerformance was essentially made to do that yes
I don't know about marker commands, maybe they load config entries inside the command call (they probably do) but they also probably cache that so consecutive calls will be cheaper
would you need to restart the game to test each sqf command, or would mission reload be good enough for most cases to flush/reset the various caches, or the caches should not affect running each sqf cmd after each other in almost all cases?
don't worry about the caches
you want to know average runtime anyway. And average time will be the time with cache
And cache will go into effect at the second call anyway. and diag_codePerformance does 10k calls. Don't think you want to restart your game 10k times to each execute a command once to get a reasonable average
so anyone up to generate the test cases for all sqf commands? ๐ฌ
i guess you could generalize to a good extent based on expected input parameters and code execution context
SQF-VM has lots of test cases
But why would you want all commands?
Writing good code often produces way better results than simply trying to avoid expensive commands
And telling people that "this command is bad" might make them write even worse code to work around not wanting to use that command
thats why i wrote classifications
ofc nothing is bad
however for config reads you can consider caching the data for example
so it is quite useful knowledge to have a basic idea how "expensive" commands are
another example is entity creation - like back in OFP one used to place all used vehicles on the map corner to have the engine preload them at mission start - instead of the mini lag you would get during regular mission time
or to make use of the engine caching (ie create at game start all markers used during the mission)
the basic understanding and knowledge may be present more or less for people with decent programming background, and experienced people from ACE/CBA/etc, yet overall i think it would still be useful to have a classification overview (and can make code design recommendations based on that)
I also have a script which spawns all objects on map into my face to pre-fill my VRAM, works wonders.
But lag when loading textures and model files is not really related to scripts
i'd say it is - good code design, or good design patterns you could call it
how do you best create unscheduled env inside a mission (without CBA/mods) - preInit from mission defined cfgFunctions, or some unit init?
also how easy is it to reimplement as part of a mission CBA (like) PFEH, WaitAndExecute, WaitUntilAndExecute? (what else)?
isNil {}
CBA PFH is literally
addMissionEventhandler ["EachFrame"
Just with own scheduling builtin, like execute every X seconds instead of every frame
You can probably just copy the CBA code into a mission
๐
You could also use CLib instead of CBA
Then everything's unscheduled
As long as you don't use spawn of course
Plus you can put your scripts in a mod that only the server will have to load (as well as CLib itself)
just lovely, totally forgot about CLib
https://github.com/TaktiCool/CLib/tree/master/addons/CLib/Statemachine
stuff like this literally is crap
FSM FTW
and because it is already funny to have one implementation, they got a second one https://github.com/TaktiCool/CLib/tree/master/addons/CLib/AdvancedStateMachine
but wait, there is more: no comments in code https://github.com/TaktiCool/CLib/blob/master/addons/CLib/SimpleObjectFramework/fn_createSimpleObjectComp.sqf
cannot believe i am saying this but ... unless you really need a feature out of CLib, stick with CBA
and that is comming from the one person who boycotted CBA for years whilst he activly developed mods .-.
I lost all respect for CLib (I didn't have any to begin with but this made it worse) after they just took stuff from CBA, put their own name onto it and removed the open-source license.
Like..
https://github.com/TaktiCool/CLib/blob/master/addons/CLib/PerFrame/fn_addPerframeHandler.sqf#L29
https://github.com/CBATeam/CBA_A3/blob/aae332ca95e8aa5199413369e4ad5b728394adae/addons/common/fnc_addPerFrameHandler.sqf#L33
Okey.. That's clearly CBA code. Waaait a second
https://github.com/TaktiCool/CLib/blob/master/addons/CLib/PerFrame/fn_addPerframeHandler.sqf#L5
wat?
My first contact with CLib was that they moved code out of Project Reality mod into CLib, then they obfuscated CLib, then left the team and forbid anyone to use CLib anymore. Basically killed Project Reality.
So atleast ethically, that code is a lava pit.
And legally too, no license, you cannot take any of this.
Also there are Extensions in there, Extensions cannot be used in a mod-less mission so what are you even supposed to do with that?
Stay away from that pile of garbage.
- those are written in C#
In other news.
InterceptDB is getting better documentation and everyone can help with it too!
https://intercept-database.rtfd.io/
https://buildmedia.readthedocs.org/media/pdf/intercept-database/latest/intercept-database.pdf
Don't talk about stuff you don't know. The extensions are server-side only. They don't influence the server-only behavior
The other points are valid though
Nontheless CLib provides an excellent framework
Well I assume I don't know because the CLib documentation is..... non existent.
And if you look at the files and example mission, it's packed as a mod, and loaded as a mod and the mission just calls the functions from the mod.
So it seems like you just load it as serverside only mod, and then run serverside only scripts? You can do the same with CBA
That's the magic difference then
Yep
How do you make sure that all variables arrive on the client before it tries to execute anything in preInit or init?
You use CLib's entry points
{
if ((missionNamespace getVariable _x) isEqualType {}) then
{
publicVariable _x;
};
} forEach allVariables missionNamespace;```Problem solved
And put a script line in the init.sqf that waits until functions are transfered
@nocturne basin doesn't work with PFH stuff as you never add the missionEH. And surely lots of other things that don't work either
CLib also does more than just that
was a lazy example to show how blatantly simple it technically is to archive serverside only mods @glossy inlet ๐
It has its own compile-logic that allows for full stack traces
I don't want to invalidate any of the points made against it (besides the one that I clarified already) but it is damn useful. That's a fact
ACE has that too. But don't need that if you have ArmaDebugEngine ๐
literally just add a header & footer to all scripts and be done with it
https://github.com/X39/Project-Alcatraz/blob/master/xms_scripting/header.hpp
https://github.com/X39/Project-Alcatraz/blob/master/xms_scripting/footer.hpp
no need for fancy call stuff that mangles around strings
though ... following the approach i did is hard if you steal most code from eg. CBA
you even can have some fancy RETURN macro ๐
That could be said about anything in CBA - you can do it yourself. So this argument is completely useless
it is not
what i want to say with this is: that ain't some fancy feature as it takes you longer to include CLib into your project then to write stuff like that on your own
Completely bs
You don't know the framework but you are still claiming stuff about it
Maybe you should consider talking about stuff you actually know
show me the fancy magic then
educate me
though ... this gets too much into #arma3_scripting already
Educate yourself: https://github.com/TaktiCool/CLib/tree/master/addons/CLib
yeah ... see, this is not how things work
you cannot call "BS" and then say "educate yourself" and expect me to literally read all scripts, most of which are not containing any comment lines explaining what they are doing
You don't know the framework but you are still claiming stuff about it ๐
After your introduction on this topic I just don't believe you have a genuine interest in it. Therfore I have better things to do than to serve your requests
Showed flaws because i actually looked into CLib for a moment
Provided your pro arguments with a con one, your answer being there then "you call BS, educate yourself" instead of providing evidence of why it is better to use CLib
you advocate for a framework and just say "believe me, it is good! If you do not then educate yourself why it is" + as i already mentioned, we already drifted too much into #arma3_scripting related stuff ... thus will no longer respond in this channel about anything CLib related
instead of providing evidence of why it is better to use CLib
you know he literally did this right
There are some (very few, but still some) things in Clib that are quite n ice
โ
for me it was the marker stuff
I would've preferred all that being submitted to CBA a long time ago and have mentioned so years ago as well
No need to really discuss this further anyway. CLib just stole stuff from CBA and put their own name onto it, they removed all licenses from it (not sure if it's even legal to redistribute GPL code without any license and with a different name on it? Actually CBA license even says that's illegal.) so you cannot safely use it anyway.
Documentation is non-existent so for a "beginner" that's also not a good idea
It is not as widely adopted so community help is sparse
And if you just want some helpers for unscheduled things you don't need 90% of it anyway.
Yeah - as I said: I don't try to invalidate any of that. My only point was, that it does indeed have a few very handy things that CBA doesn't ๐คท
It looks like stolen shit stuck together into a big heap of shit
then request them in CBA or implement them, but more than likely there is a good reason it isn't there and there are better ways to do it
Is there a reliable way to check if BattlEye is enabled besides creating a IsBattlEyeEnabled.dll file that will return the string "no" when called through callExtension? ๐
You can check the command line for the server.cfg and read the be config from there. If no server config is present, assume the default, that it is enabled
And is there a check that I can perform inside the game, somehow? In case I make an extension and would like to show a message stating that the extension won't work because BE is enabled (and not because I messed up :D)
Because checking server.cfg may work but only if it's run by a server. I won't be able to check that if it's run either by a client or by someone developing stuff (so using the client as well)
I just checked the alternate callExtension syntax, hoping that it would yield a special error code, but it seems that I'm getting ["", -1, 0] if the dll name is invalid or if BE is running (meaning I can't differentiate BE blocking the extension and the extension failing to load because I have messed up)
Do you think that there is still a point to do that, now that they're not focused on Arma 3 anymore?
If it is something trivial maybe there is a chance
Try to load a hack and see if it's still there when the game opens /s
@karmic niche you can see that we still get new script commands on my AWWACG command getting added.
I have a couple commands on my todo list I can add a BE enabled command to that, but since my command was pushed to dev branch (in a broken state) I got nothing but radio silence so.. dunno.
how much frame time is "wasted" by the scheduler ordering scripts, checking timestamps, etc - is it really significant?
It scales linearly with the number of scheduled scripts
I don't think I ever measured, but I'd say it's significant enough
how does unscheduled decide the order?
ok ty
so besides (repeated) heavy commands or doing too much each frame in unscheduled is to spawn lots of "threads" (scripts)?
I think you are missing a word
*the worst
Can say it like this : "Having many scheduled threads is bad, and the number of threads should be kept to a minimum"
It is certainly not terrible to have 20 or 50 threads, but higher numbers still cause bad things.
Not sure right now if sorting is inside 3ms limit, but either way it would be bad.
so the worst besides the worst (repeated) the worst heavy the worst commands the worst or the worst doing the worst too the worst much the worst each the worst frame the worst in the worst unscheduled the worst is the worst to the worst spawn the worst lots the worst of "threads" (scripts)?
Getting current time should be cheap and i believe that engine maintains the time-variable
Why are you so sure that scheduler checking time on each sqf command is a significant load to the game?
It should be effective if it's not implemented badly. CBA PFH etc is basically a custom scheduler and it's running quite well (and it's all in sqf not engine!)
The PFH is not really a scheduler. It only allows for scheduling. But it doesn't do it itself
Not all levels have On Surface set
From mikero tools binlog
any clue ?
on a p3d file
Getting current time should be cheap and i believe that engine maintains the time-variable That's not what it is doing.
Why are you so sure that scheduler checking time on each sqf command is a significant load to the game Because do you know how many script commands get executed?
Also who ever said that it adds a significant load?
scheduled scripts are slower, because they constantly do that check, and it's also a vtable call so that makes it even worse.
It's not much, but as with everything it adds up
Also who ever said that it adds a significant load?
well you said that:
Kju: how much frame time is "wasted" by the scheduler ordering scripts, checking timestamps, etc - is it really significant?
Dedmen: It scales linearly with the number of scheduled scripts
I don't think I ever measured, but I'd say it's significant enough
significant load = significant enough ๐ค
We are talking about a completely different thing there
Ordering has nothing to do with current time, or per script command
he said 'checking timestamps', I understand it as this: after every sqf command like +, -, setVariable it checks if it's still within the 3ms limit
are we talking about this thing?
That is a thing, but that's not what we were talking about at all
we talked about the script sorting.
Allright then. This needs a #scheduler_discussions somewhere between #arma3_scripting and #arma3_tools
Question, in Mikero's PBO maker is there a way to exclude a folder? (say a .git folder)
mikeros tools have a exclude filter, I never tried to exclude folders tho.
so it comes down to using unscheduled for three reasons?
- execution in the desired frame/time tick no matter what
- not sharing execution time with other scripts
- not being dependent on other script quality (facing possible delay of execution as result)
did anyone measure how ms ACE or another complex system using on average? (while average gameplay in MP)
- when opening parachute
"did anyone measure how ms ACE or another complex system using on average?"
Yes, I run my profiler alot. Don't have numbers on hand right now tho
In general ACE only runs things when they need to run.
"I want to run this when this variable is true, and a player is in a certain area"
Scheduled people: I'll just have a waitUntil with &&
ACE people: We can have a eachFrame handler checking every 0.5 seconds and we just remove it when the variable goes to false, and readd it when it goes to true to not waste processor time.
Dead notification be gone! You shall no longer be my Master
is there a way to process simpleExpressions via sqf?
You can write your own parser in SQF, And try to reimplement some of the script commands with SQF
But how would you want to emulate things like "dirt" or "wetness"
well the goal is to import config defined FX
make them tweakable ingame
and export as config statements again
how would i go about transitioning my license
@onyx helm https://mikero.bytex.digital/
To transfer your license, follow this https://mikero.bytex.digital/ImportGuide
hmm says mine is expired
if your license is expired, you need to buy a new one
yeah i didn't think it had been a year but i guess so
You can pm me your old account information and I can lookup when it expired
or alternatively just email me at r.torzynski@bytex.digital
I have a little problem with my Game Updater right now and maybe someone has an idea.
So this is not the first time I use it and it used to work back some many month ago. (Had to reinstall in the meantime though)
So I launched the Game Updater through the Arma 3 Tools and installed it. That seemed to have worked fine. I assigned my settings (mainly my installation path) and press UPDATE. The window pops up correctly and the Textfield goes down until: Logging in user 'MYNAME' to Steam Public ... now I'd expect the Steam Guard Code Window to pop up but it doesn't.
What could be the issue here?
steam guard doesn't work with it
Since when?
months atleast
Meh, so either I disable Steam Guard or I can't have tow installs?
you can use SteamCMD to update arma 3
Oh yeah, forgot that it can not only be used for server...duh. Thanks for the help!
is there a way to determine models paths in a ebo without extracting it?
more specifically trying to make a config mod to expose the Enoch trees for object placement
It wouldn't get trees that aren't already on the map but you could use getModelInfo to get the model paths https://community.bistudio.com/wiki/getModelInfo
This is a dump I did off all the new objects on the map and their paths, with the number of times it's used following it on the same line https://pastebin.com/axEpUrTZ
Paths to the clutter models referenced in their config https://pastebin.com/pL1WdAre
@limber garden two steps ahead ๐ thanks a bunch!
@vague shard we have internal addon for it - I can share a cfg of it tomorrow
๐
buildings should be the same as in the config dump, or are there class less ones?
there are some class less
kk
signs usually don't have classes
- there are plenty of furniture/props objects from dz which are missing classes
a3\Structures_F_Enoch\Furniture\Bathroom\toilet_b_02\toilet_b_02.p3d``` this is most important a3 asset imo ๐
is it possible to use loadFile to extract other data besides sqf and whats the size limit?
Last time I checked it only loads files that are plain text. So not loading a paa for example, or a binary file such as a p3d or ogg
@glossy inlet I should be able to load multiple Intercept Plugins right? cuz I am having trouble with that, loads one, or the other if I disable one
do they all have unique names and class names in config?
did you forget to change any of these? https://github.com/intercept/intercept-plugin-template/blob/master/addons/main/config.cpp
Might be that the pbo that loads it has same pboprefix
I made that mistake on some of mine
"do i need both classes under class Intercept to be unique"
no. Just one. If they overwrite eachother then they ofc can't load properly
but you can have a class "DeadlyDays" with multiple plugins inside it.
pboprefix is a good bet too ๐
or if you don't have a pboprefix, it'll autogenerate out of the pbo name
so if you have 3 main.pbo's that problem
@glossy inlet top 5/10 whats terrible about Enscript right now please
No. I'm leaving right now to catch my bus
tomorrow is fine too ๐
๐
check dev console, some css or font failing to load? ๐
(looks fine here)
๐ค how is extension support hard to do
should be straigth forward like ... literally
via "myweirdextension" methodname(arg1 ....)
and then some specially crafted fancy instruction that just passes everything to the first matching dll endpoint
args can only be c base types
so no objects or whatever passed
hell ... allowing objects is neither hard to do
the moment one enters extension land everything is lost anyways and either BE failed to block something or something else (loading unknown extensions --> BE failed or game already hacked)
so you could just pass the raw pointers and say "figure it out yourself"
then a month later the community will already have the important properties available with some fancy ass magic methods
not planned
How sad :(
I'm not rewriting all my python code depending on lots of python libraries depending on lots of C libraries to enscript ๐
I remember someone making his own pipeline by writing JSON objects to a file and reading that with a different process and vice versa

And destroying his SSD in the process ๐
Don't even get me started about the abysmal performance
Probably just the basics
I also remember someone working on a way to add a method for DLL calls himself
sounds like OFP solution
and I guess jayarma2lib but I don't know the tech behind it
Dangerous pages attempt to install software that can harm the device, gather personal information or operate without your consent.
TAKE ME BACK TO SAFETY
Things Kegetys published are safe to use.
If that's really the official decision, I cannot express how disappointed I am.
Let's just say that I was waiting for the callExtension call to be implemented to start learning Enscript because I didn't see the point otherwise ๐
A modern SSD does not care much about some file io. You would not be using that pipeline on each frame for hours.
You would not be using that pipeline on each frame for hours.
TFAR/ACRE would, if that was the only way.
It's not an issue to implement extension support per se. It has to to with issues around the implementation in regards to security why it has not been implemented yet. Thats what the responsible person had to say about it. Something like TFAR is nothing that the team plans to support
Extension support, if added at all officially, will only be implemented to call other services, with priority on http calls as the protocol allows to transmit all data types we need, primarily json
Any database storage that is related to the player safe can be modded to include any custom data on the read and write process.
@vague shard
extension support not planned (doesn't say anything about potential A4, but that makes DayZ modding currently 0% viable for me)
Every stored object is by default a weak reference.
array<MyClassA> pole1 = new array<MyClassA>();
pole1.Insert(new MyClassA());
So you have an array, and you add a new MyClassA object into it, what do you expect to be in the array now? A instance of MyClassA? no. The content is a single null reference.
Variable scopes don't work.
void myFunc() {
if (this) {
int myVar = 1;
}
if (that) {
int myVar = 1; //Error, variable already defined
}
}
Access index out of bounds on an array? game crash.
I haven't seen anything about exceptions yet, and they would be VASTLY more useful in Enscript than in SQF.
No 64bit ints (Yes it does matter!)
Wanna initialize a vector? ez! vector up = "0 1 0"; //<0, 1, 0> WTF IS THAT SYNTAX
For performance reasons (I assume) memory management is manual by default, which is a good thing for professionals, but very bad for begginers who WILL write bad code.
"automatic type detection" I love this. auto variableName = 1; // variableName will be of type integer but now read 2 lines up on the vector example and guess what will happen.
Not sure if still true, previously if you used inheritance with constructors all your constructors need to take the same number and types of arguments. (like.. wtf?)
Not sure if still true, can only have one constructor per class.
No multiple inheritance (atleast nothing about it in documentation)
I also remember someone working on a way to add a method for DLL calls himself
I might do that too if the DayZ modding spider bites me.
What I find interesting is that DayZ tools have a Enfusion dll with basically the full engine as dll exports. Things like model loading/parsing, Enscript execution and other magic stuff are just there as dll exports that you can interface with. Thought knowing BI I suppose that's not intended.
Custom non world object related data, can be stored via fileio between restarts.
Weak references are not an issue. It's a valid way to program things if you assume them weak by default. Not what someone coming from c++ for example would be expecting but not a major dealbreaker.
Scopes are not fully working yes, thats kind of and issue and that needs fixes from the Enfusion team. Already reported internally and people are looking into it.
Exceptions are not really a thing in enscript since most of the script is executed on the same thread. You can use mutlithreaded scripts easily but using exceptions for flow control there is not really the intended way either. Instead writing an error log and returning something like NULL can be used for flowcontrol.
The vector syntax is completly fine. It makes 0 difference if you type something like { 10, 20, 30 }; or "10 20 30". Also there is another snytax for them Vector( 10, 20, 30 )
If you give everything strong references then yes your memory mangement will be something beginners struggle with, but there are options like the autoptr to keep track of things and all the variables from within functions or classes are destroyed correctly on destruction.
Automatic type detection is working fine. In case of vectors you just use the explicit Vector(values) version instead of the implicit string
Trying to open DayZ dev tools to find more bad things about enscript.
"DayZ is not installed" well.. it is.. But there is a update available so let's install it.
"not compatible with installed game. Exiting..." Oh okey so, DayZ got an update, but someone forgot to bump the version number in DayZ tools. Guess I'm not gonna look then
The enfusion dll is there on purpose and yes it contains everything
Verify your game and tools installation via steam. That should fix that
"Exceptions are not really a thing in enscript since most of the script is executed on the same thread" what does multithreading have to do with exceptions?
When I throw an exception, I expect my exception handler to be called
When you throw and expection on your programs main thread your program will exit, as your handler is on the same instance. You can only handle exceptions that you can treat as something contained. Without the enscript main thread running at all times the game can not work cause the game code relies on script executions. So when you freeze it or break it you game is gonna crash
what?
Enscript would need a parent manger to that treats all child scripts as their own thing, in order to ensure that if one script dies all other can continue their work. Thats not how enfusion is desinged.
try {
throw new Exception();
} catch (...){
Log("oops");
}
That exits the game?
In all other languages that support exceptions that would just call the handler
No that case would just work fine.
I am talking about the issue of throwing exceptions without catching them in the same parent scope
It's something that would need to be resolved for enscript first to avoid some bad use of exceptions to crash the whole game.
In SQF it does not matter if you badly exit a script, it just kills that script thread but does not care the game a bit.
Since SQF is just on top of the game, doing things optionally.
Enscript and Enfusion are linked together, if enscript stops or fails the game is dead.
yeah well without catching them ofc crashes the game. Same as accessing array our of bounds and probably dozens of other things crash the game
Enscript seems to be designed to be unsafe but performant (manual memory management)
As much as you like to rant Enfusion for its current issues, most of them are borderline and would not occur as an issue to most people who just want to make their things. If you want to go on full OOP mode and treat DayZ as it was a full blown C++ project with micro optimizations etc you are just expecting something its totally not desinged for.
By default, you are able to do 99 of things you would want to do coming from previous oop programming. Enscript and enfusion are a bit limited to what they can do, and what eventhandlers are available etc and it leaves many things to the scripter, but that makes it perform faster than SQF could ever be and have a super useful link to the game processes / objects.
It's not perfect and will receive some revisions before it's used for <the name we all know is coming but of which you do not speak> but its already quite solid to be used.
I use it every day for a year now, and all issues that I found are beeing worked on, so there is a lot of hope for those waiting for the next title that they can enjoy a platform where all of this adressed.
Well ofc all of what I said will be fixed, and I expect it to be fixed too. Current issues don't mean issues till forever
Dayz is still the testbed, after testing come improvements and more testing
And for DayZ stuff like extensions for example are currently just not a thing. Yes of course it would be cool, but for the basics like having a simple database in relation to the player object, its already there.
I would for no money in the world write SQF again after knowing the better world of Enscript
Yep many of the things I need or would want to mod aren't relevant to DayZ anyway
but it would be nice to use dayz as a testbed for arma 4 stuff
which right now seems tricky
The previous focus was on "What do we as DayZ team need for our game to work", and all the addional nice to have stuff for community is just coming along currently. But they set aside time and people to this as well, and they try their best. A lot of things to be fixed are part of the enfusion tech team and they are not forced to bring out anything soon, just because Dayz would like to have it on their branch. A lot of stuff will go into the next title only.
@dusky dune The issues are minor in comparison what you can do more than you could in SQF. Other dev teams, while not planning on actually releasing anything in DayZ, look into it and test around to be prepared for the upcoming title. Moddellers and world makers might not benefit from DayZ, as they used RV tech there as a "meh" somewhat working solution. I think the next title will feature different formats there that are closer to industry standards. For models for example FBX which can currently be importend and exported, but is still used as p3d in DayZ, or their custom new format XOB.
And terrain builder etc should hopefully be a thing of the past there as well then, and be replaced by the WorldEditor in the Workbench toolset that Enfusion devs use.
For scripters is a fun sandbox never the less, and considering you can reuse all your custom mod data from arma 2 or arma 3 and inmport it + all the assets that DayZ offers you can have a lot fun. So if you only worry about how would scripting xyz work, then just have a look at it. It might already be enough to read the documentation on it in the future, but thats beeing still worked on by the dayz team and us community authors
So I guess I need to build Bugs into the vm too now instead of just the preprocessor as it is with sqfvm right now
Plus those Problems existed for too long already
To me, those are already "Features"
Maybe the one Dude who sat down a weekend with too much booze also already left... Who knows
@elfin oxide thanks a lot for all the details, insights and your perspective!
do you mind what projects you work on DZ SA engine these days, or is your focus mainly on understanding and following its and Enfusion engine development?
@vague shard I am investing a lot of time into R&D with feedback loops with the dev team to iron out issues I come across, which has been working well so far. For the projects that are not more then a quick test, I created and maintain an offline mode of the game where you have several admin utils available to test and develop mods, or just have a lot of fun as normal player doing experiments there (https://github.com/Arkensor/DayZCommunityOfflineMode). I also work on some gamemodes that were / are popular in arma 2/3 to bring them to DayZ. without the infected enabled its bascially a Chernarus sandbox with better fps :). And as a fun project that lets me work on all components of the gameplay and also on assets I am creating a fully funcional train mod, see footage on my channel https://www.youtube.com/channel/UCFB4z8XxAaEv3PxJnZ860uQ
Others work on implementing more gameplay features because they can not wait for the devs to add them like boats and helicopters, more basebuilding, more vehicles etc. Also the Epoch team is active on DayZ SA
The only thing that nobody touches atm are milsim missions. The lack of tacitcal mechanics in the game makes it not really a replacement for arma verterans who are in for the core arma experince. For those wo like to do some rpg stuff or fun missions, or more lightweigt combat like in wasteland its a perfect environment.
@elfin oxide thanks again. your offline mod and admin tools i do know
we are hoping to port IFA3 at least partially and some game modes eventually, yet depends on how things go forward on DZ SA side among other things
If you want to get some details on how hard it would be to port over XYZ asset or feature, dm me and I can give you insights into all of that.
as we also have classic PvP focus, DZ SA limitations (so far) seem to be OK for that usage
thanks. probably early next year we may get started
Another enscript gripe. Missing variable arguments.
Want a function like PrintF that can take between 1 and X arguments? Well you'll need X implementations of that command
That's a real bummer
@glossy inlet are C preprocessor macros fully supported?
I haven't seen any yet
I think I haven't tried
I bet it will be some weird shit custom rules
0 hits for #define on whole current enscript codebase
nvm. The "Find All" in "Entire Solution" actually only searches in open files
Okey, 0 hits with notepad++ too
#ifdef is used in multiple places though. There are #include's but they are all commented out.
Seems like all the #ifdef's come from hardcoded things at engine compiletime
๐คทโโ๏ธ Not like a lacking horrible arma preproc is a Bad thing
That thing has more Bugs then my Personal first implementation
So we will not have to #define ARG , ๐ข
Horrifying thing @cinder meteor ๐ ๐ ๐
Implementing the issues the preproc has Was worse then implementing a proper one in first place...
I had to be trying literally
For sqf-vm
lol
Actually the preprocessor isn't that bad. Unless fed with invalid input. Then it becomes wonky. But until then it works quite as expected (as long as you don't expect it to work like the standard C-preproc that is)
"not that Bad"
Yeah... Just that everything is fucked up that one May fuck up in first place
That Marco Expansion works feels like a miracle on some days compared to everything else
its 15+ years old that code
as long as you don't expect it to work like the standard C-preproc that is
Srsly what is the big problem? It was designed to perform macro-expansion and that it does (Even X39 admits that this works). Does it have a bad error handling (if one even wants to call it that way)? It surely does. But is it reliable when I enter the macros properly? I'd say yes ๐คท
If it produced an error instead of failing silently, it would save a lot of time
Well you would expect a good thing to be >90% good, not 60% good
reliable, nested #ifdef crashing the game..
meh
As I said: Once you start producing erroneous input it fails miserably. But if provided with valid input, it performs stuff properly
Nested #ifdefs are considered erroneous input for that argument as I believe we were never intended to be able to nest those
So don't get me wrong: I'm not super happy with the preprocessor either. But the way e.g. X39 puts it, one could get the impression that it didn't work at all. Which is plain wrong
thing is: 90% of the time being "just good enough" is not enough for satisfying
get away from the idea that "ohh it just crashes after 5 hours" is a good thing
that is literally a problem in software as a whole
preproc is shit
only thing it really is capable of not fucking up most of the time (because even here we have stuff like , and lacking features)
but satisfying? no
worst part actually is that enscript is the same thing
most of the time good
but not satisfying
It is always this way with custom languages really. Programming languages are extremely challenging to make, it is easy to make toy ones that function surprisingly well but to get them to throw good errors and to be robust and efficient is a massive engineering effort. Then you have the need for all the tooling to make the language good to work with. It might be hard to integrate an existing language but it is much harder to build your own and it will never be as functional and the tools will always be below the best.
I remember programming in Scala in the early days. It was interesting as a language but boy did the sharp edges catch you and the errors were just nonsense. Still now it has edges and issues and they have ripped parts of the language out, that has quite a team working on it for years and years.
stop defending buggy software please (nothing more the prepoc is ... or to phrase it like you did toy ones that function surprisingly well)
making preproc errors not crashing the game already took literal decades
sometimes i just wish BI would make RV at least partially open source ... at least then we could fix the pressing issues ourself
SQF is full of claymore mines and Enscript will probably be just the same. I am definitely not defending them, I am saying their strategy is fundamentally flawed as the language isn't their core business so they should be integrating something battle hardened instead.
or make stuff open source, we will fix it later then because we are annoyed
I'd absolutely support the idea of making the damn thing OpenSource!
sadly will never happen ... ripping out enscript eg. and releasing it open source would be enough ๐คท
If the enscript engine was OpenSource it would open a lot of possibilities
In terms of providing dev-tools
nah ... not really
Says the one who is devloping a custom VM just so he can execute SQF outside of Arma...
Well a big part of it is "open source"
DayZ tools has a enscript dll, with hundreds of DLL exports. Basically exported the whole engine and you can access everything
@sick verge ๐คท as i said: not really changing stuff ๐
The DayZ workbench tool is also "just" a UI which calls all Enfusion stuff from that dll.
I guess that's at least better, than what we've with SQF ๐คท
Being able to write unit tests in enscript, thanks to the DLL available, is definitely going to do much good for all the big and serious mods out there
It will certainly speed up the process of developing a bit. Testing in the actual game will still be slow because game start is likely still quite sluggish but running tests outside will help a lot.
what's wrong with current test support in sqf? ๐
You can't properly test complex stuff that relies on objects can you?
is it possible to pick up external input with an extension and communicate that to the running game? so similar to the windows pipe system
so more specifically to be able to select a server outside the game and transfer the ip+pw to the ingame server browser
You mean the extension is listening for input via console or TCP/IP and communicates that back the the game? Also what do you want to achieve with the server browser? Extensions are only really a think for servers, there are few that are whitelisted by BE for client use
And even those were sometimes kicked out for "whatever reasons"/lagged out (at least, it was like that :/ )
@elfin oxide to avoid game restart: so you select a server on a website (or a some local client app) and it makes you connect to that server ingame (without restart)
Does arma even have a solid connect to server function now? The last thing I saw was KK's hacky way with these frame lifetimes to abuse the server browser for instant connections
But unless you can get your extension whitelisted by BE, which I will just doubt for the moment, it's gonna be hard to pull that off. you might need to send the info for who wants to join which sever to to the hosting machine and remoteexec the connect to command to the client
Unless I am missing some other obvious way at the moment. Just the first thing that came to my mind now @vague shard
@vague shard you can use the steam protocol to connect your running game to a server
its essentially what happens when you click the "Join friend" button in steam
hmm but now im unsure if it also connects if already in the game (which is the important part) ๐
Aww, just a few minutes to slow
Yes just use steam connect URL. Just like how Battle royale does it
what was the link format
steam://connect/127.0.0.1:2302 ?
steam://connect/<IP or DNS name>[:<port>][/<password>]
yep
But I miss the appId in there ๐ค Guess steam figures that out on it's own
think it uses steam query to find out what appid is running on that port
the last time i tried this this opens up the A3 launcher - which is already good
yet the challenge here is really if you are already ingame
Just one note: it's port+1, so: 2303 if you would like to do some tests
And yes, it won't really work if you're already in-game
meh
So it basicly just starts the game with -connect
(or however the command was called)
if you could transfer ip+port (or name) ingame, you could direct connect or filter
so to make it specific: you want to try to find GM servers
- there is no DLC filter - at best you can search by server name
- there are 10k+ server - finding a small subset takes a long time
you need a minute to find a few GM servers, and like 5-10 minutes to find "all" GM servers
the idea is to use an external server browser which does server caching and has proper filtering
however without passing on a server while the game is running, you would need to restart the game when switching servers
afaik arma launcher can also tell the game to connect somewhere while it's running
I think it's named pipe protocol?
Or Steamworks
"And yes, it won't really work if you're already in-game" works for me.
steam://connect/wolfcorps.de:2302
Pops up steam dialog to enter password https://s.sqf.ovh/arma3client_x64_profiling_192_145649_v02_2019-06-01_12-53-37.png
I enter password, and my already open Arma just connects.. And I'm in slot selection. No problemo
You surprised me with that and I had to double-check what I said and it basically depends on your definition of "in-game" :)
If you're in-game-in-game (meaning: shooting baddies), literally nothing will happen
If you're in the main menu, then clicking the link will connect you to that server. No checks are made to verify whether you have the correct mods installed so if the requested server uses IFA and you don't have IFA loaded, it will try to connect but then kick you.
If Arma is not running and the server requires mods, it will open the launcher asking you if you want to connect with the right mods loaded
I assume that's good enough for kju?
It's for finding servers, not switching while you're already playing
@vague shard ? ๐
people go to lunch so they say ๐
its good to hear Steamworks matchmaking does provide that to some extent. thanks a lot for all the input guys!
did you guys test with the A3 launcher closing on A3 launcher, or remaining open in the background blocked?
I don't use A3 launcher :3
Actually, me neither ๐
And I don't really understand the last sentence
you can set if the A3 launcher should be closed when A3 itself launches
if its not closed, the A3 launcher is blocked against user input while A3 is running
so in other words while ingame, you cannot use the server browser of the A3 launcher
so you would still have to use a third party solution to select a new server
Are you sure? I just ran Arma and connected to a random server (wtf? finding one that will not kick you out because you're missing @shittymod/christmastree.pbo is almost impossible these days ๐ฑ ) and while I do have the "close arma to manage your mods/dlc" message on the mods and dlc tab, the server browser looks to be fully functional. Didn't try to switch servers tbh but I don't see the reason why that should not work.
Fun fact: you can run two instances of Arma with the launcher and if you close the second one, the DLC/MODS tabs become available again, even though the first instance of Arma is still running ๐
so i tried to join another server while the game is running
when you are on a server, it just ignores the call
if you are in the main menu, it seems to make an attempt
however i get:
even though ive been on an official vanilla Warlords, trying to join another vanilla official server
i suppose the problem is not owning all DLCs with that account, and the A3 launcher being stupid thinking they are required
like it shows when you want to connect:
so seems even it if may work, it seems badly implemented atm
Mods require game restart there is nothing you could do about it
It could be that addons loaded need to be unloaded rather than new addons loaded
as said its vanilla vs vanilla
and the issue is it complains due to lack of official DLCs - which are always marked as missing AND not used by any by the running missions, nor would that matter (except for Tanoa - where you cannot connect in the first place as the join button gets disabled)
so again badly designed system that needed to be fixed