Page 1 of 1

Two Usecode-related Questions

Posted: Wed Mar 19, 2003 5:35 am
by Karlos
1) Conversations: How can I break from a nested conversation? If I'm in a nested converse, and I want the NPC to break-off the conversation for whatever reason, how can I do this? Using a break just returns me to the next outmost converse as one would expect.

2) Usecode and Numbering: Are there any particular conventions I should follow when assigning Usecode numbers to functions, eggs, etc? Are there any reserved numbers? How high can the numbers go? Do I have to worry about collisions between shape numbers and NPC numbers, at least for shapes other than flat tiles?



-Karl

Re: Two Usecode-related Questions

Posted: Wed Mar 19, 2003 8:30 am
by drcode
1. I don't know off-hand. Maybe we need an additional feature in ucc.

2. The conventions (from the original U7) are:

0-0x3ff Functions for the shapes, by shape #.
0x400-0x5ff NPC function. NPC #n gets code 0x400+n.
0x600-0x7ff? Eggs. Also spells start at one of these spots,
and Exult is currently hard-coded to find them
there.
0x800-0xfff Any other subroutines.

One recently added feature is that if you give a # for a routine, any unnumbered routines following it will be numbered consecutively.