Changing ArmorMax and AmmoGain @Melee

Moderator: NADEO

Post Reply
User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Changing ArmorMax and AmmoGain @Melee

Post by insomnia-yamyam »

Hi folks,

i hope this is the right place/forum to ask, if not please move the thread. thanks.

Question:
I would like to change AmmoGain and ArmorMax in Melee Mode.
Years ago i've done it on the script itself. Is this still possible? Heared there have been a lot of changes in the past years. I am just too lazy to search :mrgreen: so maybe someone here could help me more quick.

Thanks! :thumbsup:

Code: Select all

			foreach (Player in Players) {
				// Spawn 
				Player.ArmorMax = x;
				Player.AmmoGain = x;
				if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::NotSpawned && !Player.RequestsSpectate) {
					SpawnPlayers(Player);
				}
			}
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Changing ArmorMax and AmmoGain @Melee

Post by Eole »

Hello,

A lot have changed, but AmmoGain and ArmorMax remained the sames, so you gave the answer. ^^

In the case of Melee I think it's better to set AmmoGain and ArmorMax only when spawning the player, so I just moved them into the "if" section. Even better would be to do it inside the SpawnPlayers() function.
ArmorMax is an Integer, 100 ArmorMax = 1 armor point. AmmoGain is a Real between 0.0 and 10.0.

Code: Select all

foreach (Player in Players) {
            // Spawn 
            if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::NotSpawned && !Player.RequestsSpectate) {
               Player.ArmorMax = 400;
               Player.AmmoGain = 2.5;
               SpawnPlayers(Player);
            }
         }
If it's something you want to adjust often you can create two new settings.

Code: Select all

// At the beginning of the script
#Setting S_ArmorMax  2   as _("Maximum number of armors")
#Setting S_AmmoGain 1.  as _("Ammo gain")

// Then in the spawn function
if (S_ArmorMax > 0) Player.ArmorMax = S_ArmorMax * 100;
if (S_AmmoGain  >= 0. && S_AmmoGain <= 10.) Player.AmmoGain = S_AmmoGain ;
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Re: Changing ArmorMax and AmmoGain @Melee

Post by insomnia-yamyam »

Thanks Eole :thumbsup:

But which script will be the correct one currently if doing this changes? I haven't had a look into the new structure, but someone told me the main script (like i remember 2 years ago) have been splitted into several script files. So which one i need to modify?

Thanks :thx:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Changing ArmorMax and AmmoGain @Melee

Post by Eole »

It's directly in the Melee script. If you modify the script for the server it should be inside /UserData/Scripts/Modes/ShootMania/Melee.Script.txt. The function spawning the players is at the bottom of the file, you can set ArmorMax and AmmoGain just above.
;)
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Re: Changing ArmorMax and AmmoGain @Melee

Post by insomnia-yamyam »

Excellent, thanks for your help, gonna try it now. :clap:

May i ask in this context if it is still possible to set the min size of the offzone in royal mode?
2 years ago i've done:

Code: Select all

#Const C_OffZoneMinRadius		22.
Can i still use it? And how, as there is no Royal Script available anymore :shock:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Changing ArmorMax and AmmoGain @Melee

Post by Eole »

Royal has been moved to it's own title pack with an official ladder. The script can't be edited anymore in this title pack.
However, the script is still available and updated on GitHub. So you can host a custom royal server in the Storm station if you want.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Re: Changing ArmorMax and AmmoGain @Melee

Post by insomnia-yamyam »

Ok cool, but if i open a custom royal server, based on my own script, which ladder will it be connected to then and does a custom royal server has any disadvantage compared to a "normal" one?
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
fng_thatoneguy
Posts: 722
Joined: 05 Jan 2011, 18:06
Location: That One Place
Contact:

Re: Changing ArmorMax and AmmoGain @Melee

Post by fng_thatoneguy »

It is connected to the regular "Storm" title ladder. We do the same thing with our Team FNG Royal server, because we liked the old pre-beta 2 rules (tighter offzone and one-hit rails.)
Image
User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Re: Changing ArmorMax and AmmoGain @Melee

Post by insomnia-yamyam »

Oh , to the regular Storm Ladder?! :(

Too bad nadeo isn't providing the possibility of "flexible" royal servers (other scriptsettings) while beeing rewarded with royal-LP. But thanks fot the info fng_thatoneguy !
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
fng_thatoneguy
Posts: 722
Joined: 05 Jan 2011, 18:06
Location: That One Place
Contact:

Re: Changing ArmorMax and AmmoGain @Melee

Post by fng_thatoneguy »

You're right, it is a little weird, but it hasn't really been that big of a deal for us. It was easy to get over for us.
Best of luck with it!
Image
Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest