AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] TF2Attributes (v1.7.2, 2022/09/18) (https://forums.alliedmods.net/showthread.php?t=210221)

GandalfTheWhite 04-12-2022 01:00

Re: [TF2] TF2Attributes (v1.2.1, 07/02/2015)
 
Quote:

Originally Posted by Storby (Post 2771352)
I have questions how I make minigun shoot rockets ?

You could use the override projectile type attribute with a value of 2.

Quote:

Originally Posted by nosoop (Post 2736871)
I now have a developer preview up in my releases that adds support for string attributes.

You still can't do things like set custom names / descriptions (this will probably never happen), but you can now read them, and you can set attributes given the name and string value (mainly the server-sided things like custom projectile model).

Code:

// read the custom name on an item, or "NO NAME" if the item doesn't have a custom name
// note that you must use the attribute class, not the name
TF2Attrib_HookValueString("NO NAME", "custom_name_attr", entity, buffer, sizeof(buffer));

// set a custom projectile model on a weapon
TF2Attrib_SetFromStringValue(entity, "custom projectile model", "models/weapons/c_models/c_grenadelauncher/c_grenadelauncher.mdl");

// you can even read off strings from somewhere and do this and it will Just Work(tm) for setting it as any type the game supports
TF2Attrib_SetFromStringValue(entity, "fire rate bonus HIDDEN", "0.2");

Let me know if you run into any issues with this one.

Hello! I've tried to use the custom projectile model attribute with your plugin, but it only works for grenade-type projectiles. I'm using it alongside the Custom Weapons X.

Excuse me if I said something wrong. My english it's not the best and this is the first time I reply to a thread in this website.

FlaminSarge 01-17-2023 12:42

Re: [TF2] TF2Attributes (v1.7.2, 2022/09/18)
 
(For those that haven't seen yet, nosoop's fork has been merged into this).

RevilleAJ 10-02-2023 12:27

Re: [TF2] TF2Attributes (v1.7.2, 2022/09/18)
 
Did this plugin break or something? I keep getting the following error spammed in the log:
Quote:

L 10/02/2023 - 16:52:16: [SM] Unrecognized library "server" (gameconf "/home/mainuser/.local/share/Steam/steamapps/common/Team Fortress 2/tf/addons/sourcemod/gamedata/tf2.attributes.txt")
L 10/02/2023 - 16:52:16: [SM] Exception reported: Could not initialize call to CEconItemSchema::GetItemDefinition
L 10/02/2023 - 16:52:16: [SM] Blaming: tf2attributes.smx
L 10/02/2023 - 16:52:16: [SM] Call stack trace:
L 10/02/2023 - 16:52:16: [SM] [0] SetFailState
L 10/02/2023 - 16:52:16: [SM] [1] Line 137, scripting/tf2attributes.sp::OnPluginStart
I've made sure everything is in the right area, including the tf2attributes.txt gamedata file. I haven't played TF2 with sourcemod in a long time since my old PC broke, and rn I'm stuck to Linux.

There's also:
Quote:

L 10/02/2023 - 16:51:50: [SM] Unrecognized library "server" (gameconf "/home/mainuser/.local/share/Steam/steamapps/common/Team Fortress 2/tf/addons/sourcemod/gamedata/core.games/engine.ep2valve.txt")
L 10/02/2023 - 16:52:16: [SM] Unrecognized library "server" (gameconf "/home/mainuser/.local/share/Steam/steamapps/common/Team Fortress 2/tf/addons/sourcemod/gamedata/sdktools.games/game.tf.txt")
L 10/02/2023 - 16:52:16: [SDKTOOLS] Signature for FireOutput not found in gamedata
L 10/02/2023 - 16:52:16: [SM] Unrecognized library "server" (gameconf "/home/mainuser/.local/share/Steam/steamapps/common/Team Fortress 2/tf/addons/sourcemod/gamedata/sm-tf2.games.txt")
I've tried both sourcemod 1.11 stable and 1.12 dev, but there's no difference between the two in terms of the errors. The last update for tf2attributes was in April, while the latest "major" TF2 updates was in July, and that update added VSH as an official gamemode and made some other changes, so I don't know if the issue is fully on my end only or not.

FlaminSarge 10-02-2023 13:59

Re: [TF2] TF2Attributes (v1.7.2, 2022/09/18)
 
The 'unrecognized library: "Server"' error seems like it could be an issue with SourceMod's gamedata-reader directly since it's happening to all of your gamedata rather than just TF2Attributes.

RevilleAJ 10-02-2023 14:22

Re: [TF2] TF2Attributes (v1.7.2, 2022/09/18)
 
Quote:

Originally Posted by FlaminSarge (Post 2810947)
The 'unrecognized library: "Server"' error seems like it could be an issue with SourceMod's gamedata-reader directly since it's happening to all of your gamedata rather than just TF2Attributes.

Seems to be the case. I'm not sure what's causing it at all or how I could fix it. I don't get the same issue with TF2Classic (as in gamedata errors, not tf2attributes), although that mod runs on Source SDK Base 2013 Multiplayer. Can't really seem to find anything about it online other than very old posts that do not have proper answers.

nosoop 10-02-2023 15:39

Re: [TF2] TF2Attributes (v1.7.2, 2022/09/18)
 
Quote:

Originally Posted by RevilleAJ (Post 2810945)
Did this plugin break or something? I keep getting the following error spammed in the log:
[...]

Copying the information over from a Discord chat, the game client's server binary (based on the location being reported) doesn't appear to ship with debugging symbols. SourceMod and many plugins expect Linux TF2 instances to run with unstripped binaries since the dedicated server ships with those; running it on a client is unsupported.

(It happens to work on Windows since debugging symbols aren't compiled into the binary; the dedicated and client server binaries are effectively the same on that platform.)

RevilleAJ 10-03-2023 02:19

Re: [TF2] TF2Attributes (v1.7.2, 2022/09/18)
 
Quote:

Originally Posted by nosoop (Post 2810956)
Copying the information over from a Discord chat, the game client's server binary (based on the location being reported) doesn't appear to ship with debugging symbols. SourceMod and many plugins expect Linux TF2 instances to run with unstripped binaries since the dedicated server ships with those; running it on a client is unsupported.

(It happens to work on Windows since debugging symbols aren't compiled into the binary; the dedicated and client server binaries are effectively the same on that platform.)

Yep, so I had to run a dedicated server with SourceMod installed there instead of loading it in-game. Never had ran a dedicated server before, but it works now, so thank you.


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

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