Would like advice on creating a transportation system
#1
Posté 15 mai 2011 - 07:24
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
Posté 16 mai 2011 - 03:14
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
Posté 16 mai 2011 - 09:13
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
Posté 18 mai 2011 - 08:41
#5
Posté 18 mai 2011 - 09:11
#6
Posté 18 mai 2011 - 09:22
#7
Posté 19 mai 2011 - 08:28
#8
Posté 29 mai 2011 - 02:41
Modifié par Kato_Yang, 29 mai 2011 - 02:47 .
#9
Posté 30 mai 2011 - 03:24
#10
Posté 31 mai 2011 - 01:17
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
Posté 04 juin 2011 - 05:22
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
Posté 04 juin 2011 - 05:27
_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
Posté 04 juin 2011 - 05:27
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
Posté 04 juin 2011 - 06:15
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
Posté 04 juin 2011 - 07:08
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
Posté 04 juin 2011 - 07:46
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
Posté 04 juin 2011 - 08:12
#18
Posté 04 juin 2011 - 08:27
-- 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
Posté 04 juin 2011 - 08:32
*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
Posté 04 juin 2011 - 10:04
http://nwvault.ign.c...id=16716&id=314
... might help
Modifié par Axe_Murderer, 04 juin 2011 - 10:06 .
#21
Posté 04 juin 2011 - 12:02
On a quick side note, awesome to see you back here, Axe.Axe_Murderer wrote...
Easy to set up and flexible but not wildly fancy:
http://nwvault.ign.c...id=16716&id=314
... might help
#22
Posté 04 juin 2011 - 04:58
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
Posté 04 juin 2011 - 05:33
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
Posté 05 juin 2011 - 11:24
I have not looked at the coach download yet but I am going to.
Thanks again for everyone's replies.
#25
Posté 08 juin 2011 - 01:47
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 TravelBadwater 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?
Modifié par Taino, 08 juin 2011 - 01:48 .





Retour en haut







