Dropping the laser

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

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?)
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

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..
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

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.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

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
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Thu Feb 05, 2009 11:01 pm

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.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

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:
    User avatar
    ai
    Forum addon
     
    Posts: 2131
    Joined: Sun Mar 05, 2006 3:54 pm
    Location: Behind you

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).
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Feb 06, 2009 10:46 am

  • divVerent wrote:Do you want to turn all weapons by 90 degrees then, to see how that would end up?


    I think that would look very bad personally. Dropped weapons should never lie down I believe, they never have and look best standing up. I agree the laser should do the same, so if anyone can please make the dropped laser stand up too. AI had a good idea to make it lied down but it doesn't match all other weapons and compared to the dropped laser standing the standing position looks much better.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 06, 2009 11:29 am

  • No, I just figured because the laser is so thin it would have a very hard time standing up. All the other weapons are actually thicker and could support the gravity without tipping over. Sorry, but the laws of physics came as an impulse to me :P If people really want then yeah, I can make it stand right back up.
    In fact, I'm gonna do that down and the new rotated version is going to be named 'g_laser', while I am going to keep the laying down version as well named 'g_laser_tipped'. Just in case.

    EDIT: Ok, as of now, it's all updated.
    Link: http://ai.planetnexuiz.de/Models/Weapons/
    User avatar
    ai
    Forum addon
     
    Posts: 2131
    Joined: Sun Mar 05, 2006 3:54 pm
    Location: Behind you

Fri Feb 06, 2009 12:20 pm

  • ai wrote:No, I just figured because the laser is so thin it would have a very hard time standing up. All the other weapons are actually thicker and could support the gravity without tipping over. Sorry, but the laws of physics came as an impulse to me :P If people really want then yeah, I can make it stand right back up.
    In fact, I'm gonna do that down and the new rotated version is going to be named 'g_laser', while I am going to keep the laying down version as well named 'g_laser_tipped'. Just in case.


    Looks much better now :) Your idea was good but the problem is that even if the laser is more thin and tall all dropped weapons are meant to stand up, and I think they look better that way too. The sniper and UZI are an example, they are very thin and much taller but still stand up so the laser is better doing the same I believe.

    Anyway I was testing it again and got the impression this drop model is be a tiny bit too big now. Could you make it a little bit smaller maybe, I think that would look better. Wanted to do that myself but cannot find a md3 importer / exporter for blender which includes the model textures as well :(
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 06, 2009 12:58 pm

  • There is no good enough md3 exporter for Blender unfortunately, the textures and stuff gets messed up when importing md3's to Blender.
    Could you take a screen on current model and how big/small you would want it, arbitrary scaling the model down would be a bit of trail and error :P If I see an indication (like how big you would want it in comparison to the mortar) I could more easily scale it down correctly.
    User avatar
    ai
    Forum addon
     
    Posts: 2131
    Joined: Sun Mar 05, 2006 3:54 pm
    Location: Behind you

Fri Feb 06, 2009 1:39 pm

  • Okay, did the needed code changes. Laser now CAN be thrown, if it is not a starting weapon.

    The rule now is: all weapons can be thrown, unless they're a starting weapon that takes no ammo.

    So if you set g_start_weapon_laser 0, you can now throw it, if you somehow got one (e.g. through sv_cheats and impulse 99).
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Feb 06, 2009 2:50 pm

  • ai wrote:Could you take a screen on current model and how big/small you would want it, arbitrary scaling the model down would be a bit of trail and error :P If I see an indication (like how big you would want it in comparison to the mortar) I could more easily scale it down correctly.


    Sure. This is what I had in mind:

    Image

    The main issue is that the laser looks too big compared to the shotgun and a few other weapons if any are also dropped nearby.

    divVerent wrote:Okay, did the needed code changes. Laser now CAN be thrown, if it is not a starting weapon.

    The rule now is: all weapons can be thrown, unless they're a starting weapon that takes no ammo.

    So if you set g_start_weapon_laser 0, you can now throw it, if you somehow got one (e.g. through sv_cheats and impulse 99).


    I fully agree with that method. However I was testing again with my pinata mutator and I think one thing was missed in the new code: If you do manage to drop a laser on the ground while the laser is a start weapon you still can't pick it up. Imo I think that any weapon dropped on the ground should always be pickable, be it a start weapon with or without ammo. How and if you are allowed to -drop- it is what should judge.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 06, 2009 2:55 pm

  • No, the rule against that is that you can't pick up a weapon if its ammo is already maxed out and you have the weapon already. This is intentional. Looks like Pinata has to prevent throwing a laser then...
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Feb 06, 2009 2:57 pm

  • divVerent wrote:No, the rule against that is that you can't pick up a weapon if its ammo is already maxed out and you have the weapon already. This is intentional. Looks like Pinata has to prevent throwing a laser then...


    My idea was that in case the weapon does not use any ammo it can be picked up (disappear from the ground while generating the pickup sound) but not change anything for the player. Do you think that could be a good idea instead? I kinda like the pinata mutator throwing the laser as well now really :)
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 06, 2009 3:01 pm

  • Well, the existing rule of picking up has a reason (so you get feedback for it being useless to even try to pick it up).

    Quake 1, 2, 3 also do the same - if you're maxed out on health or some ammo type, you can't collect it any more.

    On the other hand, laser should get a secondary mode that does take ammo. Would fix that too :P
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Feb 06, 2009 3:04 pm

  • Yeah, I guess that is true. I was just thinking of an exception only for weapons which cannot grant any ammo, since in the case of the laser you cannot be maxed out since it uses none, but you're right with that I guess.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 06, 2009 3:11 pm

Fri Feb 06, 2009 9:20 pm

  • Does that mean you can't pick up laser even if you are without any weapon?
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sat Feb 07, 2009 10:30 am

  • Nope. You CAN pickup the laser - ONLY if by some reason you have no laser.
    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.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Feb 07, 2009 11:17 am

Sat Feb 07, 2009 11:54 am

  • Chubby wrote:a come on ppl, laser is a weapon you always need. Why should you drop it?


    There are gametypes like Race where you may start without it. I think the idea of not dropping a weapon with no ammo only if it's a start weapon is a great one while all weapons should be ready to be dropable.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Mon Feb 09, 2009 4:27 am

  • divVerent wrote:Well, the existing rule of picking up has a reason (so you get feedback for it being useless to even try to pick it up).

    Quake 1, 2, 3 also do the same - if you're maxed out on health or some ammo type, you can't collect it any more.

    On the other hand, laser should get a secondary mode that does take ammo. Would fix that too :P


    My head is getting boggled with looking over this thread. I'm no developer, but if anything should happen to the laser I think it should be made possible to dual-wield via a mutator. The primary would fire the left laser and the secondary would fire the right laser. As for normal gametypes without the mutator picking up the weapon won't do squat. If it absolutely requires to be coded to do something I would say make it... uhh... I guess make it... I don't know give you like an extra shotgun shell or something EXTREMELY minor.
    I have left this website with the rest of the GPL Nexuiz community. You can find us at Xonotic.org
    User avatar
    Lee_Stricklin
    Alien trapper
     
    Posts: 404
    Joined: Sat Jun 21, 2008 8:42 pm
    Location: Midwest



Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest