Usecode Studio problem
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
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Usecode Studio problem
Hey, it's me (not dead yet...)
Okay, still been working on my little project, even got Exult Studio and everything running fine, custom usecode and everything.
My problem is thus:
>> I add an NPC into the game, specify a usecode number, custom face, shape, etc.
>> I drop the NPC into the game. Everything works fine. Conversation works through all the options, the character says the random messages he's supposed to, follows his schedule, etc.
>> However, when I save the map and reload the game, Exult changes the Usecode function assinged to the character. So, for the character to work I have to reset the usecode number EVERY TIME I LOAD THE GAME. A tad annoying, that.
I am trying to set it to 0x564, but it keeps resetting it to different numbers (no apparent pattern in the number it assigns to).
Am I doing something wrong?
Patch in question:
http://crpgn.org/patch.zip
- Wizardry Dragon
U7: Giridion project
Okay, still been working on my little project, even got Exult Studio and everything running fine, custom usecode and everything.
My problem is thus:
>> I add an NPC into the game, specify a usecode number, custom face, shape, etc.
>> I drop the NPC into the game. Everything works fine. Conversation works through all the options, the character says the random messages he's supposed to, follows his schedule, etc.
>> However, when I save the map and reload the game, Exult changes the Usecode function assinged to the character. So, for the character to work I have to reset the usecode number EVERY TIME I LOAD THE GAME. A tad annoying, that.
I am trying to set it to 0x564, but it keeps resetting it to different numbers (no apparent pattern in the number it assigns to).
Am I doing something wrong?
Patch in question:
http://crpgn.org/patch.zip
- Wizardry Dragon
U7: Giridion project
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
I'm sure I stumbled over something like this before...
Some help please, where do I find this character?
Edit again: Forget, I'm too stupid to remember how to edit exult.cfg so it works
Some help please, where do I find this character?
Edit again: Forget, I'm too stupid to remember how to edit exult.cfg so it works
--
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!
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!
Re: Usecode Studio problem
At first glance my suspicion is that it is caused by using an existing NPC and not having made a new NPC.
Second glance:
Created a really new NPC and expereinced the same problem. Curiosly it seems that there is a relation between NPC# and Usecode#. The created NPC had #0x8b and the usecode it wants to execute is always 0x48b.
In your patch the NPC # was 0x94 and the usecode it defaults to is 0x494.
Apart from that I wouldn't reassign NPCs (as it seems you hijacked one of the Skara Brae Ghosts).
Dr.Code any ideas?
Second glance:
Created a really new NPC and expereinced the same problem. Curiosly it seems that there is a relation between NPC# and Usecode#. The created NPC had #0x8b and the usecode it wants to execute is always 0x48b.
In your patch the NPC # was 0x94 and the usecode it defaults to is 0x494.
Apart from that I wouldn't reassign NPCs (as it seems you hijacked one of the Skara Brae Ghosts).
Dr.Code any ideas?
--
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!
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!
Re: Usecode Studio problem
a little reference to the relation of NPC# and Usecode#:
http://exult.info/forum/viewtopic.php?p=12938#p12938
http://exult.info/forum/viewtopic.php?p=12938#p12938
--
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!
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!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
I used the "Create NPC" function in Exult Studio. Perhaps the problem lies there.
I see two possiblities:
>> Either Exult Studio is not creating "new" NPCs.
>> Or perhaps the values I entered messed it up somehow.
- Wizardry Dragon
I see two possiblities:
>> Either Exult Studio is not creating "new" NPCs.
>> Or perhaps the values I entered messed it up somehow.
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
Dominus - I'm afraid that didn't help much.
It would solve the first possibility if I were able to reassign or set at creation time the NPC number, but Exult Studio does not allow that.
- Wizardry Dragon
It would solve the first possibility if I were able to reassign or set at creation time the NPC number, but Exult Studio does not allow that.
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
how about setting usecode# accordingly to the 400+i (i=NPC#) rule?
--
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!
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!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
That works, however that still leaves unresolved how the "Create NPC" option in Exult Studio grabbed a ghost from Skara Brae.
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
D'oh. Just realized I titled this thread wrong.
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
Yup, maybe Dr.Code can help.That works, however that still leaves unresolved how the "Create NPC" option in Exult Studio grabbed a ghost from Skara Brae.
Another thing I need to add to the Studio docs is that it is important people are using the same shape set. What I mean is that if the patch is done by BG+FoV it is quite possible that it will crash BG only games. We really need to remember that when releasing patches. (doesn't apply here, just as a rememberance)
--
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!
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!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
Are there people that use plain BG?
I just hope that wasn't an important ghost or something...
(which NPC did it grab, anyhow?)
- Wizardry Dragon
I just hope that wasn't an important ghost or something...
(which NPC did it grab, anyhow?)
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
#148
--
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!
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!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
Which is...?
I don't memorize the NPCs by number after all
- Wizardry Dragon
(sorry if I'm being a pain)
I don't memorize the NPCs by number after all
- Wizardry Dragon
(sorry if I'm being a pain)
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
he he, in Exult press F2, N, 148 and you see more informations on this NPC. Might be it is an unused NPC.
--
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!
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!
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
Must be unused.
I teleport to him and I end up under a mountain
- Wizardry Dragon
I teleport to him and I end up under a mountain
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
Way back home I have 5 1/2 inch floppy plain version, complete with cloth map, of U7 (and same for SI)... And I'm keeping a tower that has a 5 1/2 inch floppy drive in my closet (right now it's just collecting dust though) d-:
I've only played FoV and SS from my copy of the Ultima Compedium.
I've only played FoV and SS from my copy of the Ultima Compedium.
Re: Usecode Studio problem
I still have that map right beside me... With some highlighter stains from where my brothers highlighter broke.
P.S. - Sorry for hijacking the topic.
P.S. - Sorry for hijacking the topic.
Re: Usecode Studio problem
Okay, just caught up, and I think what's going on is:
1. The usecode number for NPC #n must be 0x400 + n, as Dominik indicated. It's probably a bug that ExultStudio lets you fill in any #, so I'll take a look at this tonight.
2. One of the SkaraBrae ghosts wasn't really part of the game, but we used to have a bug where we created it anyway (the extra mayor, I think). So it's correct that ExultStudio makes this # available for a new NPC.
1. The usecode number for NPC #n must be 0x400 + n, as Dominik indicated. It's probably a bug that ExultStudio lets you fill in any #, so I'll take a look at this tonight.
2. One of the SkaraBrae ghosts wasn't really part of the game, but we used to have a bug where we created it anyway (the extra mayor, I think). So it's correct that ExultStudio makes this # available for a new NPC.
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
I just worry that this may leave other NPCs to get gobbled up too. We don't need a "disappearing Lord British" bug
- Wizardry Dragon
p.s.: or maybe we do? Hmm... (-:
- Wizardry Dragon
p.s.: or maybe we do? Hmm... (-:
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
Just looked at the code for setting usecode #, and the rule is:
1. if NPC # is between 0 & 255, then the usecode # is always 0x400 + n.
2. If NPC # is 256 or higher, than you can set it in ExultStudio.
I'll try to make EStudio follow this better.
1. if NPC # is between 0 & 255, then the usecode # is always 0x400 + n.
2. If NPC # is 256 or higher, than you can set it in ExultStudio.
I'll try to make EStudio follow this better.
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
That would be much appreciated
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
You know what would really help to organize the Usecode would be the ability to break it down into seperate files.
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
You mean what `rip' does?
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
No, I mean, the ability to compile UCC source code into Usecode from many different files, like C/C++/C#, Pascal, or almost any other programming language.
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
Wizardry: You're right about the separate files. Currently, you can use "#include", and you can specify "-I" (although I'm not sure if that's ever been tested).
Another untested possibility: I think if you compile separate usecode files, you can just 'cat' the outputs all together into one big "usecode".
Another untested possibility: I think if you compile separate usecode files, you can just 'cat' the outputs all together into one big "usecode".
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
I'll go test that right now
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
Okay, include seems to work, but it seems to take significantly longer to compile, at least for me... (another five or six seconds, trivial for me, but it is quite a bit longer than before; before it was near instantaneous.)
Then again, this is a 70k of raw source I'm compiling ...
- Wizardry Dragon
Then again, this is a 70k of raw source I'm compiling ...
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Re: Usecode Studio problem
Odd; it shouldn't slow down that much. Maybe it's a bug.
-
- Posts: 1241
- Joined: Thu May 14, 2020 1:34 pm
Re: Usecode Studio problem
Perhaps, or perhaps the include# marco needs optimizing. Either way, it bears looking into. It is possible it is my machine, but I doubt it. I'm on a 2.8 gHz Intel Win XP Machine with 512 mb of ram.
- Wizardry Dragon
- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca