Insurgency

Insurgency

View Stats:
Mike Hawk Aug 21, 2019 @ 6:40pm
Sourcemod Respawn Plugin
Does anybody have a Sourcemod Respawn plugin that works with Insurgency? JBallou's seems to no longer work. Some kind of error with the natives.
< >
Showing 1-15 of 39 comments
ozzy Aug 26, 2019 @ 4:01am 
That is Circleus version which is modified as is mine and may include things like his flares? Mine is at https://github.com/ozzygit/Insurgency_Sourcemod/blob/master/Insurgency/addons/sourcemod/scripting/ozrespawn4.3.sp

I removed alot of the things like vip, engineer etc. I just use respawn, ai bots and medics (although that requires theater modification if you want defibs otherwise knife to heal)

Daimyo (who pretty much took over from JBallou) version is at https://github.com/Daimyo21/Insurgency-dy-sourcemod
Mike Hawk Aug 26, 2019 @ 5:23pm 
I thought I tried Daimyo's with no success. What dependencies does it have?
ozzy Aug 27, 2019 @ 1:17pm 
Hi Mike, the main dependency is insurgency.smx. This was originally from JBallou with Daimyo updated for newer SM releases. You'll also need insurgency.inc insurgencydy.inc and insurgency_ad.inc. One of them may not be required, but it doesn't hurt and put them all in scripting\include. If you don't have an include folder just copy daimyo's from his github.

I also recommend copying insurgency.games.txt and plugin.respawn.txt from his gamedata folder.

In his scripting folder is the respawn.cfg. Put that in cfg\sourcemod and modify to your desired config.

Grab respawn.phrases.txt and put that in the translations folder (not required but you'll see random ascii characters if you don't)

That is about it from memory, let me know if you get stuck.

His plugin uses the old sourcemod syntax and returns alot of errors which is why I recommend mine but as I said it has medics and that's it. You'll need his for engineers/vip/sunglasses etc.
Mike Hawk Aug 28, 2019 @ 4:53pm 
Thanks Ozzy, I am going to try yours out.
Mike Hawk Aug 28, 2019 @ 6:19pm 
Ozzy, it works great. How can I make the healthpacks work? It looks like it is missing the model. and does it change the model for the gurkha? The zombies all have a white missing model graphic when they come at you
ozzy Aug 29, 2019 @ 2:27am 
First, grab my ozzymedpack.smx from my plugins folder on my git.
Secondly, are you using a custom theater? I assume having zombies that you do?
ozzy Aug 29, 2019 @ 4:47am 
I've now uploaded this into a workshop item for you. The link is https://steamcommunity.com/sharedfiles/filedetails/?id=1848385598
Bot Chris Sep 1, 2019 @ 3:54am 
Hi Ozzy,

My name is chris (usual nick name: Bot Chris). Im running Insurgency servers and using your respawn plugin ozrespawn4.3.sp only the respawn bot part (I bypassed the rest) and all works fine. Its a great plugin, thanks to you and others!
But i have a situation: im using non vanilla counter attact mode... lets say we are destroying cache with 100% chance of counter attack and not last capture point (Event_ObjectDestroyed_Pre).

It will calls CreateTimer(cvar_ca_dur.FloatValue + 1.0, Timer_CounterAttackEnd);
the problem is when we kill all bots (alive and reserved); the timer is still running till the counter timer ended.
Then vanilla bot_count will spawn.. and before the counter timer ended, we killed all bots again... and finally when the counter timer ended, come the reserved bot count... but they never spawn because alive bots=0.

My questions: is there an event that detect game status; normal or in the middle of counter attack? Ins_InCounterAttack() always return 0. where can i find that fuction?

How could I execute "Timer_CounterAttackEnd" when the counter attack has ended before "cvar_ca_dur.FloatValue + 1.0".
Please advice if you have different solution. Thank you for your help.
Linothorax Sep 1, 2019 @ 5:29am 
Originally posted by Boba Fett:
My questions: is there an event that detect game status; normal or in the middle of counter attack? Ins_InCounterAttack() always return 0. where can i find that fuction?

