#arma3_tools

1 messages Β· Page 21 of 1

woeful cliff
#

Not to mention having to analyze the game world to see what they've already done and don't need to do again, when a game loads

#

I'd much prefer SQF then

dawn palm
#

possibly getting ahead of ourselves Mulle

dapper pivot
#

Yeah, I suspect many people will prefer SQF.

woeful cliff
#

protected autoptr Timer m_timer; well, that's worrying

hallow rapids
#

I really doubt that missions will be on such a low-ish level

dusky dune
#

do we have an opinion about the new scripting language already?

#

It's going to be absolutely amazing!

#

It will not have quirks because if BIS can make it themselves you don't have to accept quirks of other languages πŸ˜„

hallow rapids
#

lol πŸ˜‹

dusky dune
#

(That might or might not be a strawman)

dapper pivot
#

If the VM/JIT/whatever is fast enough we can just write an SQF VM for it anyhow. πŸ˜‰

dusky dune
#

I wonder if there's actually just going to be some SQF support from the start

#

That shouldn't be too hard, right?

dawn palm
#

hope not

glossy inlet
#

Current enscript documentation has a "execute SQF" command

dusky dune
#

It would mean it would take ages for people to switch over

feral nova
#

Wait what ?

#

whats going on ?

dusky dune
#

Ah yeah i remember you saying that dedmen, that's where i got it from

sweet stratus
#

Nah they will push to Enfusion same as DayZ for Arma 4

woeful cliff
#
proto native bool ExecuteEnforceScript(string expression, string mainFnName);```
dusky dune
#

... we know Heisen

glossy inlet
#

Most people so far are speculating that, that will be removed before Arma 4 release though

#

But they only know as much as we do

hallow rapids
#

they need to drop SQF if they want Enscript to be picked up tbh

dusky dune
#

Well still allowing SQF would help for people to move over to A4 relatively quickly

sweet stratus
#

No

dusky dune
#

Instead of first needing to learn a new language before anyone can properly mod it

#

Catch 22 tbh

woeful cliff
#

It's pretty similar to C++. Not much to learn

dusky dune
#

Implying I know c++

#

INB4 LEARN IT

hallow rapids
#

I bet 75% of the current Arma modders don't know anything about C++ πŸ˜›

woeful cliff
#

Well, once ARMA 4 comes out, they will

dusky dune
#

"I"m fluent in SQF" is the ultimate panties dropper

hallow rapids
#

^^

scenic canopy
#

I guess it's C++ on the beach instead of SQF on the beach then...

woeful cliff
#

class SqfDebugWatcher

hallow rapids
#

how did all this talk start btw, did something get released?

dusky dune
#

No

sweet stratus
#

Arma 4 won't support SQF at all the lead developer of DayZ has stated that they had to rewrite the whole systems.

dusky dune
#

It's just part of the monthly Tool maker chat

#

We need a bingo card 😦

hallow rapids
#

ah just rehashing the old info from ages ago πŸ˜›

woeful cliff
#

@sweet stratus They had to rewrite the whole thing because they wanted it in EnforceScript. And SQF can't be easily converted to ES

#

Not because SQF is gone

glossy inlet
#

"Arma 4 won't support SQF at all because a DayZ developer said they rewrote stuff in Enscript"
I don't see the logic there

dusky dune
#

Yeah i agree

sweet stratus
dusky dune
#

Like lets say Enscript is a lot faster, surely BIS would want to convert their own code at least

smoky halo
#

we still have SQS from OFP days...

dusky dune
#

And what T_D says 100%

glossy inlet
#

Also for DayZ standalone there is no real reason to keep SQF support. As there are no existing modders because it's a new game.
Arma 4 has a lot of legacy modders though.

dusky dune
#

Just that they won't "update" SQF and that anything new is suggested to be written in Enscript and it's going to be better, more versatile whatever, still doesn't mean SQF has to disappear

sweet stratus
#

@smoky halo Hardly anyone uses it though from what I know. I don't see any reason for BiS to support .SQF in the future for Arma 4. I mean we might aswell go on to bigger and better things?

dusky dune
#

Anyway it's all speculation and it really is a catch 22, accepting SQF means a longer switchover period to Enscript

sweet stratus
#

Now that's something I haven't thought about ^

dusky dune
#

Not accepting SQF means a lot of legacy modders are going to have to learn a new language

woeful cliff
#

@sweet stratus He says exactly what I said in that video

dusky dune
#

(And take a long time even if they do know to rewrite)

smoky halo
#

@sweet stratus even though hardly anyone uses it, it is still supported πŸ˜‰

dapper pivot
#

I'm pretty sure SQF was dropped from DayZ completely, there are posts from developers saying as much. The old files are still to be cleaned up though.

sweet stratus
#

@smoky halo Only reason I can see it being supported is for a transitional period like @dusky dune said

woeful cliff
#

SQF was dropped. But support for it is not

glossy inlet
#

Yeah. I saw developers stating that they want to get rid of all SQF.
Doesn't mean dropping complete support. And doesn't mean that it will also be dropped for Arma

dapper pivot
#

Even then it needs bridges for every little bit of functionality, I'd be surprised if they wrote bridges for everything in A4.

sweet stratus
woeful cliff
#

"Butt it wad word it. De code iz 100 timez fΓ‘ster."

dusky dune
#

kek

#

300% FPS increase!

dawn palm
#

you are all dreaming in alice in wonderland. bis have never, not once, given any support to backwards compatibilty. Their games, plural are littered with the corpses of missions, addons and maps that simply arne't usable in the next engine. Nothing here, is going to change.

dapper pivot
#

Yeah, Miro has said things that would indicate substantial changes to maps.

woeful cliff
#

@dawn palm Yea, it's not like SQS is still supported

dawn palm
#

init.sqs is supported

woeful cliff
#

No shit, sherlock

dawn palm
#

haaaaaaaaaa, sorry,

#

missed the sarcasm

sweet stratus
#

If someone still uses sqs in 2018 then im worried..

dapper pivot
#

Because SQS uses the same type system and methods, SQF and the new script language don't.

dusky dune
#

camera.sqs :3

dawn palm
#

which, folks, happened to be the reason for sqs in the first place.

#

it was originally designed to_only_ work for cameras and seagulls

sweet stratus
#

lol

dapper pivot
#

Is Lystic in here?

dawn palm
#

I bet 75% of the current Arma modders don't know anything about C++

this is absolute nonsense. each one of them look at mission.sqm and desc.ext because they ahve to.

dusky dune
#

I don't know anything about C++

hallow rapids
#

reading a bunch of classes and properties isn't quite knowing C++ πŸ˜›

woeful cliff
#

sqm and ext isn't c++ just because they contain class and curley brackets

dawn palm
#

then you keep believing that.

dusky dune
#

I use cpp when I do code highlighting in markdown!

#

DOES THAT MEAN I KNOW C++

#

Oh shit I'm asking for a raise

sweet stratus
#

I don't know any C++ but if it comes to it I will learn if needed to, problem is a lot of scripters aren't willing to take the time to learn/relearn

dusky dune
#
            defaultLoad = 1;
            dependencies[] = {"Main"};
            path = "pr\frl\addons\code_rolesspawns\functions";

            class getRespawnTime;
            class clientInit;
            class clientInitRandomBS;
            class init;

Awh yea money coming in!

hallow rapids
#

having to call functions with parentheses will be a shock for many already πŸ˜›

sweet stratus
#

?

dawn palm
#

'a lot of scripters' will do exactly what they did from ofp to arma1 and arma2 to arma2OA and arma2OA to arma3. they will leave in disgust becuase their code no longer works.

hallow rapids
#

or passing parameters to functions

karmic niche
#

Right! Why do I have to pass parentheses if i don't want to pass any argument to the function?!?!?!?!???????!?!!!!!!?

hallow rapids
#

lol ^^

dawn palm
#

because () is the defination of, a function!

sweet stratus
#

@dawn palm Or they could just rewrite their code xd

woeful cliff
#

because Hello is a function, Hello() is a call to a function

karmic niche
#

mikero: check your sarcasm detectors, they aren't working today, I see πŸ˜‰

dawn palm
#

burp

woeful cliff
#

Sarcasm on the internet is like winking on the phone

dawn palm
#

yay! I must try that

karmic niche
#

[I was doing C/++ for a living before switching to Python]

dapper pivot
sweet stratus
#

πŸ˜‰ @woeful cliff

karmic niche
#

@dapper pivot this looks like the C++ implementation of the call ,IMO

woeful cliff
#

No. Those are global script functions written in C++

dapper pivot
#

How does an Enforce script call it?

karmic niche
#

I mean, the thing that is called when you call getDamage in your SQF/Enforce script

#

Maybe an array of pointers

woeful cliff
#

@dapper pivot Function forwarding in the enforce Object class

#

proto float GetDamage ();

#

Much like UnrealScript does it

#

To tie c++ and script classes

dusky dune
#

getDammage() *

#

Learn to type

woeful cliff
#

@dusky dune No, they've done it right this time

dusky dune
#

πŸ˜„

woeful cliff
#

Weell, except they still call it Behaviour

dusky dune
#

What's wrong with that?

woeful cliff
#

And colour

#

British english

dusky dune
#

God save the queen

#

I bet Ian thinks it should be like that

woeful cliff
#

Actually, Colour is from the simul TrueSky SDK

dusky dune
#

Armour

#

Tyre

woeful cliff
#

but BIS still call it behaviour

#

ou looks like it should be pronounced in french

dapper pivot
#

@woeful cliff What does the function forwarding do?

woeful cliff
#

@dapper pivot Let the compiler know to look for the function elsewhere? eg. c++

#

They can't write the entire engine in ES

dapper pivot
#

Finding the function is easy, how does the stack get set up in a way that matches the C++ ABI?

woeful cliff
#

Well, it's invoked by the VM

dapper pivot
#

Almost all scripting languages avoid the problem by just passing a generic pointer to every function:

static int someFunction(lua_State *L) { ...

woeful cliff
#

GetDamage is registered as sub_72CE20@<st0>(double a1@<st0>, int a2)

#

It's prototype is GetDamage()

#

a2 is the object it's registered to

#

a1 looks like a decompiler mistake

dapper pivot
#

No, it's some kind of annotation, ST0 is an x86 FPU register.

woeful cliff
#

Yes, the return value of the call to a2's vf table

#

It's not a function parameter

#

it's the return value of the vftable call

#

Mistaken as a parameter by the decompiler

dapper pivot
#

So if you write the native functions with machine-type arguments instead of something like lua_State *L, there's something fundamentally different.

woeful cliff
#

Enforcescript has strong typing

#

It knows the argument types passed to the function

#

It just passes those straight on to the c++ function

#

Decompiled it by hand:

float GetDamage(CObject* object)
{
    float damage = object->GetDamage();
    if ( damage >= 1.0 )
    {
        result = 1.0;
    }

    return result;
}```
hallow rapids
#

another thing people will break their minds over ^^

dapper pivot
#

DayZ isn't 64-bit?

woeful cliff
#

No matter

dapper pivot
#

What made you think it was __fastcall?

woeful cliff
#

Nothing, I just put that out of habbit since I rarely work in x86

#

There's no disassembly, so I can't actually determine the calling convvention

#

Can't know whether it's double or float either, I'm just working off of the assumption that what the decompiler determined is correct.

#

I'd be more inclined to think it's float

#

Seeing as that's most common, and they now have an 'int' type as well

karmic niche
#

Wouldn't it make more sense to switch from float to double if they are breaking backward-compatibility anyway?

#

(which would make double more probable)

smoky halo
#

I highly doubt they changed the datatypes of their objects which in this case probably is still float

woeful cliff
#

@karmic niche Question is whether we need the precision.

#

Float have less precision, but are much faster computational wise

#

And of course, double takes twice the space

smoky halo
#

BIS decides what the function returns according to the datatype they used I assume

#

so maybe world coordinates will be double now

dapper pivot
#

Faster with what? The Intel x86 uses the same floating point format once it's actually in the FPU.

#

And floats will stick around for a while yet because it's predominantly what's used in GPU shaders.

woeful cliff
#

I'm on an expert on FPUs, but I know that floats are faster to compute. Not by much, but they are.

dapper pivot
#

Current FPU's compute with > 64-bits, it's how they pull off the IEEE trick of guaranteeing the error of an operation is no greater than the rounding that would otherwise occur from doing the operation perfectly and then converting it to 32- or 64-bits.

#

When you load onto the FPU stack it gets expanded to 80-bits IIRC. It's why C++ compilers picking different FPU register spills result in you getting different results even on the same CPU.

#

(Because any time it spills back to 32-bits or 64-bits you truncate it mid-operation)

#

GPU's are different though, they prefer smaller values quite strongly.

woeful cliff
#

Well, no idea, I just know they are faster.
Wikipedia says the same thing Double-precision binary floating-point is a commonly used format on PCs, due to its wider range over single-precision floating point, in spite of its performance and bandwidth cost.

karmic niche
#

TBH I heard the inverse: that doubles are faster and floats are slower but maybe this was just a myth...

woeful cliff
#

@karmic niche That makes no sense

smoky halo
dapper pivot
#

Well, bandwidth is another story, if you've got 1k floats vs 1k doubles there's twice the data to move into the CPU with the doubles.

#

But if you're randomly picking a float vs a double out of memory it has to fetch an entire cache line anyhow so there'll be no difference.

glossy inlet
#

You can fit more floats into one SSE instruction than doubles.
But not everyone has SSE support. Even not with Arma 3.
I enabled SSE support for TFAR beta with maybe a hundred users. Only took about a week till I got a message from someone who doesn't have SSE support -.-

woeful cliff
#

@dapper pivot Well, whatever it is, floats are evidently faster

dapper pivot
#

Yeah, but I don't think the ABI supports calling into functions with things in the SIMD registers.

woeful cliff
#

Eh?

dapper pivot
#

If the float literals are stored with the opcodes then it looks like it only uses 32-bit floats.

woeful cliff
#

I think it'd have been more interesting to see SetDamage

#

@dapper pivot Where'd you get the enscript disassembly?

dapper pivot
#

Yeah, I notice they have different opcodes for native versus script calls (ncall and call) so it's possible for native calls they collect up all the arguments and actually construct a C stack with them.

woeful cliff
#

Right

dapper pivot
#

ToM and DayZ spit out .lst files when you have a scripts directory.

#

It's like Arma style file patching.

#

If you stick the right files into a "scripts" directory in DayZ it uses that as the main game script set instead of what's in the .pbo

#

For DayZ you probably want to rename BattleEye first. πŸ˜‰

woeful cliff
#

Could you write enscript purely in its assembly language?

#

Like, will it load the lst files

#

Or is it just for debugging

dapper pivot
#

I doubt it, the bytecode dumps look like it's literally spitting out blocks of memory.

woeful cliff
#

hmm, okay

#

Looks like the compiler doesn't optimize either

dapper pivot
#

Though if you attach a debugger you could see if the memory addresses in the .lst are real and, if so, start figuring out the bytecode byte format.

