Skip to content

ws-armory/LibArmory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibArmory

Gitter chat

Summary

Overview

This library allows to generate links to ws-armory.github.io pages.

The ws-armory.github.io is used for two things: visualize the equipments and get a short link for sharing purpose.

The library is also available as Curse package.

API

Usage

  1. Load the library

    local LibArmory = Apollo.GetPackage("Armory:LibArmory-1.0").tPackage
  2. Use the generatelink() function

    local link = LibArmory.generatelink()

Integration

  1. Add the library in the toc.xml file

    <?xml version="1.0" encoding="UTF-8"?>
    <Addon Author="Me" APIVersion="..." Name="MyAddon" Description="My awesome addon">
            ...
            <Script Name="libs\LibArmory\LibArmory.lua"/>
    	    ...
    </Addon>
  2. If your addon is packaged using Curse, add the library as a dependency in the pkgmeta.yaml file

    package-as: MyAddon
    enable-nolib-creation: no
    ...
    externals:
      libs/LibArmory:
        url: https://github.com/ws-armory/LibArmory.git
        tag: 1.0
    ...

Developer Notes

How does it work

Wildstar in-game API exposes unique # to reference each objects, information about this objects can be found in different online databases such as Jabbithole.

This addon gather couples of (slot_id, item_id) then generates a link to the website based on this couples.

Information about items are then gathered by the website using the Jabbithole online database (more details about the website internals).

Technical details

The addon is really simple, it's work only rely on three functions of the GameLib API: PlayerUnit:GetEquippedItems(), Item:GetSlot() and Item:GetItemId().

It pretty much looks like as:

var url = InitUrl()

for key, item in ipairs(GameLib.GetPlayerUnit():GetEquippedItems()) do
	AddItemToUrl(url,item:GetSlot(), item:GetItemId())
end

--- generated links are looking like:
--- http://ws-armory.github.io/?0=17830&1=13449&4=13329&5=30459&7=28056&10=28012

That's all, as said before, really simple !

The website

More details about the website internals can be found on it's dedicated webpage.

Contact

About

Wildstar Armory - Game library

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages