Raised This Month: $12 Target: $400
 3% 

[TF2] Friendly Mode (v. 16.0112)


Post New Thread Reply   
 
Thread Tools Display Modes
salsav91
Senior Member
Join Date: Aug 2012
Location: Where Lollichops sleep
Old 04-21-2013 , 01:05   Re: [TF2] Friendly Mode (now with NoBlock, Auto-Updating, & Goomba Compatibility)
Reply With Quote #91

Quote:
Originally Posted by ddhoward View Post
Well, until we can figure out why the Overrides aren't working for you, let's focus on the other issue.

What errors are goomba.inc giving you when you attempt to compile?
Code:
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(4) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(23) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(25) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(28) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(33) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(36) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(38) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(49) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(51) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(53) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(56) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(66) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(69) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(71) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(76) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(83) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(92) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(95) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(101) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(105) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(127) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(139) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(145) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(149) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(152) : error 010: invalid function or declaration
/Gameservers/TF2_0004/orangebox/tf/addons/sourcemod/scripting/include/goomba.inc(154) : error 010: invalid function or declaration

Compilation aborted.
26 Errors.
I got the source from his site so it should be the right one.
__________________


Check out my pony animations. http://www.youtube.com/salsav91

Last edited by salsav91; 04-21-2013 at 01:07.
salsav91 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-21-2013 , 01:20   Re: [TF2] Friendly Mode (now with NoBlock, Auto-Updating, & Goomba Compatibility)
Reply With Quote #92

You need to use the goomba.inc that is included in the ZIP file containing the core goomba plugin.

Its contents should look like this:

https://github.com/Flyflo/SM-Goomba-...ude/goomba.inc
ddhoward is offline
salsav91
Senior Member
Join Date: Aug 2012
Location: Where Lollichops sleep
Old 04-21-2013 , 01:37   Re: [TF2] Friendly Mode (now with NoBlock, Auto-Updating, & Goomba Compatibility)
Reply With Quote #93

Quote:
Originally Posted by ddhoward View Post
You need to use the goomba.inc that is included in the ZIP file containing the core goomba plugin.

Its contents should look like this:

https://github.com/Flyflo/SM-Goomba-...ude/goomba.inc
I got the errors fixed, now its compiling right.. I am still lost on why its not running the overrides. Will do a complete server restart later and hopefully that will fix the problem.
__________________


Check out my pony animations. http://www.youtube.com/salsav91
salsav91 is offline
island55
Senior Member
Join Date: Aug 2010
Location: charleston
Old 04-21-2013 , 13:10   Re: [TF2] Friendly Mode (now with NoBlock, Auto-Updating, & Goomba Compatibility)
Reply With Quote #94

Quote:
Originally Posted by salsav91 View Post
So paste all of the commands I currently override?

