Skip to content

BAIN Wizards: General Improvements #446

@Infernio

Description

@Infernio

While looking through belt.py and the BAIN Wizard documentation for investigating issues 444 and 445, I noticed that two functions were missing documentation. Opening this issue as a TODO list for me as I go through and fix all the problems I found (and so I can nicely refer to this issue in commit messages).

Constants

  • The documentation lies when it says that wizards only define two constants, True and False, they also define a constant called SubPackages. It's even used in many examples further down the page.

Functions

  • DisableINILine - disables a setting by commenting out the line in the INI file. These tweaks don't seem to work in WB right now though.
  • EndExec - internal function, marks the ending of an Exec function's contents. Calling EndExec manually is an error (should still have documentation to this effect though).

Operators

  • Did you know that wizards support incrementing or decrementing variables? I didn't either, because the documentation never mentions it.
    • Turns out that the increment / decrement operators were supposed to act as postfix ones, but someone made a mistake and they actually act as prefix operators. I'll just change the specification to keep backwards compatibility.
  • The operators need some better documentation. When I see ^= I assume bitwise negation, but looking at the source code, it's actually exponentiation.
  • The in operator needs an actual explanation of what it does (with an example).
  • The dot operator basically assumes that you're familiar with OO to understand it. An example would help (starting to notice a pattern here? 😛 ).
  • An implementation of %= and % for modulo exists, but is commented out. Might be worth reviving?

Random Notes

  • Everything mentioning Espm should probably be deprecated in favor of new keywords / functions with Plugin instead, since .esl files are a thing now - and there may be other types in the future (obviously we'll keep the old versions around indefinitely, similar to how CompareOblivionVersion was handled, since an absolute ton of wizards would break otherwise).
  • The string[start:stop:step] syntax in Python isn't called indexing, it's called slicing. Indexing is only when you use a single number in the brackets (e.g. string[target]).

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation (Everything in the Docs folder)A-wizardsArea: Wizards (belt.py and ScriptParser.py)C-enhancementCategory: Enhancement, a request to add or enhance a featureM-relnotesMisc: Issue should be listed in the version history for its milestone

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions