making permanent changes to game world with Exult Studio

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
Quentin
Posts: 31
Joined: Thu May 14, 2020 1:34 pm

making permanent changes to game world with Exult Studio

Post by Quentin »

I'm trying to make a very minor mod, adding some enemy eggs into BG and changing NPC stats and inventory. I've also made changes to the shapes file to tweak weapons and spell damage, swing speed, and range.
Is there a way to add eggs and make changes to NPC inventory with Exult Studio such that the changes will stay even after I start a new game?
I hope this can be done without involving usecodes and such since I know less than nothing about such things.

Thanks in advance
Quentin
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

If you create a new game directly in map-edit mode (see below for that), make changes to NPC inventories and add the eggs, then tell Exult Studio to save the map, the next time you start a new game it will use this new data. (BTW, starting from a fresh new game is only important if you care about the starting cutscene with Iolo and Petre).

Depending on the exact type of the eggs, you might have to toy with usecode anyway -- basically, usecode eggs (like, say, moongates or those horse-shoe-shaped eggs) require some thinkering with usecode, while the others do not.

To start a new game in map-edit mode you can (a) start Exult with the "--edit" command line option and create a new game, (b) create a new game, enter map edit mode and reload from the auto-quicksave (Ctrl+R) or (c) create a new game and tell Exult Studio to reload the map (File->Reload->Map). Just remember to return the avatar to the starting position and everything will work perfectly afterwards. You may want to unset the avatar's dont_move flag (flag 16) so you can walk around freely.

Hm. I think I'll make map-edit mode ignore flag 16.
------
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]
Quentin
Posts: 31
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by Quentin »

Wow thanks for the lightning speed response.

I guess I can do without the beginning cutscene but I'd really like to keep it if possible. The problem is, using the ways you told me, I can edit eggs, map, NPC stats, everything... except NPC inventory, because it wouldn't let me open their gumps until after the beginning cutscene. I tried unsetting flag 16 but it still wouldn't let me open gumps. Is there a way to get around this little problem?
Quentin
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

ES has a 'Show gump' button which opens the NPC's (or container's) inventory gump.
------
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]
Quentin
Posts: 31
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by Quentin »

Those are helpful changes that you made in ES.

Marzo
"ES has a 'Show gump' button which opens the NPC's (or container's) inventory gump."

There was a bug that happens before the Avatar enters thru the moongate (before your most recent update) that caused the gump not to show on screen when pressing "show gump." I eventually discovered that if I pressed alt-x, the gump would appear. Once I pressed "no" to not quit game, I can manage NPC inventory... but just for one touch. The gump disappears again if I touch it or put an item into it. I had to press alt-x again to access the inventory again... All this is moot now since your fix.

There is still an existing problem though with editing via ES (I know I know I just can't be pleased). I've tried editing NPCs and the map, following your directions. All goes well except that when I start a new game, the Avatar will always retain the same shape and portrait (ie blond male Av) as the first Avatar that I made the changes with, even if I chose, say, the Asian male Avatar. It appears that editing the game this way makes a permanent change on the initgame file, and the Avatar shape is permanently saved at the NPC file(s). I hope all this ranting makes sense, and I hope that this minor problem isn't too difficult to amend.
Quentin
Quentin
Posts: 31
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by Quentin »

Marzo, would you be interested in taking a look at the changes I've made so far to shapes.vga, monster, weapons, and armor files? My aim is to balance some of the weapons and a few armors in BG, and even to add some animals and monsters from SI that would be appropriate in BG. Here's a list of the changes:

Monster:
Cyclops - given a weapons and armor inventory more akin to U6; having spears, clubs, 2-handed hammer instead of a pee shooting sling. Of course, the weapons position values of each frame of the cyclops had to be painstakingly adjusted to make it look right.

Trolls - similar to the Cyclops, weapons position values were adjusted. They were given throwing axes and 2-handed ax, like U6, instead of pee-shooters.

Bears - added to the shapes file but not to the map. I just thought Britannia should have bears, too. All looks well, except unfortunately, I don't know how to assign the proper dead bear body to the shape (a mage is the dead body for bear as of now for some strange reason).

Highwayman - is now a monster, given inventory and proper weapons position values.

Weapons: main changes include
1. Magic sword and Fire sword damage has been increased so that they are more useful. Magic sword is assign "fast stab" so that it hits more frequently, making it a deadlier weapon.
2. I made many weapons to have an armor value of 1. Just thought it made sense that you can use your weapons to block. A morningstar, whip, or dagger would not have armor value since they can't block.
3. Tinkered with the strike distance values of some weapons that I think makes sense, as well as to give them a uniqueness over another weapon... (eg, morningstar and sword now have same damage of 6, but morningstar has no armor value but has longer range)
4. Swing speed made to make more sense/give uniqueness to weapons. eg. dagger is "fast stab," magic sword is "fast stab" because it's magical! Halberd is slow swing (but high damage value and long range). Sword is slow stab, 2-handed ax is fast swing, etc.

There might be other tweaks I neglected to mention but these are the prominent ones.

I believe that these changes adds an extra dimension to the combat aspects of U7. It'd be great if you are interested in somehow incorporating them into your mod. Feel free to tweak it to your own liking, or to ignore this entirely if you don't like it.

My wish is also to be able to change monster experience points with ES one day.

That's all for now
Quentin
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

There was a bug that happens before the Avatar enters thru the moongate
It is not a bug, it is by design; it is because the avatar's "don't move" flag is set (flag 16; this is set before the initial cutscene in BG); this also happens if flag 22 is set. This still happens when you are not in map-edit mode, but these flags are now ignored in said mode.
All goes well except that when I start a new game, the Avatar will always retain the same shape and portrait (ie blond male Av) as the first Avatar that I made the changes with
That should *not* happen; from the mods I made, I know for certain that it did not happen, so if it is happening, something very wrong is going on and it has been introduced recently.
My wish is also to be able to change monster experience points with ES one day.
Experience points are calculated by Exult based on the creature's strength, dexterity, combat and intelligence. Specifically, it is given by (str + (dex + combat + int)/4)/2. So, in a way, it is already editable.
------
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]
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

something very wrong is going on and it has been introduced recently.
Turns out it wasn't that recently, I just hadn't saved a new map since -- oh, about January or so. It will work as it should in the next snapshot.
------
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]
Quentin
Posts: 31
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by Quentin »

Quote:

Experience points are calculated by Exult based on the creature's strength, dexterity, combat and intelligence. Specifically, it is given by (str + (dex + combat + int)/4)/2. So, in a way, it is already editable.


Combat goes up to 30 max, which I understand why. But in Exult Studio Str Dex Int can only go as high as 36 for some reason. Only the dragon can go beyond 36 (it has 40 strength). Is this just an arbitrary restriction? Can this cap be removed?
Quentin
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

But in Exult Studio Str Dex Int can only go as high as 36 for some reason.
Let me guess: you are trying to set it to 100. Right? The upper limit is actually 63; the upper bits get discarded. I will set a proper cap in ES.
------
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]
Quentin

Re: making permanent changes to game world with Exult Studio

Post by Quentin »

yup exactly. I discovered this with further experiments, but thought the cap is 60. Didn't know the cap is actually 63.
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

In fact, it is slightly better to set intelligence and strength to at most 31 -- while the monster will be created with the correct strength, saving and reloading the game will cap those attributes to that value.
------
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]
Quentin

Re: making permanent changes to game world with Exult Studio

Post by Quentin »

Really... in my experience it seems ok to save monster stats as long as it's below 60 in str dex and int, and 30 in combat. The xp that's resulted is about 45, which corresponds to the stats. This means I need to do further monster experiments.
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by Colourless »

SI has a lower cap than BG
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

The problem is saving and reloading after the monster has been created by (say) an egg; when you do so, the monster's strength and intelligence get capped as I described. And Colourless is absolutely right to mention the difference in BG and SI caps -- strength in BG gets capped to 63, not 31, when you save and reload.

I am thinking of fixing this, but it will have to wait until I finish the stuff I am already doing.
------
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]
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: making permanent changes to game world with Exult Studio

Post by marzo »

The xp that's resulted is about 45, which corresponds to the stats.
Oh, and by the way, I wouldn't hold the formula I gave earlier as being set in stone: I have recently uncovered a great deal of information from studying the originals, and I think I have a formula that better approaches what they did.

Hm. While I am at it, I may add a XP calculator in ES.
------
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]
Locked