Author Topic: Questions about DC  (Read 14040 times)

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: Questions about DC
« Reply #15 on: November 14, 2012, 03:16:45 PM »
Zone step events can do the job if you add a little scripting.  It is a bit complicated to explain, and I'm heading out for the evening, but I'll post the details when I get them into the proper shape.  Which includes building and testing them first, of course.
Some days it just doesn't pay to gnaw through the straps.

Offline Milos Gulan

  • Hero Member
  • *****
  • Posts: 3061
Re: Questions about DC
« Reply #16 on: November 14, 2012, 04:45:13 PM »
Thank You, Thank You and Thank You ;)  hope it can be done and I am willing to wait as long as it takes :)

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1932
Re: Questions about DC
« Reply #17 on: November 14, 2012, 08:30:26 PM »
I want to connect 2 maps and I am not sure how to do it, they are town maps that I inserted as wilderness maps. I thought of connecting them with zones that should be able to teleport but they can't be used for teleporting so now it lefts me with putting teleporting event at the edges that will transport to the other side, meaning I have to add opposite place to teleport, which will probably to take a while.

My question is how is the best and easiest way to do it :)

I have done it a few times, using the somewhat cumbersome method you have suggested - multiple teleporters. I have used this technique to link two overland maps. While cumbersome, it is foolproof, and you only have to do it all once ... and don't forget that in DC you can copy and paste events, which means you only have to pop in and change the X,Y teleport destination.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
    • Nol Drek's Web Site
Re: Questions about DC
« Reply #18 on: November 15, 2012, 01:14:53 AM »
I want to connect 2 maps and I am not sure how to do it, they are town maps that I inserted as wilderness maps. I thought of connecting them with zones that should be able to teleport but they can't be used for teleporting so now it lefts me with putting teleporting event at the edges that will transport to the other side, meaning I have to add opposite place to teleport, which will probably to take a while.

My question is how is the best and easiest way to do it :)

The easiest way is to place a "Transfer Module" Event in every square along the edges of both maps. It is easy, but time consuming. This is a common enough thing for designers to want to do that it warrants a feature request.

*** Feature Request ***

Allow a Teleport Data dialog to take, in addition to Entry Points, Absolute (x,y) coordinates, and the party's current coordinates, a literal string used in place of Absolute (x,y) coordinates.

Something like:

Absolute X,Y: 5,7 means what it has always meant
Absolute X,Y: $X,7 means transfer to current party X, 7
Absolute X,Y: 5, $Y means transfer to 5, current party Y
Absolute X,Y: $X, $Y means transfer to current party X,Y

*** Justification ***

It would make connecting two maps edge to edge a simple zone event problem - no scripting required.

*** Commentary ***

Why do we still have the ability to select an Event Type of "Stairs", "Teleport", and "Transfer Module", even though all "Stairs" and "Teleport" Events are automatically and immediately changed into "Transfer Module" Events at the moment of their attempted creation?

Is it nostalgia for redundant functions?
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1932
Re: Questions about DC
« Reply #19 on: November 15, 2012, 01:43:03 AM »
*** Commentary ***

Why do we still have the ability to select an Event Type of "Stairs", "Teleport", and "Transfer Module", even though all "Stairs" and "Teleport" Events are automatically and immediately changed into "Transfer Module" Events at the moment of their attempted creation?

Is it nostalgia for redundant functions?
I'm sure it is to help make the DC editor more user-friendly for people who are used to using FRUA (and, as recent discussion has shown, there is demand for more of that). I have no problem with it at all.

Offline Milos Gulan

  • Hero Member
  • *****
  • Posts: 3061
Re: Questions about DC
« Reply #20 on: November 15, 2012, 02:36:27 AM »
I hope this can be done by zones and scripting, becuase I have 11 map parts of a city and they are all 95x95 sqaures so that would mean a lot work to do for teleporting :) If I could avoid that I would prefer to :)

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: Questions about DC
« Reply #21 on: November 15, 2012, 03:06:27 AM »
*** Commentary ***

Why do we still have the ability to select an Event Type of "Stairs", "Teleport", and "Transfer Module", even though all "Stairs" and "Teleport" Events are automatically and immediately changed into "Transfer Module" Events at the moment of their attempted creation?

Is it nostalgia for redundant functions?

Nope.  It's so we can import FRUA designs that use the others.
Some days it just doesn't pay to gnaw through the straps.

Offline SilentThief

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 889
Re: Questions about DC
« Reply #22 on: November 15, 2012, 03:39:39 PM »
I hope this can be done by zones and scripting, becuase I have 11 map parts of a city and they are all 95x95 squares so that would mean a lot work to do for teleporting :) If I could avoid that I would prefer to :)

This might require a LOT of work, if you don't set it up right. I'm assuming that you want to teleport between one map to another and maintain the matching coordinates. My recommendation on how to do this is like this map attachment. The easier way is to not allow ALL 95 steps on the border to be open and accessible. Then you use the alleys/passages as teleporting areas and not ALL of the entire side of the map. This makes it so you do not have to have 95 separate teleport events to move from one to another map. You may still need a bunch, but not as many as you would have without limiting the passages

ST
« Last Edit: November 15, 2012, 03:48:49 PM by SilentThief »

Offline Milos Gulan

  • Hero Member
  • *****
  • Posts: 3061
Re: Questions about DC
« Reply #23 on: November 15, 2012, 05:16:10 PM »
Right thanks for advice :) I could do that but I was thinking to allow total freedom of movement around the map except on the houses squares. If teleporting could be done by zones I would prefer that so if Nologgie can acomplish that I would be happy if not nm I will do it like that :) so I am waiting for him now and his answer. :)

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2131
    • Nol Drek's Web Site
Re: Questions about DC
« Reply #24 on: November 15, 2012, 10:38:06 PM »
Nope.  It's so we can import FRUA designs that use the others.

That explains it.

I wonder if we really need those event types to be available in the editor, because they are confusing to have if they don't exist.

In FRUA, there are 3 event types that change party location:

 #   Event Type
--   ---------------
 5   Stairs
11   Transfer Module
34   Teleporter


If you use the "Import FRUA..." procedure, will you have a DC design with event types 5 and 34, or do all 5's and 34's become 11's?
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: Questions about DC
« Reply #25 on: November 15, 2012, 11:30:47 PM »
If you use the "Import FRUA..." procedure, will you have a DC design with event types 5 and 34, or do all 5's and 34's become 11's?

I don't know.  I'm told Paul and Cocoaspud have been conferring about importing FRUA designs, and this might change by the time they're done.
Some days it just doesn't pay to gnaw through the straps.

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: Questions about DC
« Reply #26 on: November 15, 2012, 11:42:37 PM »
I'm sorry this is taking so long, but I've been busy with real-life things.

This is a working copy of the tutorial I'm writing.  I still have to update it to add wilderness transfers.  I'll also change it based upon comments and critiques, so it should be in good form when posted as an 'official' tutorial.
------------------------------------------------------------------

This tutorial is more about mechanics than appearance.  When building a map it is often best to leave space outside the transfer zone so the player can see the destination area before entering it.  In 3D mode the player can see walls 3 squares distant, so having that much buffer space with walls that match those of the destination should make the transfer appear seamless.

I didn't put that much design work into the demonstration mini mod, but I would have if it were real game.

  Zone Transfer Module Event

$SET_PARTY_XY can transfer the party anywhere on a level, but it doesn't work between levels.  A 'dedicated' Transfer Module is needed to transfer between levels.  I prefer placing the zone Transfer Module at map coordinates x0, y0, but you may put it wherever you like.

The listed settings are necessary for the scripted transfer to work properly.
The settings not mentioned are left to the designer's preference.

  First window:
    -  Party attempts entry (So the Transfer Module location is not seen.)
  Teleport Destination:
    -  Dest Level:  1
    -  X:  0
    -  Y:  0
    -  Entry Point:  Script
    -  Facing:  Unchanged
Event Trigger:  Execute GPDL function

GPDL Event Trigger script:

Code: [Select]
$IF ($GET_PARTY_ASL("go"))
  {
   $SET_PARTY_ASL("go","");
   $RETURN 1;
  };

Note:  I used the "go" ASL to prevent the Transfer Module from triggering if the party was not sent there by a $SET_PARTY_XY command.  The "go" ASL is set when the party is sent, and is removed before the Transfer Module executes.  This prevents the requirement to place the zone Transfer Module in an inaccessible location.

  Zone GPDL Event Trigger Scripts

I started with a single script set, but decided to go with different sets for wilderness and dungeon maps.  Dungeon maps use facing direction in the $IF statements, which I find a bit more forgiving than using specific coordinates.

Both methods use only one zone for map transfers, and one 'line' of step events.  There are only 16 zones and 8 step events, and I thought it best to conserve them.

__Dungeon Map Transfer Scripts___________________

  Zone (Step) Events

The event used will not fire, so the type of event used is not important.  Simplest is best.  In this example I used 4 maps with a layout of :

   1   2

   3   4

The transfers create a torus pattern, so exiting map 1 to the north will take you to the south of map 3, and exiting to the west will take you to the east of map 2.  I know this is not a standard pattern for dungeons or cities, but it shows the transfer scripts for each direction.

The maps are 10 x 13, and the x,y numbering starts with 0.  The destination is set to 1 square past the transfer zone of the next map in the direction traveled.  The '//' comments in the scripts are only there to explain what the script is doing, and need not be updated or retained.

You may delete sections of the script for directions with no transfer, but it isn't necessary.  If there is no transfer to the north, you could delete:
Code: [Select]
// Going North to /3/x/11
$IF (face == 0)
  {$SET_PARTY_ASL("spot","/3/" + x + "/11");};

The format of Party ASL "spot" is "/Level/x/y".  It is read as the script that sets the transfer destination.

GPDL script for level 1 transfer step event:

Code: [Select]
$VAR loc;
$VAR face;
$VAR x;
$VAR y;
loc = $GET_PARTY_LOCATION();
face = $GET_PARTY_FACING(); //N=0, E=1, S=2, W=3
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going North to /3/x/11
$IF (face == 0)
  {$SET_PARTY_ASL("spot","/3/" + x + "/11");};
// Going East to /2/1/y
$IF (face == 1)
  {$SET_PARTY_ASL("spot","/2/1/" + y);};
// Going South to /3/x/1
$IF (face == 2)
  {$SET_PARTY_ASL("spot","/3/" + x + "/1");};
// Going West to /2/8/y
$IF (face == 3)
  {$SET_PARTY_ASL("spot","/2/8/" + y);};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);

GPDL script for level 2 transfer step event:

Code: [Select]
$VAR loc;
$VAR face;
$VAR x;
$VAR y;
loc = $GET_PARTY_LOCATION();
face = $GET_PARTY_FACING(); //N=0, E=1, S=2, W=3
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going North to /4/x/11
$IF (face == 0)
  {$SET_PARTY_ASL("spot","/4/" + x + "/11");};
// Going East to /1/1/y
$IF (face == 1)
  {$SET_PARTY_ASL("spot","/1/1/" + y);};
// Going South to /4/x/1
$IF (face == 2)
  {$SET_PARTY_ASL("spot","/4/" + x + "/1");};
// Going West to /1/8/y
$IF (face == 3)
  {$SET_PARTY_ASL("spot","/1/8/" + y);};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);

GPDL script for level 3 transfer step event:

Code: [Select]
$VAR loc;
$VAR face;
$VAR x;
$VAR y;
loc = $GET_PARTY_LOCATION();
face = $GET_PARTY_FACING(); //N=0, E=1, S=2, W=3
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going North to /1/x/11
$IF (face == 0)
  {$SET_PARTY_ASL("spot","/1/" + x + "/11");};
// Going East to /4/1/y
$IF (face == 1)
  {$SET_PARTY_ASL("spot","/4/1/" + y);};
// Going South to /1/x/1
$IF (face == 2)
  {$SET_PARTY_ASL("spot","/1/" + x + "/1");};
// Going West to /4/8/y
$IF (face == 3)
  {$SET_PARTY_ASL("spot","/4/8/" + y);};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);

GPDL script for level 4 transfer step event:

Code: [Select]
$VAR loc;
$VAR face;
$VAR x;
$VAR y;
loc = $GET_PARTY_LOCATION();
face = $GET_PARTY_FACING(); //N=0, E=1, S=2, W=3
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going North to /2/x/11
$IF (face == 0)
  {$SET_PARTY_ASL("spot","/2/" + x + "/11");};
// Going East to /3/1/y
$IF (face == 1)
  {$SET_PARTY_ASL("spot","/3/1/" + y);};
// Going South to /2/x/1
$IF (face == 2)
  {$SET_PARTY_ASL("spot","/2/" + x + "/1");};
// Going West to /3/8/y
$IF (face == 3)
  {$SET_PARTY_ASL("spot","/3/8/" + y);};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);


__Dungeon Map Transfer Scripts___________________

  Zone (Step) Events

In this example I used 4 maps with a layout of :

   10   11

   12   13

The transfers are only between adjacent maps in cardinal directions.  The maps are 19 x 19, and as usual the x,y numbering starts with 0.  The destination is set to 1 square past the transfer zone of the next map in the direction traveled.  Facing direction does not change on the overland map, so the $IF statements use x or y coordinate values.  It is possible to move diagonally and satisfy both $IFs at once.  If this occurs, the $IF that runs last will set the transfer.

GPDL script for level 10 transfer step event:

Code: [Select]
$VAR x;
$VAR y;
$VAR loc;
loc = $GET_PARTY_LOCATION();
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going East to /11/1/y
$IF (x == 18)
  {$SET_PARTY_ASL("spot","/11/1/" + y);};
