Baking Bread in SI

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
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Baking Bread in SI

Post by Knight Captain »

SI has a baking bread egg, but it wasn't placed on the map, apparently:
void eggBakeBread object#(0x635) ()

It's the same egg object as in BG, so to add it in SI, set the same criteria:

Egg Criteria: Something On
Flags: Auto-Reset
Probability: 100
Distance: 0 (Doing 1 here might make sense, BG sets 3 eggs per hearth.)
Usecode Function: 0x635
Quality: 0 (default)

Both BG and SI allow you double-click the two dough shapes, ball of dough and rolled-out dough, to place them in the oven's hearth. But without the eggs, manually placing them or dry flour on or above the hearth does not work.

I've re-implemented the egg so it can be reused in other mods someday.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Dominus »

There is no bakery and I don't think I saw the ingredients anywhere. But nice to have 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!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

There's Ducio's automaton who bakes 24/7.
The Sleeping Bull has a hearth, as does the Castle of the White Dragon, among other places.

The ingredients are all in the kitchen items, so you only need a sack of flour. Rolling pins are around too.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Dominus »

Well, let me rephrase, I never noticed those :)
--
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!
Gotcha!
Posts: 354
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Gotcha! »

You're a busy bee, Knight Captain. :)
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

Aye. I'm enjoying it, though!

I'm re-writing a lot of the existing code now so it can be used in my mod, since I've got to change or add gflags here and there. I've also reimplemented much of the utility Usecode so it could be used in a mod for The Black Gate as well someday.

Wouldn't it be cool to have the STARTEDTALKING functionality in BG? Or delayedBark, or setNewSchedules, etc?
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by agentorangeguy »

Knight Captain, have you looked to see if the hearth itself had the usecode "built in" this time in SI? I was always under the assumption they just coded the hearth egg used in BG into the hearth itself. As far as I know the hearth wouldn't work in BG unless you had the egg on it, whereas i'm pretty sure you could use it in SI without any eggs on it.

Since you're in the process of fixing functionality in SI, I did notice that the "Mining" schedule was broken... probably because they didn't add chunks of lead/iron ore. If I'm remembering correctly, the pirate in the Mountains of Freedom has his business schedule set to mining and has the pickaxe but doesn't actulaly do anything because there isn't anything to mine. Have you looked at that yet? Very cool stuff you're doing :)
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

There's no Usecode for hearth shape in either game.

In BG, there's two ways to bake bread:
Egg: Place any dough (shape 658) on top of a hearth egg, even dry "dough" flour.
Dough: Double-click wet dough (shape 658, frames 1 and 2) and then target the hearth.

In SI, there's also two ways to bake bread:
Egg: Similar logic to BG. Place any dough, even dry flour on the egg, get bread back. But these eggs were not placed on the map.
Kitchen Items: Double-click wet dough (shape 863, frames 17 and 18) and then target the hearth.

In all of these cases, only the generic oval loaf of bread is created. Which is different from the BAKE schedule, which will get various other baked goods back in the process. So how it was originally coded in both BG and SI for the player baking bread is different from how it's done schedule-wise.

One thing that I've not been working on is the schedule stuff, since those are coded by the game engine (Exult) rather than the game-specific Usecode. You're correct that schedule could be improved. The Desk Work also needs attention, as well as the combat range stuff. If there's some way we could help, like describe how it should work, I'd be happy to contribute.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

It's also interesting that in Exult SI, the oven shape seems to be preferred over the hearth if both are in the area.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Dominus »

We'd probably need someone to actually code it. You know, once you look at our schedules code schedule.cc you will quickly find that youncould improve it yourself quite a bit. You've been trained with usecode, advance with source code ;)
--
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!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

I'm not quite up for that yet, since I don't even have a home dev environment setup, but I can see why Leon's preaching doesn't work in Exult. The implementation in Exult is looking for shape 697, which is the podium. It looks like it also is looking for frame 0, so only that will work.

If I drop that into Exult and have him try to PREACH, he will stand there and bark a few things. Where those barks come from isn't clear to me.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Dominus »

Can you file that as a bug? We might need a special case for SI
--
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!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

Bug 2003 submitted.

