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

Author Topic: Custom NPC's?  (Read 2496 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
Custom NPC's?
« on: January 23, 2015, 02:59:44 PM »
These were the most promising feature of SMOD2. Would love to see them make a return. Here is a mockup for custom npcs that we made up, that shows things which would be awesome to see in the game. Thanks for looking.

Code: [Select]
// CUSTOM NPC
// Mockup for FIREFIGHT RELOADED

npc_customcombine {  // Custom entity.

"customcombine_class_name1" { // Create a custom combine class.

"Model" {  // Values relating to the model.
"body" { // Define the model we use. More than 1 for randomization.
"models/combine_super_soldier.mdl" "50"
"models/combine_ace.mdl" "25"
}

"gibs" { // Set the model/weight of gibs for this enemy.
"models/gibs/rgib_p1.mdl" "50"
"models/gibs/gib_meat01.mdl" "35"
"models/gibs/h_eyeball.mdl" "10"
}

"rendermode" "1" // See hammer. 1:color, 2:Additive, etc.
"renderamount" "255" // Amount of FX from rendermode; 0-255
"rendercolor" "10 15 150" // RGB (color)
}

"Base" {  // Basic values for npcs.
"Health" "10" // Set this NPC health
"Fov" "45" // NPC field of View cone for spotting threats.
"Blood" "BLOOD_COLOR_RED" // Define the blood type for this npc.
"SpeedMod" "1.0" // Speed multiplier.
"Headshot" "2" // 0:No Headshot; 1:Headshots OK; 2:Has Helmet
"TakeDamageScale" { // Set custom damage scale for this enemy.
"Head" "1.5"
"Chest" "1.15"
"Stomach" "1.0"
"Arm" "1.0"
"Leg" "1.0"
}
}

"Combine" { //Combine specific commands
"KickDamage" "5" // combine kick damage
"KickForce" "20" // Combine kick attack applies physical force.
"KickZForce" "10"  // Apply vertical force to kick for 'launch' effect.
"KickRecoil" { // Combine kick attack shifts players screen.
"pitch" "-0.1 0.22"
"yaw" "0.1 0.25"
}
"KickActivity" "kickattack"  //specify melee attack override animation.

"SuppressiveFire" "5" // How agressive enemy is with suppressing fire.
"Weapons" {  // List available weapons. More than 1 for randomize.
"weapon_smg1" "80"
"weapon_shotgun" "20"
}

"UseGrenades" "1" // Does this npc throw grenades. bool.
"MinGrenades" "2"  // Minimum # of grenades enemy has
"MaxGrenades" "7" Max # of grenades enemy has
"GrenadeThrowTimeMin" "45" // Minimum interval before tossing nade
"GrenadeThrowTimeMax" "190" // Maximum interval before tossing nade
"GrenadeType" { // Type of grenade to use; More than 1 for randomization.
"npc_frag_grenade" "50"
"weapon_anm14" "25"
"custom_explosive_type" "25"
}

"IsElite" "1" // Uses Elite AI extra capabilities
"IsAce" "1" // Uses Ace AI extra capabilities

"Capabilities" { // Copied from SMOD2, no idea what it does.
"CAP_TURN_HEAD" "1"
"CAN_JUMP" "1" // Use Jump Nodes
"MOVE_GROUND" "1" // Use Ground Nodes
"AIM_GUN" "1"
"INNATE_MELEE_ATTACK1" "1"
"SQUAD" "1"
"USE_WEAPONS" "1"
"DUCK" "1" // Use Duck Hint Nodes
"NO_HIT_SQUADMATES" "1"
"ANIMATEDFACE" "1"
"MOVE_SHOOT" "1"
"DOORS_GROUP" "1"
}

"MaxJumpHeight" "64"  //Maximum Units this enemy can jump, if enabled.
"MaxJumpDistance" "128" //Maximum distance NPC can jump, if enabled.
"IgnoreJumpFallDamage" "1" // bool. Ignore fall damage. Force jumps, etc.
}
}
}


