Exult Dev Team:
I was wondering if the choice of the font to use is hardcoded in the usecode file or in the engine.
For example, the sign posts (almost) always use the runic font. Is it a feature from the engine or from the usecode file that contains the actual text to say?
Thanks for the info!
Artaxerxes
ps: if it is actually from the engine, I think you guys should leave an option in the engine so that it could be put in the usecode. That way when newer games are made, there would be no need to modify the engine.
usecode question
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
I also have another question:
In the file gumps/Sign_gump.cc, at line 128 (approx), we read:
else if (txt == 44)
{
lines[line] += 'S';
lines[line] += 'T';
}
else if (txt == '|')
{
lines[line] += ' ';
}
I understand it transforms the special runic characters encoding for ST, NG, EE, EA and TH using respectively ",", "*", ")", "+" and "(". But what is the "|" used for ? In the extract above it seems it is for space but I just need to be sure about that.
Thanks!
Artaxerxes
In the file gumps/Sign_gump.cc, at line 128 (approx), we read:
else if (txt == 44)
{
lines[line] += 'S';
lines[line] += 'T';
}
else if (txt == '|')
{
lines[line] += ' ';
}
I understand it transforms the special runic characters encoding for ST, NG, EE, EA and TH using respectively ",", "*", ")", "+" and "(". But what is the "|" used for ? In the extract above it seems it is for space but I just need to be sure about that.
Thanks!
Artaxerxes
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
The font is chosen by Exult depending on which gump is being created. So a gold plaque will have gold characters, a wooden sign will have the brown characters and a tomb stone will have grey characters.
The '|' is the dot that is used to separate words when using runic characters.
Remember the fonts use upper case characters for normal letters and lower case characters for runic letters.
-Colourless Dragon
The '|' is the dot that is used to separate words when using runic characters.
Remember the fonts use upper case characters for normal letters and lower case characters for runic letters.
-Colourless Dragon
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
there are dots to separate words in runic ?
Artaxerxes
Artaxerxes
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
Third usecode question:
How do I know who or what calls a certain usecode function? Right now I am translating a under 0x400 usecode function so there is no easy way of knowing who or what says a certain phrase?
(0x3C0 if you need to know).
Artaxerxes
How do I know who or what calls a certain usecode function? Right now I am translating a under 0x400 usecode function so there is no easy way of knowing who or what says a certain phrase?
(0x3C0 if you need to know).
Artaxerxes
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
Yeah, there are dots between the words.
I think ucdump may be able to produce a call map. That should be what you want.
-Colourless Dragon
I think ucdump may be able to produce a call map. That should be what you want.
-Colourless Dragon
Re: usecode question
0x3C0 is just the usecode function for object number 0x3C0. ("mushroom")
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
thanks for the help...
So if I understand well, every usecode function below 0x400 is for the item whose number in shapes.flx is below 0x400.
Then above 0x400 it the conversations: 0x401 is conv with Dupre etc.
Then after the converstation (0x600 or so ??) there is the usecode function like what happen when you d-click on a lock door or so forth.
In this case, how do I know what called that particular function? Colourless mentioned ucdump. Is that the right tool for the job?
thx again
Artaxerxes
So if I understand well, every usecode function below 0x400 is for the item whose number in shapes.flx is below 0x400.
Then above 0x400 it the conversations: 0x401 is conv with Dupre etc.
Then after the converstation (0x600 or so ??) there is the usecode function like what happen when you d-click on a lock door or so forth.
In this case, how do I know what called that particular function? Colourless mentioned ucdump. Is that the right tool for the job?
thx again
Artaxerxes
Re: usecode question
What I can remember:
0-0x3ff: Represents shape with the same number.
0x400-0x4ff: NPC # - 0x400.
0x600-0x700: Eggs, magic spells?
0x800- : Functions called by other usecode functions.
I don't know if ucdump will cover all cases. Sometimes a function is 'scheduled' inside a script (intrinics 1 and 2). The one sure way to find out is to use gdb and put a conditional breakpoint inside the code in ucinternal.cc, something like:
b nnn if fun->id==0xmmm
Then look up the stack when it stops there.
0-0x3ff: Represents shape with the same number.
0x400-0x4ff: NPC # - 0x400.
0x600-0x700: Eggs, magic spells?
0x800- : Functions called by other usecode functions.
I don't know if ucdump will cover all cases. Sometimes a function is 'scheduled' inside a script (intrinics 1 and 2). The one sure way to find out is to use gdb and put a conditional breakpoint inside the code in ucinternal.cc, something like:
b nnn if fun->id==0xmmm
Then look up the stack when it stops there.
-
- Site Admin
- Posts: 1310
- Joined: Thu May 14, 2020 1:34 pm
Re: usecode question
I see what you mean Jeff, but it does not really help me there. The explanation helps to see what uc function is activated when a certain item is clicked on, when a certain character is conversing etc.
What I would like to know is what is the action to perform to raise the use f this one particular usecode function 0xXXXX.
But, thx for the help.
Artaxerxes
What I would like to know is what is the action to perform to raise the use f this one particular usecode function 0xXXXX.
But, thx for the help.
Artaxerxes