woeful cliff
#
Math::Clamp()
000312:0x0002b5dc:    cmpf    value, min
000312:0x0002b5e8:    bge    0x02b5fc
000314:0x0002b5ec:    move    ret, min
000314:0x0002b5f8:    rts
000317:0x0002b5fc:    cmpf    value, max
000317:0x0002b608:    ble    0x02b61c
000319:0x0002b60c:    move    ret, max
000319:0x0002b618:    rts
000322:0x0002b61c:    move    ret, value
000322:0x0002b628:    rts
000322:0x0002b62c:    rts```

`rts` is clearly a return instruction (return to sender?). Each return statement in the source causes an rts instruction. And even though the last statement is a return as well, it still puts an additional `rts` near the end. So it looks like there's no optimizing
#

Literally just direct conversion

glossy inlet
#

there is a rts instruction in BASIC apparently

dapper pivot
#

If this is their IR then they could be optimising after the .lst

glossy inlet
woeful cliff
#

@dapper pivot Doubt it

dapper pivot
#

Me too

woeful cliff
#

@glossy inlet ReTurn from Subroutine makes more sense

dapper pivot
#

JIT without optimisation would get them more speed anyhow

dapper pivot
#

Ok, just went and checked again, here's how you have fun with DayZ's scripting:

  1. Extract DayZ\dta\scripts.pbo, using a registered version of Mikero's tools. (The free ones work but why risk the goat starving?)
  2. Move the resulting directory so that you have (for example) DayZ\scripts\1_CoreExt
  3. Go in to dta\scripts\scripts\3_Game\game.c and note that you can basically mod the engine from before the splash screen even shows up.
  4. Rename DayZ\BattlEye to DayZ\DisabledBattlEye
  5. Run DayZ.exe and note that any changes you make to the enforce scripts actually take place (e.g. if you replace the DayZGame class with your own you'll get a different game)
#

When the game starts it compiles the 1_..., 2_..., etc in turn and does what seems like some pretty hard/non-dynamic linking between functions and classes.

#

And also you get .lst files such as DayZ\scripts\1_CoreExt.lst

#

The CGame object that's returned gets all the events (like OnKeyPress) and has to pass them down to the other parts of the game. So you could in theory just write Tetris in a CGame implementation and not have DayZ running at all.

dusky dune
#

just write Tetris in a CGame

I think I heard BIS say this too?

#

Or maybe that's sekrut info

dapper pivot
#

It's the basic idea behind the engine.

dusky dune
#

Like that you can basically overwrite all game behaviour if you would want to, very much unlike A3

#

Or did you tell me that before?

dapper pivot
#

DayZ has a lot of non-generic C++ in it though.

#

Like instead of building vehicles up from components using the physics primitives there's just a "vehicle" native class.

#

Whereas the ToM engine looks like a veeery vanilla build with nothing space related actually baked into the .exe

sweet stratus
#

Any way to parse through a string, scalar, bool via rvextension in c#

glossy inlet
#

Yes? Tons?

#

Don't know what you mean exactly

sweet stratus
#

I'll pm you

nocturne basin
#

why PM him? because you currently do an extremly secret project and are scared that we steal your code @sweet stratus ?

glossy inlet
#

I guess to not spam the channel with the code snippets that just spammed my PM's?

nocturne basin
#

pastebin.com and other services exist as you know @glossy inlet

glossy inlet
#

And?

#

Not like the solution to that would be useful for anyone here. So why needlessly spam the channel

nocturne basin
#

it is conspicuous when somebody comes around and PMs stuff instead of using the "normal" way to "spam" the channel

glossy inlet
#

Okey. Well. This time it wasn't.

sweet stratus
#

Thanks ^

#

Yeah, was just asking about passing through a string via rvextension dll callExtension. I linked long links so didn't want to spam . @nocturne basin

smoky halo
glossy inlet
#

Was never the question @smoky halo πŸ˜„

smoky halo
#

Its pretty much is and is close enough to be actually useful

glossy inlet
#

He doesn't need that

smoky halo
#

Unless person wants you to write the entire code for him/her

glossy inlet
#

all he wanted was to pass the function parameter into a function that expects a string

#

in the end it was just sha256(function) done.

smoky halo
#

Well you took it to PM so not like anyone could guess he had issue inside his code πŸ˜›

glossy inlet
#

There also were no issues inside the code

smoky halo
#

Ok whatever man not worth typing

glossy inlet
#

exactly why it was not worth it handling that here and spamming the channel. But you guys made it happen anyway πŸ˜„

smoky halo
#

He asked about parsing & arma extensions and c#
I just linked a useful snippet for code to deal with a common issue for new c# extension coders etc

You are the one that felt the need to reply saying its not useful in his case, as you fixed his issue in a PM.
All the spam is you felt the need to reply to basically say wrong πŸ˜ƒ

scenic canopy
#

🍿

glossy inlet
#

All he wants to do is pass a string to a function that generates a sha256 hash and returns it.
Nothing with parsing at all. Also we already solved it. So why link a snippet for code to deal with a common issue after the issue was already solved? ^^

smoky halo
#

That info wasnt in channel i.e you handled it in a PM i.e only public info was "Any way to parse through a string, scalar, bool via rvextension in c#"

#

You are arguing over a single useful link in a channel that will prob useful for the person anyways at some point.

dawn palm
#

20 years at this and i still don't know what the hell bis mean by 'scalar'. must be sqxSh*t

sweet stratus
#

who knew asking a simple question could stern a lot of confrontation within this channel ☝

scenic canopy
#

note that I don't think _RVExtension@12 is compatible with x64 extensions

sweet stratus
#

Thanks for the response anyways @scenic canopy

#

#if WIN64 [DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)] #else [DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)] #endif

scenic canopy
#

yep

#

since you're in C# you might as well use maca's nuget package like torndeco suggested to avoid handling the rvextension stuff at all

#

ah, it's not updated for x64

#

nvm then πŸ˜„

#

hmm, but I've used it to x64...

#

must've looked at the older version of it

native kiln
#

@sweet stratus pshhhh

#

method names (should) start with a capital letter in c#

#

πŸ”¨

sweet stratus
#

@scenic canopy Yeah I mean I'm just going to start off doing basic c# extensions and take it from there. Trying to prepare myself for enforce script as it seems it will be similar from what I'm hearing and just in general a nice language to learn.

@native kiln And to you mister.. https://gyazo.com/b2d9ebb31015af8401cd128f6ab5ff2b

scenic canopy
#

πŸ˜›

#

if you want to prepare for enfusion you should probably look at C / C++

#

@native kiln a button to download (deep) file list, both for the scanned workshop item and any reuploads? not sure if the file list button for matched items returns just matching or everything. can't find a button to download the scanned item file list at least

glossy inlet
#

It won't prep you that much...
And C# is similar enough. Without the complications of C/C++

native kiln
#

@scenic canopy so basically you need a page to download the file list of any workshop item? πŸ˜„

#

the file list buttons just return the matching files

#

(on the results page)

scenic canopy
#

that would be nice!

#

to avoid having to download the mod if some manually checking is required

#

especially when using more aggressive filtering

native kiln
#

sure can do

pearl beacon
#

will that be behind a login like the previous one was after some time (or am I missing things)?

native kiln
#

@pearl beacon no and even if something is behind a login its only because it has to be associated to an ID or something

#

the registration only requires you to put in a login name and a password

pearl beacon
#

so yes?

native kiln
#

@pearl beacon did you read my first sentence?

#

no

#

i dont understand what the big issue behind a registration is to be honest

#

its a username and a password

#

and yes, the password is properly stored

#

i understand that registration is something people dislike but i kept it to an absolute minimum this time

pearl beacon
#

I didn't say I dislike or like it

#

I asked if it's behind login, and you said no, but that it requires registration, so that's a yes to me -> confused πŸ˜›

native kiln
#

no and even if something is behind a login its only because it has to be associated to an ID or something

pearl beacon
#

aha Isee

native kiln
#

what i meant is that no you dont need to register to use that feature but even if somethign is behind a login it only requries minimal data to be put in

#

basically that

#

ive had people come to me in the past and rage about the fact that some things need a registration

#

so i instantly also dropped that second sentence ^^

pearl beacon
#

okay, my bad, your next sentence made it look like you do then πŸ˜„

native kiln
#

yeah i kinda thought you were about to drop the "oh i dont register on these sites" line

pliant lynx
#

long story short I had two of my large terrain projects root dirs deleted, I had backups luckily but two days worth of edits still got lost. heightmap and object alignment fixes, the only thing I have now is arma3 binarized WRP file.

#

@dawn palm @smoky halo do you guys, or anyone else for that matter, have the tools to extract heightmap + objects (with correct alignment) from binarized WRP?

vague shard
#

@pliant lynx convertwrp to pew and depew to extract data

#

a3 had no new wrp format

pliant lynx
#

okay well thats easy then, I just assumed things have changed; never assume anything πŸ˜ƒ

#

going to try convertwrp right now ...

pliant lynx
#

convertwrp worked, got PEW out of it and now importing PEW to terrain builder, thanks kju! πŸ˜ƒ

dawn palm
#

πŸ˜‡

pearl beacon
#

@native kiln I don't haha, if a web service really has no need for a username and password, I won't register out of principle :D

elfin oxide
#

@pearl beacon We can not associate your saved collections and custom filters if you are not logged in, thats why there is an account system.

pearl beacon
#

I don't need them saved :p
I understand if there is a reason like that

elfin oxide
#

@pearl beacon well you can just scan without any login on the main page, all other features that require an account are behind the login wall.

pearl beacon
#

That's perfect

elfin oxide
#

Have you even visited the site before complaining?

pearl beacon
#

where the hell did I complain?

#

the talk was about scanning only, which the new one is not up yet afaik

elfin oxide
pearl beacon
#

cool and no I didn't, didn't know beta was available even

elfin oxide
#

I understood the above discussion as complains about the system, sory then

#

maybe check the #ip_rights_violations channel as this is not really the place to discuss the crawler either

pearl beacon
#

nope, just asking, then it turned into general "why pages need registration" πŸ˜›

sweet stratus
#

This is the place for discussing c# and dll extensions right? I asked for help prior and just making sure it's the correct place

glossy inlet
#

Yes

sweet stratus
#

Ok exciting things

using RGiesecke.DllExport;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using static ul_Cinema_HandleInput_ClassContainer;

namespace ul_Cinema
{
    public class DLLEntry
    {
        [DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)]
        public static void RVExtension(StringBuilder output, int outputSize, [MarshalAs(UnmanagedType.LPStr)] string function)
        {
            output.Append(ul_Cinema_HandleInput.InputRequest(function));
        }
    }
}

DLL Entry ^^

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

public class ul_Cinema_HandleInput_ClassContainer
{
    public partial class ul_Cinema_HandleInput : ul_Cinema_HandleInput_ClassContainer
    {
        public static char split_character = ':';
        public static string InputRequest(string inputString)
        {
            string[] splitArgs = inputString.Split(split_character);
            if (splitArgs.Length < 2)
            {
                string returnMessage = "Cinema >> ERROR >> Invalid Arugments";
            } else
            {
                switch (splitArg[s0].ToLower())
                {
                    case "downloadurl":
                        string returnMessage = "Cinema >> ERROR >> Invalid Arugments";
                        break;
                    default:
                        break;
                }
            }
            return returnMessage;
        }

    }
}

^ Class Handle Input

not sure if people are familiar here with C# but running into a issue where I can't return the string within the if statement scope outside to return through the void function.

Any help would be appeciated.

glossy inlet
#

Uhm... Basic programming. Variable scopes.

#

returnMessage is undefined on the return statement

sweet stratus
#

yeah basic, im new to this shit πŸ˜›

scenic canopy
#

add a string returnMessage; first in InputRequest and remove the string before the rest of the returnMessage

pliant lynx
#

kool paste

sweet stratus
#

?

#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

public class ul_Cinema_HandleInput_ClassContainer
{
    public partial class ul_Cinema_HandleInput : ul_Cinema_HandleInput_ClassContainer
    {
        public static char split_character = ':';
        public static string InputRequest(string inputString)
        {
            string returnMessage;
            string[] splitArgs = inputString.Split(split_character);
            if (splitArgs.Length < 2)
            {
                returnMessage = "Cinema >> ERROR >> Invalid Arugments";
            } else
            {
                switch (splitArgs[0].ToLower())
                {
                    case "downloadurl":
                        returnMessage = "Cinema >> ERROR >> Invalid Arugments";
                        break;
                    default:
                        returnMessage = "Cinema >> ERROR >> No Arguments Found";
                        break;
                }
            }
            return (returnMessage);
            // return result here
        }

    }
}

this works @scenic canopy and @glossy inlet
Thank You Both

vague shard
#

semi ontopic or so ..

seems some Russians managed to patch OFP last year (chrome/google website translate works fairly well):
http://www.flashpoint.ru/threads/arma-resistance-patch-2-00-ΠΎΡ‚-ΠΊΠ»Π°Π½Π°-4rtech.55317/

rancid relic
#

setPlateNumber in arma 3 was enabled partially thanks to them

#

in VBS 1 there was semi ready code for that everybody forget about it till those Russians completed it πŸ˜›

scenic canopy
#

if only OFP had gotten JIP πŸ™ƒ

meager falcon
native kiln
#

@meager falcon Looks very cool, is that using Intercept?

meager falcon
#

yep

pearl beacon
#

oh wait, you actually made a REST server in Intercept!

meager falcon
#

yes πŸ˜…

#

thought I was joking about it? ^^

glossy inlet
#

Someone made a intercept thing without me knowing?

pearl beacon
#

no, I thought you didn't mean actual service hosted in Arma

#

but some general REST integration

#

tbh I didn't think that much about it

#

you knew Dedmen, shush

meager falcon
#

it also supports actual requests.. sync aswell as async, but async is currently a bit .. uhh... unstable πŸ˜…

pearl beacon
#

neat

meager falcon
#

also provieds a nice way to deadlock the game.. never htmlload the REST service πŸ˜…

pearl beacon
#

haha

elfin oxide
#

XD

#

Creative idea though. I like when people just do things like that

nocturne basin
#

@meager falcon is the HTTP server self-written?

meager falcon
#

actually not, I used a platform independent library called restbed which is build upon asio. I just wanted to keep my hands of the winsock stuff

nocturne basin
#

good decisionm

meager falcon
#

I just created a small wrapper around that to make it more easy to use and especially useable by the sqf commands

#

however, there are some limitations which I couldnt figure out yet (cuz no time Β―_(ツ)_/Β―)
once the server started, you cant add/remove any resources and you cannot restart the server without essentially breaking it..
but maybe if there is intrest in that, I am goind to fix that

scenic canopy
#

Cool!

#

I should port our AAR extension to intercept 😦

nocturne basin
#

Every extension should be ported to intercept
The speed benefit simply outperforms everything

pearl beacon
#

Not every extension is a performance bottleneck

elfin oxide
#

But those who are used the most have the highest bottle bottlenecks

glossy inlet
#

The biggest bottles have the biggest necks

elfin oxide
#

πŸ‘πŸ»

#

We should frame that

thin rose
#

must not be a big drinker

dawn palm
#

anyone know how to get back my friends list? the icon, top right corner has gone awol

scenic canopy
#

top right on mobile apps, top of servers list (the left side bar) on desktop

dawn palm
#

yea it dissappeared. turned out i need to rightclick->close DM (current 'friends' conversation)

tiny path
#

anyone know a mod that I can use that has a write to file, much like copytoclipboard but will write to a file with a filename?

glossy inlet
#

KK has one

#

check his blog

tiny path
#

thanks!

#

this is exactly what I need - awesome πŸ˜„ thanks @glossy inlet

#

much appreciated - will for sure speed things up πŸ˜›

feral nova
#

hmm

#

anyone know the cause of multiple steam64ids

#

trying to make a discord bot, that kinda integrates with arma using the steam account linked with discord...

76561193837958863
76561198132926159
#

apparently... i have 2 different ones for the same account

feral nova
#

before I go ahead an create something for this. is there anything to get the display name for items.. outside of arma ? for websites etc ?

karmic niche
#

Not really sure if I can help (although I have written a discor bot myself).
I... just don't understand what you are trying to do.
What do you want to obtain? What is your actual problem? What do those steam IDs have in common with your bot? What items? What does "for websites" mean?

I literally don't understand anything of what you're saying at all πŸ˜„

#

Also note that Discord userbots are forbidden and self-bots are in a grey area. Maybe I'm wrong but I don't remember the (legal) bots having a possibility to be linked with a Steam account (leaving you with userbots/selfbots) so you may want to rethink your whole bot philosophy.

tiny path
#

It doesn’t sound like he is trying to make a userbot but one that reads the linked account/steamid linked to a users own account

sacred flume
#

he might be doing something similar to what I'll be attempting soon, which is connect extdb3(or another db mod) driven database, which connects arma, to a discord bot which connect then arma to discord via the DB

#

in which case you want to be able to link the ingame players to discord users

#

but....tehre should not be multiple steamid's

#

I dont think i've seen multiple ID's linked to a name in the DB I have setup

#

or he just has a DB and is manually having someone enter the steamid?

#

to link it

#

how are you sourcing the steamid's(from where) @feral nova

#

ill run a query and see if I am getting something similar

sacred flume
#

mmm, there might be some how strange

nocturne basin
#

That just Sounds like a horrible idea you are attempting @sacred flume

sacred flume
#

why?

#

can interact with the mission and users in the mission from discord

nocturne basin
#

First of All: not everybody will have their steam and discord linked

sacred flume
#

they dont need to

#

only privileged users would link them

#

so they have access to certain commands

#

helps us moderate server

nocturne basin
#

So it literally is just to manage the running Mission?

sacred flume
#

basically, we are always in discord chat, but not always in game

nocturne basin
#

Avoid the database and use eg. An intercept plugin

#

Because what you Plan to do does not Sounds like you would need a lot of actual database purpose

#

Alternativly just run some separate Server using callextension

sacred flume
#

yea, i already setup the extdb3, I use it for a lot of things

#

this is just additional

#

ive been looking at moving to intercept

#

i thought intercept had been abandoned at the time

#

when I added it

nocturne basin
#

And avoid steamid linkage but use discord openauth

sacred flume
#

i use db for logging, and eventually going to use it for balancing units/etc

#

compiling statistics for balancing and performance numbers

#

which I can then attach web charts/etc to, and adjust unit values

#

and have mission pull in on mission start

#

throwing the bot in there was just easy and useful

#

since making the bot was like 2 days of work lol

#

i only spent a little time on intercept so far, and had trouble compiling the server mod(client mod worked) and never got back to it

feral nova
#

@karmic niche just woke up

#

its uses oauth2

glossy inlet
sacred flume
#

apparently there can be

#

a few

#

according to steam API documentation

#

you can apparently simplify part of the 64bit steamid to the same user, the rest of the data doesn't matter as far as identifying who player is

#
The low 32 bits represents the ID number for the account (the "account number").
The next 20 bits represents the instance of the account. It is usually set to 1 for user accounts.
The next 4 bits represents the type of account.
The next 8 bits represents the "Universe" the steam account belongs to.
mild kestrel
#

@dawn palm does the paid version of your tools support ODOL 73 and include MoveObject.exe?

scenic canopy
#

moveobject is included

feral nova
#

@glossy inlet ITS A STEAM THING

#

*sry caps

#

there are different "instances" of the steam64 id

#

there are a few ways to convert it

#

php example

$binary = str_pad(decbin($steamId64), 64, '0', STR_PAD_LEFT);
$binary[31] = '1';
$steamId64 = bindec($binary);

python example

binary = format(steamId64, 'b').zfill(64)
binary = binary[:31] + '1' + binary[32:]
steamId64 = int(binary, 2)
dawn palm
#

type 73 p3d's have been supported by the free tools since june last year.

feral nova
viscid verge
#

anyone bumped into this problem on a server with DSUtils.exe when signing a pbo: Error description: 8009000b: Key not valid for use in specified state ? The key was copied from my desktop where it worked just fine

karmic niche
#

In other news, the StackOverflow 2018 Developer Survey Results are out

smoky halo
#

I dont even know Rust and Kotlin

karmic niche
#

Shame on you because of Rust πŸ˜‰ (as for Kotlin, I didn't know it either 😊 )

pearl beacon
#

@karmic niche πŸ‘ŒπŸ»

fallow crest
#

Is there a way to log something in rpt with c# extension? or do i need to create a own log folder/file?

karmic niche
#

You need to create your own (or you have to resort to strange workarounds like passing the data to back to SQF, that you really do not want to do)

nocturne basin
#

intercept

fallow crest
#

thx

elfin oxide
fallow crest
#

I got my dll loaded but im getting this warning:

Warning: 12791 ms spent in callExtension calling name: "DevB_MongoDB", function: "VERSION"

My C# code is this (just for testing purpose):

using RGiesecke.DllExport;
using System.Runtime.InteropServices;
using System.Text;

namespace DevB_MongoDB
{
    public class DevB_MongoDB
    {
        [DllExport("RVExtensionVersion", CallingConvention = CallingConvention.Winapi)]
        public static void RvExtensionVersion(StringBuilder output, int outputSize)
        {
            output.Append("1.0.0.0");
        }
        
        [DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)]
        public static void RvExtension(StringBuilder output, int outputSize,
            [MarshalAs(UnmanagedType.LPStr)] string function)
        {
            string[] inputArray = function.Split(':');
            switch(inputArray[0].ToLower())
            {
                case "version":
                    output.Append("1.0.0.0");
                    break;
                case "test":
                    output.Append("Nur eine Testfunktion");
                    break;
                case "testarr":
                    output.Append(string.Format("{0}",inputArray[1]));
                    break;
                default:
                    output.Append("Error: No valid funtion!");
                    break;
            }
        }
    }
}

Anyone know how to fix this?

glossy inlet
#

Only once? Or every time you call that?

fallow crest
#

Im calling it at the start to test if its working

glossy inlet
#

Uh.

#

Doesn't answer my question

#

Is it always that slow. Or just on first use?

karmic niche
#

tbh 12s is still quite a lot, even for a one-time call

glossy inlet
#

especially for a call that does nothing besides returning a string

fallow crest
#

if i call it ingame it works fine, only on startup

karmic niche
#

FYI and for reference, my python extension that loads Python, installs custom import hooks, imports a shitload of libraries, including numpy, scipy, matplotlib takes 3-4s on the first call (and I still think it could be less)

fallow crest
#

Is there any way to change it?

glossy inlet
#

only on startup. That means all the libraries and everything that your dll loads are slow

karmic niche
#

I'd start by running the extension "manually" (create an exe that will call RVExtension from your extension) and see if the same happens

#

: Is there any way to change it?
Depending on what exactly is going on there, if it's just the initialization routine, you could create a separate thread in your extension that would initialize everything and return to Arma right away.
Of course, you would have to make sure any subsequent calls will block until the initialization thread terminates

#

This would save you those 12 seconds, assuming you will not be performing any MongoDB actions within that time.

nocturne basin
#

@karmic niche he probably would create a C# application which then in itself would not take that long to load as most dependencies are already loaded

keen owl
#

Is it a debug or release build?

#

not that a debug should take anywhere near that time, but might have side effects.

fallow crest
#

@keen owl its a debug build

fallow crest
#

with the release build it just spents 7 seconds

glossy inlet
#

The code you showed us is not causing that. So would need to see the rest of it. Github repo maybe?

fallow crest
#

@glossy inlet thats all i have. just that one file i took from the sample

glossy inlet
#

Could also be that the LoadLibrary takes that long. Antivirius? Hard drive dying?

fallow crest
#

Maybe the hard drive is the problem because im hosting local for testing

fallow crest
#

Btw does anyone know how to set the entry point for my dll?

glossy inlet
#

A different one than the Main method?
Call your special one from the normal Main method. Or write custom IL code. Or get some module that writes the custom IL code for you.

karmic niche
#

Or open the dll with python, using the pefile library and then do a:

pe = pefile.PE('your.dll')
pe.OPTIONAL_HEADER.AddressOfEntryPoint = 0x12345678
pe.write()

πŸ˜‰ (Joke! Don't actually do that! :P)

glossy inlet
#

Prolly won't work with .Net though πŸ˜„

karmic niche
#

I'd expect that to work, actually.
If it's a PE file (and it should, since it's supposed to be loaded by LoadLibrary()) so it should conform to the PE specification. It probably does a lot of additional .NET related initialization afterwards but the EP should be present.

But it's still not the way I'd expect Basti to solve his problem πŸ˜„

feral nova
#

how useful would an api be for classnames ?

#

class > displaynames ?

glossy inlet
#

If it supports all mods and languages. I'd say marginally useful

feral nova
#

mods will be added over time but it returns json right now

#

might add support for others

glossy inlet
#

I don't think I ever needed to get a display name from a classname outside of Arma

#

Except for my loadout editor. But that had everything in it's own database anyway

feral nova
#

yeah

#

i was thinking for people who make web panels and what not.

#
_fullArr = [];
{
   private _displayName = (getText (_x >> "displayName"));
   if (_displayName != "") then {
     _fullArr pushBack [configName _x,_displayName];
   };
}forEach ("true" configClasses(configfile >> "CfgMagazines")) + ("true" configClasses(configfile >> "CfgWeapons")) + ("true" configClasses(configfile >> "Cfgvehicles"));

{diag_log format ["%1",_x]}forEach _fullArr;
``` anything else i need here ?
#

I might even get it to put other info , just thought of that

#

maybe full config ?

glossy inlet
#

A full external config viewer would be awesome

feral nova
#

i dont know php + html or css but if I can get the api working, im sure someone could come up with something πŸ˜ƒ

glossy inlet
feral nova
#

will do πŸ˜ƒ

glossy inlet
pearl beacon
#

that doesn't look exactly updated

glossy inlet
#

Yeah. 1.62 is a little outdated ^^

pearl beacon
#

not even

#

ACE 3.3.2 πŸ˜›

glossy inlet
#

Also only supports a fixed localization

#

No access to the stringtables

#

Combine a config browser that can read directly from PBO (maybe even local PBO via Javascript?) with the workshop crawler. So you can just tell it to download and display config for any workshop mod.
Give it a easy to use and powerful API and a way to export full config dumps.
Boom. A new powertool was born.

feral nova
#

it should be up now

#

default arma 3 classnames for vehicles /weapons /magazines

#

*should

smoky halo
#

This isn't really a #arma3_tools but it's about tools. Which parameter would I use to skip obfuscated pbos in extract pbo

#

I tried dont pause but it didn't skip it q-q

#

Unless I did it wrong.

glossy inlet
#

I thought extractPBO only extracts one PBO per process?

smoky halo
#

The dos can do all in a folder if there are no errors

#

try dragging the 'addons' folder into the dos shortcut

#

I think I might just do it manually. Takes longer but it'll be faster than when I get a response xd

#

That's extracting the folder ting

#

That's how u do it πŸ˜›

glossy inlet
#

Guess you gotta press the ANY key.

#

Just hold down the ANY key Β―_(ツ)_/Β―

smoky halo
#

then it closes and I have to move the mods out and repeat the process

#

that's what I'm doing right now

#

been doing it for awhile now xddd

#

atleast it's faster now instead of before cos I got an ssd

karmic niche
#

And for the ANY key, maybe "piping" an empty string would do?
i.e.: echo "" | extractpbo %f

#

Otherwise, try with a newline, instead

dawn palm
#

Same behaviour for ALL my tools: Extractpbo, will NOT, under any circumstances continue processing once an error has been discovered. As much as you think you would like it to, if the tool behaved like that you would then fill forums with "why doesn't it work" when half a dozen pbos appear to have been extracted but are in fact faulty. Brain dead operation, as in ignore faults as bis do, is just not going to happen.

Yes, there is the occaisonal obviousness like obfuscated pbos which simply won't extract anything at all, but I aint going there. Faulty folders of pbos are faulty folders. And since no one ever reads error messaages, all that will happen is 'why didnt MyWidget.pbo" extract when it extracted everthing else?

With regards to -P. It is implemented for bat file use where the user takes responsibility to stop processing. The only difference between using / not using it is there's no annoying halt on the dos console. The bat file is expected to say

if errorlevel 1 goto do_something_about_It

It is not there to 'ignore all errors'

feral nova
#

hmm.

#

@smoky halo you about ?

#

Link is SS, Probably should be under scripting, but i think it might be Extdb/SQL related.
https://gyazo.com/dc21ddebd087b58d37268e3457f5f74b

"SELECT ListingID FROM `lega_market` WHERE ListingItems = '""[9,`house`,[]]""'"
``` is a diag_log of the query. with formatting. so I removed the extra " , which works in a sql query direct. but returns.
"[]"
glossy inlet
#

What if you execute it directly? Outside of Arma?

feral nova
#

works fine.

#

thats what the screenshot is

glossy inlet
#

Oh.. Yeah didn't look πŸ˜„ Oops

feral nova
#

well... something is wierd...

_itemArr = [9,"house",[]]; 
_itemArr = [_itemArr] call DB_fnc_mresArray; 
_queryMarket = format ["SELECT ListingID FROM `lega_market` WHERE ListingItems = '%1'", _itemArr]; 
_queryResult = [_queryMarket,2] call DB_fnc_asyncCall;
diag_log format ["%1",_queryResult];```
#

works fine.

fallow crest
#

Hey guys, would you use RvExtension or RvExtensionErgs function (c# extension functions)? because atm im splitting a string i.e. "DB:GET_DB" with the split char ':' into an array and then im searching for the function with a switch. would it be better if im doing it with the args thing?

glossy inlet
#

If you do the args thing you don't need to split anymore.

#

If that's better is personal opinion I guess

scenic canopy
#

I made a tool to extract all game config as JSON

#

if that's of any interest @glossy inlet

glossy inlet
#

Not for me ^^ But maybe for @feral nova

scenic canopy
#

started working on a react app for it too but never got around to complete it

feral nova
#

πŸ˜„

#

@scenic canopy yes please πŸ˜ƒ

scenic canopy
#

there's a very broken browser

#

and older arma vanilla dump

feral nova
#

have you got the extractor ?

#

Im going to be making an api for it.

#

and adding mods over time

scenic canopy
#

yeah, you pick which mods to launch with and get a nice json in the end

#

the existing AiO has most of the code already

feral nova
#

if you could supply that all I have to do would be to add new entries πŸ˜ƒ

vague shard
#

is there a tool to beautify sqf code (automatic formatting)? or can one of the IDEs with sqf support do that?

nocturne basin
#

Nobody ever implemented iirc that but theoretical that is already possible with numberous Tools

#

Just not implemented

feral nova
#

i think posiden has something

vague shard
#

will see how it goes with it

keen owl
#

Is it configurable? I dislike the non-consistent indentation of closing braces on ifs, e.g. for the example (from TM4_Indenter) with line 43 (starting line 41) vs line 45 (starting line 34).... And when run from the editor example (from Poseidon Plain Text Editor), some of those do line up?

nocturne basin
#

Sqf-vm sadly cannot Format due to comments etc are preprocessor related

#

But could fully Format comment free Code

#

And without preprocessor

vague shard
#

@paper hatchzleflash#7409 its actually based on uncrustify. the configuration files are in .\Poseidon\Data\Packages\Bin\uncrustify

#

.sqf as language C

#

i did this many years back too. it doesnt like for, while and some other constructs but works alright

faint void
#

I've just come across Intercept ( https://github.com/intercept/intercept ) and I've got a couple ideas I'd like to try, but I'm not sure if I understood this project correctly and whether my ideas are feasible with it

#

I've read something about Intercept being able to "tap" into engine level functionality, and if this is true then that would be really useful for my ideas

#

in my case I'd like to manipulate the contents of inventory holders (both objects like vehicles/boxes, but also the player's inventory) though I have no idea if any of this can be achieved with this project

#

does anyone know how feasible (if at all) this would be?

dapper pivot
#

Mostly it lets you call SQF commands directly from C++.

glossy inlet
#

Intercept can mostly just use what SQF commands already give you

#

There are some special things. But inventory manipulation is not one of them yet

faint void
#

right, that's what I was worried about

#

I'd do it in SQF but there are no commands available, so I was hoping Intercept would somehow give me access to areas that cannot be manipulated with scripting commands

#

ah well, thanks for the info

glossy inlet
#

It can. If you are a hacker πŸ˜„

#

I have some prototype code that could do that I think. But integrating that would take too much time and work I think.

#

Better just wait till BI add's my addWeaponWithAttachmentsCargo(Global) command.

faint void
#

but seeing as nobody has even commented on it yet, it's not looking promising

glossy inlet
#

Item UID's don't work.

#

They don't exist.

#

The ID of a item in a container is it's index in the item list.

#

Remove the item before it. And the index changes

#

Yeah. They thought of adding a way to use Item ID's. But it didn't work.

faint void
#

I already assumed they wouldn't come back to it and fix it, so I stopped working on my custom inventory project a while ago

#

thankfully I didn't sink too much time into it

#

still, I hope BI will redo their inventory system from scratch for ArmA 4, to make inventory manipulation more accessible and more straightforward

elfin oxide
#

They did

#

ArmA 4 will most likely based on Enfusion and not on RVEngine

#

Enfusion has a great inventory system where items are actual object that you can assign values etc

dapper pivot
#

Wasn't that part of DayZ?

elfin oxide
#

I don't see why they would use RV again if they have something better with Enfusion. Maybe they have something even better than enfusion though ...

#

Yes they use it for dayz atm

#

They used it for other titles too, like take on mars

dapper pivot
#