As Marzo notes in Bug 1814 a ton of shapes are hard coded in schedule.cc, and that's a problem because they are only the BG shapes, not SI ones. That's why the MINE schedule doesn't work in SI, shapes 915 and 916 are not ore there.

The WAITER schedule does not check the table to match the plate:
plate = gmap->create_ireg_object(717, 0);
Nor does it include any bottles to drink.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Dominus »

See? You are getting there... ;)
Readme.mingw or Readme.win32 or something like that will help you setup a development environment and off you go fixing schedules ;)
Btw. they also need all kinds of sfx assigned, too...

But seriously, I think, schedules are so low on the to-do list, everyone does other things first when there is time. So someone working on schedules would be nice ;)
--
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!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by agentorangeguy »

Didn't Leon preach in the original game? I vaguely remember wandering up there and the fellowship music starts and the barks will start up. Or was it just unimplemented / altered in Exult?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

'Twas a single-use egg that does that, but his scheduled daily one is broken.
Alexander

Re: Baking Bread in SI

Post by Alexander »

On a somewhat related note, is there a way to mod it so that you can choose to make different things (cakes, pastries, etc.) besides the plain old boring loaf of bread?

I loved the "Quests and Interactions" mod in BG, where you could make all kinds of clothes. Is something similar possible with the bread?

I always wondered why everyone else (even the robots who don't eat) gets to make all these awesome desserts while I'm stuck making the same bread that even rat poison wouldn't improve.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

Yes. In fact I've already done a similar change that allows for using the shears on cloth to make the last bandage shape (but skips the band-aid frame). So it would be very possible here as well to do a die roll with a frame array.
Alexander

Re: Baking Bread in SI

Post by Alexander »

That would be awesome. As wonderful as the interactivity is in BG and SI, I would love to see even more.

A few ideas I had, some from Ultima Online:

-It would be neat to be able to make wine at Empath Abbey, and at the Rangers' Winery in Moonshade.

-I would also love the ability to use a green potion on a regular dagger, turning it into a poison dagger.

-I always wondered why "Enchant"/"Enchant Missiles" in BG & SI only worked on arrows & bolts. Since there are magic swords and magic bows, I always figured you should be able to cast "Enchant" on weapons like regular swords and bows, and turn them into magic weapons that way. The spell in SI would obviously have to be renamed if this was done.

-Since cups & mugs are basically useless, it would be nice to be able to double-click on a bottle, click on the cup/mug and fill it so you can drink out of it, instead of chugging an entire bottle of booze in one sitting (much like you can do in Ultima Online).

I know these ideas would take a great deal of time and effort, if they're even possible. I am a huge fan of the interactivity of Ultima 7 and applaud your efforts to improve upon it.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

I might go back and have the shears make the cloth scraps (last two frames) into the band-aid shape.

Thanks for the suggestions! I just noticed that the magic wine press animation includes grapes going into the hopper, but there's no egg to trigger that, nor usecode to pick them up if the press is double-clicked. It has the bucket location hard-coded. So if you turn on the hack mover and try it, it won't work without the bucket in the original right spot. It would be harder to fix in BG because there is no animation involved.

A quick subplot could involve reading the scroll in the basement of the Rangers' barracks.

The poison daggers were sea serpent teeth, which is why they were different.

For magic items, I'd rather make them for sale than creation, or as part of a subplot.

Cups and mugs will remain useless, at least for now.

But you could add some of these yourself if you want to learn a bit of code.
Alexander

Re: Baking Bread in SI

Post by Alexander »

Oh I've been trying. I've been quite eager to help out with the code, but I downloaded U7 Wizard and can't get it working despite several attempts. Is this the program you use?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Dominus »

Don't use u7 Wizard. It's for looking up and changing the original. For Exult modding use Exult Studio (for modding the visible stuff) and any text editor to write usecode und then Exult Tool's ucc to compile the 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!
Alexander

Re: Baking Bread in SI

Post by Alexander »

Thanks. I'll give it a try.
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Baking Bread in SI

Post by Knight Captain »

I'd suggest starting with the Quests and Interactions mod code, since it has some good base parts. It has more comments to help understanding than SI Fixes in general. I can also help with questions.

Most of my fun coding time in on my own mod for SI but the underlying Usecode C is very similar.
Locked