Modifier les NPC de base

  • Initiateur de la discussion alexis62590
  • Date de début
  • Initiateur de la discussion
alexis62590

alexis62590

Geek suprême
Messages
399
Score réaction
42
Points
140
Bonjour !


Je cherche comment modifier les NPC de base sur darkrp (du genre le corbeaux ect) ou bien en ajouter un qui donne de l'argent quand il meurt.


Cdlt
 
Abstract Exo

Abstract Exo

Geek
Messages
180
Score réaction
21
Points
70
alexis62590 à dit:
Bonjour !


Je cherche comment modifier les NPC de base sur darkrp (du genre le corbeaux ect) ou bien en ajouter un qui donne de l'argent quand il meurt.


Cdlt
En théorie les NPC tués donne déjà une somme d'argent si le paramétrage est bien fait. Hmm >> darkrpmodification >> setting.lua
 
  • Initiateur de la discussion
alexis62590

alexis62590

Geek suprême
Messages
399
Score réaction
42
Points
140
Abstract Exo à dit:
En théorie les NPC tués donne déjà une somme d'argent si le paramétrage est bien fait. Hmm >> darkrpmodification >> setting.lua

Oui mais je voudrais rajouter un NPC dans sa catégorie (celle de base)
ou bien modifier leurs Playermodels
 
Dernière édition:
Yoh Sambre ♪

Yoh Sambre ♪

Shaman Fou
Messages
16 292
Score réaction
9 688
Points
1 845
alexis62590 à dit:
Oui mais je voudrais rajouter un NPC dans sa catégorie (celle de base)
ou bien modifier leurs skin
A votre guise ,

garrysmod/lua/autorun/base_npcs.lua

Code:
-- Don't try to edit this file if you're trying to add new NPCs.
-- Just make a new file and copy the format below.
local function AddNPC( t, class ) list.Set( "NPC", class or t.Class, t )
end
local Category = "Humans + Resistance"
AddNPC( { Name = "Alyx Vance", Class = "npc_alyx", Category = Category, Weapons = { "weapon_alyxgun", "weapon_smg1", "weapon_shotgun" }, KeyValues = { SquadName = "resistance" }
} )
AddNPC( { Name = "Barney Calhoun", Class = "npc_barney", Category = Category, Weapons = { "weapon_smg1", "weapon_shotgun", "weapon_ar2" }, KeyValues = { SquadName = "resistance" }
} )
AddNPC( { Name = "Wallace Breen", Class = "npc_breen", Category = Category
} )
AddNPC( { Name = "Dog", Class = "npc_dog", Category = Category
} )
AddNPC( { Name = "Eli Vance", Class = "npc_eli", Category = Category
} )
AddNPC( { Name = "G-Man", Class = "npc_gman", Category = Category
} )
-- Did you know that this MAN can shoot annabelle like he's been doing it his whole life?
AddNPC( { Name = "Dr. Isaac Kleiner", Class = "npc_kleiner", Category = Category
} )
AddNPC( { Name = "Dr. Judith Mossman", Class = "npc_mossman", Category = Category
} )
-- I don't trust these Vorts, but I'll let em stay in this category until they mess up
AddNPC( { Name = "Vortigaunt", Class = "npc_vortigaunt", Category = Category, KeyValues = { SquadName = "resistance" }
} )
AddNPC( { Name = "Vortigaunt Slave", Class = "npc_vortigaunt", Category = Category, Model = "models/vortigaunt_slave.mdl"
}, "VortigauntSlave" )
AddNPC( { Name = "Rebel", Class = "npc_citizen", Category = Category, SpawnFlags = SF_CITIZEN_RANDOM_HEAD, KeyValues = { citizentype = CT_REBEL, SquadName = "resistance" }, Weapons = { "weapon_pistol", "weapon_ar2", "weapon_smg1", "weapon_ar2", "weapon_shotgun" }
}, "Rebel" )
AddNPC( { Name = "Odessa Cubbage", Class = "npc_citizen", Category = Category, Model = "models/odessa.mdl", KeyValues = { citizentype = CT_UNIQUE, SquadName = "resistance" }
}, "npc_odessa" )
AddNPC( { Name = "Medic", Class = "npc_citizen", Category = Category, SpawnFlags = 8 + 131072, --bit.bor( SF_NPC_DROP_HEALTHKIT, SF_CITIZEN_MEDIC ), KeyValues = { citizentype = CT_REBEL, SquadName = "resistance" }, Weapons = { "weapon_pistol", "weapon_smg1", "weapon_ar2", "weapon_shotgun" }
}, "Medic" )
AddNPC( { Name = "Refugee", Class = "npc_citizen", Category = Category, KeyValues = { citizentype = CT_REFUGEE, SquadName = "resistance" }, Weapons = { "weapon_pistol", "weapon_smg1" }
}, "Refugee" )
AddNPC( { Name = "Citizen", Class = "npc_citizen", Category = Category, KeyValues = { citizentype = CT_DOWNTRODDEN, SquadName = "resistance" }
} )
if ( IsMounted( "ep2" ) ) then AddNPC( { Name = "Uriah", Class = "npc_vortigaunt", Category = Category, Model = "models/vortigaunt_doctor.mdl", KeyValues = { SquadName = "resistance" } }, "VortigauntUriah" ) AddNPC( { Name = "Dr. Arne Magnusson", Class = "npc_magnusson", Category = Category } )
end
if ( IsMounted( "lostcoast" ) ) then AddNPC( { Name = "Fisherman", Class = "npc_fisherman", Category = Category, Weapons = { "weapon_oldmanharpoon" } } ) -- Has no death sequence
end
Category = "Zombies + Enemy Aliens"
AddNPC( { Name = "Zombie", Class = "npc_zombie", Category = Category, KeyValues = { SquadName = "zombies" }
} )
AddNPC( { Name = "Zombie Torso", Class = "npc_zombie_torso", Category = Category, KeyValues = { SquadName = "zombies" }
} )
AddNPC( { Name = "Poison Zombie", Class = "npc_poisonzombie", Category = Category, KeyValues = { SquadName = "poison" }
} )
AddNPC( { Name = "Antlion", Class = "npc_antlion", Category = Category, KeyValues = { SquadName = "antlions" }
} )
AddNPC( { Name = "Antlion Guard", Class = "npc_antlionguard", Category = Category, KeyValues = { SquadName = "antlions" }
} )
AddNPC( { Name = "Barnacle", Class = "npc_barnacle", Category = Category, OnCeiling = true, Offset = 2
} )
AddNPC( { Name = "Fast Zombie", Class = "npc_fastzombie", Category = Category, KeyValues = { SquadName = "zombies" }
} )
AddNPC( { Name = "Headcrab", Class = "npc_headcrab", Category = Category, KeyValues = { SquadName = "zombies" }
} )
AddNPC( { Name = "Poison Headcrab", Class = "npc_headcrab_black", Category = Category, KeyValues = { SquadName = "poison" }
} )
AddNPC( { Name = "Fast Headcrab", Class = "npc_headcrab_fast", Category = Category, KeyValues = { SquadName = "zombies" }
} )
AddNPC( { Name = "Fast Zombie Torso", Class = "npc_fastzombie_torso", Category = Category, KeyValues = { SquadName = "zombies" }
} )
if ( IsMounted( "ep2" ) ) then game.AddParticles( "particles/grub_blood.pcf" ) game.AddParticles( "particles/antlion_gib_02.pcf" ) game.AddParticles( "particles/antlion_worker.pcf" ) AddNPC( { Name = "Antlion Guardian", Class = "npc_antlionguard", Category = Category, KeyValues = { cavernbreed = 1, incavern = 1, SquadName = "antlions" }, Material = "Models/antlion_guard/antlionGuard2" }, "npc_antlionguardian" ) AddNPC( { Name = "Antlion Grub", Class = "npc_antlion_grub", Category = Category, NoDrop = true, Offset = 1 } ) AddNPC( { Name = "Antlion Worker", Class = "npc_antlion_worker", Category = Category, KeyValues = { SquadName = "antlions" } } )
end
if ( IsMounted( "episodic" ) ) then AddNPC( { Name = "Zombine", Class = "npc_zombine", Category = Category, KeyValues = { SquadName = "zombies" } } )
end
Category = "Animals"
AddNPC( { Name = "Father Grigori", Class = "npc_monk", Category = Category, Weapons = { "weapon_annabelle" }
} )
AddNPC( { Name = "Crow", Class = "npc_crow", Category = Category
} )
AddNPC( { Name = "Pigeon", Class = "npc_pigeon", Category = Category
} )
AddNPC( { Name = "Seagull", Class = "npc_seagull", Category = Category
} )
Category = "Combine"
AddNPC( { Name = "Metro Police", Class = "npc_metropolice", Category = Category, Weapons = { "weapon_stunstick", "weapon_pistol", "weapon_smg1" }, SpawnFlags = 8, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Rollermine", Class = "npc_rollermine", Category = Category, Offset = 16, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Turret", Class = "npc_turret_floor", Category = Category, OnFloor = true, TotalSpawnFlags = 0, Rotate = Angle( 0, 180, 0 ), Offset = 2, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Combine Soldier", Class = "npc_combine_s", Category = Category, Model = "models/combine_soldier.mdl", Weapons = { "weapon_smg1", "weapon_ar2" }, KeyValues = { SquadName = "overwatch", Numgrenades = 5 }
} )
AddNPC( { Name = "Shotgun Soldier", Class = "npc_combine_s", Category = Category, Model = "models/combine_soldier.mdl", Skin = 1, Weapons = { "weapon_shotgun" }, KeyValues = { SquadName = "overwatch", Numgrenades = 5 }
}, "ShotgunSoldier" )
AddNPC( { Name = "Prison Guard", Class = "npc_combine_s", Category = Category, Model = "models/combine_soldier_prisonguard.mdl", Weapons = { "weapon_smg1", "weapon_ar2" }, KeyValues = { SquadName = "novaprospekt", Numgrenades = 5 }
}, "CombinePrison" )
AddNPC( { Name = "Prison Shotgun Guard", Class = "npc_combine_s", Category = Category, Model = "models/combine_soldier_prisonguard.mdl", Skin = 1, Weapons = { "weapon_shotgun" }, KeyValues = { SquadName = "novaprospekt", Numgrenades = 5 }
}, "PrisonShotgunner" )
AddNPC( { Name = "Combine Elite", Class = "npc_combine_s", Category = Category, Model = "models/combine_super_soldier.mdl", Weapons = { "weapon_ar2" }, KeyValues = { Numgrenades = 10, SquadName = "overwatch" }, SpawnFlags = 16384
}, "CombineElite" )
AddNPC( { Name = "City Scanner", Class = "npc_cscanner", Category = Category, Offset = 20, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Shield Scanner", Class = "npc_clawscanner", Category = Category, Offset = 20, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Combine Gunship", Class = "npc_combinegunship", Category = Category, Offset = 300, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Combine Dropship", Class = "npc_combinedropship", Category = Category, Offset = 300, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Hunter-Chopper", Class = "npc_helicopter", Category = Category, Offset = 300, Health = 600, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Camera", Class = "npc_combine_camera", Category = Category, OnCeiling = true, Offset = 2, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Ceiling Turret", Class = "npc_turret_ceiling", Category = Category, SpawnFlags = 32, -- SF_NPC_TURRET_AUTOACTIVATE OnCeiling = true, Offset = 0, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Strider", Class = "npc_strider", Category = Category, Offset = 100, KeyValues = { SquadName = "overwatch" }
} )
AddNPC( { Name = "Stalker", Class = "npc_stalker", Category = Category, KeyValues = { squadname = "npc_stalker_squad" }, Offset = 10
} )
AddNPC( { Name = "Manhack", Class = "npc_manhack", Category = Category, KeyValues = { SquadName = "overwatch" }
} )
if ( IsMounted( "ep2" ) ) then AddNPC( { Name = "Hunter", Class = "npc_hunter", Category = Category, KeyValues = { SquadName = "overwatch" } } )
end
if ( IsMounted( "hl1" ) ) then Category = "Half-Life: Source" AddNPC( { Name = "Alien Grunt", Class = "monster_alien_grunt", Category = Category } ) AddNPC( { Name = "Nihilanth", Class = "monster_nihilanth", Category = Category, Offset = 1200 } ) AddNPC( { Name = "Tentacle", Class = "monster_tentacle", Category = Category } ) AddNPC( { Name = "Alien Slave", Class = "monster_alien_slave", Category = Category } ) AddNPC( { Name = "Gonarch", Class = "monster_bigmomma", Category = Category } ) AddNPC( { Name = "Bullsquid", Class = "monster_bullchicken", Category = Category } ) AddNPC( { Name = "Gargantua", Class = "monster_gargantua", Category = Category } ) AddNPC( { Name = "Assassin", Class = "monster_human_assassin", Category = Category } ) AddNPC( { Name = "Baby Crab", Class = "monster_babycrab", Category = Category } ) AddNPC( { Name = "Grunt", Class = "monster_human_grunt", Category = Category } ) AddNPC( { Name = "Cockroach", Class = "monster_cockroach", Category = Category } ) AddNPC( { Name = "Houndeye", Class = "monster_houndeye", Category = Category } ) AddNPC( { Name = "Scientist", Class = "monster_scientist", Category = Category } ) AddNPC( { Name = "Snark", Class = "monster_snark", Category = Category } ) AddNPC( { Name = "Zombie", Class = "monster_zombie", Category = Category } ) AddNPC( { Name = "Headcrab", Class = "monster_headcrab", Category = Category } ) AddNPC( { Name = "Controller", Class = "monster_alien_controller", Category = Category } ) AddNPC( { Name = "Security Officer", Class = "monster_barney", Category = Category } ) --AddNPC( { Name = "Turret", Class = "monster_turret", Category = Category } ) --AddNPC( { Name = "Mini Turret", Class = "monster_miniturret", Category = Category } ) --AddNPC( { Name = "Sentry", Class = "monster_sentry", Category = Category, Offset = -20, OnFloor = true } )
end
 
  • Initiateur de la discussion
