exult studio woes

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
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

exult studio woes

Post by artaxerxes »

Hi all,

I created an egg with ES in a custom game. It's a usecode egg and it should trigger usecode number 0x401.

The code for 0x401 is tested and works fine. When I insert the egg with the right information (probability, auto-reset, distance, etc) and I go in "play" mode, it is actually triggered and everybody rejoices.

Then in ES, I press "save all". I then quit and restart the game. This time, the egg is but a shape, doesn't disappear when I press 'e' for 'egg display disabled' amd sure enough, doesn't trigger the usecode function.

An additional annoyance is that I've put drapes along walls, as well as columns in front of the drapes. I set all that up manually so that on the west wall, the drape shows over the wall and the column over the drape (vice-versa for the east wall). When I save all, exit and restart the game, all of that is lost and whoever wants to show on front just does. Any clue on how to make it work?

thx
Artaxerxes
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by drcode »

I'll give it a try this weekend. By "custom game", do you mean a completely new game (not U7)?
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

a completely new one. I started exult_studio and pressed "new game". Then, to play around and get me started, I copied a few files from SI: all the palettes, the shapes, portraits and gumps.
One annoying thing too is that you can't exit custom games unless you have an "exit gump" available in the gumps file. It would be nice to have a default, even if boring, gump or just even a text box when requesting to exit the game.

Artaxerxes
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by SB-X »

Or exit without confirmation.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by drcode »

Okay, I'll try that. Adding an egg to BG, then saving, worked okay for me. Sounds like something's getting corrupted.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

another point: when I add information to shapes (like adding x,y,z status to a table then setting the x-obstacle, y-obstacle and the solid checkboxes on), save, reload (just for the form), exult doesn't take it into account; I could still walk through the table.

Then I copied the *.dat from SI's static to that custom game and there it worked.

Any clue?

Artaxerxes

ps: note that I copied from SI's static dir and that ES was set to default to BG (if it makes any difference)
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by drcode »

Sounds like ES isn't saving files in the right patch directory (or not saving at all).
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

the stamps are updated, so there must be an issue with where they are saved.

Another general ES question I have:

Could you explain what the classes for item mean? So far, I figured the following:

1) Unusable - ?
2) Quality - can trigger usecode function (?)
3) Quantity - can be stacked
4) Breakabke - obvious (although some flight of stairs are tagged with it [in SI]!)
5) Quality flag - can also trigger usecode function (?)
6) Container - obvious
7) Hatchable - ?
8) Spellbook - ?
9) Barge - ?
10) Virtue Stone - ?
11) Monster - like NPC
12) Human - like NPC
13) Building - act like a roof (?)

thx a bunch

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

Re: exult studio woes

Post by drcode »

1. Pretty sure it can't be moved, but I can't recall how it's different from 'building'.
2. Object has a 'quality' field that 'get_quality()' returns. Used for wand charges, and for identifying keys with locks, deeds with ships.
3. For these, the 'quality' field is interpreted as a 'quantity'. Includes coins, reagants.
5. Not sure, but I think the 'quality' field is used as a set of flags.
7. Eggs. I think the moongates are also in this class.
8. The spellbook:-)
9. Pieces making up ships, the magic carpet, and the horse-and-cart.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

thank you Jeff!

Would you or anyone know how you are supposed to create an initgame.dat file? I tried the u6 patch posted on the forum and I'm curious on how it's done.

Oh, and by the way, ES now works fine for eggs and display order. I refreshed my local tree and recompiled.

thx
Artaxerxes
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by drcode »

ES creates an 'initgame.dat' when you do a 'save all'. If I recall, though, it's just a normal savegame file that's been renamed.
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by marzo »

ES also creates one when you do a save > map.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

excellent.

Another question now: in SI, there is a shape for a fountain (#326). The shape is set to be "animated", but unfortunately, it uses every frames for the animation, including the bloodied fountain. What method exists to limit which frames are used for the animation?

also, is it possible to have an "undo" feature, even if it just undoes the last command? Quite infuriating to press the delete key by mistake and then peer through the shape list to find the one you just deleted.

thx
Artaxerxes
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by marzo »

As far as I know, the limits of the animations are hard-coded in Exult.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

hmmmm, maybe it defaults to BG settings, even though I use SI's graphics... darn! (and I did set default to SI in ES's preference panel).

Also, I seem to have issues with importing PNG image as a new frame. The transparency is gone and replaced by a randomly color, which changes every so often when you reload the file.

Artaxerxes
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by marzo »

It does indeed default to BG; I just checked it. This is one of the things that have to be de-hard-coded in Exult before it fully supports new games. I have been doing some thinking on this issue, and will start discussion about it on the mailing list once I finish a few other things.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

ok,

in the meantime, I changed the source (only on my local tree) objs/animate.cc@341 to say:
if (Game::get_game_type() != BLACK_GATE)
instead of
if (Game::get_game_type() == SERPENT_ISLE)

