Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 06-02-2015 , 14:19   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #311

Quote:
Originally Posted by bottiger View Post
There is a bug with the code "pAttribDef < Address_MinimumValid".

I am getting addresses like eb461394 occasionally which comes out to be -347729004 which is lower than Address_MinimumValid which is 0x1000.

To fix this I would add "&& pAttribDef > Address:-1"
bump
__________________
bottiger is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 06-12-2015 , 10:56   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #312

Since the latest TF2 update, I've been getting a lot of

Code:
L 06/12/2015 - 03:47:29: SourceMod error session started
L 06/12/2015 - 03:47:29: Info (map "vsh_apg_v2") (file "errors_20150612.log")
L 06/12/2015 - 03:47:29: [VoiceHook2] Failed to acquire IClientEngine pointer.
L 06/12/2015 - 03:49:33: [SM] Native "TF2Attrib_RemoveByDefIndex" reported: TF2Attrib_RemoveByDefIndex: Attribute 69 not valid
L 06/12/2015 - 03:49:33: [SM] Displaying call stack trace for plugin "saxtonhale.smx":
L 06/12/2015 - 03:49:33: [SM]   [0]  Line 5139, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\saxtonhale.sp::ReplaceList()
L 06/12/2015 - 03:49:33: [SM]   [1]  Line 4884, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\saxtonhale.sp::evEquipped()
L 06/12/2015 - 03:49:33: [SM] Native "TF2Attrib_RemoveByName" reported: TF2Attrib_RemoveByName: Attribute 'damage force reduction' not valid
L 06/12/2015 - 03:49:33: [SM] Displaying call stack trace for plugin "saxtonhale.smx":
L 06/12/2015 - 03:49:33: [SM]   [0]  Line 18478, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\saxtonhale.sp::RemoveBossAttributes()
L 06/12/2015 - 03:49:33: [SM]   [1]  Line 1894, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\saxtonhale.sp::event_round_start()
L 06/12/2015 - 03:49:33: [SM] Native "TF2Attrib_RemoveByName" reported: TF2Attrib_RemoveByName: Attribute 'attach particle effect' not valid
L 06/12/2015 - 03:49:33: [SM] Displaying call stack trace for plugin "tf2data.smx":
L 06/12/2015 - 03:49:33: [SM]   [0]  Line 1563, C:\Users\Anne\Desktop\Stuff\PATH\sourcemod1.6\tf2data.sp::DeleteSparkle()
L 06/12/2015 - 03:49:33: [SM]   [1]  Line 1499, C:\Users\Anne\Desktop\Stuff\PATH\sourcemod1.6\tf2data.sp::ToggleSparkle()
L 06/12/2015 - 03:49:33: [SM]   [2]  Line 690, C:\Users\Anne\Desktop\Stuff\PATH\sourcemod1.6\tf2data.sp::Post_Equip()
L 06/12/2015 - 03:49:35: [SM] Native "TF2Attrib_RemoveByDefIndex" reported: TF2Attrib_RemoveByDefIndex: Attribute 26 not valid
L 06/12/2015 - 03:49:35: [SM] Displaying call stack trace for plugin "saxtonhale.smx":
L 06/12/2015 - 03:49:35: [SM]   [0]  Line 2124, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\include\../vsh/_boss.inc::event_changeclass()
L 06/12/2015 - 03:49:35: [SM] Native "TF2Attrib_RemoveByDefIndex" reported: TF2Attrib_RemoveByDefIndex: Attribute 69 not valid
L 06/12/2015 - 03:49:35: [SM] Displaying call stack trace for plugin "saxtonhale.smx":
L 06/12/2015 - 03:49:35: [SM]   [0]  Line 5139, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\saxtonhale.sp::ReplaceList()
L 06/12/2015 - 03:49:35: [SM]   [1]  Line 4884, C:\Users\Anne\Desktop\Stuff\BitBucket\VSH-DATA\scripting\saxtonhale.sp::evEquipped()
Though, I don't know if the latest sourcemod snapshots are actually fixed for TF2 yet or not. So it could just be that.

Might also just be what bottiger mentioned.

edit: It was exactly that.

Here's a temp fix until FlaminSarge pushes his own update.
Attached Files
File Type: sp Get Plugin or Get Source (tf2attributes.sp - 531 views - 25.1 KB)
__________________

Last edited by Chdata; 06-12-2015 at 16:35.
Chdata is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 06-13-2015 , 06:00   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #313

I aim to have the update for this out by the end of this weekend.

Question: SM17 syntax or stick to a mix of SM16+17 (as the current working copy is)?

@Powerlord you can set which ammo bucket a weapon uses via m_iPrimaryAmmoType (and m_iSecondaryAmmoType).
I've half a mind to write a plugin that just sets every primary to use 1, secondary to 2, melee to 3, etc., with attributes added to each to force the correct ammo pool amount for, say, the Shortstop. But that comes later.

