Script Editor: Class Renaming Plugin – Arma Reforger

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
(Add From-To usage details)
 
Line 1: Line 1:
{{TOC|none}}
{{Infobox/WorkbenchPlugin
{{Infobox/WorkbenchPlugin
|name= Class Renaming
|name= Class Renaming
Line 7: Line 8:
'''Class Renaming''' is a plugin that replaces a string by another in scripts and Prefabs (not terrain layers ''yet'').
'''Class Renaming''' is a plugin that replaces a string by another in scripts and Prefabs (not terrain layers ''yet'').


{{Feature|warning|This plugin can break your addon, be sure to make a backup before using it!}}
{{Feature|warning|This plugin can break addons if used carelessly, be sure to make a backup before using it!}}




Line 25: Line 26:
* '''Demo Mode''' - read-only mode that goes through all the steps without overwriting files
* '''Demo Mode''' - read-only mode that goes through all the steps without overwriting files
* '''Parameters''' - a list of "from X to Y" replacement rules {{Feature|informative|Only the first matching rule applies
* '''Parameters''' - a list of "from X to Y" replacement rules {{Feature|informative|Only the first matching rule applies
** The '''From''' field supports prefix and suffix wildcards:
*** {{hl|word}} means exact match of "word"
*** {{hl|word*}} means "word" as a prefix (e.g "'''word'''ing")
*** {{hl|*word}} means "word" as a suffix (e.g "pass'''word'''")
*** {{hl|*word*}} means inside a word (e.g "pass'''word'''ing" - does '''not''' match "word")
*** any other combination is '''not''' supported (e.g {{hl|wor*d}} to try and match "wor'''l'''d")


=== Directories ===
=== Directories ===

Latest revision as of 13:13, 2 October 2024

Class Renaming

Script Editor plugin

A plugin to rename a class in scripts and Prefabs

File: SCR_ClassRenamingPlugin.c

Class Renaming is a plugin that replaces a string by another in scripts and Prefabs (not terrain layers yet).

This plugin can break addons if used carelessly, be sure to make a backup before using it!


Usage

Use it with Plugins > Class Renaming Plugin; a window appears allowing to set replacement values and the concerned directories.


Parameters

Renaming

  • Only Rename Existing Editable Classes - only rename classes that exist in script files and that can be modified; if unchecked, replace all words that match criteria
  • Class Must Start With A Capital Letter - only rename words/classes that begin with a capital letter
  • Process Script Files - process .c files in the provided directories
  • Process Prefab Files - process .et files in the provided directories
  • Demo Mode - read-only mode that goes through all the steps without overwriting files
  • Parameters - a list of "from X to Y" replacement rules {{Feature|informative|Only the first matching rule applies
    • The From field supports prefix and suffix wildcards:
      • word means exact match of "word"
      • word* means "word" as a prefix (e.g "wording")
  • word means "word" as a suffix (e.g "password")
  • word* means inside a word (e.g "passwording" - does not match "word")
      • any other combination is not supported (e.g wor*d to try and match "world")

Directories

  • Script Directories - in which directories renaming can happen in script files (.c)
  • Prefab Directories - in which directories renaming can happen in Prefab files (.et)