How would you...

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
Skutarth

How would you...

Post by Skutarth »

...put any character in the game in your party with ExultStudio, then make their usecode so their conversation choices are Join or Leave and Bye?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Dominus »

look at our source code.
go into content/islefaq and look at usecode.uc. Take a look at Amy's script.
She joins and leaves the party
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Skutarth

Re: How would you...

Post by Skutarth »

I tried using Dupre's, but what happens is DUPRE joins when I say "join" and DUPRE leaves when I say "leave"...
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Dominus »

I don't really understand what the problem is. Isn't he supposed to join when you say join and leave when he is supposed to leave?
Also I'm not sure if it is supported to change existing NPCs usecode via the patch dir....
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Skutarth

Re: How would you...

Post by Skutarth »

No. I'm saying if choose leave on my NEW NPC, DUPRE leaves, and the same with join.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by artaxerxes »

You need to edit usecode, because it certainly looks like that:

if (reply == join)
add_to_party(0x402)
else if (reply == leave)
leave_party(0x402)
endif

with 402 being Dupre's character number. You need to put your own character number.

Artaxerxes
Skutarth

Re: How would you...

Post by Skutarth »

Now, how do I edit the usecode? An editor of some sort, or with notepad, or what?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Dominus »

look again at my first reply. the fiel usecode.uc is editable by any texteditor and can be transformed to usecode.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Skutarth

Re: How would you...

Post by Skutarth »

How do transform it to usecode?

It looks pretty easy to use usecode...
Heh, use usecode...
Karlos
Posts: 149
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Karlos »

You use ucc, the Usecode compiler, e.g.:

ucc -o usecode usecode.uc

http://exult.info/ucc.txt


-Karl
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Dominus »

fom the readme in /content :
To create the usecode out of the usecode.uc file you have to either grab "ucc.exe" from the tools-snapshot or build ucc from source.
Then run "ucc -o usecode usecode.uc" in the patch directory and you should have a file called usecode.

What is not in the readme but should be written as a warning:
don't replace any of your files in your STATIC dir with the ones from the patch.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by drcode »

You can also run ucc automatically from ExultStudio if you look in the 'tools' menu. It's a little limited right now, in that it assumes your source file is 'usecode.uc', and that it's in the 'patch' directory. The nice thing, though, is that it automatically has Exult reload 'usecode' if the compile succeeds.
Karlos
Posts: 149
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Karlos »

Cool! I wish I had noticed this earlier.


-Karl
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Dominus »

For all you windows users that last post by Jeff doesn't work for us. So don't bother trying
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Karlos
Posts: 149
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Karlos »

Is ucc.exe in your PATH? I think that's the only way Studio will be able to find it. On Linux, ucc and all those other utilities are installed at /usr/local/bin, which is often in the PATH.


-Karl
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by drcode »

You could always pester Ryan to make it work on Windows:-)
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Dominus »

Karl, it is really not working :-)
I think the support for it is not even compiled on Win32 as it wasn't easy portable.
I'll try to pester Ryan sometime in the future :-)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Karlos
Posts: 149
Joined: Thu May 14, 2020 1:34 pm

Re: How would you...

Post by Karlos »

Okay; I had looked at the code and saw that it was a simple exec to execute ucc, and I thought this call would work on Windows, especially if one was using gcc. If not, I suppose the exec would just get changed to a CreateProcess or some such.

I'll go back to asking questions; I seem to have more luck with that than trying to be helpful to others here. ;-)


-Karl
Locked