Reset Password
Existing players used to logging in with their character name and moo password must signup for a website account.
- MrFye 3m
- Veleth 1s
- Izzyneko 1m
- Tadrakyn 30m http://i.imgur.com/OWIRH5y.gifv
- Hivemind 3m
- Kangarat 2m Rat.
c MirageGM 13m The original cryptid.
- NyanChicken 1m
j Johnny 28m New Code Written Nightly. Not a GM.
- fopsy 5m
- Bone112 1m
- Grey0 1m
- ZaCyril 47s
- Kiwi 47s
And 8 more hiding and/or disguised
Connect to Sindome @ moo.sindome.org:5555 or just Play Now

Dispatcher: NPCs taking Taxis
The most complex dispatcher task yet

So! Something that came up during the office hours last week was that there are times where some taxi drivers don't get a lot of calls, either because there aren't a ton of players online, or there are multiple drivers online and only a static amount of people needing rides.

For a while I've been thinking about if it was possible for me to use the $dispatcher (which is what we call the complicated object that dispatches npcs to do scripted actions like start a gang war or backup their friends in a fight) to have an NPC take a taxi.

A year ago it wouldn't have been possible but we've added a lot of code around pathing, and dispatching npcs that gave me the feeling this could be accomplished with the $dispatcher now.

It's a -really- complicated set of actions with a lot of edge cases that might seem 'easy' on the surface. Let's break down what has to happen:

1. Is there a PC taxi driver online?

1A. Is the PC taxi driver in their vehicle?

1B. Is the PC taxi driver 'available' IE not driving someone else?

2. NPC needs to call for a taxi.

Well, not really. We just have to simulate it, which is the case here because there is no value in having the NPC actually call the number and talk to a script. It doesn't add value so we simulate it.

3. NPC needs to wait for the Taxi to arrive

3A. Taxi needs to be unlocked and not moving

4. NPC needs to enter the taxi

5. NPC needs to speak loudly

6. NPC needs to state their destination

6A. NPC should state the 'meter' should be used so we can track how much to pay at the end of the trip.

7. NPC needs to detect when they've arrived.

This seems easy but as many of you know, if you ask to go certain places, a Cab will get you as close as it can-- but maybe not all the way. So we need to know when we are 'near' a destination, or 'good enough' basically.

7A. NPC needs to restate destination if they haven't arrived, aren't close, and are 'stopped'. But not in an express tube because traffic causes a vehicle to stop and we don't want to spam.

8. NPC needs to pay.

Easy. But... what if they don't have any money? What if they have only part of the fare? I had to add an 'eject' verb to taxis that players can use so they can dump patrons that don't pay. Seems legit, since NPC drivers can do it.

9. NPC needs to exit.

BONUS

10. NPC needs to make small talk during the trip.

There are a lot of little edge cases that had to be covered as well that I don't go into here, but suffice to say it took me almost a week to get this into the game.

------

So, all that being said, this is now a thing! It will happen a few times a day if there are PC drivers online, and there should be a fair disposition of who gets the call as I've randomized which taxi gets the call if there are multiple PC drivers online.

I think this adds a great amount of depth to driving a taxi around as you don't have to only be getting PC fares all the time, you can get NPCs too. I had this extensively tested by a player (THANK YOU) and they did a wonderful job of roleplaying with the NPCs who were in their cab. I was really impressed. I think the small talk adds a fun bit of flavor to the interaction.

As always, please report issues with the new code.

Very cool, thanks Slither, will they take SkyFox as well or just Chex?
Just Chex for now. I will roll it out for Skyfox at some point in the future after this code is well tested. It will require new code because Skyfox aeros don't have the same verbs as taxis currently.
https://www.sindome.org/bgbb/game-discussion/ideas/improved-eject-for-cab-players-1338/
This is a cool feature and maybe makes a path for a future implementation of dispatched NPCs needing healing across sectors. Could check if an employee tied to a clinic's terminal was online or in a clinic's operating room and head there/call out on sic they were heading there.

Especially for the sectors that don't always see a lot of triage/patch-up situations.

Thanks for adding more to the game.

Haha! @crashdown I literally had this conversation with Johnny earlier:

"okay Johnny, imagine this world: An NPC was in a fight, perhaps one caused by the disaptcher gang war, and is now below 70% health, a PC doc is online, in their clinic, the dispatcher dispatches the NPC to the clinic-- if it's near, they walk, if it's not, it attempts to call a PC cab if one is available, if not, they don't go but try again later--they arrive at the clinic, and using the chunked pathing cache we added for elevator pathing, they exit the cab and enter the clinic, the arrive and if the doctor is not there, they ask an NPC to heal them, if the doc is there, they ask to be healed, and pay the doc whatever the clinic rate is, repeating until they are above 70%, then they return to where they were, either by walking or by taking another cab."

