Page 1 of 1

NPC Flags - Can teleport

Posted: Fri Oct 22, 2021 3:48 pm
by Donfrow
Been awhile since I've posted but as of late I've been back into doing some building of Glimmerscape2. I've been creating some new NPC shapes but have noticed some strange behaviour with the Exult Studio that I'm not sure if it is intended or not.

The situation is on some of the new NPC shapes I created, such as shape 1559, the "NPC flags" checkbox is always checked. The object class is "Monster". This creates the "NPC Flags" tab and the "Can teleport" box is checked in this tab. I've unchecked "Can teleport" and did multiple saves of shape info, save map, save all, but if I close Exult Studio and open the shape again the "Can teleport" is checked again. If I remove "NPC flags" on the main object tab and repeat the same process as above it rechecks "NPC Flags" on the object and "Can teleport" is checked again. If I check another "NPC Flags" box, such as "Cold immune" it saves as expected. If I check a new flag and uncheck "Can teleport" the new flag check box saves as expected but "Can teleport" remains checked no matter what I do.

I've found this "Can teleport" occurs when the "Monster" extra flag is checked. If I uncheck this NPC flags work as I would expect. If I want the "Monster" extra flag enabled and change the class from "Monster" to "Human" the issue does not occur.

Is it intentional that classes of "Monster" with extra flag "Monster" should always be able to teleport as a flag, or am I doing something strange that could be contributing to this behaviour? I am using an older version of Exult studio (1.5) as newer versions had various quarks that made map editing more difficult for me so it could also be something I'm doing with version I'm using as well. I can try updating to see if this occurs in newer versions if this is not intentional.

Re: NPC Flags - Can teleport

Posted: Fri Oct 22, 2021 5:32 pm
by Donfrow
I decided to give it a try with the 1.7 update since I was 2 major releases behind to see if the issue remained and it did not, so I am going to assume it was a bug in an earlier version that has been fixed as the issue no longer remains.

Re: NPC Flags - Can teleport

Posted: Sun Nov 21, 2021 8:51 pm
by Dominus
Pretty sure it's a bug, since most monsters can't teleport. When you
start the game, does the monster actually teleport (like mages, I think)?
from Dr. Code in the issue tracker https://github.com/exult/exult/issues/122

Re: NPC Flags - Can teleport

Posted: Mon Nov 22, 2021 9:04 pm
by Dominus
more from that issues tracker
Whew! I finally got exult to compile, but I had to upgrade Ubuntu. I
tried changing the "Can teleport" flag on an existing shape, and it
seems to work okay. But I can't recall how to create a new shape.

I have a feeling the problem has to do with this bit of code I found
that gets executed when reading in files:

Code: Select all

         // We already have monster data by this point.
         Monster_info *minf = info.monstinf;
         if (minf) {
             // Deprecating old Monster_info based flags for these powers:
             if (minf->can_teleport())
                 info.actor_flags |= Shape_info::teleports;
So I wonder if the user created the shape with an older version, and
he's stuck with the old monster-info flags. If I can figure out how to
create a new monster, I'll see if that might be the case.

Re: NPC Flags - Can teleport

Posted: Tue Nov 23, 2021 7:42 am
by Dominus
And can you try how things work after pressing "fix old shape info" in the tools menu of ES?

Re: NPC Flags - Can teleport

Posted: Tue Nov 23, 2021 10:23 pm
by Donfrow
Alas, no luck. NPC Flag "Can teleport" remains checked after fixing old shape info and unchecking the NPC flag for the teleport.

Re: NPC Flags - Can teleport

Posted: Thu Nov 25, 2021 11:30 am
by Dominus
Sorry, I wrongly stated that this is fixed. It’s not ;)

Re: NPC Flags - Can teleport

Posted: Thu Dec 02, 2021 2:49 pm
by Dominus
Meanwhile it has been fixed and we could really use your help in determining whether it works for you now :)

Basically, you just have to run the latest commit of Studio against your mod/patch (GlimmerScape2?), and catch the Shape IDs in the warnings of the migration process (studio_out.txt and studio_err.txt), and choose SHAPES.VGA, click on any Shape of the right panel - this triggers the reading of all attributes, with flag migration and warnings. At that point the migration is done but not saved, it is saved with the Save All button or at Studio Exit by the Modified Files dialog. Dragon Baroque has used GlimmerScape - mind, not 2 - as it is on SourceForge Exult mods repository, to check all this as it contains a Shape «Wisp», ID 1298, with the Teleport flag stored in monster.dat.

Then you can run the Shape Editor on the migrated Shapes, one at a time and set the NPC Flags to whatever suitable.

Re: NPC Flags - Can teleport

Posted: Fri Dec 03, 2021 6:24 pm
by Donfrow
I'll give this a try and see if I can fix/recreate it using the latest versions. You are correct I'm trying this in Glimmerscape2.

Thanks

Re: NPC Flags - Can teleport

Posted: Fri Dec 03, 2021 6:52 pm
by Donfrow
Looks like it worked. After doing the below steps it worked and I can stop every new monster from being able to teleport. Thanks for your and everyone else assistance with this.

The error messages appeared in stderr rather than studio_err as well incase anyone else runs into this.

Re: NPC Flags - Can teleport

Posted: Fri Dec 03, 2021 10:00 pm
by Dominus
Thanks a lot for confirming this. Without your insistence we wouldn’t have been able to find and fix these bugs! Thanks a lot for thos and your patience!

Re: NPC Flags - Can teleport

Posted: Sat Dec 04, 2021 5:13 pm
by Donfrow
I'm very thankful there are people who will take the time to improve and fix these things. I wish there was a bit more documentation about some of the things available in usecode/editor though (possibly I just don't know where to look either...) like what events did, etc. Still have no idea what event 4 (weapon) in usecode is actually meant to do.

Regardless I'm thankful this project is still going on, and hopefully lasts for the next X many years until I finally finish Glimmerscape2 !

Re: NPC Flags - Can teleport

Posted: Sat Dec 18, 2021 3:13 am
by SnappyBones
I'm so stoked you're doing a sequel! I loved Glimmerscape and I've had a blast digging through all the info I could find trying to make my own mod. Good luck dude

Re: NPC Flags - Can teleport

Posted: Thu Dec 30, 2021 1:08 am
by Donfrow
I'm happy to hear someone is interested in the sequel! Despite many of locations and coding done there is still a lot to do so is unfortunately quite a way off. I've changed my approach to making it and making a lot more notes/documentation which I think will ultimately result in a more cohesive experience compared to the original.