How to recompile Adoxa's dll src
-
He’s already told you:
Open: http://macchiato.com/unicode/convert.html
Set “Input” (The left side) to Text -> Simple
Set “Output” (The right side) to UTF-16M -> Base 16Then, enter text you want, for example: “進入”
After you done, click the > button in the middle
What you should get is two number: 9032 5165
This two number represent the two characters you just inputed.
Now you do a little convert manually by give each number a prefix \x, and remove the space between them, So it will be something like \x9032\x5165.
When \x9032\x5165 enters Freelancer, it will be your text “進入”.
If you had a lot of text needs to convert, AND you are using Firefox, Chrome or lastest IE (v11), you may:
0. Make sure you still on page: http://macchiato.com/unicode/convert.html
1. Press F12, it will pop up Development Gear if the web browser
2. Switch to “Console” tab
3. Paste following code in the Console Command Input and hit Enter:$('[name="mainTextOutput"]').value = "\\x" + ($('[name="mainTextOutput"]').value.split(" ").join("\\x"))
-
Actually, I simply meant load [c]Zone.rc[/c] in Notepad (or equivalent) and save it as Unicode - you can then type in Chinese as normal and [c]rc[/c] will compile it as usual.
As you’ve probably discovered by now, ResHacker doesn’t support [c]\x[/c], but I was able to just copy and paste the symbols from here, which apparently compiled successfully. Ah, but I’m using the fx version, which may make a difference.
-
adoxa wrote:
Actually, I simply meant load [c]Zone.rc[/c] in Notepad (or equivalent) and save it as Unicode - you can then type in Chinese as normal and [c]rc[/c] will compile it as usual.As you’ve probably discovered by now, ResHacker doesn’t support [c]\x[/c], but I was able to just copy and paste the symbols from here, which apparently compiled successfully. Ah, but I’m using the fx version, which may make a difference.
Sorry, I didn’t test for that method.
But I think he’s has difficulty to compile it in the first place.
(He’s acutally asked me in Chinese with PM before started this topic. And I did that compile as well and got same problem with that missing symbol)And I find that if I change:
#define IMPORT __declspec(dllimport)
to
#define IMPORT __declspec(dllexport)
and use following makefile,
# Makefile (VC6) for Zone. # Jason Hood, 24 February, 2014. CPPFLAGS = /nologo /W3 /O2 /MD /LD /EHsc Zone.dll: Zone.cpp Zone.res Common.lib cl $(CPPFLAGS) $** user32.lib /link /base:0x6140000 /filealign:512 Common.lib: Common.def lib /nologo /machine:ix86 /def:Common.def
The code will compile, but I think I better shut up before understanded what’s the different between
dllimport
anddllexport
.
(Yeah, seriously, I had an IDA Pro book(The IDA Pro Book infact), and I don’t even finish menu readout after 3 years from purchase, so I definitely don’t know what it says about this two differents.)And directly change the RC file did causes the problem he’s had right now. (Message only show once). And I sadly found that ResHacker don’t have the capacity to export and then import Res/RC files.
And the “zone.rc in Unicode” way looks has same result as edit with ResHacker, no matter I directly enter Chinese and save those file with Unicode or convert them into \x and save them into ANSI.
My programming experience is really low
-
adoxa wrote:
Actually, I simply meant load [c]Zone.rc[/c] in Notepad (or equivalent) and save it as Unicode - you can then type in Chinese as normal and [c]rc[/c] will compile it as usual.Thanks Adoxa, and yes, I by all means try to solve this problem, then I find:
1.If I in the Traditional Chinese of Windows system to open and edit the Zone.rc file, then use the “Simplified Chinese” to change the
Entered %Zv1
to
进入 %Zv1
then save it as Unicode, its work fine in the game like you do.
2.If I in the Traditional Chinese of Windows system to open and edit the Zone.rc file, then use the “Traditional Chinese” to change the
Entered %Zv1
to
進入 %Zv1
even I save it as Unicode, its only show in game at once.
3.If I in the Simplified Chinese of Windows system to open and edit the Zone.rc file, then use the “Traditional Chinese” or “Simplified Chinese” to change the
Entered %Zv1
to
进入 %Zv1
or
進入 %Zv1
even I save it as Unicode, its only show in game at once.
So, you see, that’s very strange.
And I find why I can compile successfully at first time(No.1), that’s when I want to save the Zone.rc file, the notepad warning me want to save ANSI or Unicode, then I choice the Unicode.
But when I do the No.2 or No.3 of way to change the Zone.rc file, the notepad hasn’t any warning, even I choice the ANSI to save(of cause, when I compile it, I use the Unicode to save, but still no different).
After I use the ResHacker to check:
The work fine of dll file use 2052 languages code(Simplified Chinese), and the other two use the 2052 languages code(Simplified Chinese) and 1028 languages code(Traditional Chinese).
If I use the ResHacker to change the dll languages code, no matter what I do, still can not work fine in the game.
Have any idea about that?
The attachment file is I recompile successfully and work fine in the game of dll, but it only test in the Traditional Chinese of Windows system, maybe you can test in your Simplified Chinese Windows system, and see what you get.
-
Are you sure? I loaded the dll to ResHacker and saw:
STRINGTABLE LANGUAGE LANG_CHINESE, 0x2 { 0, "进入 %Zv1" 1, "脱离 %Zv1" }
It’s not in Traditional Chinese at all.
And it’s not working properly in game – The message only show once, meaning there only “Enter” message, no “Leave” and further “Enter” / “Leave” pair.
-
Yes, I mean that, the dll file is use the “Simplified Chinese” to make and work fine in my Traditional Chinese Windows system.
So I want you to test in your Simplified Chinese Windows system to make sure what I guess, right now I know the answer.
The answer is:
If you use the different language words to change the rc file and compile it on your Windows system(like me use the Simplified Chinese words to change the English words in my Traditional Chinese Windows system, and if you want to do same thing, you need to use the Traditional Chinese words to change the English words in your Simplified Chinese Windows system), you will get a dll can work fine in your language of Windows system, but if the dll file use in the same language of Windows system(like I make of Simplified Chinese word dll use in your Simplified Chinese Windows system), then it will be issue.
So that’s very strange, isn’t it?
Let me use the Chinese to explain it clearly(sorry for my poor English):
我当然知道这个档案的内容是简体字,我的意思是,如果我使用简体字在我的繁体Windows系统去编译的话,可以在我的繁体系统下的游戏环境运作正常(这也就是我附件放上这个DLL档案的原因,我想让你测试在你的简体Windows下是否也能正常)但是如果我更换为繁体字去编译的话,即便所有步骤都一样,结果就是不能在游戏里面正常运作,它只会出现一次,然后后面就不运作了。
所以我担心,如果我使用了这个重新编译的DLL档案在我的模组中,我怕可能只有在繁体Windows环境下才会正常,结果经过你的测试以后,证明我的假设是正确的,这样编译出来的档案只能使用在繁体系统环境下。
让我纳闷的是,这么简单的一个语言置换,怎么就弄了半天还是解决不了?VB我都用过,从来没有出现这种问题,怎么换了个VC++就变成如此了?
-
Yes, it’s so weird. Debug like this is exhusting.
But there is something also weird is, after I compile with Unicoded [c]zone.rc[/c], when I open up the resulting DLL with ResHacker, it still display normally – I was hoping to see the miscode.
I think it’s either because ResHacker did code convert automatically when I open the file so I can read it, Or it’s still ANSI.
Could be a fail guess though.
I have no idea what’s going on here
-
@NeXoSe: dllimport means this function will be found in another DLL; dllexport means make this function available to others.
I tried the above DLL on my English system and that worked fine. Have you tried changing system (or maybe just using a tradelane) and seeing if that message shows up, and then try the zone again? (If you’re using Console, just do [c]s .[/c].) If that works, then perhaps Zone still thinks a message is displayed and so does not display another one until something else resets it. Still, I don’t know how that would occur. If it doesn’t work, I guess I could add some log messages to the spew (unless you want to delve into low-level debugging, as well…).
-
adoxa wrote:
@NeXoSe: dllimport means this function will be found in another DLL; dllexport means make this function available to others.Sorry for delay.
I tested again using above DLL, and I can conform that:
1, When enter a new field, the Entering message will show up, but no Leaving message.
2, Re-enter that same field, the Entering message will not show up.
3, Enter another field, the Entering message for the new entered field show up, but again, I leave without the Leaving message.
4, I also tried the Jumpgate (Cause map reloading?), same thing happens.Here is the record:
https://www.youtube.com/embed/f3yPkogmt5w
Or https://www.youtube.com/watch?v=f3yPkogmt5w&feature=youtu.be
(Sorry, litte blurring, my camera not forced, and I failed notice that…)
(And I also had to test my plugin at same time to save some time…So …)BTW: Then, why I change [c]dllimport[/c] to [c]dllexport[/c] and the DLL still working as I (seems) reversed the purpose completely? OK, I think it’s not good for waste your time and energy to answer my newbie question, I better just Google it myself to fill the empty hold of my knowledge.
Thank you!
-
I’ve attached a new [c]Zone.cpp[/c] that logs (to [c]EXE\zone.log[/c]) when you enter/leave a zone - that should at least tell if it’s a detection issue or just the display.
Regarding dllimport/export, I’m a little unsure myself. I have another project that just uses dllexport and it imports fine, too.
-
adoxa wrote:
I’ve attached a new [c]Zone.cpp[/c] that logs (to [c]EXE\zone.log[/c]) when you enter/leave a zone - that should at least tell if it’s a detection issue or just the display.OK, There is the result:
1, I downloaded the modified Zone.cpp,
2, Place it with other file and compile with my modified makefile I pasted above (It should not effect the test I guess),
3, Enter the game with compiled DLL (English Res), works good still,
4, Exit game and edit the DLL with Res copied from JONG’s Zone.dll (with ResHacker, copy and paste),
5, Re-enter the game (MP mode), travel between Detroit field(Start from) and Jersey field couple of times, problem still (only enter message shown). Here is the zone.log:Entered 3003235657 Entered 3003235657 Entered 3003235657 Entered 3003235657 Entered 3003235657
If I use the English res, it will be:
Entered 3003235657 Left 3003235657 Entered 3003235657 Left 3003235657 Entered 3003235657 Left 3003235657
-
Ah, got it. I’m guessing [c]LoadString[/c] fails because it wants a double-byte character which I don’t provide room for, which in turn showed a problem with the [c]show_left[/c] code. I’ve expanded the [c]test[/c] array to four bytes and fixed [c]show_left[/c] - if it still doesn’t work, initialise [c]show_left = true[/c] and try again; if that works, something’s still going wrong with [c]LoadString[/c].
-
Ok, that’s what I test:
Use the Traditional Chinese of text to change the Zone-fix.zip of cpp English text, then recompile and use it in my Simplified Chinese Windows system, its work fine like before Adoxe make.
Not yet to test in my Traditional Chinese Windows system, I’ll report later.
Edit:
Ok, finish the test, in my Traditional Chinese Windows system work fine as above.
Is it a final version of zone dll ?
-
if you want to change zone.dll text to your language you dont need compile and c++ programs. just find a hex edit program and open zone.dll find this lines which shown on the screenshot im attached. Iam using hexplorer program for this.
Do not forget the spaces of letters are should be 00 on left side hex codes if you want to show break between two letters break hex code should be 20 not 00.
0D is char number of enter zone
0A i left zone char name0D means 13 char
0A means 10 charif you want inrease or decrease letter number increase or decrease 0D and 0A(ex for 20 char change 0D to 14 this is about hex lang) and if you want to insert new char use insert button on keyboard.