Then you could spawn them via mapadd like so (ala SMOD2 style:

Code: [Select]
"npc_customcombine" {
"origin"
"angles"
"keyvalues" {
"class" "your_custom_class_name"
}
}


and even a console command like to spawn in game:
Code: [Select]
npc_create_customcombine <ClassName>

:)

Offline Bitl

  • *
  • *
  • +7% chance to make useful post
  • Bitl is working their way up.Bitl is working their way up.Bitl is working their way up.
Re: Custom NPC's?
« Reply #1 on: January 23, 2015, 04:08:34 PM »
These were the most promising feature of SMOD2. Would love to see them make a return. Here is a mockup for custom npcs that we made up, that shows things which would be awesome to see in the game. Thanks for looking.

Code: [Select]
// CUSTOM NPC
// Mockup for FIREFIGHT RELOADED

npc_customcombine {  // Custom entity.

"customcombine_class_name1" { // Create a custom combine class.

"Model" {  // Values relating to the model.
"body" { // Define the model we use. More than 1 for randomization.
"models/combine_super_soldier.mdl" "50"
"models/combine_ace.mdl" "25"
}

"gibs" { // Set the model/weight of gibs for this enemy.
"models/gibs/rgib_p1.mdl" "50"
"models/gibs/gib_meat01.mdl" "35"
"models/gibs/h_eyeball.mdl" "10"
}

"rendermode" "1" // See hammer. 1:color, 2:Additive, etc.
"renderamount" "255" // Amount of FX from rendermode; 0-255
"rendercolor" "10 15 150" // RGB (color)
}

"Base" {  // Basic values for npcs.
"Health" "10" // Set this NPC health
"Fov" "45" // NPC field of View cone for spotting threats.
"Blood" "BLOOD_COLOR_RED" // Define the blood type for this npc.
"SpeedMod" "1.0" // Speed multiplier.
"Headshot" "2" // 0:No Headshot; 1:Headshots OK; 2:Has Helmet
"TakeDamageScale" { // Set custom damage scale for this enemy.
"Head" "1.5"
"Chest" "1.15"
"Stomach" "1.0"
"Arm" "1.0"
"Leg" "1.0"
}
}

"Combine" { //Combine specific commands
"KickDamage" "5" // combine kick damage
"KickForce" "20" // Combine kick attack applies physical force.
"KickZForce" "10"  // Apply vertical force to kick for 'launch' effect.
"KickRecoil" { // Combine kick attack shifts players screen.
"pitch" "-0.1 0.22"
"yaw" "0.1 0.25"
}
"KickActivity" "kickattack"  //specify melee attack override animation.

"SuppressiveFire" "5" // How agressive enemy is with suppressing fire.
"Weapons" {  // List available weapons. More than 1 for randomize.
"weapon_smg1" "80"
"weapon_shotgun" "20"
}

"UseGrenades" "1" // Does this npc throw grenades. bool.
"MinGrenades" "2"  // Minimum # of grenades enemy has
"MaxGrenades" "7" Max # of grenades enemy has
"GrenadeThrowTimeMin" "45" // Minimum interval before tossing nade
"GrenadeThrowTimeMax" "190" // Maximum interval before tossing nade
"GrenadeType" { // Type of grenade to use; More than 1 for randomization.
"npc_frag_grenade" "50"
"weapon_anm14" "25"
"custom_explosive_type" "25"
}

"IsElite" "1" // Uses Elite AI extra capabilities
"IsAce" "1" // Uses Ace AI extra capabilities

"Capabilities" { // Copied from SMOD2, no idea what it does.
"CAP_TURN_HEAD" "1"
"CAN_JUMP" "1" // Use Jump Nodes
"MOVE_GROUND" "1" // Use Ground Nodes
"AIM_GUN" "1"
"INNATE_MELEE_ATTACK1" "1"
"SQUAD" "1"
"USE_WEAPONS" "1"
"DUCK" "1" // Use Duck Hint Nodes
"NO_HIT_SQUADMATES" "1"
"ANIMATEDFACE" "1"
"MOVE_SHOOT" "1"
"DOORS_GROUP" "1"
}

"MaxJumpHeight" "64"  //Maximum Units this enemy can jump, if enabled.
"MaxJumpDistance" "128" //Maximum distance NPC can jump, if enabled.
"IgnoreJumpFallDamage" "1" // bool. Ignore fall damage. Force jumps, etc.
}
}
}


