Dropping the laser

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Dropping the laser

Postby MirceaKitsune » Thu Feb 05, 2009 5:28 pm

I discussed this on IRC yesterday and since this was already talked about with one of my patches I thought to make a topic about it here.

The laser is currently the only non-dropable weapon in the game, which I mostly agree with given the fact a player should not be allowed to have no weapon in most gametypes and picking up a laser offers no advantage as it uses no ammo and is given at spawn time (unless you are in a gametype where the laser is not given to you upon spawning so picking one up can offer the advantage of obtaining it).

However if you use a hackish way to drop the laser it doesn't have a drop model and looks like a small rainbow prism on the ground. So far everyone agrees the laser should have a drop model though I remain to the opinion it should not be dropable in any gametype except Race (as discussed on IRC again, in Race you can start with no weapon including the laser). The Pinata mutator which is currently on hold because of this will probably be an exception as that causes all weapons to be dropped upon a player's death, though picking a laser up would still offer no advantage.

I'm curious what everyone thinks and if anyone is able to fix the laser having no drop model. I don't believe a new model for the laser needs to be made since the drop model should normally be the same model of the gun that you hold attached to your character (3rd person gun model), and the laser not having a drop model is likely just something not specified in the code. I'm also wondering how picking up a hackishly dropped laser in gametypes like DM should act... in my opinion the only thing it should do is be picked up like any weapon when someone walks over it though that wouldn't change anything or offer any advantage (unless the laser could later on become dual-wieldable or upgradable whenever you pick a new one up, in which case it could be dropped only if you were holding it upon death in all gametypes?)
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby esteel » Thu Feb 05, 2009 8:50 pm

The laser currently REALLY does not have a drop-model. only first person and third person models. Thats also the reason why mappers can't put the laser in maps.. which could be a nice touch for race maps or some experimental singleplayer maps.
Basicly all that needs to be done is to get someone to make a drop-model.. the code changes are rather small. But honestly a dropable laser does not make much sense in most default gamemodes as it does not have ammo. And adding ammo would require all maps to be changed.. so even if someone did the model it should probably be restriced to placeable weapons and not drops on death..
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby MirceaKitsune » Thu Feb 05, 2009 10:19 pm

esteel wrote:The laser currently REALLY does not have a drop-model. only first person and third person models.


I thought the third person model is the same as the drop model. I think the 3rd person weapon model can just be copied as the drop model with the only difference of it spinning properly. Actually I'm going to try this myself and see what results the test gives me.

esteel wrote:But honestly a dropable laser does not make much sense in most default gamemodes as it does not have ammo. And adding ammo would require all maps to be changed.. so even if someone did the model it should probably be restriced to placeable weapons and not drops on death..


As I said I agree, dropping the laser in most gametypes would not make much sense. Making the laser use ammo would be a bad idea I believe, it's meant to be an infinite ammo weapon for jumping and backup.

Either way I do agree that a drop model should be put in place just to be there for any situation... it will be used in race and probably in the pinata mutator I was planning on (a mutator which makes a player drop all weapons they are carrying upon death rather then just the one they were holding).
Last edited by MirceaKitsune on Thu Feb 05, 2009 10:37 pm, edited 1 time in total.
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby MirceaKitsune » Thu Feb 05, 2009 10:29 pm

MirceaKitsune wrote:Actually I'm going to try this myself and see what results the test gives me.


Whee, my test was a success! I went in data\models\weapons and copied v_laser.md3 renaming it to g_laser.md3 then used my pinata mutator to test (DM). The laser was dropped and displayed correctly this time with only two problems: The laser model spins around its handle (the spot you hold it from in your hand) rather then around its center, and walking over it does nothing as the code needs to know that a dropped laser can be picked up as well.

Well the dropped laser model does need to be a bit larger too as it's way too small compared to other weapon, but apart from that the only thing that needs to be done on the modeling part is copying v_laser to g_laser and editing its center so it spins correctly otherwise just code changes. Here's a result on how my test looked like:

Image
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby ai » Thu Feb 05, 2009 11:01 pm

Try changing colors while the laser is on the ground. Does something happen? Oh and, make it lay down, not stand like that, it's weird :P
ai
Forum addon
 
Posts: 2131
Joined: Sun Mar 05, 2006 3:54 pm
Location: Behind you

Postby MirceaKitsune » Thu Feb 05, 2009 11:05 pm

ai wrote:Try changing colors while the laser is on the ground. Does something happen? Oh and, make it lay down, not stand like that, it's weird :P


Yes, the laser as well as all other weapons dropped by the person change their color on the ground if the player changes their color after the next respawn.

And standing is probably the best position since all weapons stand up too. I'm trying to see if I can edit md3 files with Blender but don't count on me to as I'm not sure if I can do that.
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby ai » Thu Feb 05, 2009 11:40 pm

Ok, I took a look at it and I hopefully fixed the rotating issue as well as made it lay down on the ground. I only thought that was normal as it standing up would be breaking any sense of gravitational laws. I scaled it up a bit as well made it a tad smaller than the mortar as I figured the laser isn't that big of a weapon.
There's now way I can try this out in any game or map as you cannot place it's entity (yeah I know I can make a custom entity but I'm lazy :P It's 0.37 here for crying out loud :) )

Anyway, here's a link you can download it from: http://ai.planetnexuiz.de/Models/Weapons/
PS. I think the pants and shirt stuff should still work but I leave no guarantee :wink:
ai
Forum addon
 
Posts: 2131
Joined: Sun Mar 05, 2006 3:54 pm
Location: Behind you

Postby MirceaKitsune » Fri Feb 06, 2009 12:15 am

ai wrote:Anyway, here's a link you can download it from:
PS. I think the pants and shirt stuff should still work but I leave no guarantee :wink:


That drop model is perfect. And yes the colors still work and change even if the player changes colors after dropping the laser via death. I'm still unsure if the model should be standing up like the other guns or not though. The sniper for instance is longer in height then width and still stands up and looks better that way... I really think the laser should be standing up and lying down as well.

The only change which needs to be done now is the code one I think. As I said I believe the normal reaction to picking the laser up in a non-race gametype is having it picked up from the ground like any other weapon but no change given to the player. Basically just the weapon disappearing from the ground when you walk over it, playing the pickup sound and posting any "you have picked up X" message in the console if needed.

As for the laser weapon entity, I took care of that and made an updated entities.def with the laser in. I didn't get to test it on a map but it should work correctly. Download it here (this file belongs in data\scripts in the Nexuiz SVN).
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby divVerent » Fri Feb 06, 2009 10:18 am

Well, now that we have a laser pickup model, we could also think about a secondary mode for the laser which maybe DOES take cells. Then dropping a laser would make sense too...

some people had suggested an energy shield for quite some time now.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby divVerent » Fri Feb 06, 2009 10:22 am

ai wrote:Ok, I took a look at it and I hopefully fixed the rotating issue as well as made it lay down on the ground. I only thought that was normal as it standing up would be breaking any sense of gravitational laws.


But all other weapons DO float and rotate. Do you want to turn all weapons by 90 degrees then, to see how that would end up?

Other than that it's great.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron