News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 303
Total: 303

Author Topic: PMPE - Arkander's Automated Skill and Affix Iterator  (Read 1780 times)

0 Members and 142 Guests are viewing this topic.

PMPE - Arkander's Automated Skill and Affix Iterator
« on: »
PMPE is a serious time-saver, especially for skills with multiple levels like class skills.  Especially useful is the fact that you can make one master file which consists of 1 level block which can be edited to make changes to all 15 levels of the skill.  So, instead of having to change 15 lines of code, if you set up your master file it just takes modifying one line.  It apparently can also spit out 15 separate affixes with individual files but I haven't used it for that yet.

Quote from: Arkander
I got really sick of copying and pasting the [LEVEL1] block of my skills and manually changing each value, so I wrote a Perl script to automate it.

Current Version: 1.1.0
Updated 7 November 2013
ChangeLog
Spoiler (hover to show)

To use, install Perl and then download these three files:

PMPE.plx: http://pastebin.com/RUzahk4a
readme.txt: http://pastebin.com/BXKRk9Lp
sample.txt: http://pastebin.com/4pQzPgu4

Hit "download", throw them in a folder somewhere, and delete the .txt extension from PMPE.plx.txt. The program is intended to be run from the command line; it's pretty bare-bones, I know, but I learned Perl just to write the thing.

[size=150]FAQ:[/size][/b]


Q: What does it do and how do I use it?

A: I'll paste the readme at the end of this post so you can read it before you click through. To summarize: the script reads in one or more text file(s) specified by the command line arguments, and then prints out 15 copies of that text with certain recognized "macros" replaced by text determined by the number of the copy. In practical terms, you can give it the first level of a skill and some information about what should change, and it will give you the full 15 levels. It can also be used to create a large set of affixes, such as those commonly used for passive skills. The information it needs to flesh out the levels are given by macros inserted into the source text. The readme has more information about the macros.

Q: Does this actually save time?

A: Maybe? I admit that I may not break even on the time spent writing it, but I'm optimistic. If you're only going to use it once it might not be worth the learning curve, but I do think it can significantly speed up one of the most annoying tasks in skill creation.

Q: What sort of features does this thing have?

A: Currently, PMPE can:
  • Substitute the level value, or a function of the level value, as data
  • Substitute different values or functions based on the "Tier" of the skill (0,1,2,3)
  • Include or omit single lines or blocks of text based on conditionals involving the level value
  • Starting level, ending level, and level increment are configurable through command line arguments
Possible additions in future updates include:
  • Configurable starting and ending level values, currently hard-coded to 1 and 15 respectively Added in 1.1.0
  • Ability to use more than one macro per line
Q: Do you want credit for this?

A: A "Thanks" is all I ask!

Q: Do I have permission to modify the script?

A: Short answer, yes. However, if there is something you think needs to be added/changed/fixed, I'd prefer you let me know so I can include the change in future versions! I also ask that you not distribute any modified versions of the script.

Q: Where's that readme?

A: Note that some formatting doesn't show up properly on the forum, but is present on pastebin:

Quote from: readme.txt
This is version 1.0.0 of the Perl Markup Pattern Extender (PMPE) Readme. PMPE
was created to automate some of the most tedious parts of skill developement
for Torchlight II's GUTS toolkit; namely, the copying of a single level of a
skill repeatedly to give 15 levels of increasing benefits.

===============================================================================
INSTALLATION
===============================================================================
You will need a recent version of the perl interpreter to run PMPE.
Available at http://www.perl.org/get.html

===============================================================================
USE
===============================================================================
Invoke PMPE.plx from the command line, followed by file names and/or option
flags. It may be necessary to invoke perl directly, as in
   >perl PMPE.plx file.txt
depending on the operating system. Include the .txt extension for the files.

IMPORTANT:
The files and option flags are processed in First In First Out order, meaning
that any option flag adjustments apply only to files listed after them!

To access aditional options, use the following command line arguments:
   -silent    Only print errors to console
   -quiet     Prints messages to console during first read (default)
   -verbose   Prints messages to console for each read
   -alltext   Prints all output directly to the console
   -split     Each output loop prints to a different .txt file
   -nosplit   All output is printed to the same file (default)
   -default   Resets all option flags to default settings


===============================================================================
MACROS
===============================================================================
The primary feature of PMPE is its ability to make small incremental changes to
the markup text as it copies, making it ready to be copied and pasted directly
into GUTS's data editor GUI or the raw .DAT files. These changes are created
by editing the source text to include macros.

Macros are marked with the character '#'. Only one macro can be placed on each
line of source text.

A single '#' is replaced by the current level.
   Example: [LEVEL#]       becomes [LEVEL1]|[LEVEL2]|[LEVEL3]|etc

A mathematical operation inside two '#'s is performed on the current level.
   Example: #*2+100#       becomes 102|104|106|etc

A conditional inside two '#'s will cause the line to be omitted if the
conditional is false. Conditionals in this format start with L, followed by a
boolean operator (>,<,>=,<=,==) and some value. The conditional inside the #
symbols can appear anywhere in the line, and is never printed.
   Example: TEXT #L>=10#    prints TEXT only if the level is 10 or greater

Note: Avoid whitespace in the conditional if possible.

A conditional can be made to apply to an entire block of lines with the syntax
#START:[conditional]# and #END#. The conditional is formed as above and applies
starting on the line containing the #START:# instruction. The line containing
#END# is considered OUTSIDE the block. To minimize confusion, it is recommended
that #START:# and #END# be placed on their own lines.
   Example:
      #START:L>=15#
      [EFFECTS]
         [EFFECT]
         [/EFFECT]
      [/EFFECTS]
      #END#
         Result: the entire [EFFECTS] block within the macro tags will only
               be printed at level 15.

A special case exists for Skill Tier benefits awarded at skill levels 5, 10,
and 15. The syntax "#T:[expression]/[expression]/[expression]/[expression]#"
will apply the first expression if the level is between 1 and 4, the second if
the level is between 5 and 9, and so on. The expression can be the same as in
the mathematical operation macro, or use "=[Constant]" to exclude the level
from the evaluation. This feature works only on numerical expressions and is
primarily intended for use with fields such as COOLDOWN, DURATION, and RANGE.
   Example: #T:=10/=8/=6/=4# becomes 10, 8, 6, or 4 depending on the skill level

For additional examples of macro use see sample.txt

Please feel free to submit any bug or feature requests in this thread, or email arkanderxx+pmpe@gmail.com

Share on Bluesky Share on Facebook


Re: PMPE - Arkander's Automated Skill and Affix Iterator
« Reply #1 on: »
Nice.

I've added it to the list with a link back to here.

 

Recent Topics+-