#arma3_tools

1 messages ยท Page 30 of 1

glossy inlet
#

latest version?

fickle void
#

yeah frontend stopped responding to mouse, keyboard still works partially

#

can't alt f4

#

just checking for updates now

#

it isn't latest

glossy inlet
#

I also had that at work. But VS updates fixed it

#

In the mean time just show me the code ^^

fickle void
#

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)

glossy inlet
#

oh inside arma ๐Ÿค” hmpf

fickle void
#

and before it writes out to the next file :/

#

actually i will remove all the actual code that does things and check

smoky halo
#

Can you open 10000 files for writing on windows?

#

and not crash?

keen owl
#

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.

smoky halo
#

ah yeah, true

fickle void
#

it doesn't reopen the files with new handles anyway it just looks them up in a hashmap if they are already open

fickle void
#

FYI the problem was some kind of conflict with reshade. Removing that (or using the latest version instead) and the problem goes away.

sick verge
#

Can a macro-name start with a number?

#

Like #define 1name

nocturne basin
#

AFAIK no
but you should test it
arma might surprise here

sick verge
#

Alright - thanks

glossy inlet
#

afaik it searches for first non-whitespace char. Which a number is

sick verge
#

Alright - have to test this at some point then ๐Ÿค”

sick verge
#

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?

glossy inlet
#

Well I know armake preproc would print bar

sick verge
#

That's what I'd expect. But I'm not so sure if Arma is behaving as expected in this casse ๐Ÿ˜… :

nocturne basin
#

same for SQF-VM
i would expect the same with arma though

glossy inlet
#

There's still hope, that we don't have to fix our stuff

nocturne basin
#

"fix"

#

i ain't "fixing" this

karmic niche
#

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?

glossy inlet
#

Because maybe someone has tested that already and knows the answer.
There are enough weird people here that, that might be possible

karmic niche
#

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

sick verge
#

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
nocturne basin
#

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 ๐Ÿ™ˆ ๐Ÿ˜„

glossy inlet
#

true

#

armake doesn't need to recreate the mistakes

sick verge
smoky halo
#

Does anyone here mod? Like factions and vehicles

glossy inlet
fallen stone
#

@sick verge You'll probably find that behaviour in every preprocessor

#

Pretty normal

sick verge
#

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 ๐Ÿคท

fallen stone
#

๐Ÿ˜ƒ

#

armake doesn't need to recreate the mistakes
If it's outputting foo then I'd say that's a mistake

glossy inlet
#

Like how Arma crashes/kills itself on nested ifdefs. There is absolutely no reason to replicate that mistake in armake

fallen stone
#

No, but if not ARMA, it should conform to something like cpp

glossy inlet
#

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

fallen stone
#

Which means in this example, it should output bar ๐Ÿ˜› ?

glossy inlet
#

ye

nocturne basin
#

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

sick verge
#

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

wind coral
#

is it possible to make a file stream handle accessible to other functions? (specifically in cpp)

cinder meteor
#

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);

wind coral
#

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.

cinder meteor
#

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);

wind coral
#

Him, yes cpp file streams.

#

I will see about this, does if stream act like the flag for open? Open file for input?

cinder meteor
#

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

wind coral
#

Right, the open function with ofstream has three flags, one for writing, reading, and then one for pruning data upon opening.

cinder meteor
#

IDK what happens when you try open an ifstream for output ๐Ÿคท or the other way

wind coral
#

Hmm.

cinder meteor
#

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

wind coral
#

I honestly have no idea either. But it seems to fit the needs for now

cinder meteor
#

do you need output now? ofstream works for output for sure, that's what I know

wind coral
#

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?

cinder meteor
#

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?

wind coral
#

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?

cinder meteor
#

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

#

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

wind coral
#

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?

cinder meteor
#

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.

wind coral
#

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?!

cinder meteor
#

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

wind coral
#

Ah. Buffer is fuller faster with smaller bits with quicker intervals?

cinder meteor
#

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.

wind coral
#

Ok, that makes sense. Sorry for question overload. Exciting stuff.

cinder meteor
#

then actually the hard drive itself has some sort of buffer/cache built it... which is transparent for us again ๐Ÿค”

wind coral
#

Does that differ any from what you were talking about?

cinder meteor
#

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

wind coral
#

Makes sense.

glossy inlet
#

@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

scenic canopy
#

+1 on nlohmann json

glossy inlet
neon flax
#

Someones It could be you lenny

exotic mesa
#

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 ?

sick verge
#

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)

smoky halo
#

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

sick verge
#

Woops then I remembered the command wrongly

vague shard
#

anyone here ported/imported custom fonts to A3?

nocturne basin
#

whats the problem?

#

as far as i know, you just need to render them to a texture

#

and then you are done

obsidian sluice
#

Sure, I did

dusky dune
#

Yes, the build in tool works fine

#

Keep other languages in mind though ๐Ÿ˜„

#

(non-roman font)

onyx helm
#

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")

glossy inlet
#

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

cinder meteor
#

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 ๐Ÿคท

nocturne basin
#

there is not really much more you could do then before

glossy inlet
#

code which runs fixed amount of time? what does that have to do with optimization?

cinder meteor
#

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

glossy inlet
#

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

cinder meteor
#

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

wind coral
#

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?

glossy inlet
#

Example code?
vector type for strings -> std::vectorstd::string

wind coral
#

Hold on.

glossy inlet
#

lets go and falls

wind coral
#

๐Ÿ˜ฎ

#
 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

glossy inlet
#

std::find doesn't return a vector

wind coral
#

Oh wait

glossy inlet
#

it returns iterator

wind coral
#

Correct

glossy inlet
#

what is cmdLib?

wind coral
#
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

glossy inlet
#

std::find returns iterator

#

to get index std::distance(cmdLib.begin(), yourFoundIterator)

nocturne basin
#

std::unordered_map or std::map

glossy inlet
#

He's not mapping anything tho

wind coral
#

iterators are used for essentially "combing" the array though yes?

glossy inlet
#

Well could map string to index.. that'd be a waste

#

yeah

nocturne basin
#

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

glossy inlet
#

iterators are basically pointer to a element in container

wind coral
#

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.

glossy inlet
#

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);

wind coral
#

OH!

wind coral
#

Ok, now I have this bot bob that can find stuff in files for you.

smoky halo
#

auto variablename =

glossy inlet
#

Somehow my thinking ability decreases while I'm at work ๐Ÿค”

obsidian sluice
native kiln
nocturne basin
#

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

scenic canopy
#

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 ... )
nocturne basin
#

Literally nothing right now

wind coral
#

What is wrong with using auto? Too much memory allocation?

smoky halo
#

who said it? nothing is wrong with using auto

#

even better you will learn to appreciate auto&&

wind coral
#

&& flag for read only?

smoky halo
#

no it is a universal reference

elfin oxide
#

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

fallen stone
#

Somebody has been reading Meyers!

glossy inlet
#

Almost always auto ๐Ÿš—

smoky halo
#

Only if you know what is under the hood otherwise it will be driving blind

glossy inlet
#

Almost know what you're doing

quick fog
#

@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";
};```
#
  1. 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?

#
  1. why does it add #define _arma_ to the rvmat?
#
  1. 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

glossy inlet
#
  1. 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
  2. it's useless. But all of mikeros config stuff does that
quick fog
#

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!

scenic canopy
#

pboproject takes care of tga -> paa if I remember correctly

#

even inside p3d and rvmat

glossy inlet
#

If you have source files. I'd recommend just using notepad++ replace in files to replace file paths in bulk

dawn palm
#

#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.

vague shard
#

@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

quick fog
#

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

obsidian sluice
#

I usually do that manually with e.g. Notepad++

nocturne basin
cinder meteor
#

I don't understand, do you mean that it is constantly re-compiling as you type and highlighting errors?

nocturne basin
#

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

sour bluff
#

did mikeros tools change name from maverik to bytex?

glossy inlet
#

That's not their name

#

he just changed distribution platform

smoky halo
#

you are in the wrong business Dedmen

#

giving away shit for free

nocturne basin
#

IIRC, that is not fully true

#
  • he got that fancy orange now
smoky halo
#

Mike Andrew is that real Mikero's name?

glossy inlet
#

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

nocturne basin
#

well ... no option for me ๐Ÿ˜„

native kiln
#

@glossy inlet You got 2 patrons

glossy inlet
#

One was a donation. Not a follower thing

pearl beacon
#

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 ๐Ÿ’ช

glossy inlet
#

I don't do important things either :D
Does anyone really? Everyone basically just does the nieche thing that they like to do

pearl beacon
#

that's what's modding is about

#

and why I think Patreon and any kind of donations are most suited for it

nocturne basin
#

Got a Paypal link in my stuff for ages
3 donations in total iirc

sour bluff
#

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

vague shard
#

@sour bluff contact them best on their discord

dawn palm
#

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

amber heart
#

@glossy inlet I don't do important things either :D Getting a PBR shader in-game would be pretty important.

glossy inlet
#

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 ๐Ÿ˜„

amber heart
#

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).

cinder meteor
#

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 ๐Ÿค”

nocturne basin
#

uhm ... what for?`

#

you do not even need an intercept addon in theory for that

cinder meteor
#

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

smoky halo
#

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

obsidian kayak
#

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

glossy inlet
#

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.

obsidian kayak
#

fixed the issue above. I used addon builder instead if anyone else has this problem

obsidian kayak
#

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

scenic canopy
#

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

cinder meteor
#

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

glossy inlet
#

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

cinder meteor
#

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? ๐Ÿ˜ฎ

glossy inlet
#

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.

cinder meteor
#

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)

glossy inlet
#

It's all by reference

#

so it all points to the same data

nocturne basin
#

something to note: points to the same data

cinder meteor
#

That's good to know, thanks!

obsidian kayak
#

thanks @scenic canopy! also I meant to say cfgWeapons ๐Ÿ˜ฌ I hope that doesn't make a difference here

scenic canopy
#

no difference

glossy inlet
#

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.

cinder meteor
#

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?

glossy inlet
#

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}]

cinder meteor
#

That's pretty interesting, thanks!

smoky halo
#

I have experimented with circular buffer for script scheduler, it would handle anything you throw at it and no choke

glossy inlet
#

once script is done just take from start and push to end? instead of resorting every frame?

smoky halo
#

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

glossy inlet
#

dynamic? based on a fps target?

smoky halo
#

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.

glossy inlet
#

I would ๐Ÿ˜„ But I don't care about scheduled

smoky halo
#

Yeah you are not BI programmer and even if you were, you would probably not be allowed

dawn palm
#

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.

mild kestrel
#

@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.

dawn palm
#

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.

scenic canopy
#

any improvements on the shadow lod issue generated by binarize?

sly skiff
#

What was that again?

scenic canopy
#

binarize generated a duplicate shadow lod which triggered pboproject warning while validating lods, or something like that ๐Ÿ˜›

glossy inlet
#

that's your issue

#

shadowBuffer lods should not be inside your model

#

OB displays them as shadowLod 1000+

#

Binarize generates them. You can't

glossy inlet
#

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.

scenic canopy
#

@glossy inlet problem is that it blocks building islands without warnings if they depend on say CUP ๐Ÿ˜ฆ

glossy inlet
#

Well someone has to fix the broken p3d files

scenic canopy
#

even worse with islands depending on older mods which are no longer maintained at all since they will never be fixed

cinder meteor
#

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

glossy inlet
#

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

glossy inlet
#

Oof.. finally done.
Recompiling and publishing a dozen projects is too much work :U I should probably get proper CI going ๐Ÿ˜„

vague shard
#

@scenic canopy duplicated LODs is a warning AFAIK. no problem with pboproject nor makepbo here

scenic canopy
#

I don't like warnings ๐Ÿ˜„

#

since other things slips through without "warnings are errors"

vague shard
#

well his tools are rather expressive - hence we postprocess those with regex to keep it to the relevant info

sacred flume
#

@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

cinder meteor
#

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?

scenic canopy
#

I use the builtin Arma autotest functionality on GPU VMs, works fine

sacred flume
#

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

cinder meteor
#

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)

sacred flume
#

its not done for a speedup, but for versatility of having a c++ environment that can use external libraries

glossy inlet
#

"(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

cinder meteor
#

the instructions and all that is slow yes that's what I meant I think
like, the VM part of it?

karmic niche
#

@cinder meteor sqf commands are implemented in C++. What is usually slow is the scripting language that actually calls those C++ (sqf) commands

cinder meteor
#

that's what I meant, yes, everything that happens between these calls of native functions

glossy inlet
#

the content of native functions stays just as fast.
Just the sqf overhead is gone in intercept

cinder meteor
#

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 through reveal command 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

glossy inlet
#

"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

smoky halo
#

Well at least you can see what path it is going to take before it takes it which could be useful

glossy inlet
#

The pathCalculated eventhandler is the new cool thing

#

calculatePath is just a shorthand for something that you could also do manually

smoky halo
#

Well I havenโ€™t played with it but the AI created to which you attach EH is supposed to get auto deleted

sacred flume
#

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

cinder meteor
#

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

nocturne basin
#

Sqf as language is nice

#

The vm is horrible though

karmic niche
#

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! ๐Ÿ˜ 

nocturne basin
#

Nope

#

Sqf as language is nice

#

But the Operators are horrible ๐Ÿ˜‚ ๐Ÿ˜‚

orchid shadow
#

Only x39 could try and push such a retarded line.

cinder meteor
#

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!

nocturne basin
#

That is not bothering you if you understand that there is no code

#

Code is some magical thing more or less

native kiln
#

All this magic around it makes it unintuitive imo

smoky halo
#

Wait what? It bothers you that child scopes have access to variables set in parent scopes? What languages donโ€™t do that? @cinder meteor

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

smoky halo
#

Call is the same as if (true) {...} it is not a function call

cinder meteor
#

oh allright, let me say it this way, lack of function calls bothers me in SQF, does it sound correct?

smoky halo
#

It is just unconditional entering of child scope

#

Spawn is the closest to it

#

It creates separate scope

cinder meteor
#

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.

smoky halo
#

Think of call as lambda with env captured by reference

orchid shadow
#

just use private

#

and not a issue

cinder meteor
#

@orchid shadow you can still see privates from the caller's scope

#

But not modify them

sick verge
#

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

orchid shadow
#

Yes you are quite right, i'm so glad that i put SQF down.

cinder meteor
#

...and then you read some code and realize that it relies on variables being passed to code like that...

smoky halo
#

You can see privates from callers scope
Wut?

cinder meteor
#

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 ๐Ÿ˜„

smoky halo
#

You can modify _c in func1 and that is child scope not callers scope, your example doesnโ€™t show seeing from callerโ€™s scope

cinder meteor
#

Where was _c created then?

smoky halo
#

In callerโ€™s scope

cinder meteor
#

Isn't it called caller's scope? Like scope of the one that calls? No? I might have called it wrong then

smoky halo
#

Yeah

cinder meteor
#

So, func1 can see privates created in func0, that's what I mean

smoky halo
#

Yeah it can and this is true for most languages, I feel like we are going in circles from yesterday

cinder meteor
#

Is it true for C?

smoky halo
#

Yeah you can modify vars in parent scopes from child scopes

cinder meteor
#

I don't quite understand what we are arguing about, you are aware of the fact that I am talking about function calls ๐Ÿคท

smoky halo
#

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

cinder meteor
#

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
๐Ÿ˜„

dawn palm
#

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);

cinder meteor
#

Yes I know that it's not true for C, that was my point, but thanks anyway ๐Ÿ˜ƒ

dawn palm
#

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

cinder meteor
#

+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

dawn palm
#

agreed.

smoky halo
#

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

cinder meteor
#

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

smoky halo
#

not in sqf

#

anyway forget it

#

Not touching this subject again

cinder meteor
#

Cool, thanks

#

It's quite beyond my C++ knowledge ๐Ÿ˜„ [&](int j){std::cout << i << " - " << j; }(30);

smoky halo
#

you're welcome

glossy inlet
#

spawn is the real call Sparker! Everyone switch to using spawn now! ๐Ÿ˜„

cinder meteor
#

Yes let's see if TFAR will work with spawn first ๐Ÿ˜„

#

or maybe even execvm

glossy inlet
#

never

obsidian sluice
#

Every script I make has at least one contition while {true} and one onEachFrame

#

Fite me

sick verge
#

๐Ÿ˜ฑ

nocturne basin
#

do you even lift bro?

sly skiff
#

@dawn palm would it be possible for PboProject to not clear Data\ folder from .png files only Layers\ folder

dawn palm
#

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.

sly skiff
#

Well while it's not the best format for textures I for one sometimes use it because it's faster to preview.

dawn palm
#

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.

cinder meteor
#

I think there is no way to automate mode publishing to Steam Workshop, right?

#

through some .bat file or whatever

glossy inlet
#

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 ๐Ÿ˜„

cinder meteor
#

lol

neon flax
#

publisher has cli interface

glossy inlet
#

wuuuuht

neon flax
#

If you can trigger script on some windows server with steam running with logged account you can automate stuff.

cinder meteor
neon flax
#

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?

karmic niche
#

@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

cinder meteor
#

Thanks, I will probably figure it out after I was guided to the proper wiki page

scenic canopy
#

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?