Then you could spawn them via mapadd like so (ala SMOD2 style:

Code: [Select]
"npc_customcombine" {
"origin"
"angles"
"keyvalues" {
"class" "your_custom_class_name"
}
}


and even a console command like to spawn in game:
Code: [Select]
npc_create_customcombine <ClassName>

:)
I was actually thinking on creating a base entity then, add some Key Values (like model, headshot stuff, etc.) and allowing the game to use up to 30 of them, like Custom Weapons.

So yes, it will use a modified custom weapons system to create each NPC.
FIREFIGHT RELOADED: GET IT NOW ON STEAM! http://store.steampowered.com/app/397680

crack tales, ooo-ooo

My Blog

"They are rage, brutal, without mercy. But you. You will be worse. Rip and tear, until it is don

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: Custom NPC's?
« Reply #2 on: January 24, 2015, 04:56:33 PM »
Well there wouldn't be anyway to just let the user have an unlimited amount of custom combine class types (using only one script file)?

For example:
Code: [Select]
npc_customcombine {  // Custom entity.

"super_combine" { // Create a custom combine class.

"Key" "Value"
"Key" "Value"
"Key" "Value"
}

"fast_combine" { // Create a custom combine class.

"Key" "Value"
"Key" "Value"
"Key" "Value"
}

"cloaked_combine" { // Create a custom combine class.

"Key" "Value"
"Key" "Value"
"Key" "Value"
}
}

and then the player could just select which class name they want, like:

Code: [Select]
"npc_customcombine" {
"origin" "x y z"
"angles" "x y z"
"keyvalues" {
"class" "fast_combine"
}
}


[code]"npc_customcombine" {
"origin" "x y z"
"angles" "x y z"
"keyvalues" {
"class" "cloaked_combine"
}
}

and then have it just search the script for that class and load all the values (like it did in SMOD2).

I'm only asking because I don't know if you had thought of that, or if its just out of the scope of the project? If 30 custom soldiers is all we get I will take it,  but I'd love to see a dynamic system like this (SMOD2 style).

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: Custom NPC's?
« Reply #3 on: January 24, 2015, 05:22:43 PM »
I mean, if the limit is just another source limitation, (I've said this before) I would rather deal with bugs with infinite custom weapons/npcs/grenades/whatever than be limited in what you can do in something that is supposed to be customizeable. However, the scope of this project I'm guessing is that this isn't supposed to be customized to the scope SMOD originally was, so I suppose the limits are alright. I would still have the infinite stuff.

Also, if we're running out of space now with custom weapons, we are going to REAAALLY get limited with NPCs. If you had (or like 999) you could do some really neat stuff, like dedicated navigators, infantrymen, AT soldiers, etc like in games like X-COM. That would be incredible in combat, already improving on the excellent combine AI (If you don't realize how good it is, go in GMOD and put some cover down in a large open space, and then put a squad fighting some rebels and watch as they cover each other and communicate)

If we had access to that level of customization, it might be unparalleled to pretty much anything to the ease of use to make a detailed gameplay experience (sound like i'm talking out of my ass right now I swear to god) without having to learn much code. The only thing you would have to learn is some very simple Lua (an already extremely easy language to learn if you have some time).

Also, would it be possible to expose some ironsight variables for the console so you can really fine tune ironsights in your mini-mod? Stuff like ironsight move rate, smoothing on the movement, possibly even doing some crazy stuff like dulling animations (I'm not sure if this is possible without some crazy idle blending). Just saying this while I'm here.
MLG