Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Homestones / Reststones / Portals / Teleport-Logics  (Read 550 times)

0 Members and 0 Guests are viewing this topic.

Dolfo

« on: 27, January 2022, 14:57:35 »
I had this idea from another game. A kind of teleport back to your home. It should not be that hard to implement this.

1: We need an item for this stone, a kind of stone?
2: When applying this you get teleported same way, like the tabernacle express.
So it's mainly a clone of the teleporter dying logic, without you must dying.
3: Next it could be a cool idea, to combine the rest mode with this stone. So this "apply stone, teleport to home" only works when you are in restmode, this means you need 8 seconds first without monsters attacking you? I think this must be only some flags to check, before allowing this home teleport?
4: The whole restmode code could be cloned to a kind of invoke/summoning logic, where you can only invoke/summon things, when you have focused some time before and when there are no monsters hitting you.

...

Later this could also improved in things, like mages summon temporary portals to city, other players can use.

You can also think about cooldown on this "homestone"/"reststone", or make it use once only? :o
« Last Edit: 27, January 2022, 15:05:20 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

_people_

« Reply #1 on: 28, January 2022, 15:59:45 »
In 2011 I discussed a crystal called "celvenate" which contains "magic stuff" required for teleportation. The eventual goal being that anything related to teleportation would cost the user some amount of this material (word of recall, TP to a specific location spell, TP'ing across fragments of the Shattered Planes via the Random Dungeon system).

As far as applying the stone goes, perhaps an option is that applying it returns you to a specific place (savebed) but it can be redirected by certain methods (location-specific spells, or a crystal made beforehand with specific coordinates tethered to it).

Rest mode locking is a very good idea IMO, and is extremely easy to implement.

As far as invoking/summoning goes, I can't think of any specific examples right now (very tired) but certainly worth exploring.

Original topic: https://www.daimonin.org/10769/teleportation-concept-proposals/
« Last Edit: 28, January 2022, 16:07:19 by _people_ »
-- _people_ :)

Dolfo

« Reply #2 on: 28, January 2022, 17:08:36 »
I have read your other topic. I would first not go for such a free teleporter system. Your current lua teleport command can handle this, like checking for blocked fields and so on, but players would fast find teleporter tricks to bypass other gamelogics, like key locked doors, or guarded rooms.

I would start with some "easy" home stone logic and then like you said a kind of learning other teleport destinations. So this could also be a kind of quest or buyable logic for a teleport to iluma spell for example.

If you plan some short teleports, perhaps you can abuse path finder logic of a monsters, to check if there is a free way to this destination spot? But here i would go for a pathfinder logic not allowed to open doors.

You can also make a different between instant short teleports and restmode locked long teleports to previous learned locations.

I think this short distance teleport is more a mana cost only spell, homestones is nice to have for all players, could be cost some money and can used only once and casting teleports to towns could be special material like you descibed in other topic.

But start with a home stone would be great feeling. Don't know 1 gold for a stone, use once?
« Last Edit: 28, January 2022, 17:12:22 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Delrisst

« Reply #3 on: 25, February 2022, 22:38:17 »
Just want to say I am an advocate for this return to town teleport thing, and 100% support the resting first so you cant just teleport while fighting.

Another thing I have seen is teleport stones on different spots on the world map...like 1 east, west, north, south etc. to help with navigation.

Dolfo

« Reply #4 on: 14, October 2022, 12:38:45 »
Finally i found some time to advance here. I puzzled a theoretic prototype for this.
Update: It's now a working prototype, must be tested if it works also with bed spawn, public trunk has no appartements, can't test this.
Update: It's uses now the player_is_in_shop function to test for players in shop.

prototyp definiton in server/src/include/sproto.h
Code: [Select]
uint8 player_is_in_shop(player_t *pl);

function definition in server/src/server/shop.c
Code: [Select]
// small function to check if player is in shop
uint8 player_is_in_shop(player_t *pl)
{
 object_t *shop = NULL;
 msp_t *msp = MSP_KNOWN(pl->ob);
 MSP_GET_SYS_OBJ(msp, SHOP_FLOOR, shop);
 if (shop)
 {
  return 1;
 }
 return 0;
}