cinder meteor
#

hmm probably @crisp gull or @fickle void knows better

scenic canopy
#

arma 3 publisher and steam client needs to be running within the same desktop session otherwise steamworks connection will fail

fickle void
#

If appveyor has a package for it

#

Or I guess we can make one

#

Or we do it on circleci

scenic canopy
#

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

fickle void
#

I could host one actually, just depends on how much effort it saves us

crisp gull
#

i dont really want to publish on steam all git versions and so keep the publish manual

scenic canopy
#

depends on how fancy steam guard you're using ๐Ÿ˜›

#

we deploy all our SFP mods to internal Dev Build for each and every commit

fickle void
#

Well I would publish with a separate steam account anyway

scenic canopy
#

and then manually decide when to deploy publically

fickle void
#

But yeah I don't think we need to automate it anyway

scenic canopy
#

(dev build being on steam)

fickle void
#

Scripting it would be nice though

scenic canopy
#

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

plush shard
#

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

vague shard
#

is there a way to upload missions via cmd too, or is its version too old?

scenic canopy
#

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

vague shard
#

kinda hate the Eden upload..

neon flax
#

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. ๐Ÿค”

scenic canopy
#

steam web api does not expose mods, only missions

neon flax
#

yeah but I've uploaded it as mission

scenic canopy
#

probably needs a tag

neon flax
#

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?

scenic canopy
#

steamworks

neon flax
#

Eh, I have only node on my pc right now.

scenic canopy
#

it's a c++ sdk from valve

neon flax
#

I know.

scenic canopy
#

either that or their undocumented APIs such as protobuf

neon flax
scenic canopy
#

it's kinda broken

#

a lot of workshop stuff is missing from it as well

neon flax
#

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.

scenic canopy
#

mods have mod and whatever categories they are in

neon flax
#

^ - it's borked by my cli upload

scenic canopy
#
"singleplayer"
"scenario"
"vr"
neon flax
#

๐Ÿค”

#

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.

scenic canopy
#

the new ISteamUGC API can only represent folders of files

#

the old API were only files

neon flax
#

I guess someone from BI would be able to help us.

scenic canopy
#

I think it was mentioned somewhere that mission uploads use the old API

vague shard
#

yeah

#

it was meant to be ported to the new eventually, but never happened..

subtle raft
#

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 ๐Ÿ˜„

glossy inlet
#

did you install extractpbo AND depbo? they are seperate installers

subtle raft
#

oh really, that would explain it

#

user error ๐Ÿ˜„

#

lol now a deogg64 error

#

im guessing thats a seperate install too?

glossy inlet
#

probably

subtle raft
#

Yup, all working now. Thanks again for your continued help to my various questions.

vague shard
#

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

scenic canopy
#

dedmen's tool is nice

glossy inlet
#

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

pearl beacon
#

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

vague shard
#

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

glossy inlet
#

unscheduled doesn't need to mean event based

vague shard
#
  (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

glossy inlet
#

where does the time allowed come from tho

vague shard
#

some arbitrary defaults set by BI

glossy inlet
#

Sounds more like it just logs when you execute a slow command, otherwise the script would suspend before it hits the limit?

vague shard
#

well its a rough indicator from what i understand. not more, not less

cinder meteor
pearl beacon
#

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

cinder meteor
#

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

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)
plush shard
#

+ 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

glossy inlet
#

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.

vague shard
#

so unscheduled extends the frame length and thus can freeze even when it takes extremely long

glossy inlet
#

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

vague shard
#

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?

glossy inlet
#

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

vague shard
#

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?

glossy inlet
#

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

vague shard
#

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

glossy inlet
#

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

vague shard
#

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?

glossy inlet
#

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

vague shard
#

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?

glossy inlet
#

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

vague shard
#

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

glossy inlet
#

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

vague shard
#

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)

glossy inlet
#

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

vague shard
#

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)?

glossy inlet
#

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

vague shard
#

๐Ÿ‘

sick verge
#

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)

nocturne basin
#

FSM FTW

#

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 .-.

glossy inlet
#

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.

nocturne basin
#
  • those are written in C#
glossy inlet
sick verge
#

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

glossy inlet
#

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

sick verge
#

Nope

#

Scripts get transferred to the client as needed on connect

glossy inlet
#

That's the magic difference then

sick verge
#

Yep

glossy inlet
#

How do you make sure that all variables arrive on the client before it tries to execute anything in preInit or init?

