UI_close_gumps not working?

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

UI_close_gumps not working?

Post by agentorangeguy »

anyone else having trouble with getting the UI_close_gumps(); intrinsic working?? it doesn't appear to do anything anymore
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

I'm trying to make a usecode egg with "something on", that once you remove the object on the egg, or put something on it, all gumps should close.

In the past this has worked, but now it doesn't...?

the DOUBLECLICK event seems to work if you use UI_close_gumps but the EGG event doesn't seem to?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

Hmm, I'm triyibg to think of an in game egg like this. I know there is one but right now I cannot remember.
And probably needs a mod to test it, too, so I can do a regression test.
--
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!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

Try the egg in front of Penumbra's house maybe? in U7
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

well, at least that is working. Take a look at the keyring mod, there are some UI_close_gumps in there. Mostly doubleclick but some are Scripted maybe that helps.
KnightCaptain to the rescue? :)
--
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!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

They should work up on EGG event too, they used to. One of the eggs I had for my mod for an egg triggered by "Something On" used to close the gumps when it was triggered, but it no longer does that.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

Can you give me pointers in how to implement that in a mid so I can see if I can reproduce it?
--
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!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

something basic like

Code: Select all

if (event == EGG)
{
    UI_close_gumps();


}
with the usecode egg set to "something on". If an object is on the egg and removed, it should activate the code, and it *should* close the gumps, but doesnt.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Knight Captain »

Can you email me your function?

Also, what settings are you using in ES for the egg?

I'm always a fan of Usecode debug messages going to stdout. ;)
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

ES settings for the egg:

Something On
probability 100
checked autoreset
Distance 1
Function number 0xbe8
quality 0

I can't seem to ever find where the stdout file goes to so I just use party barks when I need to make sure if something is working haha

Email sent with the code in question
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

anyone know whats up with it?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

I'll investigate after this little business trip
--
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!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

I don't know if I did it correctly, but in the islandfaq mod, I changed usecode like this:

enum events
{
EGG = 0
};

//TEST usecode egg
void Somethingegg object#(0xbe8) ()
{
if (event == EGG)
{
UI_close_gumps();
}
}

And in Exult added an egg according to your instructions:
Something On
probability 100
checked autoreset
Distance 1
Function number 0xbe8
quality 0

But it's not triggering as far back as my snpashots archive of 2012. So I think either I'm doing it wrong, or ucc changed and the resulting usecode is broken, or this way of doing it wrong and that's why it isn't working for you.
I'll see if Marzo can chime in.
--
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!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

I don't think that matters when I just enumerate this
--
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!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

I think I got on the right track.

It does work (I just needed to get rid of the if (event == EGG) otherwise it wouldn't trigger at all for me, but I guess that is due to some other usecode stuff, I'm just doing wrong.
So

Code: Select all

void Somethingegg object#(0xbe8) ()
{	
	    UI_close_gumps();
}
diid work (only needs to be sure that only Auto-reset is ticked, for some reasons it often ticked hatched when applying - And I used Distance 5 to make sure).

BUT (and there is always a but), you need to have set Gumps to not Pause the game in Gameplay settings.
That's very likely the culprit in your setup.

And again, I tested this with snapshots archive, this worked like this already in January 2012.

But in the original it works when gumps are open. So we might need to fix this.
--
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!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Knight Captain »

Event 0 is proximity, and I don't believe that triggers when Gumps are open.

Gumps pause the gameplay by default.

Nice bug find, Dominus!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

Excellent, so i wasn't crazy haha.

I remember the egg from Penumbra's in the original closing all gumps when you'd place the object to give the sparkly effect. I just tried it and it didn't work as it should, so yeah something definitely had changed over the years and got broken
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

I have now tracked down the culprit in the code but I don't understand it enough to fix it on my own.
It's got something to do with Gump_manager.cc:668 void Gump_manager::set_gumps_dont_pause_game(bool p)
if I comment the first two code lines, both states close the gumps. But I don't get what this code does to begin with
--
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!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

We must summon Marzo! :D
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

Funny, it's a 17 years old bug, introduced when Colourless made it possible to use gumps and not have the game paused by that. So Exult 1.0 was still correct, but Exult 1.2 was already broken.
The commit that broke it https://github.com/exult/exult/commit/2 ... 0a8fb3a533
--
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!
Fretka Furlet

Re: UI_close_gumps not working?

Post by Fretka Furlet »

@agentorangeguy: If you're running in Win 10, the stdout.txt and stderr.txt files are located in C:\Users\Appdata\Local\Exult, same place the savegame files are.
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

Any luck contacting Marzo , or Dr Code? or anyone who could fix this? :D
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

No luck ;(
--
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: UI_close_gumps not working?

Post by drcode »

Sorry, I've been really busy lately. Is this related to a problem I'm seeing when playing, where I'll perform some action when gumps are open, like giving food, but nothing happens until I close the gumps?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

Most likely.
It's got something to do with Gump_manager.cc:668 void Gump_manager::set_gumps_dont_pause_game(bool p)

if I comment the first two code lines, both states close the gumps and then they don't. But I don't get what this code does to begin
--
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: UI_close_gumps not working?

Post by drcode »

I think set_gumps_dont_pause_game only gets called when you bring up the game options menu. The real problem is the 'dont_pause' feature (which defaults to 'no'), which means we pause everything when a gump is open. This is what has been bothering me while I've been playing lately.

And it's probably preventing usecode from running too, so the 'close_gumps' intrinsic doesn't get activated until after you close the gumps. :-)

I'll try playing with 'dont_pause' set to 'yes'.
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by agentorangeguy »

Any luck with this, Dr Code?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by drcode »

Try this in your exult.cfg:


...

yes
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

I might have solved this finally https://github.com/exult/exult/issues/153
--
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!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: UI_close_gumps not working?

Post by Dominus »

And it's in the code. Marzo confirmed my findings.
--
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