Difference between revisions of "Category:Pluggy"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
imported>Haama
(Updated TESNexus link)
 
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Pluggy''' (latest version is Beta v30) is a plugin for OBSE that provides functions to create, store, and manipulate single-dimension arrays.
__NOTOC__


==Download and Discussion Thread==
{{OBSE Plugin
[http://www.bethsoft.com/bgsforums/index.php?showtopic=778904 Pluggy in the Bethesda Forums (Oblivion Mods)]
|Version=Beta 124
|InternalVer=124
|Name=Pluggy
|Author=[http://www.bethsoft.com/bgsforums/index.php?showuser=410736 Elys], [http://www.bethsoft.com/bgsforums/index.php?showuser=299036 haama], Leandro Conde
|Description=
Pluggy is a multifunction plugin for OBSE.  Its main features include:
*Single-dimension array support
*String variables
*The ability to save strings to text files
*True INI file support, both reading and writing values
*Hud creation (>= v101), both surface/image and text HUDs
|Install=
#Browse to the folder Oblivion\Data\obse\plugins
#Extract the contents of the downloaded zip into that folder
|Download=[http://tesnexus.com/downloads/file.php?id=23979 TESNexus]
|Source=[http://tesnexus.com/downloads/file.php?id=23979 TESNexus]
|Discussions=
*[http://www.bethsoft.com/bgsforums/index.php?showtopic=853089 <nowiki>[WIP/BETA]</nowiki> Pluggy #5]
*[http://www.bethsoft.com/bgsforums/index.php?showtopic=873139 <nowiki>[WIP/BETA]</nowiki> Pluggy #6]
*[http://www.bethsoft.com/bgsforums/index.php?showtopic=930549 Pluggy v122 Crash - A Report, An attempt to gain Elys' attention...]
*[http://www.bethsoft.com/bgsforums/index.php?showtopic=955774 Pluggy-related Crashes]
*[http://www.bethsoft.com/bgsforums/index.php?showtopic=978991 <nowiki>[Relz/eWIP]</nowiki> Pluggy #7]
|OBSEname=OBSE_Elys_Pluggy
}}


==What is an array?==
==Introduction==
You can think of a single-dimension array as an expandable piece of lined paper. Each line contains a bit of information. In Oblivion's case, the line can either be empty, a [[Reference_Variables|reference]], an [[Long Integer|integer (long)]], or a [[Floating Point|float]]. Each line is called an index, and they start with 0.
See the following pages to get an overview of the various Pluggy capabilities:
*[[Introduction to Pluggy Arrays]]
*[[Introduction to Pluggy Strings]]
*[[Introduction to Pluggy INI Files]]


An example array:
==Data Storage==
{| border="2" cellpadding="5" cellspacing="0"
*The arrays/strings are stored in files with the extension .pluggy in "My Documents\My Games\Oblivion\Saves"
|-
*A .pluggy file is created whenever the game is saved and there are arrays/strings in use.
!style="background:#ffdead;" |Index
*Each .pluggy file's name corresponds to its associated save file, e.g. "autosave.pluggy" corresponds with "autosave.ess".
|style="background:#ffeded;" |Info in index
*If all arrays/strings are destroyed, or all mods that were using arrays/strings are deactivated, the .pluggy file will not be created at the next save.
|style="background:#ffeded;" |Type of info in index
|-
!style="background:#ffdead;" |Index 0
|style="background:#ffeded;" |---
|style="background:#ffeded;" |Empty
|-
!style="background:#ffdead;" |Index 1
|style="background:#ffeded;" |0000000F (Gold)
|style="background:#ffeded;" |Reference
|-
!style="background:#ffdead;" |Index 2
|style="background:#ffeded;" |658
|style="background:#ffeded;" |Long
|-
!style="background:#ffdead;" |Index 3
|style="background:#ffeded;" |4.563
|style="background:#ffeded;" |Float
|}


==Where are the arrays stored?==
==Memory Usage==
*The arrays are stored in separate .pluggy files.
*Memory (in-game) - 4 bytes per empty array index and 6 bytes per filled array index or string character
*A .pluggy file is created whenever the game is saved and there are arrays in use.
*HDD space - 6 bytes per filled array index or string character
*Each .pluggy file corresponds to it's save game file.
*If all arrays are destroyed, or all mods that use the arrays are deactivated, the .pluggy file will be deleted.
*The files are incredibly small - only 9 '''bytes''' per non-empty array index.


==How much space and memory do the arrays take?==
==Function Speed==
*Memory (in-game) - 4 bytes per empty array index and 9 bytes per filled array index
*HDD space - 9 bytes per filled array index
 
==How fast are the functions?==
*Not fully tested, but running 900 Pluggy "Find" calls only took half a second while 900 [[GetInventoryObject]] calls took 10 seconds. In short, these are incredibly fast functions.
*Not fully tested, but running 900 Pluggy "Find" calls only took half a second while 900 [[GetInventoryObject]] calls took 10 seconds. In short, these are incredibly fast functions.


==Some peculiarities (compared to other Oblivion functions)==
==Notes==
*Most Pluggy functions can be used to both return and set a value. This is determined by an optional flag - if it's left empty the value will be returned and if it's filled the value will be set to that flag.
*Many Pluggy functions can be used to both return and set a value. This is determined by an optional flag - if it's left empty the value will be returned and if it's filled the value will be set to that flag.
**For example, '''ArraySize 0''' will return the size of Array 0 while '''ArraySize 0 10''' will set Array 0's size to 10 indexes.
*All files used by Pluggy functions must be located under '''"...\My Documents\My Games\Oblivion\Pluggy\User Files"'''.  This includes INI files, plain text files, and files that are saved/created by a script.
*Each array is associated with a mod (either Esp or Esm). If the mod is removed then the array will be removed once the player saves.
**There is also a system to prevent other mods from accidentally modifying your arrays and to prevent other mods from modifying your arrays.
**#To modify an array from another mod the modder will need to include a special Global flag to their function.
**#If you want to prevent any other mod from modifying your arrays, add a special Protection flag when you create it or set it later with [[ArrayProtect]]
**#Note that other mods will be able to look at your array regardless of Protection or Global flags.
**#The corresponding mod for each array can be changed with [[ArrayEsp]].
*Arrays have indexes from 0 to (array size - 1). The array size is set when you first create the array and can be modified with [[ArraySize]].
*There are 3 '''SetInArray''' and '''FindInArray''' functions: one for integers, one for floats, and one for references.


[[Category: OBSE Plug-Ins]]
[[Category: Functions|Z]]
[[Category: Functions]]
[[Category: Functions (OBSE)]]
[[Category: Functions (OBSE)]]

Latest revision as of 19:15, 23 April 2009



Pluggy
Author(s)

Elys, haama, Leandro Conde

Current Version Beta 124 (GetPluginVersion returns 124)
Description

Pluggy is a multifunction plugin for OBSE. Its main features include:

  • Single-dimension array support
  • String variables
  • The ability to save strings to text files
  • True INI file support, both reading and writing values
  • Hud creation (>= v101), both surface/image and text HUDs
Installation
  1. Browse to the folder Oblivion\Data\obse\plugins
  2. Extract the contents of the downloaded zip into that folder
Download

TESNexus

Source Code

TESNexus

Discussions
OBSE Name "OBSE_Elys_Pluggy"

(for use with IsPluginInstalled/GetPluginVersion)


Introduction[edit | edit source]

See the following pages to get an overview of the various Pluggy capabilities:

Data Storage[edit | edit source]

  • The arrays/strings are stored in files with the extension .pluggy in "My Documents\My Games\Oblivion\Saves"
  • A .pluggy file is created whenever the game is saved and there are arrays/strings in use.
  • Each .pluggy file's name corresponds to its associated save file, e.g. "autosave.pluggy" corresponds with "autosave.ess".
  • If all arrays/strings are destroyed, or all mods that were using arrays/strings are deactivated, the .pluggy file will not be created at the next save.

Memory Usage[edit | edit source]

  • Memory (in-game) - 4 bytes per empty array index and 6 bytes per filled array index or string character
  • HDD space - 6 bytes per filled array index or string character

Function Speed[edit | edit source]

  • Not fully tested, but running 900 Pluggy "Find" calls only took half a second while 900 GetInventoryObject calls took 10 seconds. In short, these are incredibly fast functions.

Notes[edit | edit source]

  • Many Pluggy functions can be used to both return and set a value. This is determined by an optional flag - if it's left empty the value will be returned and if it's filled the value will be set to that flag.
  • All files used by Pluggy functions must be located under "...\My Documents\My Games\Oblivion\Pluggy\User Files". This includes INI files, plain text files, and files that are saved/created by a script.

Subcategories

This category has the following 5 subcategories, out of 5 total.

A

F

H

S