Code:
Overrides
{
    /**
     * By default, commands are registered with three pieces of information:
     * 1)Command Name         (for example, "csdm_enable")
     * 2)Command Group Name    (for example, "CSDM")
     * 3)Command Level        (for example, "changemap")
     *
     * You can override the default flags assigned to individual commands or command groups in this way.
     * To override a group, use the "@" character before the name.  Example:
     * Examples:
     *        "@CSDM"            "b"                // Override the CSDM group to 'b' flag
     *         "csdm_enable"    "bgi"            // Override the csdm_enable command to 'bgi' flags
     *
     * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
     * any setting that csdm_enable previously had.
     *
     * You can make a command completely public by using an empty flag string.
     */
 
"sm_friendly" "a"    
"sm_bgod"    "a"
"sm_resizeme"   "o"
"+sm_laser" "a"
"-sm_laser" "a"
"sm_togglehoming" "a"
"sm_setspawn" "p"
"sm_clearspawn" "p"
"sm_color" "a"
"sm_setspeed" "o"
"sm_resetspeed" "o" 
"sm_goto" "p"
"sm_bring" "p"
"sm_gimme" "p"
"sm_noclip" "p"
"sm_resizehead" "a"
"sm_fia" "o"
"sm_fia_adminflag" "o"
"sm_resizemyhead" "a"
"advertisement_immunity" "a"
"unusual_immunity" "o"
"sm_render" "b"
"sm_crits" "b"
"sm_buddha"    "b"
"sm_setplayerspawn" "b" 
"sm_clearplayerspawn" "b"
"sm_god"    "c"
"sm_mortal"    "c"
"melee_voteflag" "b"
"sm_voteban" "c"
"sm_votekick" "c"
"sm_rweapons" "b"
"sm_banspray" "c"
"sm_unbanspray" "c"
"sm_banspraylist" "c"
"sm_setff" "c"
"sm_unsetff" "c"
"sm_motd" "b"
"sm_reloadadmins" "b"
"sm_map" "b" 
"sm_kick" "r"
"sm_ban" "r"
"sm_resize"   "z"
"sm_scale"      "z"
"sm_scaleme"    "z"        
"sm_fake" "z"
"sm_force" "z"
"sm_sbuild" "z"
"melee_flag" "z"
"sm_forcertd" "z"
"target_info" "z"
"sm_hudsay" "z
"sm_betheghost_override" "z"
"melee_voteflag" "z"
"sm_rof_access" "z"
"sm_rof_access_target" "z"
"sm_spycrab" "z"
 
}
Less you mean some other override that I am unaware of.

your missing an end quote with the sm_hudsay command

Last edited by island55; 04-21-2013 at 13:10.
island55 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-22-2013 , 01:36   Re: [TF2] Friendly Mode (now with NoBlock, Auto-Updating, & Goomba Compatibility)
Reply With Quote #95

Holy balls, I need to look at the actual damage-removing part of the code a little closer. The original code that I adopted literally hooks EVERY entity that spawns, then, whenever ANY entity takes damage, it checks to see if the entity is an engie building, and applies the appropriate damage nullification if necessary. This is incredibly inefficient.

This seems to work a little more efficiently:

Quote:
public OnPluginStart() {

(other stuff)

HookEvent("player_builtobject", Object_Built);
}
I don't think I even have to do an entity > 0 check with this method.

Any technical reason why changing OnEntityCreated() { stuff } to HookEvent("player_builtobject", Object_Built); isn't a good idea as far as Engie buildings are concerned?

Last edited by ddhoward; 04-22-2013 at 01:38.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-22-2013 , 02:23   Re: [TF2] Friendly Mode (now with NoBlock, Auto-Updating, & Goomba Compatibility)
Reply With Quote #96

Seems to be working out in my testing; I'm just going to go with it. Shouldn't be too hard to go back to the other method if any issues become apparent.

The next update more than doubles the amount of cvars (from 14 to 28 or 29), so it will DEFINITELY be including AutoExecConfig.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-22-2013 , 07:35   Re: [TF2] Friendly Mode
Reply With Quote #97

Uploading new version 13.0422. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread. Changes are:
  • Improved performance on hooking Engineer buildings. Previous versions of the plugin hooked EVERY entity as they were spawned, and everytime an entity took damage, checked and re-checked to see if it was an engie building. This version and all future versions will hook only Engie buildings.

  • Added AutoExecConfig(). This will generate a cfg file at tf/cfg/sourcemod/friendly.cfg, populated with the default values of all this plugin's cvars. Any cvars set here will override the same cvar anywhere else.

  • Removed sappers from the list of weapons blocked by sm_friendly_blockweps. Friendly spies will instead have their sappers instantly removed from enemy buildings.

  • Added 14 new cvars regarding the settings of Friendly engineer buildings. The first post will soon be updated with a list of all cvars, please be patient.

Next update will hopefully include a way to stop Friendly players from capping points, pushing the cart, and grabbing Intel.

Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!


Code for this update was modified from code originally seen in this plugin and this plugin.


