UCC Compiling

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
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

UCC Compiling

Post by Donfrow »

Hi

I've been messing around with exult studio and I figured I would try to make a simple NPC. I've tried to find the answer so please forgive me if I've missed it.

I added a NPC speach to the usecode.rc that is provided for BlackGate, however when I try to compile it I'm getting:

Warning: usecode.ec:8: Use '#game "[blackgate|serpentisle]" to specify intrinsics to use .

I can compile it for SI by using the -s, but I can't seem to figure out what do to make it work for BG.

Also, if I wanted to simply add another NPC to the existing BG game, can I copy the static usecode into the patch directory and have the new NPC's speach "added" in, or would it just overwrite it the entire file?

Thanks!
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: UCC Compiling

Post by Donfrow »

Well, I went ahead and messed around using SI since I could actually compile it for that, and semi answered my second question.

I noticed that I can bring the custom usecode in and have it work along side the normal usecode for SI, that is I can talk to Lucilla in Monitor and have it work normally, as well as a new NPC that says what I want it to say using my usecode. However, can it be saved like that? Every time I quit SI and go back in it seems that the custom usecode has to be given the usecode in Exult Studio again. So can they work side by side without reloading it every time, or is it an all or nothing?
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: UCC Compiling

Post by drcode »

If you're writing this for BG, you can get rid of the warning by adding '#game "blackgate"' at the top of your file.

I'm not sure I understand your second question, but it should be easy to have the original 'usecode' and your new one at the same time. Exult first loads all the functions in 'static/usecode', and then loads those in 'patch/usecode'. If a function in 'patch/usecode' has the same number as one in the original, it will override it. But for a new NPC, it should simply be added to the list.
Donfrow
Posts: 308
Joined: Thu May 14, 2020 1:34 pm

Re: UCC Compiling

Post by Donfrow »

Thanks for the information.

You did get my second question right. Sorry I couldn't explain it better.
Locked