@anybody else If you really have an issue with setting the clip of a particular weapon and you're too lazy to figure out how to set it before the item is given to the player (so the clip automatically updates properly), just follow up the TF2Attrib_Set... for clip with:
PHP Code:
if (GetEntProp(weaponProp_Send"m_iClip1") > maxclipSetEntProp(weaponProp_Send"m_iClip1"maxclip
where maxclip is the clip you KNOW it's supposed to have.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 06-13-2015 at 06:05.
FlaminSarge is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 06-18-2015 , 22:48   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #314

Quote:
Originally Posted by FlaminSarge View Post
I aim to have the update for this out by the end of this weekend.

Question: SM17 syntax or stick to a mix of SM16+17 (as the current working copy is)?

@Powerlord you can set which ammo bucket a weapon uses via m_iPrimaryAmmoType (and m_iSecondaryAmmoType).
I've half a mind to write a plugin that just sets every primary to use 1, secondary to 2, melee to 3, etc., with attributes added to each to force the correct ammo pool amount for, say, the Shortstop. But that comes later.

@anybody else If you really have an issue with setting the clip of a particular weapon and you're too lazy to figure out how to set it before the item is given to the player (so the clip automatically updates properly), just follow up the TF2Attrib_Set... for clip with:
PHP Code:
if (GetEntProp(weaponProp_Send"m_iClip1") > maxclipSetEntProp(weaponProp_Send"m_iClip1"maxclip
where maxclip is the clip you KNOW it's supposed to have.
I say 1.7 syntax, you're going to eventually change to SM1.7 as the SM Dev team are planning to deprecate SM1.6 syntax.
__________________
nergal is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 06-18-2015 , 23:25   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #315

Quote:
Originally Posted by Powerlord View Post
No, you have to regenerate the player to fix their ammo count. Which is really annoying.

Actually, I think we were discussing this in another thread, but some functions on CTFWeaponBase that could be used to update the ammo count don't work properly on games with CEconItems (i.e. TF2 and CS:GO).

One thing I found out digging through the Source SDK2013 is that ammo counts are exclusively attached to players and not weapons. TF2 adjusts the max reserve ammo that these ammo types store through attributes on weapons. That's why the attributes to adjust primary and secondary ammo are separate attributes.

I *suspect* the ammo pool used is actually tied to the class in TF2 rather than the weapon. However, then you have things like the Shortstop which uses the Scout's pistol ammo pool instead of the scattergun ammo pool.
Going off of prior discoveries when I was on the TF2 Classic dev team, things like the Minigun and Flamethrower have their ammo coded in the class CTX files...or was it hardcoded in the respective "tf_weapon_<name>.cpp" files of the game itself...shit, I can't remember now.

Certain weapons still have ammo set in their CTX files. Grenade Launcher is a good example, I was able to make it a 4 shot with 20 grenades total by editing the grenade launcher CTX.

Of course, we were using leaked 2008 TF2 source code for that project, so I'm guessing the way ammo counts are stored has been changed in current-day TF2.

Also, I may just not know what I'm talking about at all. Pretty sure this is what you were talking about, but I could be wrong.
404UserNotFound is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 06-20-2015 , 00:59   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #316

Quote:
Originally Posted by nergal View Post
I say 1.7 syntax, you're going to eventually change to SM1.7 as the SM Dev team are planning to deprecate SM1.6 syntax.
[Citation Needed]

Last time I asked asherkin about this, he said that they won't remove backwards compatibility to old syntax (and provide 2 compilers - 1.6 syntax and 1.7 syntax) anytime soon, or else it will break virtually all the plugins that have been written up to this date.

I would say continue using the 1.6 syntax, because there can be several [private] plugins that only work on 1.6 and not on 1.7, and you will break them with a 1.7 upgrade. Look at how many servers are using this plugin, after all. But then again, I really don't know much.
Potato Uno is offline
Otokiru
Senior Member
Join Date: Apr 2012
Old 06-20-2015 , 08:20   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #317

linux server;
SourceMod Version: 1.7.3-dev+5214;
using gamedata file on 1st post; im having the same issue like the rest;
Quote:
19:04:40 L 06/20/2015 - 19:04:52: [SM] Plugin encountered error 25: Call was aborted
19:04:40 L 06/20/2015 - 19:04:52: [SM] Native "SetFailState" reported: Could not initialize call to GEconItemSchema
19:04:40 L 06/20/2015 - 19:04:52: [SM] Displaying call stack trace for plugin "tf2attributes.smx":
19:04:40 L 06/20/2015 - 19:04:52: [SM] [0] Line 87, /home/forums/content/files/8/4/3/0/4/116848.attach::OnPluginStart()

Last edited by Otokiru; 06-20-2015 at 08:21.
Otokiru is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 06-20-2015 , 09:05   Re: [TF2] TF2Attributes (v1.1.1, 08/27/2013)
Reply With Quote #318

Yeah I've been told multiple times they aren't going to break/require rewriting of the thousands of plugins using 1.6 syntax for compilation.

"But yeah, keep the misinformation going everyone."

Also maxammo is based on your ammo type and class: https://forums.alliedmods.net/showthread.php?t=262695
__________________

Last edited by Chdata; 06-20-2015 at 09:15.
Chdata is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 06-24-2015 , 00:33   Re: [TF2] TF2Attributes (v1.2.0, 06/23/2015)
Reply With Quote #319

Alright, squids and TATSUMAKI SENPUKYAKU stalled me, but v1.2.0 is now out, and attached to the first post.

Also https://github.com/FlaminSarge/tf2attributes

The .inc is now in SM1.7 syntax, but I wrote another example plugin using SM1.6 syntax and it seemed to compile with the 1.7 inc just fine. Let me know if that becomes an issue.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 06-24-2015 at 00:39.
FlaminSarge is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 06-24-2015 , 02:25   Re: [TF2] TF2Attributes (v1.2.0, 06/23/2015)
Reply With Quote #320

1.6 syntax should never die out. 1.7 is all piggybacking off of it anyways.

as for servers that refuse to update sm past 1.6, they need to fix those plugins.
Most of the errors are due to poor datapack handling.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 06-24-2015 at 02:27.
friagram is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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