EDIT: WARNING: This version of the plugin is bugged, and REQUIRES the Goomba Stomp plugin to be installed. It is recommended that you instead install the current version.
Attached Files
File Type: smx friendly.smx (17.1 KB, 154 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 143 views - 33.9 KB)

Last edited by ddhoward; 04-29-2013 at 02:24.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-23-2013 , 03:28   Re: [TF2] Friendly Mode (v. 13.0422)
Reply With Quote #98

Uploading new version 13.0423. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread. Changes are:
  • Removed tf_weapon_fireaxe from the list of weapons blocked by sm_friendly_blockweps. This should be the last weapon removed until a better solution is implemented.

  • Made improvements to Friendly/sapper interaction.
    • Friendly spies cannot sap any building
    • Friendly Engies/Pyros cannot remove sappers from non-friendly buildings
    • Non-friendly spies cannot sap Friendly buildings, if that buildings's invuln cvar != 0
    • If a friendly building is being sapped, the sapper can be removed by both Friendlies and non-Friendlies

  • Made changes to sm_friendly_invuln_* cvars
    • If 0, friendly buildings will be vulnerable to all damage
    • If 1, buildings will be invulnerable to all player-inflicted damage
    • If 2, buildings will have full godmode

  • Re-organized code blocks

  • Fixed cosmetics and demoshields not adhering to alpha settings if the item was equipped after spawning

  • Added cvar sm_friendly_alpha_w with default value of 128. Functions identically to the other alpha cvars, affecting wearable cosmetics and demoshields.

  • sm_friendly_admin can now be activated regardless of any invuln cvar. An admin who uses this command can still NOT bypass the invulnerability of a player/building with "godmode."

  • Added cvars sm_friendly_killsentry_f, sm_friendly_killdispenser_f, and sm_friendly_killtele_f, each with default value of 1. An Engineer who enters friendly mode will have his buildings destroyed based on these settings.

  • Added cvar sm_friendly_stopcap with default value of 1. When enabled, Friendly players will be unable to capture points or push payloads. (NOTE: A player who enables Friendly mode while ALREADY capping a point will CONTINUE to cap the point. If you are concerned about players abusing this, consider setting sm_friendly_action_f to "-1" or "-2".)

  • Added cvar sm_friendly_stopintel with a default value of 1. When enabled, Friendly players will be unable to pick up the intelligence. If a player enters Friendly mode while holding the intel, he will be forced to drop it.

Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!

PLEASE NOTE: This version causes mild and occasional error log spam, having something to do with the Control Point blocking code. Working on a solution.

EDIT: WARNING: This version of the plugin is bugged, and REQUIRES the Goomba Stomp plugin to be installed. It is recommended that you instead install the current version.
Attached Files
File Type: smx friendly.smx (18.6 KB, 145 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 155 views - 39.2 KB)

Last edited by ddhoward; 04-29-2013 at 02:24.
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-23-2013 , 07:14   Re: [TF2] Friendly Mode (v. 13.0423)
Reply With Quote #99

Uploading new version 13.0423.1. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread. Changes are:
  • Removed "Hello!" from the sm_friendly_v message and advert

  • Fixed some Friendly/sapper interaction bugs

  • Fixed the advert not working

Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!

PLEASE NOTE: This version causes mild and occasional error log spam, having something to do with the Control Point blocking code. Working on a solution.

EDIT: WARNING: This version of the plugin is bugged, and REQUIRES the Goomba Stomp plugin to be installed. It is recommended that you instead install the current version.
Attached Files
File Type: smx friendly.smx (18.9 KB, 133 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 144 views - 39.5 KB)

Last edited by ddhoward; 04-29-2013 at 02:25.
ddhoward is offline
island55
Senior Member
Join Date: Aug 2010
Location: charleston
Old 04-23-2013 , 12:45   Re: [TF2] Friendly Mode (v. 13.0423.1)
Reply With Quote #100

island55 is offline
Reply


Thread Tools
Display Modes

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 07:17.


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