it would be very nice to be able to heal more people at the hospital. a lot of the time, i've found myself just waiting for several hours. spicing that up every now and then with a hurt person coming in would be very nice!
This is really impressive!
That is soo cool. The *only* problem I can see with this is the unfair extra thousands pc cab drivers are making per trip, daily if they're the only cab drivers on, on top of player fares. I used to make lots of chy at Chex. Not sure how to feel about players doing cross sector trips for NPC's with the meter and making tons of flash, maybe even multtimes a day on top of character fares.
I don't see why it would be a problem. The game only has so many players and they only need so many taxi rides. This gives folks, especially folks who play in timezones that have less going on, a bit more stuff to do and a chance at income they might be missing out on because of their play times.

Why would people having more opportunities to make money be an issue?

Is the money earned from these NPCs counted towards the weekly quota?

Once these NPCs have been set up to be visiting more than just taxis (such as doctors, bartenders, and mechanics), then perhaps this will feel more fair to everyone.

What is the limitation on the number of 'jobs' that the dispatcher can handle?

(I could have sworn that I asked when I first started playing, and someone told me that the MOO is single threaded. In other words, there is just one massive queue and the software can only parse through it as fast as the processor on the box can execute the code. So that seems like a natural bottleneck.)

Would it be possible to have NPCs also grabbing NPC cabs? The only reason for such a thing would be to make the world feel more alive and real. But it obviously does not make any sense to spend precious compute cycles on that kind of 'background noise' if the compute cycles truly are precious.

All I'm trying to say Slither, is that these characters stand to make a couple thousand extra a day, depending on trip distance and frequency of the npc trips for that day. It might not seem like a lot in the grand scheme of things or unfair, just that they're using the meter and we all know how expensive npc cabs are - because they use the meter. I can understand the reason, and I think it's a great thing. It just feels unfair for all other service workers, like docs and EMT's etc. When these cabbies have quiet days and make it some days later. That's how it used to be for me when I played at chex, but the busy days were worth with the decline and wait, because I made tons of flash. Now they can make extra thousands (1K - 3K+-) per NPC trip (a few a day, and the fuel is already free). Maybe it could count towards the weekly limit, like FairyBlue inquired about?
One thing I would point out here:

I would encourage all cabbies to use the meter. It is there for a reason. If you chose not to that is your problem. If your colleague is choosing not to, make sure they learn their lesson.

People expect these ultra cheap taxi fares because cabbies keep giving it to them. Even better, now that you might get the occasional NPC fare, you can afford to tell cheap PCs to pay up or walk.

And SkyFox should be charging even more!

I agree with what Grey said. How much we dictate Npcs charge with the meter is what we want PCs charging. If you are charging less to undercut the competition then you are making an IC choice to make less money upfront so you can have more business over all.

PCs can not use the meter with npcs and get paid a flat, small rate. That's built in. So if you want to to a lesser fare as a cabbie because that's how your character plays, you can not use the meter.

If we're talking about the meter. The reason why people don't use the meter is because people (especially poor mixers) prefer to pay 150 chy and wait 10~20 minutes for the lev, than pay over 2000 chyen for the same ride. There are definitely situations where that money is well invested but it's not like everyone can afford a taxi using the meter when they want to commute anywhere.
Taxi prices are what they are because they are not an alternative to the lev, they are an upgrade. Filthy mixers are supposed to take the lev, or find their own way around. People with status would prefer to take the monetary hit rather than be caught taking a lev.

The taxi prices are supposed to be a barrier to entry. Only corpies and wealthy mixers have the kind of disposable income to pay for a taxi.

I'm not going to tell PC cab drivers they -have- to use the meter, but I'm also not going to reduce the cost to the point where everyone uses taxis instead of:

1. taking the lev

2. stealing a car

3. buying a car

4. bumming a ride

5. finding an alternative way to get topside

I understand that if prices were lower, more people would take automated cabs instead of the lev, or player cabs, for those that use the meter. However, consider that a lot of time and thought regarding pricing iterations over the years has already taken place and this is where we landed.

Sure, a taxi ride might cost more than updating your clone. The reason for that is that updating your clone is something you kinda HAVE to do from an OOC standpoint and if we make buying/updating as expensive as it should be (10k/100k probably), the game becomes less fun by a LOT. On the flip side, you don't have to take a taxi. And if you can't afford the price, is it really themely for you to be taking one?

Too poor to take a taxi and don't want to wait on the lev? Seek out #5 above, there are alternatives, RP with some savvy Mixer chums and see if you can't learn about them. You won't regret it!
Kind of late to the party here, but I took a cab the other day with a person who I wasn't sure about being a PC/NPC. It was really cool. The dialogue and functionality were really streamlined. I love the moments in SD where you're not sure exactly who you're dealing with. These kinds of moments with NPCs really make the world seem bigger and more alive.

Having NPCs take the cabs is such a cool next step!

This is still active yeah. Not ready to bring it over to skyfox yet. If you aren't seeing this as a PC taxi driver, feel free to let me know here so I can look at it out is scheduled often enough.
I've had similar issues with Chex not working, and if you just walk up to an NPC Chex cab you can't board because the back doors are locked. Haven't tested in a while though.