sick verge
#

You use CLib's entry points

nocturne basin
#
{
    if ((missionNamespace getVariable _x) isEqualType {}) then
    {
        publicVariable _x;
    };
} forEach allVariables missionNamespace;```Problem solved
sick verge
#

And put a script line in the init.sqf that waits until functions are transfered

glossy inlet
#

@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

sick verge
#

CLib also does more than just that

nocturne basin
#

was a lazy example to show how blatantly simple it technically is to archive serverside only mods @glossy inlet ๐Ÿ˜›

sick verge
#

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

glossy inlet
#

ACE has that too. But don't need that if you have ArmaDebugEngine ๐Ÿ˜„

sick verge
#

Anyone stating it doesn't do anything good, is mistaken

#

True that ^^

nocturne basin
#

though ... following the approach i did is hard if you steal most code from eg. CBA

#

you even can have some fancy RETURN macro ๐Ÿ˜„

sick verge
#

That could be said about anything in CBA - you can do it yourself. So this argument is completely useless

nocturne basin
#

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

sick verge
#

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

nocturne basin
#

show me the fancy magic then
educate me
though ... this gets too much into #arma3_scripting already

sick verge
nocturne basin
#

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

dusky dune
#

You don't know the framework but you are still claiming stuff about it ๐Ÿ˜„

sick verge
#

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

nocturne basin
#

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

dusky dune
#

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

sick verge
#

โ˜

dusky dune
#

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

glossy inlet
#

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.

sick verge
#

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 ๐Ÿคท

orchid shadow
#

It looks like stolen shit stuck together into a big heap of shit

pearl beacon
#

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

karmic niche
#

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? ๐Ÿ˜ƒ

elfin oxide
#

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

karmic niche
#

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)

karmic niche
#

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)

smoky halo
#

Make a request and ticket and post on BIF

#

And ping Dwarden

karmic niche
#

Do you think that there is still a point to do that, now that they're not focused on Arma 3 anymore?

smoky halo
#

If it is something trivial maybe there is a chance

rough grove
#

Try to load a hack and see if it's still there when the game opens /s

glossy inlet
#

@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.

vague shard
#

how much frame time is "wasted" by the scheduler ordering scripts, checking timestamps, etc - is it really significant?

glossy inlet
#

It scales linearly with the number of scheduled scripts

#

I don't think I ever measured, but I'd say it's significant enough

vague shard
#

how does unscheduled decide the order?

glossy inlet
#

order of eventhandlers

#

first added first

vague shard
#

ok ty

#

so besides (repeated) heavy commands or doing too much each frame in unscheduled is to spawn lots of "threads" (scripts)?

glossy inlet
#

I think you are missing a word

vague shard
#

*the worst

glossy inlet
#

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.

nocturne basin
#

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)?

cinder meteor
#

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?

neon flax
#

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!)

sick verge
#

The PFH is not really a scheduler. It only allows for scheduling. But it doesn't do it itself

rough python
#

Not all levels have On Surface set
From mikero tools binlog

#

any clue ?

#

on a p3d file

glossy inlet
#

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

cinder meteor
#

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 ๐Ÿค”

glossy inlet
#

We are talking about a completely different thing there

#

Ordering has nothing to do with current time, or per script command

cinder meteor
#

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?

glossy inlet
#

That is a thing, but that's not what we were talking about at all

#

we talked about the script sorting.

cinder meteor
subtle smelt
#

Question, in Mikero's PBO maker is there a way to exclude a folder? (say a .git folder)

glossy inlet
#

mikeros tools have a exclude filter, I never tried to exclude folders tho.

vague shard
#

so it comes down to using unscheduled for three reasons?

  1. execution in the desired frame/time tick no matter what
  2. not sharing execution time with other scripts
  3. 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)

smoky halo
#
  1. when opening parachute
glossy inlet
#

"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.

nocturne basin
#

Dead notification be gone! You shall no longer be my Master

vague shard
#

is there a way to process simpleExpressions via sqf?

glossy inlet
#

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"

plush shard
#

but it only takes a config, so not a solution

vague shard
#

well the goal is to import config defined FX

#

make them tweakable ingame

#

and export as config statements again

onyx helm
#

is there a new website for mikero's tools?

#

the old maverick website redirects me

glossy inlet
#

Yes

#

bytex somtehing

onyx helm
#

how would i go about transitioning my license

native kiln
onyx helm
#

hmm says mine is expired

native kiln
#

if your license is expired, you need to buy a new one

onyx helm
#

yeah i didn't think it had been a year but i guess so

native kiln
#

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

sand shuttle
#

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?

glossy inlet
#

steam guard doesn't work with it

sand shuttle
#

Since when?

glossy inlet
#

months atleast

sand shuttle
#

Meh, so either I disable Steam Guard or I can't have tow installs?

mossy dragon
#

you can use SteamCMD to update arma 3

sand shuttle
#

Oh yeah, forgot that it can not only be used for server...duh. Thanks for the help!

vague shard
#

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

limber garden
#

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

vague shard
#

@limber garden two steps ahead ๐Ÿ˜ƒ thanks a bunch!

rancid relic
#

@vague shard we have internal addon for it - I can share a cfg of it tomorrow

vague shard
#

๐Ÿ‘

rancid relic
#

@vague shard it might be not up to date

vague shard
#

buildings should be the same as in the config dump, or are there class less ones?

rancid relic
#

there are some class less

vague shard
#

kk

rancid relic
#

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 ๐Ÿ˜›
vague shard
#

is it possible to use loadFile to extract other data besides sqf and whats the size limit?

elfin oxide
#

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

sacred flume
#

@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

scenic canopy
#

do they all have unique names and class names in config?

sacred flume
#

do i need both classes under class Intercept to be unique?

#

thats prob it

glossy inlet
#

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.

scenic canopy
#

pboprefix is a good bet too ๐Ÿ‘

glossy inlet
#

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

vague shard
#

@glossy inlet top 5/10 whats terrible about Enscript right now please

glossy inlet
#

No. I'm leaving right now to catch my bus

vague shard
#

tomorrow is fine too ๐Ÿ˜ƒ

scenic canopy
#

extension support? ๐Ÿ˜„

#

might be more dayz related though

hallow rapids
#

Hmmmm... is this just me or what?

scenic canopy
#

๐Ÿ˜„

#

check dev console, some css or font failing to load? ๐Ÿ˜›

#

(looks fine here)

nocturne basin
#

๐Ÿค” 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

dusky dune
#

DLL extension support is not planned

#

WQAIT WAT

#

why

karmic niche
#

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 ๐Ÿ˜•

native kiln
#

I remember someone making his own pipeline by writing JSON objects to a file and reading that with a different process and vice versa

scenic canopy
karmic niche
#

And destroying his SSD in the process ๐Ÿ˜‚

native kiln
#

:D

#

I actually don't know what enscript offers in terms of IO operations

karmic niche
#

Don't even get me started about the abysmal performance

native kiln
#

Probably just the basics

#

I also remember someone working on a way to add a method for DLL calls himself

scenic canopy
#

sounds like OFP solution

#

and I guess jayarma2lib but I don't know the tech behind it

dusky dune
#

Dangerous pages attempt to install software that can harm the device, gather personal information or operate without your consent.

TAKE ME BACK TO SAFETY

elfin oxide
#

Things Kegetys published are safe to use.

karmic niche
#

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 ๐Ÿ˜•

elfin oxide
#

A modern SSD does not care much about some file io. You would not be using that pipeline on each frame for hours.

glossy inlet
#

You would not be using that pipeline on each frame for hours.
TFAR/ACRE would, if that was the only way.

elfin oxide
#

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.

glossy inlet
#

@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.

elfin oxide
#

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

glossy inlet
#

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

elfin oxide
#

The enfusion dll is there on purpose and yes it contains everything

#

Verify your game and tools installation via steam. That should fix that

glossy inlet
#

"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?

elfin oxide
#

DayZ should exit to desktop when you throw an exception ingame?

#

I don't think so

glossy inlet
#

When I throw an exception, I expect my exception handler to be called

elfin oxide
#

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

glossy inlet
#

what?

elfin oxide
#

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.

glossy inlet
#
try {

throw new Exception();
} catch (...){
Log("oops");
}

That exits the game?

#

In all other languages that support exceptions that would just call the handler

elfin oxide
#

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.

glossy inlet
#

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)

elfin oxide
#

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.

glossy inlet
#

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

elfin oxide
#

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

glossy inlet
#

Yep many of the things I need or would want to mod aren't relevant to DayZ anyway

dusky dune
#

but it would be nice to use dayz as a testbed for arma 4 stuff

#

which right now seems tricky

elfin oxide
#

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

nocturne basin
#

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

vague shard
#

@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?

elfin oxide
#

@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.

vague shard
#

@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

elfin oxide
#

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.

vague shard
#

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

glossy inlet
#

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

native kiln
#

That's a real bummer

smoky halo
#

@glossy inlet are C preprocessor macros fully supported?

glossy inlet
#

I haven't seen any yet
I think I haven't tried

smoky halo
#

I bet it will be some weird shit custom rules

glossy inlet
#

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

nocturne basin
#

๐Ÿคทโ€โ™‚๏ธ Not like a lacking horrible arma preproc is a Bad thing

#

That thing has more Bugs then my Personal first implementation

cinder meteor
#

So we will not have to #define ARG , ๐Ÿ˜ข

nocturne basin
#

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

cinder meteor
#

lol

sick verge
#

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)

nocturne basin
#

"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

sick verge
#

as long as you don't expect it to work like the standard C-preproc that is

#

๐Ÿคท

vague shard
#

its 15+ years old that code

cinder meteor
#

as long as you don't expect it to work like the standard C-preproc that is

sick verge
#

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 ๐Ÿคท

cinder meteor
#

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

glossy inlet
#

reliable, nested #ifdef crashing the game..
meh

sick verge
#

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

nocturne basin
#

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

smoky halo
#

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.

nocturne basin
#

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

smoky halo
#

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.

nocturne basin
#

or make stuff open source, we will fix it later then because we are annoyed

sick verge
#

I'd absolutely support the idea of making the damn thing OpenSource!

nocturne basin
#

sadly will never happen ... ripping out enscript eg. and releasing it open source would be enough ๐Ÿคท

sick verge
#

Yep

#

All the possibilities that would open... ๐Ÿš€

nocturne basin
#

uhm ... nothing

#

but we at least could fix stuff BI is not touching

sick verge
#

If the enscript engine was OpenSource it would open a lot of possibilities

#

In terms of providing dev-tools

nocturne basin
#

nah ... not really

sick verge
#

Says the one who is devloping a custom VM just so he can execute SQF outside of Arma...

glossy inlet
#

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

nocturne basin
#

@sick verge ๐Ÿคท as i said: not really changing stuff ๐Ÿ˜„

glossy inlet
#

The DayZ workbench tool is also "just" a UI which calls all Enfusion stuff from that dll.

sick verge
#

I guess that's at least better, than what we've with SQF ๐Ÿคท

karmic niche
#

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

smoky halo
#

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.

scenic canopy
#

what's wrong with current test support in sqf? ๐Ÿ˜›

neon flax
#

You can't properly test complex stuff that relies on objects can you?

vague shard
#

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

elfin oxide
#

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

wind elm
#

And even those were sometimes kicked out for "whatever reasons"/lagged out (at least, it was like that :/ )

vague shard
#

@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)

elfin oxide
#

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

native kiln
#

@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) ๐Ÿ˜„

glossy inlet
#

Aww, just a few minutes to slow

#

Yes just use steam connect URL. Just like how Battle royale does it

native kiln
#

what was the link format
steam://connect/127.0.0.1:2302 ?

glossy inlet
#

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

native kiln
#

think it uses steam query to find out what appid is running on that port

vague shard
#

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

karmic niche
#

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

wind elm
#

meh

#

So it basicly just starts the game with -connect

#

(or however the command was called)

vague shard
#

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

#
  1. there is no DLC filter - at best you can search by server name
#
  1. 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

glossy inlet
#

afaik arma launcher can also tell the game to connect somewhere while it's running

#

I think it's named pipe protocol?

scenic canopy
#

Or Steamworks

glossy inlet
scenic canopy
#

Yep, Steamworks has logic for joining lobbies

karmic niche
#

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

glossy inlet
#

I assume that's good enough for kju?
It's for finding servers, not switching while you're already playing

karmic niche
#

@vague shard ? ๐Ÿ˜ƒ

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?

glossy inlet
#

I don't use A3 launcher :3

karmic niche
#

Actually, me neither ๐Ÿ˜„
And I don't really understand the last sentence

vague shard
#

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

karmic niche
#

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 ๐Ÿ˜„

vague shard
#

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

#

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

#

so seems even it if may work, it seems badly implemented atm

smoky halo
#

Mods require game restart there is nothing you could do about it

vague shard
#

@smoky halo ...

#

this is not the point here

smoky halo
#

It could be that addons loaded need to be unloaded rather than new addons loaded

vague shard
#

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