alexis62590

alexis62590

Geek suprême
Messages
399
Score réaction
42
Points
140
Merci a toi ^^ J'ai vu que tu aider pas mal sur le forum x'))

J'attend que la maintenance de g-box se finissent :D
 
  • J'aime
Réactions: Yoh Sambre ♪
  • Initiateur de la discussion
alexis62590

alexis62590

Geek suprême
Messages
399
Score réaction
42
Points
140
Euh juste on le met ou le model ^^'
 
Yoh Sambre ♪

Yoh Sambre ♪

Shaman Fou
Messages
16 292
Score réaction
9 688
Points
1 845
alexis62590 à dit:
Merci a toi ^^ J'ai vu que tu aider pas mal sur le forum x'))
EVERYWHERE 4Head , pour la maintenance au vu du bordel de réorganisation ca risque pas d'être fini demain PJSalt mais le site en n'a besoin et ca va faire un bien fou pour la navigation donc ca va au final :)
 
Yoh Sambre ♪

Yoh Sambre ♪

Shaman Fou
Messages
16 292
Score réaction
9 688
Points
1 845
alexis62590 à dit:
Euh juste on le met ou le model ^^'
Nan il te suffit de visité le fichier que j'ai indiquer dans > garrysmod/lua/autorun/base_npcs.lua