// Going South to /12/x/1
$IF (y == 18)
  {$SET_PARTY_ASL("spot","/12/"+ x +"/1");};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);

GPDL script for level 11 transfer step event:

Code: [Select]
$VAR x;
$VAR y;
$VAR loc;
loc = $GET_PARTY_LOCATION();
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going West to /10/17/y
$IF (x == 0)
  {$SET_PARTY_ASL("spot","/10/17/" + y);};
// Going South to /13/x/1
$IF (y == 18)
  {$SET_PARTY_ASL("spot","/13/"+ x +"/1");};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);

GPDL script for level 12 transfer step event:

Code: [Select]
$VAR x;
$VAR y;
$VAR loc;
loc = $GET_PARTY_LOCATION();
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going East to /13/1/y
$IF (x == 18)
  {$SET_PARTY_ASL("spot","/13/1/" + y);};
// Going North to /10/x/17
$IF (y == 0)
  {$SET_PARTY_ASL("spot","/10/"+ x +"/17");};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);

GPDL script for level 13 transfer step event:

Code: [Select]
$VAR x;
$VAR y;
$VAR loc;
loc = $GET_PARTY_LOCATION();
x = $DelimitedStringSubstring(loc,1);
y = $DelimitedStringSubstring(loc,2);
// Going West to /12/17/y
$IF (x == 0)
  {$SET_PARTY_ASL("spot","/12/17/" + y);};
// Going North to /11/x/17
$IF (y == 0)
  {$SET_PARTY_ASL("spot","/11/"+ x +"/17");};
$SET_PARTY_ASL("go","1");
$SET_PARTY_XY(0,0);


See the attached mini mod for a demonstration.

To use the mini mod:
1.  Copy (do not move) TemplateDesign.dsn from your editor folder to your working folder and rename it to Test.dsn, or whatever else you deem appropriate.
2.  Extract the mini mod to your working folder.
3.  Copy and replace the Data, Resources, and Saves folders from the mini mod to your Test.dsn folder (from step 1).
4.  In the Test.dsn folder, start UAFWin and press CTRL+P to run the playfile.

Edits:
Added overland maps and transfers
Revised scripts to use x & y variables
Updated mini mod
« Last Edit: November 16, 2012, 05:11:28 AM by nologgie »
Some days it just doesn't pay to gnaw through the straps.

Offline Milos Gulan

  • Hero Member
  • *****
  • Posts: 3061
Re: Questions about DC
« Reply #27 on: November 16, 2012, 03:28:03 AM »
Wow thaanks :) that looks good and in time, and it is wonderful only if it I could make it work in my design too. I have read it trough and I understand what need to be done but don't know how to really do it and import those GPDL scripts into my design. I hope with little help I might do it so here is my design and those levels are around 20-30 (11 maps of town). Sorry btw for trouble I started town then though it might be cool to actualy walk the streets of it then resized maps to be bigger and got 11 nice maps :) so now only to link them and it might be nice :D

Offline Milos Gulan

  • Hero Member
  • *****
  • Posts: 3061
Re: Questions about DC
« Reply #28 on: November 16, 2012, 04:19:04 AM »
One more thing I made cat NPC but instead of being human I want to change it race into animal. How can I do that?

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: Questions about DC
« Reply #29 on: November 16, 2012, 06:13:02 AM »
Wow thaanks :) that looks good and in time, and it is wonderful only if it I could make it work in my design too. I have read it trough and I understand what need to be done but don't know how to really do it and import those GPDL scripts into my design. I hope with little help I might do it so here is my design and those levels are around 20-30 (11 maps of town). Sorry btw for trouble I started town then though it might be cool to actualy walk the streets of it then resized maps to be bigger and got 11 nice maps :) so now only to link them and it might be nice :D

For starters, download the mini mod and have a look at how it's done.  The scripts can be viewed or edited by opening the event in the event editor and clicking on the "GPDL Script" button on the lower right side.  The Transfer Module is at 0,0, and the step event script is found under "Step Events/ Step Event 1".  I used a Chain event.

In order for a step event to be active you must highlight the event and click on the "Step Events" button.  This will allow you to set "event Happens every | # | steps" (set it to 1), and select the zone(s) where it happens.

If a tutorial doesn't enable a reader to perform the task described it isn't fulfilling its purpose.  I'll update this one as needed, and if I can't talk you through it I'll do a few in your design as specific examples.

One more thing I made cat NPC but instead of being human I want to change it race into animal. How can I do that?

Neither the character nor monster method works on NPCs.  I don't know how to do it yet, but I'll give it a shot.
Some days it just doesn't pay to gnaw through the straps.