Extract Items/Skins/... from raw VDF data files
- Refactoring... This file will be too long
- Generalization isDatasInitialized
- Better handle of Little Endian for vdf / Hack dependency
- Datamining File for more informations
- DEBUG - Better Handle of Knifes and Rarities (My god, need so much hack ><. Volvo... that's not really clean ^^')
- To ES6
- Optimize Performances
- defindex to int ?
npm install node-csgo-parser --save
var parser = require('./csgo-data-parser'),
var schemaFilePath = './test/test-data/schema.txt',
langFilePath = './test/test-data/csgo_english.txt',
itemsFilePath = './test/test-data/items_game.txt',
outLogFilePath = './out/logs/parser.log';
var csgoDataParser = new parser(schemaFilePath, langFilePath, itemsFilePath, 'debug', outLogFilePath);
Must pass schema file (like schema.txt), language file (like csgo_english.txt) and item file (like item_data.txt) at VDF format
- Schema file can be find in Steam API
- Language file can be find in game data files (steam-data/csgo/resource/csgo_language.txt)
- Items File can be find both in game data files () and in Steam API (Note : You need do get the items_game_url information)
A sample script is at example.js
.
- CSGODataParser
- new CSGODataParser(schemaFilePath, langFilePath, itemsFilePath, logLevel, logFilePath)
- .getLogger() ⇒
winston.Logger
- .isDatasInitialized() ⇒
boolean
- .isLangInitialized() ⇒
boolean
- .getLangValue(keyLang) ⇒
String
- .getWeapons() ⇒
Array.<Weapon>
- .getCollections() ⇒
Array.<Collection>
- .getExteriors() ⇒
Array.<String>
- .getCases() ⇒
Array.<Prefab>
- .getCaseKeys() ⇒
Array.<Prefab>
- .getStickers() ⇒
Array.<Sticker>
- .getMusicKits() ⇒
Array.<MusicKit>
- .getRaritiesIndex() ⇒
Array.<Rarity>
Param | Type | Description |
---|---|---|
schemaFilePath | String |
Path to schema file. |
langFilePath | String |
Path to csgo_lang file. |
itemsFilePath | String |
Path to items_game file. |
logLevel | String |
Winston Log Level, if > info no timing data for generations. |
logFilePath | String |
Choosen file path to write logs. |
Return the parser's logger.
Kind: instance method of CSGODataParser
Returns: winston.Logger
- Winston based Parser's Logger.
Access: public
Check if datas files are OK.
Kind: instance method of CSGODataParser
Returns: boolean
- True if datas initialized, false otherwise
Access: public
Check if lang file is OK.
Kind: instance method of CSGODataParser
Returns: boolean
- True if initialized, false otherwise
Access: public
Get the lang value from valve key i18n values.
Kind: instance method of CSGODataParser
Returns: String
- traduction if langfile initialized and key is present, key otherwise
Access: public
Param | Type | Description |
---|---|---|
keyLang | String |
valve key i18n values (like #PaintKit_aa_fade_Tag) |
Generate bases Weapons data from schema's data.
Kind: instance method of CSGODataParser
Returns: Array.<Weapon>
- List of Objects. One object represent one Weapon.
Access: public
Generate collection's data from itemsgame's data.
Kind: instance method of CSGODataParser
Returns: Array.<Collection>
- List of Collections. One object represent one Collection.
Access: public
Generate exteriors.
Kind: instance method of CSGODataParser
Returns: Array.<String>
- One string represent one exterior type - I18N Name
Access: public
Generate Weapon/Stickers skin Case list.
Kind: instance method of CSGODataParser
Returns: Array.<Prefab>
- List of Object. One object represent one case
Access: public
Generate Weapon/Stickers skin Case keys list.
Kind: instance method of CSGODataParser
Returns: Array.<Prefab>
- List of Object. One object represent one case key
Access: public
Generate Stickers list. Note : Some unknown stickers are present in the item_game file so they have a rarity set to "default" (id 2 to 12)
Kind: instance method of CSGODataParser
Returns: Array.<Sticker>
- List of Sticker. One object represent one sticker
Access: public
Generate MusicKits list.
Kind: instance method of CSGODataParser
Returns: Array.<MusicKit>
- List of MusicKit. One object represent one music kit
Access: public
Generate Rarities index.
Kind: instance method of CSGODataParser
Returns: Array.<Rarity>
- List of Rarity objects. One object represent one rarity.
Access: public