Writing PDA Nodes: Difference between revisions
(Created page with "== Writing Nodes == Most of the basics of how to use your PDA are covered in-game at help datapad or here in the guide to PDA Basics, but if you end up wanting to really use the PDA you're going to end up having to compose nodes. This system is super powerful and flexible, but at the cost of having some fairly gnarly syntax. Don't worry, though- writing basic nodes isn't too tough! === Basic Node Composition === You start by composing a node with datapad pda compose <t...") |
(No difference)
|
Revision as of 16:51, 13 August 2025
Writing Nodes
Most of the basics of how to use your PDA are covered in-game at help datapad or here in the guide to PDA Basics, but if you end up wanting to really use the PDA you're going to end up having to compose nodes.
This system is super powerful and flexible, but at the cost of having some fairly gnarly syntax. Don't worry, though- writing basic nodes isn't too tough!
Basic Node Composition
You start by composing a node with datapad pda compose <title>. Then you'll want to open your outbox to get the node's number, just for later reference.
datapad pda compose Sample Note You have composed a new document. Check your OUTBOX to see it. datapad pda outbox Outbox for Sample-Account (Person) [#3616] SampleNote (Note) [#4661] on 2176-03-07 08:57:44
Once the note's created, you're able to add text to it, line by line. The basic command for adding text is datapad pda append text <text>- it'll automatically add the line to the last node you had opened.
Datapad pda append text without any added words will give you a blank line, which helps a lot for readability.
So how would we write a basic node?
datapad pda append text This is my first line of a node. datapad pda append text datapad pda append text It doesn't have to be anything fancy, you see.
What would this look like?
datapad pda open 4661 SampleNote (Note) [#4661] (0) This is my first line of a node. (1) (2) It doesn't have to be anything fancy, you see.
Voila! It really can be that simple.
But in reality you're likely going to need more than three lines. It's easy to mess up when entering things line by line, so you may need to tidy things up. A few helpful commands:
datapad pda replace <line number> text <new text> - Replaces the original line with this new line.
datapad pda insert <line number> text <new text> - Puts a new line in directly BELOW the specified line.
datapad pda swap <line #1 number> <line #2 number> - Swaps the order of two lines.
Working With Sketches
One great use case of nodes is to store and share item designs. For that kind of thing, the sketch function is fantastic.
In essence, sketches just store a single line of text in a different format to make it clear the text is ICly representing an image.
To create a sketch, you type datapad pda append sketch instead of datapad pda append text - otherwise, everything else looks the same!
How would this look in-game? Here's a sample node with a couple sketches in it. To look at the sketches, you just type datapad pda interact <line number>:
https://cdn.imgchest.com/files/7lxcprblg37.png
Now you can share this node with other people so they can see your strings and provide feedback in advance, if you were making an item for someone.
NOTE: If you do this, make sure you save your color strings somehow - either by saving a log with your input in it, or by copying your strings into an external document. That'll make your life a lot easier when it comes time to make the actual object! But if you realize you forgot to save your strings, don't despair - as long as the node exists, you CAN get the color codes back. See Advanced Node Editing for some tips on how.
Writing Nodes Externally
Just writing line by line works fine if you're doing something short, but if you're trying to write out anything long it's going to get obnoxious for you fast. This is doubly true if you want pretty formatting, or to update a node later, or to use color... etc, etc.
For bigger nodes, I recommend writing your nodes first in a basic text editor. Notepad works just fine, though I personally love Notepad++ (https://notepad-plus-plus.org/) as a more powerful alternative. It's free, too!
Now, after you write out your node in a text editor, you'll have to enter the text in the game. This IS a tricky process, but luckily there's a few easy ways around that:
1) The lovely Caors has made a great tool to help people enter their text into the game. Check out https://udcolortools.neocities.org/PDALines. The page will tell you how to use it in detail, but the basic idea... All you have to do is copy and paste your text into the left box, hit the 'basic' button, and the right box will output some code you can put into an alias. Inputting that alias will then enter the text into your node.
https://cdn.imgchest.com/files/y2pckdbx5q7.png
2) If this doesn't work for you, you can also do this by just making sure every line you write has 'datapad pda append text' at the start, and then entering those lines in a batch. In Notepad++, if you do a Find and Replace with the 'Regular expression' options checked, searching for ^ and replacing it with 'datapad pda append text ' will insert those words in front of every line for you.
https://cdn.imgchest.com/files/7ogcbwzqkzy.png
Once you've done this, you can enter the lines manually by copying and pasting them in.
For MUSHClient users who want to take this path, I heavily recommend setting up an alias with speedwalk delay. Once you've added 'datapad pda append text' to the start of each line, you can then simply copy the lines from Notepad directly into the alias box with no other effort needed.
https://cdn.imgchest.com/files/yrgcnad6po4.png
More Information
Hopelessly lost? Try reviewing PDA Basics and PDA Actors.
Ready for the next step? Check out Advanced PDA Node Editing.