usecode deassemble

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Quester

usecode deassemble

Post by Quester »

WinXP
P4

F:\Program Files\Exult>ucxt.exe -a

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Can anybody help?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: usecode deassemble

Post by wjp »

Is Exult setup correctly so that it can find the game data files? Is your exult.cfg in the same directory as ucxt?
Quester

Re: usecode deassemble

Post by Quester »

yes, all installed correctly, ucxt in Exult folder
is there another way to disassembly usecode? I try translate BG & SI to Russian
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: usecode deassemble

Post by wjp »

Russian? Wow, very nice :-)

You could use 'wud' too. It's probably more stable than ucxt currently.
Quester

Re: usecode deassemble

Post by Quester »

thanks
I yet dont see a code form usecode, and have a question:
is there way to use more symbols in font than in original game? Latin is 26 symblos, russian - 32
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: usecode deassemble

Post by wjp »

Yes, that's possible, since French uses more symbols, too. (Letters with accents).

I'm not really familiar with the details, though.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: usecode deassemble

Post by artaxerxes »

I think I can help on that one.

To decompile usecode, I've used "rip" and "wud". To recompile, I've used "wuc" and "rip" (again).


Get the cvs from si-french (sf.net/projects/si-french) and use the "le_camomille.pl" perl script to automatically take a usecode file, a rip, a wud and a wuc exec and magically split all data to be translated into a "todo" directory.

Wrt alphabet, it works this way:
fonts.vga holds several shapes. Each shape is made of 127 frame. Each frame is a letter of the alphabet. What the exult engine does when it needs to show a string of text is about the following:

for each letter of string_to_show
number = convert_letter_to_number(letter);
show_frame(number);
endfor

The association number letter is such that A = 0x41, B = 0x42,..., a = 0x61, ....
just like normal ASCII.

For the accentuated letters in French, I used the unused frame of each shape to put in é, à, ç etc. However, I cannot type normal é and expect it to be shown on the map since 'é' > 127. So I convert each é into the frame number of the shape. So for instance, I know that I put é at the 4th frame (starts at 0) so I have to type 0x03 whenever I need to put a é, which is easily done with emacs: c-q c-c (result is ^C which is 0x03).

There you go. I dunno is the russian alphabet uses something similar to ASCII. I really doubt it would work with unicode though. At worst, you'd have to make your own frames, assign arbitrarily a number to them and type your text normally but create a converting program that maps russian letter to frame number. I've done a similar program to convert accents to ultima shapes. It is in the tools directory of CVS and it is called "conv.pl".

If you need more help, don't hesitate to ask!

Artaxerxes
Quester

Re: usecode deassemble

Post by Quester »

Thanks for help, I very need it.
Also question - in decoded script - where is font number? I think it is "pushi 1" before calling print function, its right?
Locked