AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014 (https://forums.alliedmods.net/showthread.php?t=246378)

ChauffeR 08-16-2014 17:16

[DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
TF2ItemsInfo v1.9

Since this plugin's been abandoned by Leonardo, and the fix is an easy line change, I'll try maintaining it for what I can
This is, obviously, a drop-in replacement to TF2ItemsInfo v1.8

Why the update?
Quote:

Valve recently changed location of the items_game file - however the original author is no longer maintaining the plugin, so I simply changed the code to reflect Valve's change
What is it?
Quote:

List of natives that could be useful for plugin devs.
What uses this?
Quote:

* [TF2Items] Bot Weapon Randomizer
* [TF2Items] Give Weapon
* Many private plugins
Who is credit to team?
Quote:

* Leonardo - all the work on the plugin,
* Mecha The Slag - original idea,
* FlaminSarge - bug fixes,
* 11530 - bug reports.
How to install?
Quote:

* Download files from Links section (below)
* Put tf2itemsinfo.smx in /addons/sourcemod/plugins/
* Put tf2itemsinfo.txt in /addons/sourcemod/data/
* Put tf2itemsinfo.sp in /addons/sourcemod/scripting/
* Put tf2itemsinfo.inc in /addons/sourcemod/scripting/include/
Optional:
Quote:

Updater plugin.
How to configure?
Quote:

Is not possible.
Known issues?
Quote:

None(????)
ToDo list:
Quote:

* Add function that returns a KeyValues per item;
* Add function that returns item model;
* Add function that returns item styles.

CVars & CMDs:

PHP Code:

// variables
sm_tf2ii_version // version
sm_tf2ii_logs 1 // Enable/disable logs
sm_tf2ii_db "" // DB name (from databases.cfg)
sm_tf2ii_fix01 0 // Fix items with 'string' attributes
sm_tf2ii_updater 1 // enable/disable autoupdate
// commands
sm_tf2ii_refresh // rescan items_game.txt
sm_tf2ii_reload // same as above
sm_si <name> [pagenum// find items ids by name
sm_fi <name> [pagenum// same as above
sm_sic <classname> [pagenum// find items ids by classname
sm_fic <classname> [pagenum// same as above
sm_ii <id> [extra// print item info (extra value - anything except 0)
sm_pi [id] [extra// print item info (extra value - anything except 0)
sm_sa <id|name> [pagenum// find attributes ids by id or name
sm_fa <id|name> [pagenum// same as above
sm_sac <classname> [pagenum// find attributes ids by classname
sm_fac <classname> [pagenum// same as above 

Natives, functions, etc:
Spoiler

Downloads
This work is licensed under GNU GPL v3
Full archive tf2itemsinfo.zip
Plugin tf2itemsinfo.smx
Data File tf2itemsinfo.txt
Source tf2itemsinfo.sp
Include tf2itemsinfo.inc
GitHub chauffer/tf2itemsinfo

ezetna 08-17-2014 11:07

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
!!!!!!!!!!!!!!!!!!!!!!!!!! nice

ReFlexPoison 08-17-2014 15:08

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
PHP Code:

public Plugin:myinfo = {
    
name "[DEV] TF2ItemsInfo",
    
author "ChauffeR",
    
description "items_game.txt parser",
    
version PLUGIN_VERSION,
    
url "http://hop.tf/"
}; 

Ouch.

ChauffeR 08-19-2014 03:17

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
Quote:

Originally Posted by ReFlexPoison (Post 2185343)
PHP Code:

public Plugin:myinfo = {
    
name "[DEV] TF2ItemsInfo",
    
author "ChauffeR",
    
description "items_game.txt parser",
    
version PLUGIN_VERSION,
    
url "http://hop.tf/"
}; 

Ouch.

sorry about that, I did it to keep track on my own server, here:
https://github.com/chauffer/tf2items...94c617db4b628d

Leonardo 08-19-2014 17:53

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
Quote:

Originally Posted by ChauffeR (Post 2186080)
sorry about that, I did it to keep track on my own server, here:
https://github.com/chauffer/tf2items...94c617db4b628d

You've added my name when it's already in there.

sugestin zis (alphabetic):
Code:

/*    Asher "asherkin" Baker          */
/*    ChauffeR                        */
/*    FlaminSarge                    */
/*    Leonid "Leonardo" Kuchinov      */
/*    Mecha The Slag                  */
/*    ReFlexPoison                    */

EDIT:
why the hell you have tf2items.inc ? this is not a part of tf2itemsinfo

ChauffeR 08-21-2014 05:40

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
Quote:

Originally Posted by Leonardo (Post 2186407)
You've added my name when it's already in there.

sugestin zis (alphabetic):
Code:

/*    Asher "asherkin" Baker          */
/*    ChauffeR                        */
/*    FlaminSarge                    */
/*    Leonid "Leonardo" Kuchinov      */
/*    Mecha The Slag                  */
/*    ReFlexPoison                    */

EDIT:
why the hell you have tf2items.inc ? this is not a part of tf2itemsinfo

Done, and tf2items.inc is there since your original code has it.
I have not checked whether it's needed for compilation or not, though.

Leonardo 08-21-2014 16:08

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
TF2II dependency on TF2Items. It is needed to compile. But you must link it to this thread.

WildCard65 08-21-2014 16:38

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
There is a way to allow travis to build tf2itemsinfo with tf2items WITHOUT adding the include to the repo, FF2 does that with TF2Items for it's travis building. https://github.com/50DKP/FF2-Officia...travis.yml#L17

asherkin 08-21-2014 16:57

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
Quote:

Originally Posted by WildCard65 (Post 2187213)
There is a way to allow travis to build tf2itemsinfo with tf2items WITHOUT adding the include to the repo, FF2 does that with TF2Items for it's travis building. https://github.com/50DKP/FF2-Officia...travis.yml#L17

That is completely crazy, don't do that. If you want a file from the TF2Items repo, clone it.

WildCard65 08-21-2014 17:01

Re: [DEV] TF2ItemsInfo v1.9 | 16th Aug 2014
 
rukia
Quote:

Originally Posted by asherkin (Post 2187221)
That is completely crazy, don't do that. If you want a file from the TF2Items repo, clone it.

what's crazy about it, it just uses a packaged build that can be unzipped and merged with the sm folder structure.


All times are GMT -4. The time now is 09:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.