[B1][ManiaScript] Arbitrary restrictions

Moderator: NADEO

mattw_cstrfan
Posts: 29
Joined: 14 Sep 2011, 14:13

[B1][ManiaScript] Arbitrary restrictions

Post by mattw_cstrfan »

EDIT: Read my next post below for more information.

So I have a mostly-working gametype script set up that is basically Melee except with weapon changes using the 1, 2, and 3 keys (using cleverness with ManiaLinks and netread/netwrite variables). The only problem is, SetPlayerWeapon refuses to work on a player that's already spawned, instead throwing this error and halting the entire script:

Code: Select all

The procedure SetPlayerWeapon failed to complete :
    Cannot change the default weapon of a spawned player
Indeed, changing weapons before the player finishes spawning works just fine no matter how many times it's done, but as soon as the player gets "Go!" it stops working.

Is there any reason to have this restriction? Allowing gametype scripts to switch players' weapons at will could prove to be an interesting idea, but this pretty much stops it cold.
Last edited by mattw_cstrfan on 12 Jul 2012, 21:10, edited 1 time in total.
User avatar
w1lla
Posts: 2287
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: [B1][ManiaScript] Changing player's weapons after spawni

Post by w1lla »

Code: Select all

foreach (Player in Players) {
if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::Spawned) continue;
SetPlayerWeapon(Player, CSmMode::EWeapon::Laser, False); 
}
	} else {
SetPlayerWeapon(Player, CSmMode::EWeapon::Rocket, False); 
}	
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
mattw_cstrfan
Posts: 29
Joined: 14 Sep 2011, 14:13

Re: [B1][ManiaScript] Changing player's weapons after spawni

Post by mattw_cstrfan »

Just restating what I said in IRC: Putting in

Code: Select all

if (Player.SpawnStatus == CSmPlayer::ESpawnStatus::Spawned) continue;
would indeed stop it from crashing, but it'd also stop players from changing weapons while they're alive, which ... kind of misses the point.



EDIT: So, apparently this is intentional behavior. Ugh. Please, just ... please rethink this.

The only thing these restrictions are doing is harming the game's longevity, really. You advertise a scripting language, but most who attempt to use it will be put off of it after hours of work gets wasted by a built in restriction that makes no sense and completely ruins all of their work.

I can't change max ammo of a player who's alive either. In this case you can actually get around that by setting the player's AmmoGain to 0 when at a certain point but ... why should you even need to do that when there's a perfectly fine function in the game that sets the HUD correctly and everything?

I can do almost nothing with the player's stamina bar. I can neither turn it off completely or give the player more stamina, as both StaminaMax and StaminaGain are restricted to the range of 0.1-1.0.

And yet, I can fully alter a player's armor and armor maximum at any time.

The restrictions are arbitrary and make no sense.



The scripting language is perfectly fine for doing simple things like making everyone have laser/rail gun (by the way, I dislike Instagib servers)... but the more I try to make anything complex with it, the more I risk running into an arbitrary restriction I didn't know about that makes all of my work pointless.

This is not at all how it should be, and it will likely turn a lot of people away from using ManiaScript. Which ... isn't what you want, is it?
Tuta
Translator
Translator
Posts: 31
Joined: 15 Jun 2010, 11:57

Re: [B1][ManiaScript] Changing player's weapons after spawni

Post by Tuta »

This sounds like a real issue that could very much limit the creativity of the community, weird :S
Haven't actually translated anything...

GTX 670 Windforce
I5 3570k
Corsair 8GB 1600mhz
XFX Pro Series 650W
1TB 7200rpm HDD

Edit: More like school laptop nowadays..
User avatar
Awpteamoose
Posts: 76
Joined: 12 Jul 2012, 20:27

Re: [B1][ManiaScript] Changing player's weapons after spawni

Post by Awpteamoose »

I was expecting maniascript to be much more powerful, tbh.
User avatar
haenry
Halloween Mapper 2011
Posts: 1642
Joined: 15 Jun 2010, 12:18

Re: [B1][ManiaScript] Changing player's weapons after spawni

Post by haenry »

So there is really no way to create a weapon change during the round with maniascript? not nice to hear... :?
A nice person is a better person!
Did you participate in a Monthly Track Contest yet?
My Maniaplanet maps!
mattw_cstrfan
Posts: 29
Joined: 14 Sep 2011, 14:13

Re: [B1][ManiaScript] Arbitrary restrictions

Post by mattw_cstrfan »

Bringing this up from an IRC chat with Gugli from this morning:
[07:50] <MattW_CFI> is there any reason ManiaScript can't force a player's weapon to change if that player is alive?
[07:51] <@Gugli[Nadeo]> MattW_CFI: Yep, it's a design choice.
[07:51] <MattW_CFI> Why, though? :x
[07:51] <MattW_CFI> It limits a bunch of rather ingenious ideas
[07:53] <@Gugli[Nadeo]> MattW_CFI: I'm not the one making these decisions, and I know it prevent some new modes, but mostly, it prevent people from doing modes where players don't know what's happening
[07:53] <@Gugli[Nadeo]> MattW_CFI: You can not change the speed in Trackmania, because there's has to be a core-gameplay that never changes
[07:54] <@Gugli[Nadeo]> MattW_CFI: It's the same in Shootmania with weapons after you spawned.
[07:54] <MattW_CFI> That's the thing though
[07:54] <MattW_CFI> you're allowing weapons to be forced, but not if a player is alive
[07:54] <MattW_CFI> it's completely arbitrary and silly
[07:54] <@Gugli[Nadeo]> because, from the player point of view, it's a sudden change in gameplay
[07:54] <MattW_CFI> especially given the player's weapons do automatically change during the course of typical gameplay
[07:55] <@Gugli[Nadeo]> On certain specific blocs, the player learns thoses blocks
[07:56] <@Gugli[Nadeo]> The purpose is, whatever the mode, you can increase your playing skills
[07:56] <@Gugli[Nadeo]> When you try a new mode, you just have to learn new strategies, tactics
[07:56] <@Gugli[Nadeo]> but no new ways to use the weapons/environement
[07:57] <@Gugli[Nadeo]> bumpers and such are "physical"
[08:00] <MattW_CFI> And yet I can also force-set players' ammunition as well, regardless of spawn status
[08:01] <MattW_CFI> It seems entirely arbitrary and silly :x
[08:03] <MattW_CFI> Because, well, I can allow players to choose how much ammunition their rocket launcher has with the press of a button, but I can't do something that would likely seem more logical to most and allow weapon switching at the press of a button
[08:07] <MattW_CFI> I just really wish you'd rethink it, Gugli[Nadeo], as it seems you're limiting ManiaScript for ... rather unusual reasons
It's already very possible for creators of gametypes - or even mappers - to do something that confuses the player. I've seen at least one Royal map that added a camera shake effect whenever you were on the rail platform, which of course threw off the aiming of everyone that tried to use it. Does this mean the MediaTracker should be harshly limited as well to stop mappers from doing stupid things? If you ask me, I think not. Likewise, ManiaScript shouldn't be limited for similar reasons.

Not like I'm asking to alter the movement speed or anything deeply embedded in the game like that, I just simply want to allow things like max ammo/weapon changes for those that are alive. I highly doubt anyone who first sees the definition of "SetPlayerWeapon" will think it's restricted in the manner that it is. :x
Aso
Posts: 3
Joined: 22 Jul 2010, 13:37

Re: [B1][ManiaScript] Arbitrary restrictions

Post by Aso »

This seems very limiting for the creativity of new gametype developers. It would have been fun if there was more flexibility with it.
redding
Posts: 12
Joined: 05 Jul 2012, 01:13

Re: [B1][ManiaScript] Arbitrary restrictions

Post by redding »

Nadeo, custom maps and mods are what will make your game last and be fun. The more restrictions you put on your game, the faster it will die.
User avatar
Slig
Posts: 637
Joined: 15 Jun 2010, 11:52
Location: TraXicoLand

Re: [B1][ManiaScript] Arbitrary restrictions

Post by Slig »

mattw_cstrfan wrote:Not like I'm asking to alter the movement speed or anything deeply embedded in the game like that, I just simply want to allow things like max ammo/weapon changes for those that are alive. I highly doubt anyone who first sees the definition of "SetPlayerWeapon" will think it's restricted in the manner that it is. :x
I was very surprised when testing/seeing that too, 2 days ago.
That's strange and limitating, essentially for ammo/weapon : players are used to have weapon changes in many fps. And btw it's what the game do itself with the railgun platform, isn't it ?
Locked

Return to “Shootmania Storm Reports”

Who is online

Users browsing this forum: No registered users and 1 guest