No, as in DayZ had a different implementation (that didn't come from Enforce).

elfin oxide
#

Not sure what you mean but since they switched to enforce the inventory was the same all the way

#

Its handled engine side atm but you have full access to adding and removing items, taking things to hand etc. And how you display your items GUI wise is totally up to you

vague shard
#

it was done before in RV engine

#

weapons and such were made entites like vehicles

#

thus a lot more interaction was made possible

dawn palm
#

updated tools

arma3p updated to work faster by using a file.lst of pbos to extract rather than extracting inividually

depew re-written for faster operation (one of the first and oldest exes in the toolset)

eliteness updated to properly display cyrillic character filenames (eg) AND to decode three newly intoduced map= icons for the 2d map in wrps

pbodeps updated to properly display cyrillic characters and european umlats (NOT codpepage1252 which is the default for europe and not suitable for bis utf encoded character strings).

the dll has been updated with significant changes/speed improvements for rap/derap
fixed bug in dissappearing error messages for stderr dos console output
fixed requiredaddons rebuilds where it was always rebuilt and with sometimes repeated names
p3d:
made detection of an unknown map= type as a warnings are errors, not a throw (credit snakeman)
added two new mapinfo items (map= in the geolod)

#

oh, and credit to killswitch for constantly keeping these tools up to date for linux. Neither of us are particularly interested in the microsoft OS, but he does all the hard work.

dusty imp
#

@dawn palm legend

nocturne basin
#

question: would anybody be interested in SQF-based commands for INI-Parsing? (intercept-plugin)
alternativly, XML parsing etc. could also be provided

dawn palm
#

added two new mapinfo items (map= in the geolod)
bzzzt wrong, these are simply newly indroduced icons for minforestSquares and Rocks, there is no p3d associated with them, and the above was misleading info for model makers.

smoky halo
#

didnt test it yet

nocturne basin
#

paint.net plugin formats are fairly straigth forward
as long as the base is working, the plugin should work too

smoky halo
#

well my code doesnt do swizzling so far. so probably has problems with _sky textures ^^

sly skiff
#

ah that site again xD

#

rip-rip-ripaway take all the content

#

how can you say this For rights holders All models are published by users, so p3dm.ru is not responsible for their content. All copyrights belong to the specified owners. If you are the copyright holder of the file "Jared Hester", located on the site p3dm.ru and do not want it to continue to be freely available, then we are ready to assist in the removal of this material. Just write us.

#

and the "Admin" of the site is the one uploading all the ripped content

glossy inlet
#

Ah no

#

I see

sly skiff
#

I play random rant card

glossy inlet
#

"resource-extractors" 😏

sly skiff
#

xD

keen owl
dawn palm
#

defxy.exe

#

they are compressed qnions

keen owl
#

qnion?

dawn palm
#

ah hang on, brain fart, i saw 'seven shorts' and assumed rtm

#

moment

#

struct OFPEntry
{
uint16_t CharIndex; // bias by 0x20. 0 = space, x21 = 'A' etc
uint16_t TextureFileNum; /* Fontname "CourierNewB64"
font desc file = "CourierNewB64.fxy",
first texture file "CourierNewB64-01.paa",
second "CourierNewB64-02.paa".
*/
uint16_t wX,wY; //3C,70 - Top-left Corner of char on the texture;
uint16_t wWidth,wHeight; //10,14 Width and Height of char on the texture;
};
struct FxyEntry : OFPEntry
{
uint16_t KerningWidth;
};

#

kerning was introduced for arma

keen owl
#

So each entry is 7 ushorts. All such entries coming immediately after the signature which consists of 4 chars, and ulong (4 bytes) version

dawn palm
#

checking...

keen owl
#

This is the data I get

(b'BIFo', 258)
FxyEntry(code=33, paa_file=10, x=0, y=8, width=0, height=166, kerning_width=0)
FxyEntry(code=87, paa_file=44, x=65535, y=65535, width=55, height=46, kerning_width=65535)
#

The first is signature parts. Each FxyEntry is basically each ushort in that order (first one adjust +0x20).

#

As you can see it doesn't look quite right.

dawn palm
#

65535 == -1 == default

#

so it it's a short, not a ushort <grin>

keen owl
#

at least for x, y and kerning width

dawn palm
#

it's been a long time since i've been in here, so I applaud your efforts to use fxy files, let me run some tests....

keen owl
#

Yup. But all my data get's misaligned. I just changed those I mentioned to shorts. But the paa_file and charcode get's screwed:

FxyEntry(code=33, paa_file=10, x=0, y=8, width=0, height=166, kerning_width=0)
FxyEntry(code=87, paa_file=44, x=-1, y=-1, width=55, height=46, kerning_width=-1)
FxyEntry(code=65567, paa_file=55, x=8218, y=-1, width=65535, height=55, kerning_width=8222)```
dawn palm
#

top of file is mimetype 'Bifo' + ulong version (x0101)

#

remainder of file is an integral chunk of 7 'ushorts'

keen owl
#

Is there padding at end?

dawn palm
#

so immediately, your version number seems wrong

#

there is no 'padding' for version 0x0101

keen owl
#

It's 02 01 00 00 in hex

dawn palm
#

yes, that btw, is not really a decimal, it's bi's way of saying version major.minor

#

please pass me this fxy file, it's a new wrinkle

#

(or tell me which pbo)

keen owl
#

It's ...\Steam\steamapps\common\Arma 3\Addons\uifonts_f_data.pbo

dawn palm
#

thank u

keen owl
#

But remove 8 bytes from the file size, and it is only divisable by 4, 6 and 12 from 4 to 20

#

I am looking at PuristaMedium. Which several has that version. (0x0201)

#

It looks like EtelkaNarrowMediumPro still uses 0x0101 version

dawn palm
#

yep that's fine, we can work together on this. it shouldn;t take long

#

suggest you also just work on listing a type 1.1 to get your listings nice and neat 😎

#

generally speaking, the 'character code' is normally listed in hex (mainly to indicate cyrillic 0x4xx chars eg)

keen owl
#

Wait, are they using 2 or 4 bytes for the entire version part?

dawn palm
#

4

#

they can't change or break this because the older file version has to remain readable

keen owl
#

Okay. But in practice first byte (in file order) is minor , second one is major, and two unused?

smoky halo
#

did they update fxy format?

keen owl
#

Looks like it.

smoky halo
#

lol, would not have expected that

keen owl
#

Weird. I am looking at EtelkaNarrowMediumPro18. And this is the beginning bytes:

Entry #1 : 00 00 01 00 01 00 01 00 00 00 00 00
Entry #2 : 00 00 01 00 01 00 01 00 01 00 03 00```
#

The width and height is different for the same character?

dawn palm
#

format is:
'bifo' 0x0102
18 bytes gumf
followed by contiguous 22 byte structures

keen owl
#

gumf meaning garbage ?

dawn palm
#

meaning to be decoded

keen owl
#

ahh

dawn palm
#

five shorts + 3 longs == 22 bytes

#

21 00 06 00 02 00 02 00 09 00 03 00 00 00 02 00 00 00 07 00 00 00
char x y w h dunno1 dunno2 dunno3

#

corresponds to an ! char which is about right

keen owl
#

Is that for purista medium? What size?

dawn palm
#

EtelkaMonospacePro9

keen owl
#

Does another section perhaps start 4954 bytes in that file?

dawn palm
#

probably. looking at that

keen owl
#

My bad another 22 bytes further in

dawn palm
#

yep two sections so far, each with an 18 byte gumf

keen owl
#

if I read the dunno's as signed 32 bit numbers, their range sort of makes sense as some kind of offset.

#

Also might byte 26-47 actually also be a valid 22 byte entry for whitespace?

dawn palm
#

dunno3 is the nEntries in each section
section one = 0x20...0xFF
section two =0x100 to 0x192

#

0x20 is a valid char for whitespace

#

it's a valid, blank, paa texture just like any other

keen owl
#

What mean nEntries in a section? What sections?

#

Also I count 224 entries in the first part, so that gotta be that the E0 = 224 at byte 22 indicates?

dawn palm
#

there are 0xE0 00 00 00 entries in the first section for chars 0x20 to 0xFF
0x92 entries in the second for chars 0x100 to 0x191

#

each 'entry' is the struct described above (22 bytes)

smoky halo
#

did they include the config that was used for fxy creation?

#

// list of ranges of letters we want to include into font
class Latin1
{
// base ASCII and Latin-1
start = 0x20;
end = 0x100;
};
class Latin2
{
// Latin-2 (Latin Extended-A)
start = 0x100;
end = 0x180;
};
...

keen owl
#

Ah. I see. I have 4 sections in the file.

#

The first byte in the gumf is the file number

dawn palm
#

yes, it's been done well, they finally have winansi (probably) and 'proper' cyrillc

keen owl
#

Although everything else in the gumf is identical?

dawn palm
#

I suspect it's NOT latin2, T_D, more likely to be upper half of first unicode page (which almost corresponds to winansi)

smoky halo
#

that was just an example: here are the other default Unicode sections

#
class LatinExt
{
  // Latin Extended-B
  start = 0x180;
  end = 0x250;
};
*/
class Cyrillic
{
  // Cyrillic
  start = 0x400;
  end = 0x460;
};
/*
class CyrillicExt
{
  // Cyrillic Extended
  start = 0x460;
  end = 0x500;
};
class CyrillicSup
{
  // Cyrillic Supplement
  start = 0x500;
  end = 0x530;
};
*/

class SpecialCharacters
{
  start = 0x2010;
  end = 0x2020;
  list[]={0x2122};
};```
#

I never remember how to post code in discord πŸ˜„

dawn palm
#

me neither and can't be bothered learning new tricks

#

are you getting above from source code? because the ranges do not correspond to what's in the fxy file

smoky halo
#

it's from the default config in the arma tools folder of FontToTGA

dawn palm
#

in fact it doesn't matter, the above are unciode descriptors

#

and really, that's all that matters. pure utf8/utf16le

smoky halo
#

I wonder what version the current FontToTGA creates

dawn palm
#

well you're the genius with this stuff, so get to work!

smoky halo
#

I thought you would do the work for a change πŸ˜„

keen owl
#

Well, 1.1 seems to work, and 1.2 partially works. Still don't know what the 3 additional values are, and it fails on puristamedium

dawn palm
#

No t_d, i just take all the credit.

#

i'll check purista next Muzzle (nice work btw)

smoky halo
#

the tool still creates 1.1

keen owl
#

u2

dawn palm
#

well ditto binarise, the unreleased version produces 3 new mapinfo items

smoky halo
#

without a version change?

keen owl
#

I am looking at specific Purista-Medium18. The hex looks... interesting.

#

Lots of FFFFFFFF columns when aligned on 16 byte wide columns

dawn palm
#

there's no requirement for wrp version changes with mapinfo items. there should be, there isn't

smoky halo
#

maybe the mapinfo items were introduced with latest wrp version?

#

but not used so far

keen owl
#

for purista medium 18, a valid section seems to begin at position 0x12F2

dawn palm
#

pls give me the fileanme Muzzle, so we work on same page

keen owl
#

uifonts_f_data\a3\uifonts_f\data\Fonts\Purista-Medium\Purista-Medium18.fxy

dawn palm
#

k

keen owl
#

But before that section something is clearly aligned on 16 byte boundaries it appaers

dawn palm
#

k

#

ouch

keen owl
#

at 0x12EE is 4 bytes E0 00 00 00 , which can be read as 224. After that it if you read 22*224 bytes ahead, ending shortly before new gunk

#

And the entries seems to match up with char codes from 0x30-0xFF every 22nd byte.

smoky halo
#

can you send me the Purista-Medium18.fxy?

dawn palm
#

dun

#

0x12EE is a long way into the file

keen owl
#

Another section starts after the next gunk. At 0x2938, there is 0x92 00 which is 146, the same size for the second section for Etelka. The first char code is 256 also

#

But what is all that gunk doing there.

dawn palm
#

how did you skip over or determine the ff ff ff f fffffffff entries?

keen owl
#

Got something more.

#

at 0x18 there is 5B 02 in little endian = 603

#

Each of the gunk entries seems to 8 bytes. And if you skip 603 *8 = 4824 bytes you end up at the first section I mentioned

#

Yup, I can verify that also matches another gunk later down.

smoky halo
#

do you know when they introduced this font format? which arma version?

dawn palm
#

yes to above muzzle

keen owl
#

I think we need to understand the missing bytes for the section header right after the signature

#

This is how I parsed it for Etelka:

SectionHeader_1_2(section_no=2, unknown=b'\x00\x0e\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00', num_entries=146)
SectionHeader_1_2(section_no=3, unknown=b'\x00\x0e\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00', num_entries=96)
SectionHeader_1_2(section_no=4, unknown=b'\x00\x0e\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00', num_entries=52)```
#

Basically the 18 bytes were: one byte for section number (could be 2). Then 13/12 bytes of gunk. And finally 4 bytes num entries

#

The first and latter part seems to still match up, but somehow the section is of a different type since the num_entries are now of size 8 rather than 22

#

And the length part starts 4 bytes earlier for this kind of section

#

Here are the bytes immediately after the signature. The last 4 bytes has been verified to indicate the size of the section after. But for the "gunk" section the size of each entry is 8 bytes, but for Etelka it is 22 bytes. For the other files, valid 22 bytes comes after the gunk.

01 00 1F 00 00 00 1A 00 00 00 5B 02 00 00               - PurisMed18
01 00 20 00 00 00 1B 00 00 00 70 03 00 00               - PurisMed19
01 00 23 00 00 00 1D 00 00 00 70 03 00 00               - PurisMed20
01 00 24 00 00 00 1E 00 00 00 70 03 00 00               - PurisMed21```
#

I would interpret it as 2 bytes section number, followed by 4 byte chunks.

#

The last being the count of following entries.

smoky halo
#

are you on dev or normal branch?

keen owl
#

normal

smoky halo
#

k

keen owl
#

Spotted something.. I think the garbage part of Etelka is 0 bytes.

#

The unknown part is the number just before times 8 bytes long. So it works out for Etelka too. It has a 0 byte section of this unknownness:

01 00 | 1F 00 00 00 | 1A 00 00 00 | 5B 02 00 00 | Unknown |             - PurisMed18
01 00 | 20 00 00 00 | 1B 00 00 00 | 70 03 00 00 | Unknown |             - PurisMed19```
dawn palm
#

the section structure is as follows (based also on your work)

struct section
{
ushort secion_num;
ulong max_height;
ulong max_width;
ulong n8byteEntries;
float thingy[n8byteEntries][2]; // ie none if zero
ulong n22byteEntries;
byte font[n22byteEntries][22];
};

keen owl
#

Nice πŸ˜„ ..

#

max_height before max_width?

dawn palm
#

i chose arbitrarily to give em a name, the value is always larger

keen owl
#

I think it width then since paa often unuse bottom?

#

*reverse order I mean

dawn palm
#

am comfortable with that

#

i think your 'unknown' above, is the often non-existent float array

#

.... now to test my theories...... 😎

#

no crash with above struct

smoky halo
#

the texture file #1 of Purista18. Could one of you send that to me too πŸ˜ƒ

dawn palm
#

moment

#

am not too interested in these large fonts because most of them wont be filled out with cyrillic or 'latin2'

keen owl
#

Jup, a bit slow but I got it working.

#

But smaller font have ? :S

dawn palm
#

well less work, less bloat

#

and 100x more likely to be used in text strings

#

large font is decoration and rarely contains information content text

#

msgheaderTitle = SNOW BERRIES

#

so what.

#

@smoky halo the true unicode upper code page is officially called, "latin-1 supplement", it is often confused with winansi (code page 1252). I'd be keen to know what the glyph is at 0x00A2

keen owl
#

what file is it?

dawn palm
#

EtelkaMonospacePro9-01,02,or 03.paa

#

(depends on the 22 byte file indicator)

#

and i was wrong with above:

codepoint 0x80 is the euro symbol in winansi, and is blank in latin-1

keen owl
#

the glyph at 0x00A2 is cent

dawn palm
#

yes, thank you, that's helpful, but sadly i got it wrong, winansi and latin are same for that one. (sigh)

smoky halo
#

number of sections per fxy is the same as number of texture files?

keen owl
#

in a sane world yes

#

theoretically, there is nothing to prevent have multiple unused texture files, or several empty sections.

#

That enough for me today. Thanks for the help guys. I put my Python code here if anyone else will find it useful: https://pastebin.com/jVG9wnsQ . Though for now it is still missing what the 3 unknown values are in the new format, and what the pairs gunk part is about.

smoky halo
#

I have a feeling I know what the 8byte entries are

#

here is my guess for 8byte entry:

ushort charTo;
int distance; (always? negative so more like a overlap)```
#

I cannot explain why they occur in pairs of 8byte entries though, because each entry already contains the pair of chars.

#

so I might be off with my guess

#

but if you look at the chars that are used there, the thing that I noticed is that you can put them closer together. A ',' or '.' for example can be put closer after an 'F' because at the lower right corner of the 'F' is still space

#

charFrom will be from the section while charTo can also refer to other char codes not present in the section

dapper pivot
#

Didn't they add Kerning pairs to the new format? That would have (left character, right character, absolute or relative spacing adjustment) somewhere.

dawn palm
#

number of sections per fxy is the same as number of texture files

yes. and so far, the section number itself refers to the abc1,2,3.paa

the unicode codepoints in 'section #1' correspond to ascii glyphs in abc1.paa

#

i think you're (both) right Ian

dapper pivot
#

And yeah, if there's negative values then it will be an adjustment from the default font spacing (where the edges of the x-box touch)

#

If you open the original TTF in a font editor you should be able to look at the table of kerning pairs it's presumably just copying.

dawn palm
#

.... and much better too is the Euro symbol is present in abc4.paa, and has the corresponfing unicode codepoint. this means that ABC1.paa is NOT winansi

#

this is a typical 'kerning' entry:

2c 00 31 00 ff ff ff ff 2c 00 54 00 ff ff ff ff

how do i interpret that please?

keen owl
#

, (comma=2c) followed by 1 (0x31) relative shifted by -212 ???

dawn palm
#

ah thank u

#

that makes sense because:

2c 00 31 00 ff ff ff ff 2c 00 54 00 ff ff ff ff
2c 00 56 00 ff ff ff ff 2c 00 57 00 ff ff ff ff
2c 00 59 00 ff ff ff ff 2c 00 76 00 ff ff ff ff
2c 00 77 00 ff ff ff ff 2c 00 79 00 ff ff ff ff

#

(sorry for the doubled up pairs which are in fact not pairs at all

keen owl
#

oh my bad I misread -212 before, accidentally put 2c together

#

it's all -1

dawn palm
#

yes that threw me

keen owl
#

so that just mean actually -1 of some unit, or some kind of default

dawn palm
#

yep

keen owl
#

it seems wasteful to add so many entries if it is just some default

dawn palm
#

umm, we are dealing with bis here.

keen owl
#

Well I am not going to tell BIS how to do their thing..... But if they take apart a font file, just to construct their own format in 15 different size variants, eventually adding kerning pairs back into their own format, for their windows game, rather than just use DirectWrite, then that's their thing.

#

Though DirectWrite might only be Vista and forwards so sorta makes sense if no backport exist

dapper pivot
#

Also DirectWrite doesn't work for Vulkan. πŸ˜‰

keen owl
#

I though they used OpenGL/DirectX?

dapper pivot
#

They use DirectX now, but my money is on Vulkan winning because Microsoft will try to make new API's only available from the MS store.

#

And unlike OpenGL/DirectX, Vulkan isn't any more difficult to use than DirectX 12.

keen owl
#

I see. Anyway my point was, that if they were gonna take apart a font format, just to put all the pieces back in again in their own custom format, they might as well read directly from the source. Surely there are other font libraries.

dapper pivot
#

Other games do the same thing, e.g. distance field font rendering uses pretty heavy pre-processing that you'd not want to do suddenly during the game.

smoky halo
#

there are other values than -1 like -2 and -3 πŸ˜ƒ

keen owl
#

Rumours abound that a -4 has been spotted in the wild πŸ˜ƒ

#

So how does, say for a gui element, the font and sizeEx get handled? I imagine sizeEx is a simple multiplicative factor, but how is the font size determined?

dawn palm
#

possibly the W and H parms of each section ?

keen owl
#

But those only exist in the sections of the new format.

#

Maybe you guys already realised this, but I am guessing the kerning pair values are in pixel offsets then?

dawn palm
#

idiot question. why vulkan? why not OpenGL and be done with it?

dapper pivot
#

OpenGL in the early days was complicated to use because you didn't have a minimum basic level of assumed support from the hardware (you had to detect all kinds of features) whereas DirectX just says "if you don't support X, Y and Z you aren't considered a DirectX N video card".

dawn palm
#

k

dapper pivot
#

And also you have to pretty much manually dynamically load every new OpenGL function from the DLL.

dawn palm
#

ah, similar to java? load-the-function-before-u-use-it. each time. every time.

dapper pivot
#

Hence the popularity of DirectX for PC games, it was easy to just specify a DirectX level and then write to it and tell people they needed a "DirectX N" card.

dawn palm
#

yep. that does make some sense.

dapper pivot
#

DirectX 12 and Vulkan are quite different, the idea with them is you go very low level to milk every last drop of performance.

#

You can set up multiple jobs for a GPU to do, tell the API how those jobs depend on each other, and then the GPU can run many jobs at the same time to make sure it isn't ever idle waiting for the CPU to give it more work.

dawn palm
#

'with them' i think you mean 'with vulkan' ?

dapper pivot
#

And since they're both equally complex, DirectX doesn't have the simplicity advantage any more.

#

With Vulkan and DirectX 12, DirectX 12 is completely different from DirectX 11.

#

Any sane company would've named it something else.

dawn palm
#

It's a DirectX brand name that counts here i guess.

dapper pivot
#

Because they will probably have to put out an update to DirectX 11 at some point and who knows what that'll be called. πŸ˜‰

#

Vulkan is the next generation of OpenGL by the way, it's roughly the same group doing it.

dawn palm
#

ok. that is making even more sense now.

#

I obviously use OpenGl for the penguin, but i've never paid much interest in the how.

dapper pivot
#

Yeah, Vulkan will be the primary API for Linux eventually.

dawn palm
#

my interest was limited to the KDE desktop. it did/does what i want.

dapper pivot
#

And because it'll end up being used on mobile devices too, hopefully that makes it more attractive than DirectX 12 and stop MS from trying to use API's to kill and replace Steam. πŸ˜‰

dawn palm
#

and, as you know, anything gui in the penguin, is less processing crunch at the server / apache / sendmail end.

#

the new fxy format uses (obviously) more than 4 paa sections for cjk (ideographic fonts) up to 24 in fact. but it ALSO repeats the same sets again, again and again, for many fonts. with different 'weights' in section header

#

At the moment i'm impressed with bis . The fact that they're supporting katakana (and cyrillic) 'properly', and also sticking to true unicode. You'd think 'true' unicode would be obvious, but there are dozens of errors in their code where they 'assume' cp1252. The rpt log being one of them from memory, and the mod.cpp in a persons mod, definately.

#

Personal opinion only, i think it's pretty dumb supporting kerning at all, it's a game for god's sake, not a letter quality word processor. Perhaps they need to when they grab the original truetype fonts.

dapper pivot
#

Not supporting it severely limited the fonts that they could use.

dawn palm
#

well, again, the fonts they can use shouldn't need to be too many. ImHO

dapper pivot
#

Most fonts are close to unusable without kerning pairs, the ones they picked before just happened to be not horrible without it.

dawn palm
#

k

dapper pivot
#

You even used to have to avoid using lower case in the default A3 font because it looked terrible.

dawn palm
#

My argument there (if there is one) is they chose the wrong default font.

dapper pivot
#

Lower case would be an issue with almost any font.

dawn palm
#

k

#

(except for monotype, fixed spacing) slap

#

I think someone made a boardroom decision to increase the number of fonts as a marketing gimmick and the devs are paying for it.

dapper pivot
#

Or the designers pushed for it when they were asked to do the new Apex UI.

#

Ah, or they did a mock-up in Photoshop or Illustrator, sold it to management, and then dumped it on the programmers to implement. πŸ˜‰

dawn palm
#

seems like they don't have a 'chief engineer' with enough muscle to bite them.

vague shard
#

they added support for Japanese and Chinese and such in recent months, didnt they?

glossy inlet
#

I think 1.76 update was that yeah

plush shard
#

I think Japanese was supported pretty much since the beginning

elfin oxide
#

Nah they added support for it not long ago. Might have been adding MORE chars though instead of adding the language itself

glossy inlet
dawn palm
#

Turkish wasn't or wouldn't be too difficult to add because it uses the romanic character set with an extra cedilla or two

#

arabic/katakana/mandarin ideographs are a different ballgame

keen owl
#

Interesting they have a few explicit (as an complete unicode symbol) ligatures in there, like ff

dawn palm
#

they do. and along with the 2nd half of the 1st codepage (blahblah1.paa) they are always present in blahblah4.paa along with the euro symbol

#

Βƒ Β§ Β€ Β¬ ΒΆ

keen owl
#

But they also have some "missing" glyphs for unicode chars. The image is just the 404 version of unicode.

#

In an attempt to fully understand the format, I am trying to render some text. So far I would make an excellent kidnapper: https://imgur.com/a/Ij0V8

keen owl
#

K. So for the new entries, it is: char_code, x, y, width, height, offset_x, offset_y, kerning_width

#

Is there any information about 'descenders' anywhere? I am rendering using the sections max_height yet it only goes from the top to the baseline

keen owl
#

Tried rendering with kerning pairs. I deliberately selected pairs in the left part that have high kerning offsets. The bottom is with pair kerning, the above has not. Does it look right? https://imgur.com/a/rQnfB

spiral forge
#

the comma difference may, depending on situation, make some stuff less readable maybe? aside from that, ev. fine

dapper pivot
#

Is that Purista Medium?

keen owl
#

yes

#

Lou, yes. But to be clear there is no space before or after the comma

#

It is testing kerning directly between comma and W

spiral forge
#

I might ask... -why- do you want to do that :p

dapper pivot
#

Lou: Arma isn't allowed any secrets from us.

#

any

keen owl
#

You mean why would I ever but put letters immediately after comma with no space?

#

I probably won't (can't think of why), but it is jus to test the code

spiral forge
#

not that I am against it

keen owl
#

But my goal is to gain full understanding of the font metrics, so I can make nice aligned text in arma guis

#

Besides Purista, any font making use of kerning pairs?

#

With exception of Purista and EtelkaMonospacePro they all seem to still be version 1.1

#

And obviously monospace does not have interesting kerning pairs

#

Hmm space has no kerning width in v1.1

#

Inside Arma, in the config for CfgFontFamilies, there are for some fonts entries like:

spacing = 0.17;```
#

I am guessing those numbers are somehow used. Yet other v1.1 fonts, like RobotoCondensed does not have such an entry

#

Nvm, on RobotCondensed, it is v.1.2

dapper pivot
#

The largest kern is between L and Y (e.g. LY)

#

Actually it's between Y and AE (AE as one glyph) which is unicode 0x00C6.

keen owl
spiral forge
#

it indeed works

dapper pivot
spiral forge
#

I like the YÆ link

dapper pivot
#

The AE should stick into the Y

#

Yeah, that looks spot on.

keen owl
#

Even space does not have a width in the font file itself:

  117 FxyEntry_1_1(char_code=32, file_no=1, x=1, y=1, width=0, height=0, kerning_width=0)
P 117 FxyEntry_1_1(char_code=80, file_no=1, x=329, y=61, width=29, height=56, kerning_width=29)```
#

The second number, 86, 117 is my X drawing position.

dapper pivot
#

Is there any space between the f's in ff? Purista has no spacing between the cross strokes.

keen owl
#

No, there is no kerning pair entry for that one

dapper pivot
#

Yeah, there won't be a kerning pair, it should just naturally line up.

keen owl
#

At least in my rendering there is a one pixel empty space between

#

In texture file number 4

#

If I render them, two individual f f at size 9 instead they sorta merge together, with partial opacity where they connect.

dapper pivot
#

Yeah, it might just be rounding error, but in the OTF itself they connect (with r's and t's too)

keen owl
#

I think it might be how BIS pixel encoded it rather than my rendering if I may be so bold. The lower resolutions seems to merge better. It is only when I go up to size 46 there is a pixel dividing line.

#

'rt' definitely connects, 'ft' and 'tf' has the same line

#

And at size 18 they meld together

#

Still not sure about my EtelkaNarrowPro though. It is version 1.1. with no space for well space, and no included spacing between letters. In other words the kerning concerns only the letter part and not the spacing between. I used the values from the config:

spacing = 0.17;```
Since my test size is 46, I  multiplied by that and got   spaceWidth ~=41   (for reference a W has kerning width alone of 44), and then I did the same to get  spacing ~= 8.  I replace the 0 kerning width of space with the 41, and add spacing (8) to all kerning widths (including space again). This is the output: https://imgur.com/a/Hx10h   (and this one is where I only use the raw kerning_width from the file: https://imgur.com/a/GuZwQ)
#

But doesn't really fit the name of a font with narrow in the title?

dawn palm
#

I deliberately selected pairs in the left part that have high kerning offsets.
the best example of what kerning actually means, it's visual effect, and why it is explictly kerned character pairs is shown in your example of LY

#

The image is just the 404 version of unicode.
the 'image' is just a rendition of what's already out there in an already existing font that's been arm wrestled into paa. There's no extra work here, there's no attempt to add more glyphs than the font already has. There is NO font in the universe that has all unicode glyphs. One that comes closest is arial and is probably less than 10% of the whole.

#

and I'm thrilled to bits that it IS the 404 standard which bis haven't buggered up.

dawn palm
#

arma3p update (credit dahlgren)
now extracts the unencrypted pbos of tanks.dlc

dawn palm
#

DeFxy now decodes the new format1.2 (credit Muzzle and T_D)

dawn palm
#

I have also introduced (similar to most other tools) NameOfFileORfolder. The latter is exceptionally helpful for rapidly finding bazongled files in a3\ (there currently aren't any faulty fxy, but dozens of p3d) or listing only specific type of fxy (eg). -options for this are in an alpha state subject to change.

vague shard
#

@dawn palm cant quite follow and didnt see anything in the changelog i can relate to this
do you have an example please

dawn palm
#

i gone went and broke it. fixing when i have time.

vague shard
#

k

vague shard
#

does anyone have a list of sqf cmds with only local effect, and one with for local object execution?

keen owl
#

I find you can't rely too much on the list. Pretty much everything related to UI, including actions, and map stuff including markers are local.

#

I saw setRank in that list and made no sense that it is local. Then reading it is supposedly changed in Arma 3 to something more sane.

#

But you are not the first to ask. There was some discussion in #arma3_scripting some time ago, that it would be nice to have that sort of information extracted from Arma.

dawn palm
#

this might not be relevant to the question,. but there's another category of sqf. 'Apparent' constants known only at game/engine load time, vs constants known at compile time. One popular verb is GetProductVersion. This has the benefit of providing (eg) different classes in a config,cpp, based on the engine under-the-hammer, or the engine revision. The problem with 'apparent' constants is the config.cpp can never be,, a config.bin.. Caveat Emptor.

nocturne basin
#

@dawn palm there is no constant Known at compiletime in sqf

dawn palm
#

model.cfg's use sqf constants.
rad +90
sin 30;

glossy inlet
#

db

dawn palm
#

configs use sqf constants in exec/evals

#

_exec ( a= 1+ pi + sqrt 2);

glossy inlet
#

But that's simpleExpression and not SQF right?

dawn palm
#

they are part of the sqf language

#

or sqs if you prefer

#

the exec evals for huds can be quite complex math expressions, but you almost never encounter them because they have been compiled out.

#

and a series of thermal constants beginning with K=... is also fairly expressive. But you can't of course use GetPlayer <grin>

nocturne basin
#

@dawn palm thing is still: sqf does not knows constants

They May be baked by executing it in Configs
But they are not actual constants

dawn palm
#

you're arguing semantics.

#

pretty hard to see how PI is something other than 3.1437.....

smoky halo
#

technically those expressions are not evaluated by the sqf engine afair

dawn palm
#

what does 'evaluate' them then?

smoky halo
#

need to check. gimme some mins

dawn palm
#

bis binarise copies that section of code, directly out of the engine to evaluate model.cfg statements. the same orders of precedence and the same operators, indeed the same verbs are used as in sqx proper.

#

complete with unary binary and constant, operators.

#

the very same engine code is used to evaluate _exec/eval (in cfgConvertFileChange)

#

and of course, the very same code is used by the engine if it gets hit with a config,cpp containing exec/eval

smoky halo
#

you are right mike

#

it gets through the sqf-vm

dawn palm
#

hell, you even get 'non scalar' and other bloody nonsense if you type it wrong. So, bottom line folks is sqX is NOT just for missions at run-time, or the init= when you open a door.

nocturne basin
#

@dawn palm it is no constant if it is determined at runtime
Even if a method always Returns 4, it still is a method

#

And in sqf, nothing is set at compiletime unless you explicitly write eg 12

scenic canopy
dawn palm
#

it is no constant if it is determined at runtime
Even if a method....
get over it X39. PI, 'true' and 'false' are constants not methods. And just to ruin your day, sqf is run at compile time, not runtime (eg not gametime), for model.cfgs and exec evals.

#

you're pushing a barrow up a hill arguing that constants aren't produced or recognised until sqf is actually run.

#

the constant that is called config.bin, in it's entirety isn't a constant until something bothers to read it's static, fixed in concrete, entries.

nocturne basin
#

They are nular commands that get called thus no constant
And Config eval is not determined at compiletime magically on the sqf side!
Only Config compiletime

dawn palm
#

ok ok you win. let's move on.

nocturne basin
#

And I repeat myself: method_true() neither would be a constant but a method call

#

The difference is Important

Yes, they May get baked into Configs but the actual nular commands are nontheless commands

#

At compiletime of Config they get called
In Config context this only thus is true but not for sqf context

#

Unless they use a different "vm" for Config eval

dawn palm
#

as if I or anyone else sane, would give give a rat's arse whether PI is a 'nular value' or a mongolian tomato with eyeballs

#

that's just delving deeper into the mess that's already called bis.

nocturne basin
#

Sqf is dang simple and with intercept it even gets optimization that actually makes nular commands as constants

#

And I do give a shit due to sqf-vm

dawn palm
#

so the message from you is, instead of keeping it simple, with words that every sane coder would understand, you want to let everyone know your profound knowledge of this awful, awful, language.

nocturne basin
#

I want that nobody has false assumptions

glossy inlet
#

@scenic canopy Used from other addons mainly. Will also provide standalone SQF functions for like remoteExec returning something like a std::future for return value.

smoky halo
#

my PAA lib now supports channelSwizzling so it is able to correctly read _sky textures

dapper pivot
#

C doesn't have constants either by that logic, since every constant access invokes a "register load immediate" cpu instruction.

#

Except for the rare few CPU's that have constant generators feeding right into the ALU, but they only have a very small number of hardwired available constants like 1, 2 and -1.

nocturne basin
#

@dapper pivot not true due to load constant actually being the instruction that Puts a value into the alu

Equivalent to sqf would be a subroutine call

dapper pivot
#

Load immediate puts it into a register, not the ALU. So whether there's an operation at runtime (like SQF's nullars) really has no bearing on when you'd use the term "constant".

nocturne basin
#

@dapper pivot there is an impactfull difference especially in speed
And indeed, you are right about the alu Part but still not comparable as nular still has subroutine call as its closest Equivalent

dapper pivot
#

What are you comparing the speed of?

nocturne basin
#

CallX is pretty expensive while push just pushes

#

Theoretical, nular can return anything

#

But they do not

#

Still that is more like the RFC April fool random

#

Eg pi (nular command) returns actual pi
But nobody says it might not change

#

You could make it a constant by using intercept optimizer (not sure if yet released)

dapper pivot
#

The same could be said of most of things like std::numeric_limits, yet you wouldn't chide anyone for calling the members of it "constants".

nocturne basin
#

Just that there is only one constant in sqf and that is a value
Everything else is not constant but a command

#

A meaningfull difference that also prevents people from thinking stuff like "Player is a preset variable"

#

And other funny things that come around