New item interactions

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
Tristan de Inés

New item interactions

Post by Tristan de Inés »

I think it would be nice if new ways to interact with items could be added. For example, using iron ore on a forge would melt it. Then using some items on the forge would make either bullets for the musket or iron bars. Then maybe you could make normal swords by forging just as you forge the Dark Sword and then sell them.

I'm not speaking of skills and lists of items to create as in UO. Just some new ways of interacting with items, like how you can bake bread by using a water bucket on flour and then putting it in the oven. Things like these make the world more interesting and alive.

I also liked the idea of "real paperdolling" someone once mentioned. I realise this sounds like a huge effort, but I think it would be a very cool improvement.
Oblivious

Re: New item interactions

Post by Oblivious »

I'm not sure that can be implemented... Keep in mind that RG originally intended for you to do the following things:

*Fill cups with water (there are duplicate sprites for each cup and jar, so I think it was originally intended to have an empty and full one of each I believe he originally intended this for U6 as well)
*Harvest crops and turn them into bags of wheat
*Mix wheat with flour to make bread
*Use for the flour sifter and dough plate (looks like mortar&pestle)
*Harvest lumber with an axe or saw, and use the saw mill to make boards
*Brew your own potions
*Cook pastries, cake, etc. by using the honey/sugar/flour/spice/etc. in the jar items
*Forge your own equipment
*Make clothing out of the rolls of cloth
*dig holes with the shovel
*Possibly make your own jewelry

However, the programmers ran out of time and these things could never be coded in.

It's also blatantly obvious that the starbursts were originally supposed to be gems, but the programmers could not implement a peer spell/ability, so they recycled the sprite and had the item become starbursts.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by drcode »

Keep in mind that all those interactions are controlled by the scripts in the 'usecode' file. It's possible in Exult to write your own and replace the ones that came with the game. It's just not really easy.
Tristan de Inés

Re: New item interactions

Post by Tristan de Inés »

Okay, so how do you decompile / compile usecode?

I read somewhere, that there's still no documentation to it, but I guess you learn coding best by looking at the code (unless talking about functional programming, which still gives me headaches).
Tristan de Inés

Re: New item interactions

Post by Tristan de Inés »

Can someone explain to me what the benefit of having a scripting language (like usecode in the case of U7) is?

I would get the point, if the scripting language would be in simple text format to allow for easy editing and customisation after the program has been compiled and released, but in the case of usecode, it has to be compiled itself, so where's the difference to having the game functionality hardcoded?
nadir
Site Admin
Posts: 407
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by nadir »

Because you have to translate your scripting language into a much simpler representation which is then executed by a special virtual machine. Most of the complex constructs needed in a human readable language can be reduced to a handful of basic instructions, therefore making the virtual machine much easier to implement, and the binary usecode file much smaller to distribute.
Remember: usecode is not compiled to native (e.g. x86, powerpc) code.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by Dominus »

And thankfully U7 wasn't all hardcoded. Exult would pretty much be non-existant if all of usecode were hardcoded into ultima7.com.
--
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!
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by drcode »

Most modern games use scripts; I've even heard of one that uses a Lisp variant as its language. Along with the advantages already listed is portability, although U7 didn't take advantage of that.
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by SB-X »

Extensibility. Once the engine is done the designers and usecoders can work with the available system without reworking the engine for every new thing (in practice this isn't always what happens). New games can be made with the same old engine; minimal changes in the base code reduce likelyhood of bugs, or at least make them easier to find. (in practice you see that they usually ended up changing the engine anyway)
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by SB-X »

Oh, about the topic at hand. Brewing potions is something I thought about a few days ago while playing SI. It sounds like it could be useful, the others are more for show.
Kagehi Kossori
Posts: 44
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by Kagehi Kossori »

Yeah. An example of something that uses such a base engine with additional scripts to make new games is Dink Smallwood:

http://dynamic4.gamespy.com/~dink/index.shtml

It is capable of importing just about any sort of graphics and scripting all the interactions, though it is a bit more primitive in some respects. I don't think for example that you could stack a bunch of boxes in it and climb to the top of a building. It is more or less a single layer map, without the height settings needed to make true buildings. It also doesn't scroll, but subdivides each section of the map into a *room*. The one advantage it does have is that it does not suffer from the glitch that currectly tends to eat chunks of scenery or buildings in Exult. In the long run, Exult's engine will make Dink's engine look rediculously simplistic, but right now Dink is more realiable when actually designing new games.

In any case, Dink uses a variation of C and compiles the files into a compiled object file. Like Exult, the editor runs parallel to the engine, so changes to the code are implimented the moment you leave a room, then return to it.

Hmm.. This reminds me.. I need to play some Dink games again and see if the new video card I got runs them any better. I had a horrible bitmap scaling issue on the old one, where it stretched or shrank the image, but only some of the lines actually got drawn from the resized bitmap. I hope with the new card this glitch will have gone away. :(

Ironically, this is something else in Exult you wouldn't need to worry about, but only because you can't rescale images in the engine that I am aware of.
Annorax
Posts: 81
Joined: Thu May 14, 2020 1:34 pm

Re: New item interactions

Post by Annorax »

I agree, having those extra possible activities coded into the usecode would be awesome.
--------------
Knowledge is power. Power corrupts. Study hard. Become evil.
Locked