libre a toi d'ensuite supprimer des NPC ou edit leur nom ect (concernant l'ajout de drop d'argent il faut passer par un code et les skins du reskin assez basique
 
  • Initiateur de la discussion
alexis62590

alexis62590

Geek suprême
Messages
399
Score réaction
42
Points
140
Ok merci :D je passe en résolu
 
Abstract Exo

Abstract Exo

Geek
Messages
180
Score réaction
21
Points
70
alexis62590 à dit:
Ok merci :D je passe en résolu
Attention cependant. Les modifications de ce fichier entraîne de gros bugs de NPC in game. Les animations, les mouvements et même la visibilité du NPC peuvent être fortement affectés.
 
Yoh Sambre ♪

Yoh Sambre ♪

Shaman Fou
Messages
16 292
Score réaction
9 688
Points
1 845
Abstract Exo à dit:
Attention cependant. Les modifications de ce fichier entraîne de gros bugs de NPC in game. Les animations, les mouvements et même la visibilité du NPC peuvent être fortement affectés.
Lol wtf
 
Abstract Exo

Abstract Exo

Geek
Messages
180
Score réaction
21
Points
70
  • Initiateur de la discussion
alexis62590

alexis62590

Geek suprême
Messages
399
Score réaction
42
Points
140
  • J'aime
Réactions: Yoh Sambre ♪
AyZenSantos

AyZenSantos

Psychopathe
Messages
3 361
Score réaction
753
Points
300
Tuer des pigeons des npcs animaux sa pourrait être bien comme job genre chasseur à chaque fois qu'il tue un animal sa lui donne 50 €
 
Yoh Sambre ♪

Yoh Sambre ♪

Shaman Fou
Messages
16 292
Score réaction
9 688
Points
1 845
AyZenSantos à dit:
Tuer des pigeons des npcs animaux sa pourrait être bien comme job genre chasseur à chaque fois qu'il tue un animal sa lui donne 50 €
Non pas aussi basique
 
Discord d'entraide
Rejoignz-nous sur Discord