studio stuff

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
colarob

studio stuff

Post by colarob »

I'm working on a patch for si using the studio and was wondering about switches and doors. Can you say.. have a lever operate a sliding door in the area just by having their quality values the same? Or do you need to do event handling with usecode. If the former is true are there criteria for quality assignments if merely doing a patch for si?
colarob

Re: studio stuff

Post by colarob »

Also, in triggering a usecode egg using the "something on" criteria, can the key object be determined via quality?
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: studio stuff

Post by drcode »

It's been a while since I've really studied the usecode, so I'm a bit rusty. I'm pretty sure the answer to your first question is 'yes', but you should look at the disassembled code for 'lever' to see.

For the second question: You need to get the actual object placed on the egg. I can't remember if that's the 'item' passed to the usecode function, or if you have to find it (by looking for the closest object to the egg, I'd guess).
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: studio stuff

Post by Colourless »

The 'something on' criteria is one thing that Ultima 8's usecode vastly improves upon from Ultima 7.

In U7, only Eggs could be triggered by a something on criteria, and if that was a usecode egg, then the item isn't passed to the usecode, you have to search for it, using an awkward method (find_nearby).

U8 improves on that in 3 ways:
1) Every item can be triggered by something being placed on it
2) The item is passed to the usecode function that is called
3) U8 usecode has the ability to search for all the items on top of another item.

-Colourless Dragon
colarob

Re: studio stuff

Post by colarob »

Thank You. It had finally occured to me that i had read that shapes have their own predetermined usecode in the beginning of the u-codefile and started reading it shortly after I posted. I have one more question please.
In writing to my own faces file with ipack (using the gimp to edit) I was using hi-res images and scaling them to the common resolution for a face
file and using 256 indexed coloring, but got a garbled (but somwhat distinguishable image in studio's browser. I tried then dragging the new image onto an extracted face and it seemed to pick up its' palette, but seemed to lose some pixels. I noticed though too, that custom palettes (or the file name anyway) doesn't show up in the studio's tree although the custom faces file does.
colarob

Re: studio stuff

Post by colarob »

I am, too, using winXP and I understand there are NT issues?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: studio stuff

Post by Dominus »

Xp wasn't having those issues, only NT 4.x and Windows 2000.
--
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!
Locked