Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [HELP] woah...this is interesting!! (custom_weapons)  (Read 3751 times)

0 Members and 1 Guest are viewing this topic.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
[HELP] woah...this is interesting!! (custom_weapons)
« on: September 05, 2013, 11:08:46 PM »
you can actually send inputs to the players viewmodel!!!!   :o


weapon_custom keyvalues (for mapadd)

NPCAnimType  = <string> //known: SMG1
EBSprite = <string> //ref: EnergyBullet { SpriteMaterial }
EntClass = <string> //ref: BulletEntitySpawn { Class }
ExpType = <string> //ref: BulletEntitySpawn { Type }


Thoughts: SMOD must convert the values in weapon_custom##.txt scripts into these keyvalues...



« Last Edit: September 06, 2013, 01:49:20 PM by BIZ »

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #1 on: September 06, 2013, 12:23:38 AM »
guys we need help with this, which is why I am making it public. Lets work together to crack this bad boy wide open :)

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #2 on: September 06, 2013, 10:29:46 AM »
How the hell did you find out that???

And so we can actually control the weapon outisde the script?

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #3 on: September 06, 2013, 11:47:11 AM »
Is that related to the developer 2 error messages when an npc is equipped with weapon_custom# that pops up about inputs to the weapon?

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #4 on: September 06, 2013, 01:45:53 PM »
Is that related to the developer 2 error messages when an npc is equipped with weapon_custom# that pops up about inputs to the weapon?

no please share

How the hell did you find out that???

And so we can actually control the weapon outisde the script?

possibly, although many things seem to be hidden,
« Last Edit: September 06, 2013, 01:48:43 PM by BIZ »

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #5 on: September 08, 2013, 02:33:57 PM »
Well, I can't get it to work now. I'll have to remove the node list and try again, the last time I saw those errors were when I forgot to add nodes on dm_3houses.

Although I can think of no reason that the lack of nodes would cause weapon input error logs in developer 2.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #6 on: September 08, 2013, 04:23:45 PM »
here is what I have so far and the only real practical use I can think of right now....but if you use the ent_dump command on a custom weapon, you can see some of these keyvalues...and if we could learn more of them, then things could get very interesting.

http://youtu.be/MdHSptyrczY

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #7 on: September 10, 2013, 01:55:45 AM »
That music is tripping me out.

I want to give npcs named weapons, then set the weapons on fire.

Or turn the weapon into spiders or something.

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #8 on: September 13, 2013, 09:45:27 PM »
How about adding a tiny percentage of malfunction that can cause the weapon to stop working in a puff of smoke, like an overcharged cartridge or out-of-battery discharge that renders the gun nonfunctional? Remove the entity and replace with a physics prop of the same worldmodel.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #9 on: September 13, 2013, 10:07:52 PM »
How about adding a tiny percentage of malfunction that can cause the weapon to stop working in a puff of smoke, like an overcharged cartridge or out-of-battery discharge that renders the gun nonfunctional? Remove the entity and replace with a physics prop of the same worldmodel.

Good luck :)

I want to give npcs named weapons, then set the weapons on fire.

actually, if you use the 'additionalequipment' keyvalue for most NPC's, SMOD automatically names their weapons :)

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #10 on: September 14, 2013, 03:25:25 PM »
How about adding a tiny percentage of malfunction that can cause the weapon to stop working in a puff of smoke, like an overcharged cartridge or out-of-battery discharge that renders the gun nonfunctional? Remove the entity and replace with a physics prop of the same worldmodel.

Good luck :)

I want to give npcs named weapons, then set the weapons on fire.

actually, if you use the 'additionalequipment' keyvalue for most NPC's, SMOD automatically names their weapons :)

I never could get "additionalequipment" to work. I assume it's overridden by the npc_weapon_randomize script? Even if I have no entry for that map, the "default map" kicks in.

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #11 on: September 14, 2013, 03:37:15 PM »
yes

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #12 on: September 17, 2013, 11:15:13 AM »
I'll give you something to discuss:

I remember playing custom v_model anims trough mapadd, but they were completely useless,
for eg, if I play act_vm_attachsilencer, animation would play but after animation ends (goes to vm_idle) it would become unsilenced again.
You'd have to make a whole v_model animation handling in mapadd and cfgs, and it's almost impossible
 (I've had enough problems with making weapon slots in cfgs)
Officially Unofficial BSNOOCH Discord:
https://discordapp.com/invite/eBqezeR

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #13 on: September 17, 2013, 02:59:35 PM »
I'll give you something to discuss:

I remember playing custom v_model anims trough mapadd, but they were completely useless,
for eg, if I play act_vm_attachsilencer, animation would play but after animation ends (goes to vm_idle) it would become unsilenced again.
You'd have to make a whole v_model animation handling in mapadd and cfgs, and it's almost impossible
 (I've had enough problems with making weapon slots in cfgs)

There is some evidence that SMOD converts the custom weapon script into keyvalues for the weapon_custom once it is in game. Now I'm not sure how much of the script is converted, but you can see at the top I have posted the keyvalues I have discovered.

We are able to modify an entities keyvalues on the fly either via mapadd or console and probably LUA (i haven't tried).


So if, lets say, the whole script file is converted to keys, particularly the animation overrides section....Then it could very well be possible to change the default idle animations (theoretically).

hows about that :)

Offline Zadaki_L

  • *
  • +1% chance to make useful post
  • Zadaki_L has no influence.
Re: [HELP] woah...this is interesting!! (custom_weapons)
« Reply #14 on: September 17, 2013, 11:33:41 PM »
Well, this brings up an even more interesting idea.

You could have a script that is run each time a weapon is fired. It assigns a random value (from 0 to 1) to a particular variable, and if the variable is within a certain range (say, above 0.999, for a chance of 0.1%) then the script remembers the location of the w_model in a temporary variable, kills the weapon entity the player is using, replaces it with a prop_physics with the same w_model and location. A small env explosion with a puff of smoke and 1hp of damage to the player. Tada, an out-of-battery discharge that kBs the gun.

Or if the variable is above 0.99 (but below 0.999 - essentially a 1% chance) then the viewmodel is forced into the reload animation - the same procedure as if there was a failure to feed or failure to extract.

That could be processor-intensive though, especially for full-auto guns. Though it would only call the random generator on each shot, so that's not too bad.