So that I default to using SI's frame animation, as I believe SI's shapes.vga has more to offer than BG.

Artaxerxes
TMNM Dragon

Re: exult studio woes

Post by TMNM Dragon »

I remember having a similar problem.
I think if you add a file called identity that contains the text SILVER SEED, that it fixed the problem. There should be a file like that in your SI gamedat directory.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

nice to know, TMNM Dragon..


by the way, is there anyone here that compiled a list of flags for SI? I'm trying to understand the usecode behind opening a door (0x1B0, 0x1B1, 0x10E and 0x178) but I got lost after it sent me to 0x1C3 and checks a bunch of flags...

thx
Artaxerxes
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by SB-X »

Yeah... or did you mean item flags? These are the only global flags.
0x4e AskKraygAboutWalks/KraygAccusedOfSpying
0xbf FoundTestLocation?
0x79 CantraKidnapped
But there are a lot more UI_set_item_flag_A4(..., ...) calls, and I don't know what those flags mean. Are those listed on the cheat screen?

So is this various scripted events that happen when opening certain doors? Like the Knight's Banquet.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

I just have no idea. I have a gut feeling it tries to decide how to open the door, let me explain:
every item has a origin point, that of bottom right. If you dclick a door, it should open, that is, change shape in order to look like an opened door. However, it might not be sufficient to change the shape. You might have to change the frame AND the location since the door's unseen hinges are always at the origin (bottom right). In one case, the door will look fine when opened but in all others, the opened version of the door has to be moved a couple of spots away and you might have to add some usecode to determine in which direction the door open. Out of the same closed door, you have to put in usecode whether this particular one opens toward you or away from you, resulting in different shape/frame/location combo.

Artaxerxes
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by marzo »

Flags in usecode are of two kinds: global flags (accessed in UCC by using "gflags") and item flags (accessed via UI_set_item_flag, UI_get_item_flag and UI_clear_item_flag).

Global flags indicate things such as Cantra's kidnapping and the release of the banes (SI) or the forging of the Black Sword and the destruction of the generators (BG). There is a good collection of SI flags whose use I have discovered for SI Fixes (in the Exult CVS: content/sifixes/src/header/si_gflags.uc), and I intend to add more. Global flags can be modified with the "Flag Modifier" tool in the Exult cheat screen. And just an important warning: in the UCXT output, all global flags are in *hexadecimal*, even though they do not start with "0x". This will save you a lot of grief... and (plug) if you haven't seen my utilities in ESGuides (http://www.wiredentertainment.net/exult ... 0&Itemid=1), I strongly recommend that you search and replace "gflags[" by "gflags[0x".

Item flags indicate things such as being invisible, poisoned or even insane (in SI -- the so called "si_zombie" flag). The full range of flags can be seen in files from the Exult CVS; two that spring to mind are objs/flags.h and content/sifixes/src/header/contants.uc, although I think there are more. The latter has the advantage of gathering in one place the names and descriptions of a lot more usecode contants than the former file does (such as schedules and attack modes). For objects, I think that the only really important flags are "invisible", "okay_to_take" and "temporary". Another thing that is important is that not all items have item flags -- I know that items whose type is one of "quality flags", "container", "monster" and "human" have them, but I don't know if any others do.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by Wizardry Dragon »

Question: I know this has probably been asked many times before, but is there any rough timetable for the implementation of the Z coord in schedules?

I've been waiting for this for a LONG time now :|

- Wizardry Dragon
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

yet another question regarding starting new game from scratch:

how do I set the configuration so that I can have music? I have created a few ogg files and peered through the source and it seems everything is hardcoded, based on GAME_IDENTITY.

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

Re: exult studio woes

Post by drcode »

Wizardry: I just have to sit down and do it. It would be simple, except that the savegame format will have to change.

Artaxerxes: Sorry, but it's another thing we have to work on.
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

DrCode:

what about putting the oggs in a flex file and just use the ref# to play the song number requested by the eggs? Or if the filesize is going to be too much for a flex file, simply holding the filename in the flex instead of the whole song?

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

Re: exult studio woes

Post by drcode »

Wait, are you talking about the music played by eggs? That's something you can control, since you refer to the songs by #. What's hard-coded is the music during the intro and during combat (and probably some other places).
artaxerxes
Site Admin
Posts: 1310
Joined: Thu May 14, 2020 1:34 pm

Re: exult studio woes

Post by artaxerxes »

I was indeed talking about music played by the eggs, but I still don't know where to place the files and how to name them so that they will be picked up by Exult.
I was thinking I should put them in /usr/local/share/exult/music (like BG's and SI's oggs are) but comes the naming issue.

I checked the source and it seems that for instance, when you request song #1, ogg is enabled and you play BG, then it will play 01bg.ogg (according to exult/audio/Midi.cc@733). If you are playing SI, it will play bgconvmusic[1] = 10bg.ogg (according to exult/audio/Midi.cc@758).

Artaxerxes
Locked