Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Juggernaut Script?

Custom scripts
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
OREO
Fighter
Fighter
Posts: 45
Joined: Mon Dec 03, 2018 3:18 am
Title: Cookie
SFD Account: OREO
Started SFD: Pre Alpha
Location: Oreo Pack
Gender:
Age: 21

Juggernaut Script?

Post by OREO » Fri Oct 23, 2020 8:31 am

Hey guys, so I’ve always wanted a juggernaut game mode script where one person has super speed, strength, more hp, and infinite stamina, and has to beat everyone else.

It turns out, that script already exists. I played it on someone’s server and didn’t think to ask where he got it from since I’d expect he got it on the workshop or the sfdmaps.ua site, but I looked and couldn’t find it on either of those sources.

Any of you have it? It would mean a lot to me if you can post it here, or send it to me on a PM (private message on the forum).

PS: If someone sends it to me I’ll probably post it here anyways, with permission of course.
0 x
All I’m asking for: grappling hook

User avatar
KliPeH
Moderator
Moderator
Posts: 900
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

Post by KliPeH » Fri Oct 23, 2020 10:04 am

Could it be the Demon script?
0 x
 
Image

User avatar
OREO
Fighter
Fighter
Posts: 45
Joined: Mon Dec 03, 2018 3:18 am
Title: Cookie
SFD Account: OREO
Started SFD: Pre Alpha
Location: Oreo Pack
Gender:
Age: 21

Post by OREO » Fri Oct 23, 2020 6:03 pm

KliPeH wrote:
Fri Oct 23, 2020 10:04 am
Could it be the Demon script?
Yea I had a look at this earlier and I just got to look at the code, its not what I'm looking for, thanks though (also that script doesn't work anymore). Please if you ever hear anything else or find anything let me know (for anyone reading this forum).


Quick Update: It turns out the guy who I played it with was the one who created it, he was really cool with posting it here on the forum. Soon you will be able to see his post.
Last edited by OREO on Sat Oct 24, 2020 4:59 pm, edited 2 times in total.
0 x
All I’m asking for: grappling hook

DottyScotty
Meatbag
Posts: 1
Joined: Sat Oct 24, 2020 5:38 am
Gender:

Post by DottyScotty » Sat Oct 24, 2020 5:57 am

Hey OREO, DottyScotty here, we were the ones that played together on the server! The juggernaut script is one that I created myself! Here is the code that you can put into a text file:

Code: Select all

static Random rand = null;
public void OnStartup(){
	rand = new Random();
	int count = 0;
	int playerCount = 0;

        foreach(IPlayer ply in Game.GetPlayers()){
		playerCount = playerCount + 1;
        }

	int jugger = rand.Next(1, playerCount + 1);

        foreach(IPlayer ply in Game.GetPlayers()){
		count = count + 1;
		if (count == jugger){
			PlayerModifiers modify = ply.GetModifiers();
			modify.MaxHealth = (playerCount - 1) * 100;
			modify.RunSpeedModifier = 1.5f;
			modify.SprintSpeedModifier= 1.5f;
			ply.SetModifiers(modify);
			ply.SetTeam(PlayerTeam.Team1);
			ply.SetHealth((playerCount - 1) * 100);
			Game.ShowPopupMessage(ply.Name + " is the Juggernaut!");	
		}
		else{
			ply.SetTeam(PlayerTeam.Team2);
		}
        }


}
1 x

User avatar
Odex64
Superfighter
Superfighter
Posts: 130
Joined: Sat Jul 29, 2017 12:39 pm
Title: Content Creator
SFD Account: Odex64
Started SFD: PreAlpha
Location: Italy
Gender:
Age: 18

Post by Odex64 » Sat Oct 24, 2020 9:21 am

You probably mean Exsceses' Boss Rush script. He made a lot of "everyone vs boss" scripts but almost all of them are private.
0 x
Image

User avatar
OREO
Fighter
Fighter
Posts: 45
Joined: Mon Dec 03, 2018 3:18 am
Title: Cookie
SFD Account: OREO
Started SFD: Pre Alpha
Location: Oreo Pack
Gender:
Age: 21

Post by OREO » Sat Oct 24, 2020 4:57 pm

DottyScotty wrote:
Sat Oct 24, 2020 5:57 am
Hey OREO, DottyScotty here, we were the ones that played together on the server! The juggernaut script is one that I created myself! Here is the code that you can put into a text file:
Ayee! Thanks BOSS! We appreciate that script! I’m glad someone made it! What a beast! I’m surprised of how you did it with such little code, it’s really clean/understandable nice logic 👍 .
2 x
All I’m asking for: grappling hook

