Ingamechat read(log) / write "bridge" to use with other tools?
-
Thank you very much that was right hint.
There was an dependency to MSVCR90.DLL part of
Microsoft Visual C++ 2008 Redistributable Package (x86)
and this was not installed.[Edit]
I changed something and recompiled it that was the problem^^
How you compiled it without this dependencys?[Edit2]
Ok got it ^^ -
I thought it should be UTF-16, 2 bytes, for covering most languages?
-
StarTrader wrote:
I thought it should be UTF-16, 2 bytes, for covering most languages?offtopic :
Not exactly. The way i understand it Unicode is this kinda ‘virtual’ characters table (Unicode != UTF16).
And in practice it is represented in transformation formats (UTFs), where number shows minimal amount of bits per character. But it could use more than that. For instance, Cyrillic letters use 2 bytes in utf8.
So any UTF can represent full Unicode space, as i understand it. -
With this new chatlog.dll you can log chinese and russian so I think all languages will work with it
I was playing a bit to create an Translator for Freelancerchat using the google ajax, thats why i was asking for utf-8 support.
It works now translation isnt perfect all the time but much better then nothing
Its also possible to translate with an command single words ingame.
Now just one thing is missing. At the moment I use an dx overlay to show translation ingame but it does not work well with all graphic cards some get low fps cause of it :(.So I ask if you adoxa can make me happy again and write me an dll that read a textline from a file and then put it with a hook into freelancerchat like this:
I dont need to send it to server just put it to the Freelancerchatlog in the game maybe with color change support if this is possible.If that would possible i could complete my Freelancer Translationplugin to make it easyer for player to understand foreign languages and to write in foreign languages
-
Not entirely just sure what you want, but find [d]attached[/d] how I interpreted it. It will detect changes to EXE\externalmsg.txt and add them to the chat output window. It assumes the file is in UTF-8 (BOM optional) and only one line is written each update (although adding multiple lines shouldn’t be hard). It uses STYLE_EXTERNAL, so define it in DATA\FONTS\rich_fonts.ini and choose your own color (you might also like to make it italic).
-
Hm I have one problem, I tryed now many hours to find an solution but none of my solutions realy worked
The problem is after I write one time into externalmsg.txt the file is blocked by Freelancer and im not able to write into it again until u unlock it manually.
I also tryed to add
remove(“externalmsg.txt”);
after it writes into Freelancer chat but its just dirty solution and it doesnt work well.
Afte some time it get not longer deleted and old problem that im not able to write into the file start again.
Do you have any ideas how to solve that issue?
Maybe use registry instead of externalmsg.txt would work better? although I dont know how to do this[Edit]
I tried now this, I added
if( _unlink( “externalmsg.txt” ) == -1 )
return;after
fclose( file );
If seams that it fixed the problem that I was not able to write into externalmsg.txt.
But now an other problem occur which has nothing to do with my changes. It also random crash with your dll if I write to fast to many data into externalmsg.txt I get this crash:
http://www.imagebanana.com/view/eslvll36/error.jpg[Edit2]
Im not shure but it seams tab into game and out during it write into chatlog result faster in a crash…Any Ideas?