2016-08-15 20:51:24 +01:00
|
|
|
*****
|
|
|
|
|
Usage
|
|
|
|
|
*****
|
|
|
|
|
|
|
|
|
|
Installing the wrapper
|
|
|
|
|
======================
|
|
|
|
|
|
|
|
|
|
Build archives contain two binaries:
|
|
|
|
|
|
2019-10-22 21:02:15 +01:00
|
|
|
* ``loot.*.pyd`` is the Python wrapper
|
|
|
|
|
* ``loot.dll`` is the C++ library DLL that the Python wrapper was built against.
|
2016-08-15 20:51:24 +01:00
|
|
|
|
2022-07-02 16:46:00 +01:00
|
|
|
The C++ DLL requires the `Visual C++ 2019 Redistributable (x86)`_
|
2016-08-15 20:51:24 +01:00
|
|
|
to be installed.
|
|
|
|
|
|
|
|
|
|
To use the wrapper, copy both files to wherever you want to import them from
|
|
|
|
|
(they must be in the same folder), and you're done!
|
|
|
|
|
|
2022-07-02 16:46:00 +01:00
|
|
|
.. _Visual C++ 2019 Redistributable (x86): https://aka.ms/vs/16/release/vc_redist.x86.exe
|
2016-08-15 20:51:24 +01:00
|
|
|
|
|
|
|
|
Using the wrapper
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
Checking Compatibility
|
|
|
|
|
**********************
|
|
|
|
|
|
|
|
|
|
To check if the module loaded is compatible with the version of the API that you
|
|
|
|
|
developed against::
|
|
|
|
|
|
2019-10-22 21:02:15 +01:00
|
|
|
>>> import loot
|
|
|
|
|
>>> loot.is_compatible(0,14,0)
|
2016-08-15 20:51:24 +01:00
|
|
|
True
|
2019-10-22 21:02:15 +01:00
|
|
|
>>> loot.is_compatible(0,9,0)
|
2016-08-15 20:51:24 +01:00
|
|
|
False
|
|
|
|
|
|
|
|
|
|
Getting a Plugin's Bash Tag Suggestions
|
|
|
|
|
***************************************
|
|
|
|
|
|
|
|
|
|
To get a plugin's Bash Tag suggestions from a ``masterlist.yaml`` metadata file::
|
|
|
|
|
|
2019-10-22 21:02:15 +01:00
|
|
|
>>> import loot
|
|
|
|
|
>>> db = loot.create_game_handle(loot.GameType.tes4, 'C:\\path\\to\\oblivion\\directory')
|
2017-12-30 15:29:21 +00:00
|
|
|
>>> db.load_lists('masterlist.yaml')
|
2016-08-15 20:51:24 +01:00
|
|
|
>>> tags = db.get_plugin_tags(u'Unofficial Oblivion Patch.esp')
|
|
|
|
|
>>> tags.added
|
|
|
|
|
set([u'Scripts', u'Relations', u'C.Owner', u'Actors.AIPackages', u'Actors.Stats', u'Actors.ACBS', u'C.Music', u'Factions', u'Invent', u'Relev', u'Names', u'C.Light', u'Delev', u'C.Name', u'C.Climate', u'NPC.Class', u'Stats', u'Actors.DeathItem', u'Creatures.Blood', u'Actors.CombatStyle', u'Actors.AIData'])
|
|
|
|
|
>>> tags.removed
|
|
|
|
|
set([u'C.Water'])
|
|
|
|
|
>>> tags.userlist_modified
|
|
|
|
|
False
|