#arma3_tools
1 messages Β· Page 21 of 1
possibly getting ahead of ourselves Mulle
Yeah, I suspect many people will prefer SQF.
protected autoptr Timer m_timer; well, that's worrying
I really doubt that missions will be on such a low-ish level
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 π
lol π
(That might or might not be a strawman)
If the VM/JIT/whatever is fast enough we can just write an SQF VM for it anyhow. π
I wonder if there's actually just going to be some SQF support from the start
That shouldn't be too hard, right?
hope not
Current enscript documentation has a "execute SQF" command
It would mean it would take ages for people to switch over
Ah yeah i remember you saying that dedmen, that's where i got it from
Nah they will push to Enfusion same as DayZ for Arma 4
proto native bool ExecuteEnforceScript(string expression, string mainFnName);```
... we know Heisen
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
they need to drop SQF if they want Enscript to be picked up tbh
Well still allowing SQF would help for people to move over to A4 relatively quickly
No
Instead of first needing to learn a new language before anyone can properly mod it
Catch 22 tbh
It's pretty similar to C++. Not much to learn
I bet 75% of the current Arma modders don't know anything about C++ π
Well, once ARMA 4 comes out, they will
"I"m fluent in SQF" is the ultimate panties dropper
^^
I guess it's C++ on the beach instead of SQF on the beach then...
class SqfDebugWatcher
how did all this talk start btw, did something get released?
No
Arma 4 won't support SQF at all the lead developer of DayZ has stated that they had to rewrite the whole systems.
ah just rehashing the old info from ages ago π
@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
"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
Yeah i agree
Like lets say Enscript is a lot faster, surely BIS would want to convert their own code at least
we still have SQS from OFP days...
And what T_D says 100%
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.
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
@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?
Anyway it's all speculation and it really is a catch 22, accepting SQF means a longer switchover period to Enscript
Now that's something I haven't thought about ^
Not accepting SQF means a lot of legacy modders are going to have to learn a new language
@sweet stratus He says exactly what I said in that video
(And take a long time even if they do know to rewrite)
@sweet stratus even though hardly anyone uses it, it is still supported π
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.
@smoky halo Only reason I can see it being supported is for a transitional period like @dusky dune said
SQF was dropped. But support for it is not
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
Even then it needs bridges for every little bit of functionality, I'd be surprised if they wrote bridges for everything in A4.
Enforce Script API. http://lystic.net/dayzwiki/
"Butt it wad word it. De code iz 100 timez fΓ‘ster."
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.
Yeah, Miro has said things that would indicate substantial changes to maps.
@dawn palm Yea, it's not like SQS is still supported
init.sqs is supported
No shit, sherlock
If someone still uses sqs in 2018 then im worried..
Because SQS uses the same type system and methods, SQF and the new script language don't.
camera.sqs :3
which, folks, happened to be the reason for sqs in the first place.
it was originally designed to_only_ work for cameras and seagulls
lol
Is Lystic in here?
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.
I don't know anything about C++
reading a bunch of classes and properties isn't quite knowing C++ π
sqm and ext isn't c++ just because they contain class and curley brackets
then you keep believing that.
I use cpp when I do code highlighting in markdown!
DOES THAT MEAN I KNOW C++
Oh shit I'm asking for a raise
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
defaultLoad = 1;
dependencies[] = {"Main"};
path = "pr\frl\addons\code_rolesspawns\functions";
class getRespawnTime;
class clientInit;
class clientInitRandomBS;
class init;
Awh yea money coming in!
having to call functions with parentheses will be a shock for many already π
?
'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.
or passing parameters to functions
Right! Why do I have to pass parentheses if i don't want to pass any argument to the function?!?!?!?!???????!?!!!!!!?
lol ^^
because () is the defination of, a function!
@dawn palm Or they could just rewrite their code xd
because Hello is a function, Hello() is a call to a function
mikero: check your sarcasm detectors, they aren't working today, I see π
burp
Sarcasm on the internet is like winking on the phone
yay! I must try that
[I was doing C/++ for a living before switching to Python]
Check out "Example: Object getDamage" on http://lystic.net/dayzwiki/, it looks like an Enforce object method is a plain C ABI function.
π @woeful cliff
@dapper pivot this looks like the C++ implementation of the call ,IMO
No. Those are global script functions written in C++
How does an Enforce script call it?
I mean, the thing that is called when you call getDamage in your SQF/Enforce script
Maybe an array of pointers
@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 No, they've done it right this time
π
Weell, except they still call it Behaviour
What's wrong with that?
Actually, Colour is from the simul TrueSky SDK
@woeful cliff What does the function forwarding do?
@dapper pivot Let the compiler know to look for the function elsewhere? eg. c++
They can't write the entire engine in ES
Finding the function is easy, how does the stack get set up in a way that matches the C++ ABI?
Well, it's invoked by the VM
Almost all scripting languages avoid the problem by just passing a generic pointer to every function:
static int someFunction(lua_State *L) { ...
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
No, it's some kind of annotation, ST0 is an x86 FPU register.
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
So if you write the native functions with machine-type arguments instead of something like lua_State *L, there's something fundamentally different.
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;
}```
another thing people will break their minds over ^^
DayZ isn't 64-bit?
No matter
What made you think it was __fastcall?
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
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)
I highly doubt they changed the datatypes of their objects which in this case probably is still float
@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
BIS decides what the function returns according to the datatype they used I assume
so maybe world coordinates will be double now
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.
I'm on an expert on FPUs, but I know that floats are faster to compute. Not by much, but they are.
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.
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.
TBH I heard the inverse: that doubles are faster and floats are slower but maybe this was just a myth...
@karmic niche That makes no sense
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.
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 -.-
@dapper pivot Well, whatever it is, floats are evidently faster
Yeah, but I don't think the ABI supports calling into functions with things in the SIMD registers.
Eh?
If the float literals are stored with the opcodes then it looks like it only uses 32-bit floats.
I think it'd have been more interesting to see SetDamage
@dapper pivot Where'd you get the enscript disassembly?
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.
Right
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. π
Could you write enscript purely in its assembly language?
Like, will it load the lst files
Or is it just for debugging
I doubt it, the bytecode dumps look like it's literally spitting out blocks of memory.
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.
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
there is a rts instruction in BASIC apparently
If this is their IR then they could be optimising after the .lst
@dapper pivot Doubt it
Me too
@glossy inlet ReTurn from Subroutine makes more sense
JIT without optimisation would get them more speed anyhow
Ok, just went and checked again, here's how you have fun with DayZ's scripting:
- Extract DayZ\dta\scripts.pbo, using a registered version of Mikero's tools. (The free ones work but why risk the goat starving?)
- Move the resulting directory so that you have (for example) DayZ\scripts\1_CoreExt
- 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.
- Rename DayZ\BattlEye to DayZ\DisabledBattlEye
- 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.
just write Tetris in a CGame
I think I heard BIS say this too?
Or maybe that's sekrut info
It's the basic idea behind the engine.
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?
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
Any way to parse through a string, scalar, bool via rvextension in c#
I'll pm you
why PM him? because you currently do an extremly secret project and are scared that we steal your code @sweet stratus ?
I guess to not spam the channel with the code snippets that just spammed my PM's?
pastebin.com and other services exist as you know @glossy inlet
And?
Not like the solution to that would be useful for anyone here. So why needlessly spam the channel
it is conspicuous when somebody comes around and PMs stuff instead of using the "normal" way to "spam" the channel
Okey. Well. This time it wasn't.
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
Was never the question @smoky halo π
Its pretty much is and is close enough to be actually useful
He doesn't need that
Unless person wants you to write the entire code for him/her
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.
Well you took it to PM so not like anyone could guess he had issue inside his code π
There also were no issues inside the code
Ok whatever man not worth typing
exactly why it was not worth it handling that here and spamming the channel. But you guys made it happen anyway π
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 π
πΏ
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? ^^
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.
20 years at this and i still don't know what the hell bis mean by 'scalar'. must be sqxSh*t
who knew asking a simple question could stern a lot of confrontation within this channel β
@smoky halo If you were wondering, I was stuck with creating this!
https://github.com/A3Heisen/sha256-rvExtension/blob/master/ul_encryption/DLLEntry.cs
Using the useful information provided on Maca134 web-blog/page I was able to achieve my original question in mind along with the help from @glossy inlet
note that I don't think _RVExtension@12 is compatible with x64 extensions
Yes, I literally just read 5 minutes ago in a response on this thread. https://forums.bohemia.net/forums/topic/181816-how-to-c-arma-extension/ about that π
Thanks for the response anyways @scenic canopy
#if WIN64 [DllExport("RVExtension", CallingConvention = CallingConvention.Winapi)] #else [DllExport("_RVExtension@12", CallingConvention = CallingConvention.Winapi)] #endif
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
@sweet stratus pshhhh
method names (should) start with a capital letter in c#
π¨
@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
π
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
It won't prep you that much...
And C# is similar enough. Without the complications of C/C++
@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)
that would be nice!
to avoid having to download the mod if some manually checking is required
especially when using more aggressive filtering
sure can do
will that be behind a login like the previous one was after some time (or am I missing things)?
@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
so yes?
@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
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 π
no and even if something is behind a login its only because it has to be associated to an ID or something
aha Isee
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 ^^
okay, my bad, your next sentence made it look like you do then π
yeah i kinda thought you were about to drop the "oh i dont register on these sites" line
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?
okay well thats easy then, I just assumed things have changed; never assume anything π
going to try convertwrp right now ...
convertwrp worked, got PEW out of it and now importing PEW to terrain builder, thanks kju! π
never should assume anything, I know how to convert wrp to pew since ages ago https://pmc.editing.wiki/doku.php?id=arma2:terrain:wrp_to_pew so stupid to just assume that "oh well arma3 binarized one dont work, lets go ask on the CHAT" hehe.
π
@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
@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.
I don't need them saved :p
I understand if there is a reason like that
@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.
That's perfect
Have you even visited the site before complaining?
where the hell did I complain?
the talk was about scanning only, which the new one is not up yet afaik
cool and no I didn't, didn't know beta was available even
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
nope, just asking, then it turned into general "why pages need registration" π
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
Yes
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.
Uhm... Basic programming. Variable scopes.
returnMessage is undefined on the return statement
yeah basic, im new to this shit π
add a string returnMessage; first in InputRequest and remove the string before the rest of the returnMessage
kool paste
?
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
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/
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 π
if only OFP had gotten JIP π
https://www.youtube.com/watch?v=QyPZFVK2rZQ
some kind of teaser
needs some love still
@meager falcon Looks very cool, is that using Intercept?
yep
oh wait, you actually made a REST server in Intercept!
Someone made a intercept thing without me knowing?
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
it also supports actual requests.. sync aswell as async, but async is currently a bit .. uhh... unstable π
neat
also provieds a nice way to deadlock the game.. never htmlload the REST service π
haha
@meager falcon is the HTTP server self-written?
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
good decisionm
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
Every extension should be ported to intercept
The speed benefit simply outperforms everything
Not every extension is a performance bottleneck
But those who are used the most have the highest bottle bottlenecks
The biggest bottles have the biggest necks
must not be a big drinker
anyone know how to get back my friends list? the icon, top right corner has gone awol
top right on mobile apps, top of servers list (the left side bar) on desktop
yea it dissappeared. turned out i need to rightclick->close DM (current 'friends' conversation)
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?
thanks!
this is exactly what I need - awesome π thanks @glossy inlet
much appreciated - will for sure speed things up π
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
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 ?
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.
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
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
That just Sounds like a horrible idea you are attempting @sacred flume
First of All: not everybody will have their steam and discord linked
they dont need to
only privileged users would link them
so they have access to certain commands
helps us moderate server
So it literally is just to manage the running Mission?
basically, we are always in discord chat, but not always in game
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
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
And avoid steamid linkage but use discord openauth
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
https://steamid.io/
http://steamcommunity.com/profiles/76561193837958863
http://steamcommunity.com/profiles/76561198132926159
I have never seen anything like that... wtf. Two steam ID's to the same account. But the profile page looks slightly different...
@sacred flume how are you sourcing the steamid's(from where) I think using the steam account linked with discord... Is the answer?
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.
@dawn palm does the paid version of your tools support ODOL 73 and include MoveObject.exe?
moveobject is included
@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)
type 73 p3d's have been supported by the free tools since june last year.
https://gyazo.com/c6a0ea8007aad1f1b532c03fbb78c891 we have life anyway π
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
people use python for god knows what reason
https://insights.stackoverflow.com/survey/2018#most-loved-dreaded-and-wanted π
In other news, the StackOverflow 2018 Developer Survey Results are out
I dont even know Rust and Kotlin
Shame on you because of Rust π (as for Kotlin, I didn't know it either π )
@karmic niche ππ»
Is there a way to log something in rpt with c# extension? or do i need to create a own log folder/file?
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)
intercept
thx
@fallow crest don't rpt .. use this: http://www.armaholic.com/page.php?id=30684
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?
Only once? Or every time you call that?
Im calling it at the start to test if its working
tbh 12s is still quite a lot, even for a one-time call
especially for a call that does nothing besides returning a string
if i call it ingame it works fine, only on startup
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)
Is there any way to change it?
only on startup. That means all the libraries and everything that your dll loads are slow
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.
@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
Is it a debug or release build?
not that a debug should take anywhere near that time, but might have side effects.
@keen owl its a debug build
with the release build it just spents 7 seconds
The code you showed us is not causing that. So would need to see the rest of it. Github repo maybe?
@glossy inlet thats all i have. just that one file i took from the sample
Could also be that the LoadLibrary takes that long. Antivirius? Hard drive dying?
Maybe the hard drive is the problem because im hosting local for testing
Btw does anyone know how to set the entry point for my dll?
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.
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)
Prolly won't work with .Net though π
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 π
If it supports all mods and languages. I'd say marginally useful
mods will be added over time but it returns json right now
might add support for others
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
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 ?
A full external config viewer would be awesome
We just talked about that in #arma3_scripting a couple days ago I think
i dont know php + html or css but if I can get the api working, im sure someone could come up with something π
Or just find out if https://configs.arma3.ru/ has an API
will do π
https://configs.arma3.ru/162.137494/configFile/CfgWeapons/arifle_Katiba_F.html Well.. That was easy. Just put the classname in the link and get the config. Then you can just parse the displayName. Done.
that doesn't look exactly updated
Yeah. 1.62 is a little outdated ^^
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.
it should be up now
default arma 3 classnames for vehicles /weapons /magazines
*should
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.
I thought extractPBO only extracts one PBO per process?
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
@glossy inlet https://gyazo.com/b46cd1d556a41bc9b493c8caf17c1440
That's extracting the folder ting
That's how u do it π
Then it reaches https://gyazo.com/901bec4db4789177f5ed33e9e2cb6e42
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
Try unpacking each file separately:
https://stackoverflow.com/a/180749/6543759
And for the ANY key, maybe "piping" an empty string would do?
i.e.: echo "" | extractpbo %f
Otherwise, try with a newline, instead
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'
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.
"[]"
What if you execute it directly? Outside of Arma?
Oh.. Yeah didn't look π Oops
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.
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?
If you do the args thing you don't need to split anymore.
If that's better is personal opinion I guess
I made a tool to extract all game config as JSON
if that's of any interest @glossy inlet
Not for me ^^ But maybe for @feral nova
started working on a react app for it too but never got around to complete it
have you got the extractor ?
Im going to be making an api for it.
and adding mods over time
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
if you could supply that all I have to do would be to add new entries π
is there a tool to beautify sqf code (automatic formatting)? or can one of the IDEs with sqf support do that?
Nobody ever implemented iirc that but theoretical that is already possible with numberous Tools
Just not implemented
i think posiden has something
@feral nova thanks for the tip - http://tom4897.info/projects/poseidon-tools/documentation/tm4_indenter/
UsageInside PoseidonSimply hit ctrl+e, ctrl+i, the current file will be indented as it should.As dos tooltm4_indenter.exe is located at the root directory of Poseidon ToolsArgument used:
will see how it goes with it
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?
Sqf-vm sadly cannot Format due to comments etc are preprocessor related
But could fully Format comment free Code
And without preprocessor
@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
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?
Mostly it lets you call SQF commands directly from C++.
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
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
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.
hope they'll eventually consider my suggestions https://feedback.bistudio.com/T124736
but seeing as nobody has even commented on it yet, it's not looking promising
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.
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
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
Wasn't that part of DayZ?
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
No, as in DayZ had a different implementation (that didn't come from Enforce).
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
it was done before in RV engine
weapons and such were made entites like vehicles
thus a lot more interaction was made possible
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.
@dawn palm legend
question: would anybody be interested in SQF-based commands for INI-Parsing? (intercept-plugin)
alternativly, XML parsing etc. could also be provided
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.
someone made a PAA plugin for Paint.NET using my open source code. https://p3dm.ru/soft/resource-extractors/10685-paa-pac-plugin-for-paintnet-v4020-net-47.html
didnt test it yet
paint.net plugin formats are fairly straigth forward
as long as the base is working, the plugin should work too
well my code doesnt do swizzling so far. so probably has problems with _sky textures ^^
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
I play random rant card
"resource-extractors" π
xD
I am trying to extract font metrics from FXY files: https://community.bistudio.com/wiki/FXY_File_Format#Struct . However, I can't get the entries themselves to match up properly. The BIKI suggests either 6 or 7 ushorts, but neither seems to fit. This is my short python script to extract: https://pastebin.com/3A45uPTz . Does anyone have suggestions?
qnion?
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
So each entry is 7 ushorts. All such entries coming immediately after the signature which consists of 4 chars, and ulong (4 bytes) version
checking...
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.
at least for x, y and kerning width
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....
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)```
top of file is mimetype 'Bifo' + ulong version (x0101)
remainder of file is an integral chunk of 7 'ushorts'
Is there padding at end?
so immediately, your version number seems wrong
there is no 'padding' for version 0x0101
It's 02 01 00 00 in hex
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)
It's ...\Steam\steamapps\common\Arma 3\Addons\uifonts_f_data.pbo
thank u
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
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)
Wait, are they using 2 or 4 bytes for the entire version part?
4
they can't change or break this because the older file version has to remain readable
Okay. But in practice first byte (in file order) is minor , second one is major, and two unused?
did they update fxy format?
Looks like it.
lol, would not have expected that
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?
format is:
'bifo' 0x0102
18 bytes gumf
followed by contiguous 22 byte structures
gumf meaning garbage ?
meaning to be decoded
ahh
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
Is that for purista medium? What size?
EtelkaMonospacePro9
Does another section perhaps start 4954 bytes in that file?
probably. looking at that
My bad another 22 bytes further in
yep two sections so far, each with an 18 byte gumf
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?
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
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?
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)
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;
};
...
Ah. I see. I have 4 sections in the file.
The first byte in the gumf is the file number
yes, it's been done well, they finally have winansi (probably) and 'proper' cyrillc
Although everything else in the gumf is identical?
I suspect it's NOT latin2, T_D, more likely to be upper half of first unicode page (which almost corresponds to winansi)
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 π
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
it's from the default config in the arma tools folder of FontToTGA
in fact it doesn't matter, the above are unciode descriptors
and really, that's all that matters. pure utf8/utf16le
I wonder what version the current FontToTGA creates
well you're the genius with this stuff, so get to work!
I thought you would do the work for a change π
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
the tool still creates 1.1
u2
well ditto binarise, the unreleased version produces 3 new mapinfo items
without a version change?
I am looking at specific Purista-Medium18. The hex looks... interesting.
Lots of FFFFFFFF columns when aligned on 16 byte wide columns
there's no requirement for wrp version changes with mapinfo items. there should be, there isn't
for purista medium 18, a valid section seems to begin at position 0x12F2
pls give me the fileanme Muzzle, so we work on same page
uifonts_f_data\a3\uifonts_f\data\Fonts\Purista-Medium\Purista-Medium18.fxy
k
But before that section something is clearly aligned on 16 byte boundaries it appaers
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.
can you send me the Purista-Medium18.fxy?
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.
how did you skip over or determine the ff ff ff f fffffffff entries?
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.
do you know when they introduced this font format? which arma version?
yes to above muzzle
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.
are you on dev or normal branch?
normal
k
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```
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];
};
i chose arbitrarily to give em a name, the value is always larger
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
the texture file #1 of Purista18. Could one of you send that to me too π
moment
am not too interested in these large fonts because most of them wont be filled out with cyrillic or 'latin2'
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
what file is it?
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
the glyph at 0x00A2 is cent
yes, thank you, that's helpful, but sadly i got it wrong, winansi and latin are same for that one. (sigh)
number of sections per fxy is the same as number of texture files?
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.
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
Didn't they add Kerning pairs to the new format? That would have (left character, right character, absolute or relative spacing adjustment) somewhere.
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
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.
.... 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?
, (comma=2c) followed by 1 (0x31) relative shifted by -212 ???
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
yes that threw me
so that just mean actually -1 of some unit, or some kind of default
yep
it seems wasteful to add so many entries if it is just some default
umm, we are dealing with bis here.
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
Also DirectWrite doesn't work for Vulkan. π
I though they used OpenGL/DirectX?
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.
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.
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.
there are other values than -1 like -2 and -3 π
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?
possibly the W and H parms of each section ?
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?
idiot question. why vulkan? why not OpenGL and be done with it?
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".
k
And also you have to pretty much manually dynamically load every new OpenGL function from the DLL.
ah, similar to java? load-the-function-before-u-use-it. each time. every time.
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.
yep. that does make some sense.
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.
'with them' i think you mean 'with vulkan' ?
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.
It's a DirectX brand name that counts here i guess.
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.
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.
Yeah, Vulkan will be the primary API for Linux eventually.
my interest was limited to the KDE desktop. it did/does what i want.
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. π
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.
Not supporting it severely limited the fonts that they could use.
well, again, the fonts they can use shouldn't need to be too many. ImHO
Most fonts are close to unusable without kerning pairs, the ones they picked before just happened to be not horrible without it.
k
You even used to have to avoid using lower case in the default A3 font because it looked terrible.
My argument there (if there is one) is they chose the wrong default font.
Lower case would be an issue with almost any font.
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.
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. π
seems like they don't have a 'chief engineer' with enough muscle to bite them.
they added support for Japanese and Chinese and such in recent months, didnt they?
I think 1.76 update was that yeah
I think Japanese was supported pretty much since the beginning
Nah they added support for it not long ago. Might have been adding MORE chars though instead of adding the language itself
No they really added it.
https://dev.arma3.com/post/spotrep-00071
Also turkish was special? https://dev.arma3.com/post/spotrep-00075
Japanese existed before yes.
Chinese and Turkish absolutely didn't. No stringtable entry for them.
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
Interesting they have a few explicit (as an complete unicode symbol) ligatures in there, like ff
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
Β Β§ Β€ Β¬ ΒΆ
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
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
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
the comma difference may, depending on situation, make some stuff less readable maybe? aside from that, ev. fine
Is that Purista Medium?
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
I might ask... -why- do you want to do that :p
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
not that I am against it
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
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.
Okay. I think that works then: https://imgur.com/uXQVGRG
it indeed works
I like the YΓ link
Now I turn my attention to old v.1.1 EtelkaMonoSpacePro. It currently looks like this: https://imgur.com/a/GuZwQ
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.
Is there any space between the f's in ff? Purista has no spacing between the cross strokes.
No, there is no kerning pair entry for that one
Yeah, there won't be a kerning pair, it should just naturally line up.
At least in my rendering there is a one pixel empty space between
But there is a separate entry for http://www.fileformat.info/info/unicode/char/fb00/index.htm
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.
Yeah, it might just be rounding error, but in the OTF itself they connect (with r's and t's too)
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?
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.
arma3p update (credit dahlgren)
now extracts the unencrypted pbos of tanks.dlc
DeFxy now decodes the new format1.2 (credit Muzzle and T_D)
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.
@dawn palm cant quite follow and didnt see anything in the changelog i can relate to this
do you have an example please
i gone went and broke it. fixing when i have time.
k
does anyone have a list of sqf cmds with only local effect, and one with for local object execution?
or are these complete and reliable enough?
https://community.bistudio.com/wiki/Category:Commands_utilizing_local_arguments
https://community.bistudio.com/wiki/Category:Commands_with_local_effects
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 no that BIKI list is not entirely accurate, or even sensical. I mean what does it mean for the effect of https://community.bistudio.com/wiki/doSuppressiveFire to be local?
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.
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.
@dawn palm there is no constant Known at compiletime in sqf
model.cfg's use sqf constants.
rad +90
sin 30;
db
But that's simpleExpression and not SQF right?
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>
@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
you're arguing semantics.
pretty hard to see how PI is something other than 3.1437.....
technically those expressions are not evaluated by the sqf engine afair
what does 'evaluate' them then?
need to check. gimme some mins
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
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.
@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
@glossy inlet is https://github.com/intercept/intercept-network supposed to be used standalone or from other intercept addons?
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.
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
ok ok you win. let's move on.
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
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.
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
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.
I want that nobody has false assumptions
@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.
my PAA lib now supports channelSwizzling so it is able to correctly read _sky textures
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.
@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
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".
@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
https://github.com/X39/sqf-vm/blob/master/sqfvm-cpp/parseassembly.cpp theese are the available instructions for sqf (naming is Equivalent to what intercept prints out)
What are you comparing the speed of?
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)
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".