wud ,ucdump & co.

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
Gianluca

wud ,ucdump & co.

Post by Gianluca »

How can i do for disassembling the usecode file with wud?What's the correct syntax to use?I have tried "wud -s -a usecode" but doesn't work!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: wud ,ucdump & co.

Post by wjp »

The syntax is:

wud -s usecode -a (for serpent isle's usecode)

or

wud usecode -a (for black gate's usecode)


As an aside, please remember to specify _exactly_ why something doesn't work. There's no way we can figure out what is wrong when you simply say "It doesn't work"
nadir
Site Admin
Posts: 407
Joined: Thu May 14, 2020 1:34 pm

Re: wud ,ucdump & co.

Post by nadir »

Also in CVS, SharpTooth/Darke has been working on ucxt, a much more powerful alternative to wud.
Gianluca

Re: wud ,ucdump & co.

Post by Gianluca »

Thanks!now im able to view the file, but if i want save the result in file for modify and then recompiling with wuc?
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: wud ,ucdump & co.

Post by Colourless »

I wouldn't advise that you attempt to recompile usecode using wuc. It requires that you have all the offsets numbered correctly to work. Any changes to the usecode will change the offsets.

-Colourless Dragon
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: wud ,ucdump & co.

Post by SB-X »

I was not able to get the output of wud to recompile with wuc. Some of these tools are not really supported, ucxt is much better. Soon with ucc and ucxt you will be able to code in a C-like script.
nadir
Site Admin
Posts: 407
Joined: Thu May 14, 2020 1:34 pm

Re: wud ,ucdump & co.

Post by nadir »

I believe you also need to use mklink to regenerate the linkdep files.

However SB-X is correct: ucxt and ucc allow the use of our homebrew ExultScript, which will be much easier that working with the usecode bytecode.
Download bgpatch3.zip from our project page on SourceForge to get a glimpse of what ExultScript looks like
Max aka Moscow Dragon

Re: wud ,ucdump & co.

Post by Max aka Moscow Dragon »

UCDUMP is self-explaining, though does not support SI (it will decode the intrinsic functions wrongly, the bytecode itself is fine).

UCDUMP source comments contains some info about innerworking of the game.
Locked