Page 1 of 1

UCC Compiling

Posted: Mon Apr 30, 2007 11:14 am
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!

Re: UCC Compiling

Posted: Tue May 01, 2007 1:12 pm
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?

Re: UCC Compiling

Posted: Thu May 03, 2007 2:39 pm
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.

Re: UCC Compiling

Posted: Thu May 03, 2007 5:02 pm
by Donfrow
Thanks for the information.

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