intermap teleport

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

intermap teleport

Post by mjohnston »

could intermap teleports some day also include an input for z?

being able to set a height in the destination would be useful for submaps of sewers, caverns, and stuff like that... I was just working on some sewers under a city in my mod and wanted to have basements of buildings at a higher level on the map, with the lower areas masked off with black floor shapes to keep them hidden... then while setting up a intermap teleport egg I saw it has no place to input the z height, so the avatar ends up in the dark-nothingness under the room I wanted him in.
thanks, matthew
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by drcode »

Yes, that would be a good improvement. I think U7 didn't allow z-coords in teleport eggs, and we haven't gotten around to enhancing that yet.
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by SB-X »

You should add your request to the feature tracker at http://sourceforge.net/tracker/?atid=35 ... unc=browse.
This forum is a good way to get the developers attention on an issue but it will likely be forgotten in the near future unless it's recorded on the tracker, which might even be looked at occasionally.
(unless Marzo decides to add that feature in the next snapshot :-D )
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by drcode »

I'm starting to work on this...
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by drcode »

You should see this implemented in the latest snapshot.
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by SB-X »

Nice!
mjohnston
Posts: 58
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by mjohnston »

thanks for working on this, but what I was really wondering about was setting z coords for teleporting between maps...
thanks, matt
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by drcode »

Maybe I forgot to do something. I'll take a look later.
mjohnston
Posts: 58
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by mjohnston »

I found this file in the CVS a while back,
http://exult.cvs.sourceforge.net/exult/ ... iew=markup

-where I see things related to eggs and the teleport and intermap teleport eggs... the parts that look like they are for intermap teleports do not have anything with a z value or whatever... examples I manage to dredge up:

----------------------------------------------------------------------------
336 case 7: // Teleport:
337 {
338 int qual = data1&0xff;
339 if (qual == 255)
340 {
341 set_toggle("teleport_coord", true);
342 int schunk = data1 >> 8;
343 set_entry("teleport_x",
344 (schunk%12)*c_tiles_per_schunk +(data2&0xff),
345 true);
346 set_entry("teleport_y",
347 (schunk/12)*c_tiles_per_schunk +(data2>>8),
348 true);
349 set_entry("teleport_z", data3&0xff, true);
350 set_spin("teleport_eggnum", 0, false);
351 }
352 else // Egg #.
353 {
354 set_toggle("teleport_coord", false);
355 set_entry("teleport_x", 0, false, false);
356 set_entry("teleport_y", 0, false, false);
357 set_entry("teleport_z", 0, false, false);
358 set_spin("teleport_eggnum", qual);
359 }
360 break;
361 }

------------------------------------------------------------------------------

372 case 11: // Intermap:
373 {
374 int mapnum = data1&0xff, schunk = data1>>8;
375 set_spin("intermap_mapnum", mapnum);
376 set_entry("intermap_x",
377 (schunk%12)*c_tiles_per_schunk + (data2&0xff));
378 set_entry("intermap_y",
379 (schunk/12)*c_tiles_per_schunk + (data2>>8));
380 break;
381 }
382 default:
383 break;
384 }
385 return 1;
386 }

----------------------------------------------------------------------------

there's a lot more lines of this sort of thing in other areas of the file, but to me it all looks like repetition of the same thing.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by drcode »

Oops:-( I'll try to fix this soon.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by drcode »

I think it's fixed now.
mjohnston
Posts: 58
Joined: Thu May 14, 2020 1:34 pm

Re: intermap teleport

Post by mjohnston »

it does indeed work now - thank you very much! being able to work with submaps from a top-down sort of direction is very nice when designing underground areas - much more versatility for how areas can be set up. I hope other people designing maps find it to be as useful as I have.
Locked