Aller au contenu

Photo

Would like advice on creating a transportation system


  • Veuillez vous connecter pour répondre
24 réponses à ce sujet

#1
Badwater

Badwater
  • Members
  • 113 messages
The module I'm building is going to have 6 or 8 cities/settlements that players can travel to. I'd like to set up a transportation system that allows PCs to not have to walk - at a price, of course.

I'm thinking that it will be cleaner and easier if I have one conversation and one script that covers the travel possibilities between settlements. That would mean the NPC or object that a PC is negotiating travel arrangements with would need a reference to know where they're at, and give options and price based on distance. I also think there should be a flag (perhaps trigger based?) that determines whether a PC has actually traveled yet to the place they're trying to get transportation to get to. If you haven't gotten there by foot then you're not going to take a carriage or airship there!

This system would not include water travel; that's handled differently.

If anyone knows of a download that would cover these bases, then great; otherwise, I'd appreciate any advice you might have on putting this together so I don't have a half-dozen conversations and a dozen or more scripts.

Thanks very much!

#2
_Guile

_Guile
  • Members
  • 685 messages
I'd make a teleportation Rune which started a conversation with the PC...

When the PC get's to a town, they can talk to a mage, who can enchant the rune to store a permanent location back to the city, this way the PCs can jump from city to city, once they have reached a city and paid the mage to enchant the rune so that they can teleport back...

This is a pretty popular way of handling teleporting...

Basically you will need a teleportation script for each line in the conversation, and the conversation will need to check to see if the variable is stored on the rune, the mage will natrually place the variable on the rune, for a price...


If you need further help just ask..

Modifié par _Guile, 16 mai 2011 - 03:16 .


#3
Kato -

Kato -
  • Members
  • 392 messages
I already have such a system in place in my PW. It's custom, tiny, and works with a single script and a portal stone. It's driven by a dynamic dialog showing the available destinations to user. Each destination sets a variable on a portal stone(each player owns one) so that the player can travel there at will. You can also port to party leader, or to last location where you used your stone. The cost can be changed easily, as for the rest of the parameters, since the script is simple and small. If this is what you're looking for, I'll be happy to share this tiny system with you, it works flawlessly.

I forgot: You need to have ZDialog installed for this system to work. It's well worth it, it will probably help you with most of your dialogs. :)

Modifié par Kato_Yang, 16 mai 2011 - 09:33 .


#4
Badwater

Badwater
  • Members
  • 113 messages
I'm not familiar with ZDialog; what's that about and what does it do?

#5
Kato -

Kato -
  • Members
  • 392 messages
Zdialog is a great system written by Paul Speed, allowing you to build dynamic dialogs, or if you prefer, to build conversations programmatically. The system can be found on the vault, and it contains a small demo module to help you get started, along with a bunch of scripts you only need to import. The porting system I mentioned is ready to use with ZDialog :)

#6
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
It is a dynamic conversation system   There is also a second version  ZZ-Dialog 1.0 .  I myself have never used or looked at either one, so can not really give an opinon on useing them. I mormally just write my own dynamic conversations as needed.  

#7
Badwater

Badwater
  • Members
  • 113 messages
Thanks for the feedback, everyone. None of this is quite what I'm after, but the responses have helped me to clarify my thinking insofar as what I would like to be doing instead. I will mull over this a bit more and then get cracking.

#8
Kato -

Kato -
  • Members
  • 392 messages
 

Modifié par Kato_Yang, 29 mai 2011 - 02:47 .


#9
Taino

Taino
  • Members
  • 139 messages
Their is a Wagon Transportation which I think is pretty neat... It kinda makes the player feel as if they are on a actual wagon.

#10
Baaleos

Baaleos
  • Members
  • 1 330 messages
I use a Stargate System myself.

Players choose 6 out of 42 possible rune symbols (ascii characters), and the symbols corospond to numbers and letters.

The order of symbols they choose, can construct a 6 digit string like this

154ab8

Which then tells the stargate that they have to find a Stargate with a matching tag, it then activates both stargates, and when the player walks into the local stargate, it transports them to the stargate they were 'Dialing'.

