Help:Automation/en

From Valve Developer Community
Jump to: navigation, search
Blank image.pngTodo: This page is not a stub but could use some more detail.

Unlike many other wikis, such as Wikipedia, the VDC, as a site focused on programming in relation to certain games and engines, can benefit greatly from automatic gathering and formatting of much of the data that these engines use. Automation can also greatly help with tasks such as applying and updating templates across pages, for example updating pages using the old template {{Lang}} to use it's new counterpart {{MultiPage}}.

This article delves into the realm of automation, exploring the usage of scripts and bots in streamlining processes and enhancing efficiency across the VDC.

A script for generation entity lists from fgd file

Scripts

Scripts are fundamental to automation, enabling the automation of repetitive tasks and the execution of complex operations. This section will detail the types of scripts used in automation, their applications, and the programming languages most commonly employed for scripting.

Note.pngNote:While AI can be used for some automation, it still often makes errors and needs specific prompts. Regular scripts are still recommended for most tasks.


The following scripts provide utility for task automation:

Entity Lists

Creating lists of entities is not difficult task; in fact, it is rather straightforward.

Warning.pngWarning:This script is useless if the format for the FGD file in the game is modified, for example in games using Strata Source Strata Source. This script works with standard FGD files for all vanilla Source Source branches.
Note.pngNote:These scripts utilize a combination of Bash scripting and Unix/Linux command-line tools, such as grep, sed, and awk

Issues

Icon-Bug.pngBug:Sometimes the script adds entities to the wrong section (with a different prefix)
Icon-Bug.pngBug:Sometimes unnecessary spaces may be added

For Source Source FGD's

The Script[1]

  • Uses grep -i '^\(@solidclass\|@pointclass\|@NPCClass\)' "$1" to filter lines from the input file that start with @solidclass, @pointclass, or @NPCClass.
  • Creates sections based on the prefixes extracted from the processed lines. It uses an associative array declare -A seen to keep track of prefixes that have already been processed. This ensures that each prefix corresponds to a single section.
  • Uses *{{ent|$result}} to format the processed lines as wiki entries.
  • The section headers are formatted as ===%s_*=== where %s is replaced with the prefix. For example, if the prefix is foo, the section header will be ===foo_*===. Each processed line is then added under the appropriate section.
  • Handles unincluded lines by appending them to a separate "Unincluded" section at the end of the output file. This ensures that all lines are accounted for, even if they don't fit the criteria for the other sections.
Usage

Source-FGD-Ent-List-VDC-2.sh <input> <output>

Pages created using this script

For GoldSrc GoldSrc FGD's

The Script[2]

  • The logic is the same as the Source Source script
    • Uses grep -i '^\(@solidclass\|@pointclass\)' "$1" to filter lines from the input file that start with @solidclass, @pointclass, or @NPCClass.
    • Uses *{{ent|$result_(GoldSrc)|alt=$result}} to format the processed lines as wiki entries.
Usage

GoldSrc-FGD-Ent-List-VDC-2.sh <input> <output>

Pages created using this script

Bots

Icon-broom.png
This article or section needs to be updated to include current information regarding the subject.
Remember to check for any notes left by the tagger at this article's talk page.

Bots are automated software agents designed to perform repetitive or time-consuming tasks, often in response to certain triggers or conditions.
This is a table of bots that currently exist on this site.

Bot Operator Framework Purpose Status
VDCBot Valve Valve N/A A range of automated cleanup assignments. Also used to ban users from editing the wiki.

Active

(intermittently)
PIPEbot Mailmanmicky Pywikibot Pywikibot N/A

Inactive

, likely to never become active
WisdomBot Wisdurm DotNetWikiBot DotNetWikiBot Updating pages using {{lang}} to use {{multipage}}, as well as other tasks, most of which are also just replacing deprecated templates.

Active

(intermittently)
AveaBot Noug4at AutoWikiBrowser
Pywikibot Pywikibot
Updating deprecated templates, optimizing pages, categorization & adding templates. See more at it's user page.

Active

(intermittently)
PeeBot Pee DotNetWikiBot DotNetWikiBot Fixing redirects, updating templates, helping with template creation and possibly more.

Active

(intermittently)

See also

External links


References

References