Page 1 of 1

U7 engine internals - shape kinds and such

Posted: Wed Nov 14, 2001 8:04 am
by Max aka Moscow Dragon
I'm very much interested in how the Exult team solved the following problems:

1) Shapes have a kind of the "dungeon roof" flag.
In native engine, the "dungeon/non-dungeon" mode - whether the whole world is black or not - depends ONLY on the shape kind which is above the Avatar's head. I had an experiment of editing IFIX file to replace the Monitor jail roof with a mountain roof - and the jail worked as a dungeon - palette change and whole world black, switched by Avatar stepping back and forth between the patched roof and usual roof.
There must be some table of "dungeon roof" flags. Where is it? In EXE or in some data file?
2) Containers - i.e. bodies - have a flag which prohibits putting items to them, only taking.
Where is this flag?
3) The "flatbed" flag. You can put items on the table - but not on the statue. Where is it?
4) The whole thing of stealing. Does it work in Exult? How the engine determines whether the item is yours or not? Depends on the kind of table it is on? Or some Eggs?

Re: U7 engine internals - shape kinds and such

Posted: Wed Nov 14, 2001 9:03 am
by drcode
1. Colourless (Ryan) knows the most about this. But I think we have a list of 'dungeon' shapes in the code, and it's different in SI than in BG. We never found flags for this in the data files.

2. Never found this one either.

3. Same here. Maybe I'll look into this.

4. I think I've got the 'okay_to_take' flag correct now. What's wierd is that this flag is only stored for certain types of items (containers, and those with 'quantity'), but it's also sometimes set/cleared by Usecode. Anything else is up for grabs. I always thought it strange in the original BG that you could steal all sorts of stuff in front of an NPC, but they'd get mad if you pulled something out of a drawer.

However, we don't have the 'guards' working completely. For example, they're supposed to show up and hang over you when you break a glass case, and that's not implemented in Exult.

Re: U7 engine internals - shape kinds and such

Posted: Wed Nov 14, 2001 10:36 am
by Colourless
1) That's pretty much how things works. Different shapes are used to define a dungeon roof, these are the mountain shapes. There doesn't seem to be anything that differentiates between a dungeon roof and a normal roof except the shape number. So, it's in the EXE file, not a data file.

With the actual rendering itself, after much observations I worked out that it blacks out every tile at the height of the dungeon 'roof', that doesn't have a 'roof' above or at the same height as the dungeon 'roof'.

2, 3, 4) Dr Code has answered about as well as we can.

-Colourless Dragon

Re: U7 engine internals - shape kinds and such

Posted: Wed Nov 14, 2001 12:41 pm
by drcode
Max: I tried emailing you about providing some more Exult/U7 information, but am not sure if I got the address right.

Re: U7 engine internals - shape kinds and such

Posted: Wed Nov 14, 2001 1:41 pm
by Max aka Moscow Dragon
My email address on this forum is valid.