This system gives unlimited expandability to both travel destinations,
in addition to the ability to have any content you want in the off world locations, it is after all, simulating an off world location. So it can be as different or out of Canon as you want.

#11
Badwater

Badwater
  • Members
  • 113 messages
What I'm after is a point-to-point system of non-arcane traveling. I'm not using stones of recall or portals, for the simple reason that I feel a barbarian half-orc is likely to not be able to use such a magical device and would instead just throw it in frustration at something or someone. Said barbarian probably can, however, figure out how to hire a carriage or pay for a ride aboard a ship. That's my rationale, anyway. The mages on our server already have teleporting capabilities.

I was after a script where I could use one conversation for a carriage or boat/ferry ride. The NPC would know where s/he is at and where that particular location connects to at whatever price.

#12
Badwater

Badwater
  • Members
  • 113 messages

_Guile wrote...

I'd make a teleportation Rune which started a conversation with the PC...

When the PC get's to a town, they can talk to a mage, who can enchant the rune to store a permanent location back to the city, this way the PCs can jump from city to city, once they have reached a city and paid the mage to enchant the rune so that they can teleport back...

This is a pretty popular way of handling teleporting...

Basically you will need a teleportation script for each line in the conversation, and the conversation will need to check to see if the variable is stored on the rune, the mage will natrually place the variable on the rune, for a price...


If you need further help just ask..


The problem in application to what I'm doing is that not every settlement or destination I have in mind will have a mage. I'm creating a very low magic world and while magical things will not be rare, they will be uncommon in many places.

#13
Badwater

Badwater
  • Members
  • 113 messages

Taino wrote...

Their is a Wagon Transportation which I think is pretty neat... It kinda makes the player feel as if they are on a actual wagon.


Does anyone know more about this?

#14
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
It could be done all in one conversation, but it would be variable and token heavy, each NPC needing to have the locations they can travel to set on them individually. You could then also either set a specific cost of the travel on each NPC, or use a base cost and multiplier system based on the "distance" between points.

Are you looking for an immediate jump to point on agreement, or will they have to spend some small amount of time in the back of a wagon as they travel, similar to what PotM had installed a few years back?

#15
Badwater

Badwater
  • Members
  • 113 messages
If something was available on the back of a wagon, I could see where something like that could be useful. Having some random (including no) encounters is something I could do interesting things with, but I don't have any information on it and what it does, and can therefore make no determination on if I would or could use something like that.

In the absence of anything clever I'll probably use individual conversations. My only concern is hitting resource limits - because we ran into that in our original server, I'm quite conscious of ways to trim resource usage.

#16
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
Depending how many travel options you want to have each NPC offer, and if it will be the same number for each, you're either looking at one script per option, or two, plus the starting conditional.
Even if there are 100 possible destinations, under a token and variable system, if there are only say, six choices, that's all you would need for scripts, plus the initial starting conditional.
If the number of options varies, then you also need a starting conditional for each of the choices as well as for each choice on selection.

The initial starting conditional always returns TRUE on convo start, but that's needed to set the tokens used for destination choices, and cost of each trip, if applicable, plus the tag of the WP they will be transported to.
I'll get my toolset open and make up a quick example script for the starting conditional, and travel script, since that might help explain better what I mean.

#17
Badwater

Badwater
  • Members
  • 113 messages
Thanks very much, I appreciate the response. It's one of those things where I know what I want but I'm not so sure how to get there.

#18
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
Okay, this is just quick, and only sets up one possible node, but I tested it and it works.  Hopefully this is enough to at least get you going with what you want, or give you ideas enough to do it another way.

-- The initial starting conditional:

int StartingConditional()
{
 //// Tokens and variable names should be set to what works with your existing mod standards.
 //// One pair of these needed with unique token numbers per travel option the NPC will offer.
 SetCustomToken (4201, GetLocalString (OBJECT_SELF, "TRAVEL_1_NAME") );
 SetCustomToken (4211, IntToString (GetLocalInt (OBJECT_SELF, "TRAVEL_1_COST")) );

 return TRUE;
}

-- The conditional for conversation node 1:

int StartingConditional()
{
 if (GetLocalInt (OBJECT_SELF, "TRAVEL_1") ) return TRUE;
 return FALSE;
}

-- Option ones example line in the convo itself.  Each line needs to match the tokens set:

<CUSTOM4201>: <CUSTOM4211> GPs.


-- The script for selecting option 1:

//// If you want to do anything elaborate, like a mini cutscene, move this whole routine
//// to an include to keep the size of it down.
//// All you need to pass along, is the NPC, PC, and convo option number, "1" in this example.

void main()
{
 object oPC = GetPCSpeaker();
 int nCost = GetLocalInt (OBJECT_SELF, "TRAVEL_1_COST");
 ////  Putting gold check here, instead of in the conditional,
 ////  so a poorer PC will still see the options available to travel.
 if (GetGold (oPC) < nCost)
    {
     //// This message could alternately be set on the NPC, to give each a more "unique" feel,
     //// but this is just a quick example.
     SpeakString ("You don't have enough gold to travel.");
    }
 else
    {
     SpeakString ("Hop in.  [Gesturing to the nearby wagon]");
     TakeGoldFromCreature (nCost, oPC);
     object   oWP = GetObjectByTag (GetLocalString (OBJECT_SELF, "TRAVEL_1_WP"));
     location lWP = GetLocation (oWP);
     DelayCommand (5.0, AssignCommand (oPC, JumpToLocation (lWP)) );
    }
}



Variables used in this example:
string  TRAVEL_1_WP
string TRAVEL_1_NAME
int       TRAVEL_1_COST (GP cost - any positive number will work.)
int       TRAVEL_1              (TRUE/FALSE type.  Set 1 to activate.  Alternatively, you could just use the cost as the check)

All four variables need to be set for each option the NPC will have, with a unique named conditional and selection script for each.

#19
Badwater

Badwater
  • Members
  • 113 messages
I'm looking this over to see if I have questions. Thanks for the response.

*Update* I'm going to test this in a test module tomorrow. This looks interesting and helpful. Thanks for the idea.

Modifié par Badwater, 04 juin 2011 - 08:36 .


#20
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
Easy to set up and flexible but not wildly fancy:
http://nwvault.ign.c...id=16716&id=314

... might help

Modifié par Axe_Murderer, 04 juin 2011 - 10:06 .


#21
TSMDude

TSMDude
  • Members
  • 865 messages

Axe_Murderer wrote...

Easy to set up and flexible but not wildly fancy:
http://nwvault.ign.c...id=16716&id=314

... might help

On a quick side note, awesome to see you back here, Axe.

#22
lordofworms

lordofworms
  • Members
  • 252 messages
http://nwvault.ign.c...s.Detail&id=826

is the coach system I used. (: and in the posts I have a link for a custom horse drawn carriage and tileset interior if you wanted to use custom content

#23
Failed.Bard

Failed.Bard
  • Members
  • 774 messages

lordofworms wrote...

http://nwvault.ign.c...s.Detail&id=826

is the coach system I used. (: and in the posts I have a link for a custom horse drawn carriage and tileset interior if you wanted to use custom content



  If that's the whole package, complete with panning skybox outside the carriage windows to simulate movement, it's definately the way to go for servers using content.

  The little script example I posted would work, but it's simplistic.  By the time I'd finished posting it I'd already thought of ways it could have been better set up.

#24
Badwater

Badwater
  • Members
  • 113 messages
Thanks Axe_Murderer. With a little bit of customization to charge gold for players to use it, the Port Me NPC system is going to do what I want.

I have not looked at the coach download yet but I am going to.

Thanks again for everyone's replies.

#25
Taino

Taino
  • Members
  • 139 messages

Badwater wrote...

Taino wrote...

Their is a Wagon Transportation which I think is pretty neat... It kinda makes the player feel as if they are on a actual wagon.


Does anyone know more about this?

It is a nice system and very simple to use. One thing it is missing is a random encounter ambush while the wagon is rolling. Check it out for yourself. Here's the link: Caravan Wagon Travel

Modifié par Taino, 08 juin 2011 - 01:48 .