HOMESTONE type definition server/src/include define.h
Code: [Select]
#define HOMESTONE 160

If we want also wrap this to lua we need
server/src/plugin_lua daimonin_game.c
Code: [Select]
{"TYPE_HOMESTONE",             HOMESTONE},

we need all the checks for HOMESTONE and the restmode checks in
server/src/server apply.c
function apply_object line 1358

add also to non player filter, monsters better don't allow to use homestones
Code: [Select]
if (what->type == HOMESTONE || ...

and the apply logic for the HOMESTONE in switch part
Code: [Select]
switch (what->type)
{
case HOMESTONE:
 if (player_is_in_shop(pl))
 {
  ndi(NDI_UNIQUE, 0, who, "Shop Magic cancels the magic of your homestone. Nothing happens.");
  r = 9;
  break;
 }
 if(!pl->rest_sitting)
 {
   ndi(NDI_UNIQUE, 0, who, "You need to rest first to use it.");
   r = 9;
   break;
  }
  // looks like rest_sitting and rest_mode and nearly same, so we need to check resting_reg_timer
  if(pl->resting_reg_timer>0)
  {
   ndi(NDI_UNIQUE, 0, who, "You need to fully rest first to use it.");
   r = 9;
   break;
  }
   ApplyHomestone(who, what);
   r = 9;
   break;

and the final function we need the prototyp definition at head of apply.c
Code: [Select]
static void ApplyHomestone(object_t *op, object_t *homestone);

and the full function at the end of apply.c
Code: [Select]
static void ApplyHomestone(object_t *op, object_t *homestone)
{
 if (op->type == PLAYER)
 {
   player_t *pl = NULL;
   if (pl = CONTR(op))
   {
    ndi(NDI_WHITE, 0, op, "You use your homestone.");
    decrease_ob_nr(homestone, 1);
    // looks like op is same than pl->ob, so we can use both here
    (void)enter_map_by_name(pl->ob, pl->savebed_map, pl->orig_savebed_map, pl->bed_x, pl->bed_y, pl->bed_status);
    play_sound_player_only(pl, SOUND_TELEPORT, SOUND_NORMAL, 0, 0);
    }
  }
}
« Last Edit: 19, October 2022, 14:28:21 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Shroud

« Reply #5 on: 14, October 2022, 14:03:15 »
I've not looked too closely at the code but I would imagine that a lot of the code for a theoretical homestone would be very similar to the code used to jail a player with the only difference being that the target location is the player's apt/savebed point rather than jail along with the activation being with an item instead of a DMBuster /talk command from a vol etc.

Just as an additional thought normally using or applying an item disrupts resting so would that have an impact on the homestone since potentially applying the item would stop you resting and then when it checks if you're resting you would fail that check
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

Dolfo

« Reply #6 on: 14, October 2022, 14:16:23 »
Teleporting to jail is no more a problem for me, i had such teleport on my presentation server. I used this also for the waypoint. Biggest problem was to find out how to teleport to players last "savedbed" spot, that's reason i took the code from death code.

Yeah the applying disrupts the restmode, but check for that is behind all the case logics, you can also set the forth bit in r to say don't disrupt restmode. So that's work fine. Also this logic is more a fast solution to have a kind of homestone logic.

This would also be a great help on future stuckings. Player can unstuck themselves by using a homestone or also other players can help and bring a stucked player a homestone, if he hasn't one.
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Shroud

« Reply #7 on: 14, October 2022, 20:54:43 »
One other thought I've had is that using a homestone could break other scripts. For example I remember in Tetranesia that there was a script that called over a giant to push a raft and if a player logged out the giant lost it's target and scripted ended up hanging/crashing. Using a homestone would have a similar effect. You also have things like the Haunted Mansion quest where players could in theory escape a scripted death. I'm not too sure how the plane script would work if you use a homestone mid flight.

Having said that I don't think it's disastrous as players wouldn't be stuck and presumably if they break scripts they can report it and then scripts can get fixed. I think main class of scripts affected are ones that rely on the player to go to a certain location (e.g. shop and shop portal)
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

Dolfo

« Reply #8 on: 14, October 2022, 21:31:45 »
Think of a player like this. A free day, waking up, cooking coffee, putting on his computer, thinking "Yeah, halloween is open now, i waited so long for this and lucky i have this free day, this would become a nice gamer day today, it's also rainy outside. How could the world be better, playing the whole day daimonin, yeah. Let's go, yeah."  8)

"What?, why?, door is closed?, i thought haloween is open?, noo!  :-\
ok i go back and hunt other places, shit."  ::)
"WHAT, why this second door is also closed, WHAT, no gm on, _people_ the only one, who can free me is offline, also not in discord. noooooooooooooooooooo"  :'(