Ins_InCounterAttack() is a native inside scripting/insurgency.sp which calls InCounterAttack() in same file.
Last edited by Linothorax; Sep 2, 2019 @ 9:25am
ozzy Sep 1, 2019 @ 6:45pm 
@Hawkeye, I'm not 100% sure. I didn't really developer the plugin, Daimyo81 did. I've just removed some stuff and tried to customise it myself. I've also tried to remove some bugs that were there and move it to the new Sourcemod syntax. Look at Event_ControlPointCaptured_Pre and Event_ObjectDestroyed_Pre. There is conditions within those events. If you still get stuck let me know, I might be able to find out more or put you in touch with Daimyo81. He's very helpful but also very busy so he's limited in how much help he can give.

@Linothorax, while the Insurgency.sp exists in the scripting folder the plugin doesn't include it. It includes insurgencydy.inc instead which is the version that Daimyo81 updated.

Bot Chris Sep 1, 2019 @ 8:47pm 
@Ozzy, Thanks for your reply. Daimyo81 use different approach calling Timer_CounterAttackEnd() (1 sec with TIMER_REPEAT and will stop when Ins_InCounterAttack()=FALSE). His approach is more suitable in my games. I will look into his code again to learn and find a solution.
fyi, In ozrespawn4.3.sp Event_ControlPointCaptured_Pre and Event_ObjectDestroyed_Pre when you call CreateTimer(cvar_ca_dur.FloatValue + 1.0, Timer_CounterAttackEnd);
definitely the is problem in the specific condition that I mentioned above (after the counter timer ended, the new added reserved bots (g_iRemaining_lives_team_ins) will never spawn. I confirmed that.
But if that condition will never happen in your game (if sm_respawn_counterattack_type=infinite), it will be ok. I bypassed a lot of your functions and infinite counter attack not working now hehe
Anyway from what i learned, your AI Director codes is only for the AMBUSH Reinforment right?


@Linothorax, its true Ins_InCounterAttack() is in the insurgency.sp; its also in the insurgency.inc and insurgencydy.inc; but there is no codes. I want to see the codes coz I never had Ins_InCounterAttack() return TRUE even when in the middle of counter attack (need further testing); and that fuction is called many times in respawn plugin.
Linothorax Sep 2, 2019 @ 10:00am 
@ozzy / @Hawkeye

The insurgencydy.inc gets included into insurgency.sp #19[github.com]

`Ins_InCounterAttack` is defined in the include insurgencydy.inc #266[github.com]

Which gets set inside insurgency.sp #89[github.com] / insurgency.sp #653[github.com]

public Native_InCounterAttack(Handle:plugin, numParams) { return InCounterAttack(); }

It calls InCounterAttack inside insurgency.sp #633[github.com]

bool:InCounterAttack() { new bool:retval; retval = bool:GameRules_GetProp("m_bCounterAttack"); return retval; }
(removed comments)

GameRules_GetProp is comming from the sdktools include
Sourcemod API - GameRules_GetProp[sm.alliedmods.net]

If it works for ozzy then maybe your sourcemod/gamedata is not up to date? (Just guessing)
Last edited by Linothorax; Sep 2, 2019 @ 10:05am
Bot Chris Sep 2, 2019 @ 9:15pm 
@Linothorax, Thanks for your reply. I never said Ins_InCounterAttack() doesn't work. Its called many time in respawn plugin and i confirmed, it works. But I don't know how to use it, event with the below code; it always return FALSE(before, during and after counter attack).

CreateTimer(1.0, InCounterAttackStatus, _ , TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);

Action InCounterAttackStatus(Handle Timer)
{
if (g_iRoundStatus == 0) return Plugin_Continue;

if (Ins_InCounterAttack()) PrintToServer("Ins_InCounterAttack=TRUE");
if (!Ins_InCounterAttack()) PrintToServer("Ins_InCounterAttack=FALSE");

return Plugin_Continue;
}
Nullifidian Sep 6, 2019 @ 6:00am 
@Karthus
Yes, I'm after the same thing you are. Bots use to get lives reset after counter, but now after x version it stopped.

If you look at this one https://github.com/zWolfi/INS_sourcemod/blob/master/bot_respawn.sp it works fine. We have to figure out what makes it work by comparing code.

If I or you find solution please post here. Thanks.
Last edited by Nullifidian; Sep 6, 2019 @ 6:45am
< >
Showing 1-15 of 39 comments
Per page: 1530 50