User avatar
OREO
Fighter
Fighter
Posts: 45
Joined: Mon Dec 03, 2018 3:18 am
Title: Cookie
SFD Account: OREO
Started SFD: Pre Alpha
Location: Oreo Pack
Gender:
Age: 21

Post by OREO » Thu Oct 29, 2020 3:39 am

HELOO! I sure hope the moderators don't get mad at me for "double posting" or whatever that's called.

ANYWAYS, so we've been slightly editing the script with the goal of posting the finished product on the steam workshop, and so far the juggernaut has extra hp, height, movement speed, knockback on kicks/punches/throws (after grab), which is exactly what we want. Something else that we would like is for the juggernaut to be able to throw objects a lot further (and maybe jump higher?).

I know there was a throw mod script like that but it's messy (with more than 400 lines of code) and it has to refer to every single item on the game from cue-sticks and bottles to rifles and mines. Anyone know if there's a modifier of some sort that makes a player's "throwing power" stronger? I know the developers managed to do it for the strength boost powerup.

Here's what we have so far, please feel free to post your edits here :)

Code: Select all

static Random rand = null;
public void OnStartup(){
	rand = new Random();
	int count = 0;
	int playerCount = 0;

        foreach(IPlayer ply in Game.GetPlayers()){
		playerCount = playerCount + 1;
        }

	int jugger = rand.Next(1, playerCount + 1);

        foreach(IPlayer ply in Game.GetPlayers()){
		count = count + 1;
		if (count == jugger){
			PlayerModifiers modify = ply.GetModifiers();
			modify.MaxHealth = (playerCount - 1) * 250;    //sets max health
			modify.RunSpeedModifier = 1.5f;      //makes there base speed faster
			modify.SprintSpeedModifier= 1.5f;	 //makes there sprint speed faster
			modify.SizeModifier= 2.0f;           //added size
			modify.MeleeForceModifier= 2.5f;     //added strength, so the kicks, grabs, and punches have more knockback
			//from this line of code onward, I'd like someone to add strength to the juggernaut's overal throwing power (more distance and speed), and maybe more vertical jump distance
			ply.SetModifiers(modify);
			ply.SetTeam(PlayerTeam.Team1);
			ply.SetHealth((playerCount - 1) * 250);  //sets starting health
			Game.ShowPopupMessage(ply.Name + " is the Juggernaut!");	
		}
		else{
			ply.SetTeam(PlayerTeam.Team2);
		}
        }
}

//Refer to this link for more modifyers and stuff file:///C:/Program%20Files%20(x86)/Steam/steamapps/common/Superfighters%20Deluxe/Content/Data/misc/ScriptAPI/html/class_s_f_d_game_script_interface_1_1_player_modifiers.html#a3a807b1a32eab2484f5d9f7c7d77617d//
0 x
All I’m asking for: grappling hook

User avatar
Odex64
Superfighter
Superfighter
Posts: 130
Joined: Sat Jul 29, 2017 12:39 pm
Title: Content Creator
SFD Account: Odex64
Started SFD: PreAlpha
Location: Italy
Gender:
Age: 18

Post by Odex64 » Thu Oct 29, 2020 2:14 pm

I don't even know why I'm writing this (apparently I've got a lot of free time).

First of all I'd fix your script before adding further throw and super jumps. I noticed your friend declared 3 useless variables and did 2 foreach loops (which aren't necessary); a much better way to take the boss is declaring an IPlayer variable and directly assign it to a random player..

Code: Select all

IPlayer ply = Game.GetPlayers()[rand.Next(Game.GetPlayers().Count())];
this piece of code will make your script shorter and better ^^.
You can also assign modifiers and profiles in just one line of code, just like that:

Code: Select all

ply.SetModifiers(new PlayerModifiers() { CurrentHealth = 300, MeleeForceModifier = 2 }); //ETC..
You can use the PlayerWeaponRemoved event and increase the linear velocity to make longer throws.

You can also use a the UpdateCallback or PlayerMeleeActionCallback to make super jumps (increase the (y)linear velocity).


Said that, good luck with improving and finishing your script.
1 x
Image

User avatar
OREO
Fighter
Fighter
Posts: 45
Joined: Mon Dec 03, 2018 3:18 am
Title: Cookie
SFD Account: OREO
Started SFD: Pre Alpha
Location: Oreo Pack
Gender:
Age: 21

Post by OREO » Thu Oct 29, 2020 8:44 pm

Odex64 wrote:
Thu Oct 29, 2020 2:14 pm
You can use the PlayerWeaponRemoved event and increase the linear velocity to make longer throws.

You can also use a the UpdateCallback or PlayerMeleeActionCallback to make super jumps (increase the (y)linear velocity).

Said that, good luck with improving and finishing your script.
Thanks a lot for the steering us to the right direction, your advice is much appreciated 👍
0 x
All I’m asking for: grappling hook

Post Reply