I have heard from 2 players stucking is no fun, or "this had ruined my day, if i got stucked there".
No, when you really want to play a game and you have fun to play it, stucking is the last thing you want let happen to your char.

But with the other thing your are right, using homestone in a flight over ambrosia must be tested. But you can trigger same, with a low hp char, some -hp gear or poison booze or evil liquid, killing yourself in plane or gm jails you. Whole Ambrosia is also not save against dying, happens to a player last week. He died, woke up in non Ambrosia with all his fruit currency he smuggled this way out of Ambrosia, where it becomes worthless.

Perhaps it could be an idea, to define a flag parameter on a map to forbid a homestone there? And yeah of course shop should also be a non homestone zone or homestone teleport cleans all non paid items should also work. But also again here, what happens if a player is dying in shop or gm jails him?  :o
« Last Edit: 14, October 2022, 21:40:41 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Shroud

« Reply #9 on: 15, October 2022, 21:25:34 »
As far as the things raised in the reply

1. I think nothing catastrophic would occur in the Tetranesia quests and as you said a lot of it can be replicated by a person dying etc. If any scripts do crash then it simply means that the function ceases rather than a server wide crash. I think for the airplane most of the data is kept on the ticket object rather than invisible quest data so I think discarding the ticket would reset the player. Having said that it's an untested hypothesis. I would expect that if a homestone does break any scripts resulting in a player getting stuck then a homestone also allows the player to escape so it would probably solve most of the problems it causes.

2. In the shop basically way I think it is meant to work is that any unpaid for items cannot be used (although recently I think arrows could be used due to a bug). If you enter a shop with unpaid for items the next time you leave it will try to pay for them with normal logic. Only slight exception is Apple Orchard shop that I believe uses special tickets but if you manage to smuggle them out and go to a regular shop it charges it's negligible examine value instead of apple orchard currency.

3. I had considered homestone prevention areas but the problem is that any script that can be broken by a homestone is also an area where players are most likely to get stuck. For example in the shop if a player has an unpaid for item that they can't find and not enough money to pay for it they'll be stuck for a long time.

Also note that I'm not opposed to a homestone in principle. Just from a QoL perspective I imagine if a player is in the Lom room and needs to return to sell loot then a homestone is a lot more appealing than a mad dash through GT where you risk death. I also think it's unlikely to cause any major bugs unless players go out of their way to do so and similar effects can be achieved by dying or logging out.

I'll also add that apartment portal leads to the last place you entered apartment from. This means that if for example you're stuck in Tetranesia and entered your apartment from Tetranesia last then the next time you leave you'll return to Tetranesia. This means that in theory an evil mapmaker you teleport you to a 2x1 room with other tile being a portal to your apartment and if you enter it not even a homestone will save you although I doubt that will ever exist!
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

Dolfo

« Reply #10 on: 16, October 2022, 13:25:54 »
Could be also interesting what happens when you log out during a flight.

For unpaid items there is also a problem, if player drop them on ground outside shops. This leads to an unpaid item pile on ground, and picking this again up, will not remove it, instead player get a copy in his inventory. So a player can drop this everywhere, other players can pick it up and do the same. This way you can spread the whole server with unpaid items. Only a gm can remove this. Of course a map unload from server is fixing this or also a server restart. But if player have the idea to drop this unpaid items in there appartement, then only a gm or a server admin can fix this.  :o
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Dolfo

« Reply #11 on: 16, October 2022, 17:58:35 »
Sitting down there in guildhall ant cellar and apply this homestone, suddenly teleported back to tavern, this felt so good. Can't wait to do the same deep in dungeons. Code must be tested, if it works also with saved beds.

Easiest way to test this, is to put an artifact with type 160 in artifact list. I grapped my creditcard artifact and made it temporary type 160. Finally we need to think about, what grafic we use for a homestone and how expensive a homestone should be. I personally would make it not to expensive. Don't want player to think: "But with my current level tabernackle express is cheaper!" I would go for max 1 gold or perhaps cheaper.

I have updated the above code.  :o
« Last Edit: 16, October 2022, 18:01:59 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Shroud

« Reply #12 on: 16, October 2022, 22:42:13 »
Could be also interesting what happens when you log out during a flight.
I believe that has already been tested and doesn't cause an issue since key moments in the script are when you board and exit the plane. So logging in/out has no effect since when you apply exit you trigger the exit script. I believe it was tested around the time people were getting stuck in the planes...

As far as shop bugs go the homestone does make it a lot easier to reproduce although I think the solution is in how unpaid items are handled as I remember unpaid items used to disappear when they were dropped and presumably an update has changed that behaviour.

As far as implementation goes if it's only as an item then it is quite possible someone could still get stuck and then find they don't have the item on them. I could see an alternative approach where players are taught in the tutorial a prayer with a 100% success rate and then they cast the homestone prayer to leave the tutorial and reach the starting area. If you want a cost then it could potentially use up some money in your inventory that is taken by the tabernacle as an "offering" but you could use a formula like Math.min(1s per level, all your money). It would also mean that players can learn the prayer skill and apply an altar since many players learn cause light wounds and then when they're about to use it in combat discover they have no god
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

Dolfo

« Reply #13 on: 16, October 2022, 23:03:28 »
This is my next goal. I will look in shop exit logic and in drop item logic. Shop exit logic i will try to go in the loop, where all unpaid items are paid. Must be easy to change it to drop all unpaid loot and allow teleport out of shop. This will end the era of new players stucked in shops.

I also want to look in drop logic, it player drops unpaid item on a non shop tile, this should deleted the item too. If you say there was something in past, perhaps i find this old code.

Allowing a prayer instead of a homestone, could also lead to stucking situations, if player is to low to learn it. But if we have a stucked player somewhere, with a homestone we have also the option another player comes in there and bring a homestone to the stucked player. Homestone should not be the main fix for stucked players, it could be a help as a side effect of this logic. I personaly would also target mages for things like teleporting to towns. Could be easy to build in a logic, where mages can reach from everyplaces the waypoints by spells later. Of course for high level mages. I was also thinking to build a gm command targeting all waypoints and allowing to delete broken ones. So that would be same logic for a kind of waypoint spell for mages. Of course this spell must have a kind of channeling time, could be done first also with the player restmode. Mages waypoint spell i think should be only for very high mages (level 110)?
« Last Edit: 16, October 2022, 23:06:33 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

_people_

« Reply #14 on: 16, October 2022, 23:04:29 »
For shops, just use:

Code: [Select]
object_t *shop = NULL;
msp_t *msp = MSP_KNOWN(pl->ob);
MSP_GET_SYS_OBJ(msp, SHOP_FLOOR, shop);

if (shop)
{
    // notify player they shouldn't use that in a shop, and return
}

Scripts in general will need to be much smarter with teleportation in the game. For example, procedural dungeons - once complete, they will hook into the DEATH event to reset player progress if they die in a procedural dungeon. There's a potential for exploitation here - if you're about to die, just teleport back to town and try again.

Also death interrupts like the HG burning. It's not unreasonable to expect players to try to teleport out of that situation rather than face what's supposed to be a guaranteed death. But when they do eventually die (either by DoT or otherwise) they'll end up in the icy cavern (or whatever I called it). It may be confusing to die and end up somewhere you've never been before.
-- _people_ :)

Tags:
 

Related Topics

  Subject / Started by Replies Last post
9 Replies
825 Views
Last post 21, February 2008, 10:03:25
by Nite_Star
2 Replies
607 Views
Last post 28, March 2008, 08:35:25
by Nobbit
B6 portals

Started by smacky « 1 2 » Dev Server

15 Replies
5245 Views
Last post 13, May 2009, 15:29:27
by smacky
13 Replies
6528 Views
Last post 02, August 2011, 19:28:20
by Killest_is_awesome
3 Replies
865 Views
Last post 27, February 2019, 05:42:25
by canusee