Usecode Documentation

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
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Usecode Documentation

Post by Wizardry Dragon »

Would anybody use it if I made all my usecode notes up nice and posted them?

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
dino
Posts: 70
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by dino »

I think I would. :) I like seeing new resources.
Dino the Dark Dragon
----====[url=http://www.udic.org/]UDIC[/url]====----
Webmaster of [url=http://dino.shiftedphase.com/ultima/]Dino's Ultima Page[/url]
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Dominus »

Yes, please. Usecode documentation is much needed. I'd be interested to integrate it with Exult Studio documentation somehow.
--
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!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Well, I'll rewrite my notes into something comphrehendable and post them :)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Mighty Dog

Re: Usecode Documentation

Post by Mighty Dog »

Excellent, that will make creating my new world all the much easier.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

That is where all my notes come from - the notes I take as I observe how things work when I script tem into my little world :-)
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by drcode »

That'd be great. We could also use them to look for bugs and improvements. Note that we can pretty much make the language do whatever we want.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

It would be really neat if someone could get the UI_give_item() and UI_get_item() functions to treat the Avatar's backpack as an array.

Functions specific to adding to and subtracting from the party gold would be much appreciated. In fact, a function kind of like converse but for buy {} or sell {} would be most appreciated.

Special FX such as spellcasting don't seem to work well either. Trying to make succesive spells go off in order just results in them going off at the same time. (Trying to do a flashy ritual kinda along the lines of the FoV mage's)

Just some thoughts.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Here is my first hack at documentation.
This mostly details what I see as the most common, basic function usecode is used for, and that is conversations.

http://crpgn.org/ucc_doc.txt

I *will* expand on this, just my hands are getting a little sore tonight :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

*ahem*

Thoughts?

I know it isn't much, but I wouldn't want it to be glossed over; that's kinda why I didn't take the initative to do this earlier, I thought it would be.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Dominus »

he he, I like the cliffhangers "This section coming soon."
But so far it is well written. Especially not too dry as one could suspect of such a document.
Keep going....
--
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!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by wjp »

I'm at work right now so can't read it through thoroughly, but I did notice you aren't using the new-style 'converse' block, in which you can use 'case' instead of if statements.

Check content/islefaq/usecode.uc in the exult sources for a sample of the exact usage.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by artaxerxes »

well, I like it a lot. It's easy to read, yet instructive.
Keep the same style and I'll buy your books! ;-)

Time for advanced content now.

Artaxerxes
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

I'm an old school programmer :-)

I will make a note, between the older version and the new version.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Case is more complicated to understand anyways, I'm trying to ease people into it :-)

I plan on addidng many more advanced functions as I expeirment more with the advanced functions. Right now my implementations of the more advanced functions are pretty limited in scope, so I need to test further.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by drcode »

I like the fact that you're teaching by example.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

That's the way I've always learned the best through, so that's the way I try to teach :-)

So, if I were to work on this more, could this find a place in the docs? :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Dominus »

hey, there was never a doubt in my mind. This will surely go into the documentation :-)
Probably as an external file as it will probably be much too big for the Studio doc.
--
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!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Whatever works :-)

I will post an expanded version once I have finished experimenting further.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by SB-X »

What might help, along the same lines, is a usecode function list for BG/SI. I have such a list for SI, but it is nowhere near being finished.
There are many utility functions that you can use if you include U7 usecode. (legal issues with this in new games, but that's not my problem)

I also have a flag list that is much more complete, but not enough for me to post yet. This will be helpful for people modifying SI. (or cheating)
nadir
Site Admin
Posts: 407
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by nadir »

We could set up a Wiki so that creating this documentation can be a collaborative effort.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

I plan to add a function list as a reference. Think of it like the Borland Delphi documentation. I'm making the User Manual now, and I will add the Language Reference after :-)

Is the documentation script for php.net downloadable/open-source? (I didn't see anything to that effect, but perhaps there's a reason I have glasses ... :-)

That is a really nice looking system and if I were to set up a system for users to contribute notes, that looks like a pretty solid one. Plus, it's geared towards the same sort of documentation.

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Never mind, I found it in the php.net CVS using their webby thing :-) If I set up a system like that, would people use that?

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Dominus »

At least the people here who voiced their interest in Exult Studio before, I'd think.
Sounds promising...
--
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!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Now to tinker with it until it works :-)

Thanks for showing interest, nice to know I'm not the only one that'd use it :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by drcode »

Yes, that would be really helpful. And with people starting to look at the usecode compiler, we'll find ways to improve it.
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Hmm. I can't get this thing to seem to work. Could someone do me a favour and grab the phpdocs module from the php cvs and see if they can't get it working?

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by artaxerxes »

I think it's a brilliant idea. It would be even nicer if it was somehow tied to the exult web site, instead of on a separate site altogether. And who knows, if we have a wiki on exult, we might even put in it the documentation and the FAQ (if it is possible to export it to a text file for inclusion in the packages).

Artaxerxes
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

I like the php.net documentation system better than wiki. Not as easy to setup (still having problems) but it's a very solid and very attractive looking system.

Not to mention it's specifically suited towards documenting a programming language :-)

If the Exult team could trust me/us with a piece of their site, then by all means, that would be cool :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Dominus »

I would prefer to have it on-site as well (and giving my "vote" on this)
--
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!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Thanks Dominus :-)
Well then, perhaps you or one of the Exult team could set that system up, if we can get some consensus going :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Dominus »

Well then, perhaps you or one of the Exult team could set that system up, if we can get some consensus going :-)
Not me, probably best would be for you to have access rights here...

(Just looking at the list and our activity.. you wouldn't belive there are 14 developers of Exult...)
--
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!
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Well, that would be ideal, but I didn't imagine you would trust me with that :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by Wizardry Dragon »

Okay, here's what I propose, I'll whip a system up, post it on my site with the info I have right now, and then the team can take a look, see if they like it, and if they do we can move it over here.

Sound good? :-)

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
nadir
Site Admin
Posts: 407
Joined: Thu May 14, 2020 1:34 pm

Re: Usecode Documentation

Post by nadir »

Sounds good

I would do it myself if I had the time :(

Tristan
Locked