Exult Studio and Items

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
Cheshire Katt

Exult Studio and Items

Post by Cheshire Katt »

I've been toying with a few ideas for things to do down the road (once Exult Studio gets further along -- especially that usecode editor I'm looking so forward to), and I've been wondering about something -- item creation.

What is planned for functionality regarding the creation and editing of items that DO things? Weapons and armor come quickly to mind, as they have damage, AC, weight, mass, and so forth, plus paperdoll art. All items have weight and mass, some items do things when doubleclicked (potions, books, that clicky ball thing in Spektor's office in Monitor), equipped (Erinon's Axe, Belt of Strength, Helm of Light, Rings of Invis/Regen), attacked with (wands, firedoom staff). Some weapons throw and return. Arrows have special properties. And so forth.

What about making a custom container? A mortar and pestle, perhaps -- put components in the mortar, and then use the pestle on it to mix, to replicate the style of magic system used in Ultima 4, where spells are basically prefab single-use items?

Or much more simply, adding a new type of armor to the game -- say, for someone trying to recreate the original plot of Ultima 9, this person might want to add the Wyrmguard armor type to the game.

So basically, that's what I've been curious about -- what is actually planned for Exult Studio down the road, so that I may develop plans of what I want to do based on what I find out?

Thanks,
Chesh
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Exult Studio and Items

Post by drcode »

Some answers:

Usecode editor: I've not heard of this. There is a Usecode compiler, and you can see an example of the script language by looking at the 'usecode.uc' file in our 'island patch'.

Weapons/armor/etc.: If you double-click on a shape in ExultStudio, you'll get an 'info' window that lets you set all these things. You can turn any shape into a weapon by checking the 'weapon' box and then entering its attributes. Same goes for armour and ammo.

Making items do things: You have to write a Usecode function for each of these. Ultima7 has hundreds of these.

Custom containers: Later. Exult currently has container shapes hardcoded, along with the 'gumps' (inventory display) used by them. I plan on rewriting this in the new-development code.
Cheshire Katt

Re: Exult Studio and Items

Post by Cheshire Katt »

Thanks, DrCode, these were pretty much the answers I was hoping for.

Some followup comments:

Usecode editor: perhaps this was the wrong term for it. There has been talk of including a color-coded C-like syntax usecode tool in Exult Studio. I'm not sure if these are rumors or whatnot, or if there is already a tool that lets me dump the usecode into said C-like syntax / recompile it back into it (I played around with wud, but that's not quite the format I'm looking for).

Weapons/armor: If this includes paperdoll art, I'm a happy, happy man.

Items doing stuff: I assumed this was the case, but have been somewhat intimidated by the bytecode output of wud. I think I'm just gonna have to start decompiling and seeing what I can see.

Custom containers: Again, works for me.

Cool. Thanks!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Exult Studio and Items

Post by wjp »

Try ucxt if you want to decompile usecode into a C-style language, and ucc if you want to compile that language back into usecode. Usecode.uc in our patch is a relatively simple example of a script in this language.
Pertex

Re: Exult Studio and Items

Post by Pertex »

is it possible to decompile the original usecode? Or is there a problem with ucxt and Windows? When I try ucxt -bg -fs -a I always get the message:
assertion failed: otd.opcode!=0x00, file ./usecode/ucxt/src/ucfunc.cc, line 1031, abnormal program termination
Locked