NPCs using scopes -1 reply

Please wait...

Chickenfeed

I don't spend enough time here

50 XP

26th January 2008

0 Uploads

27 Posts

0 Threads

#1 10 years ago

Basically, I've given Wolf an AK74 and a PSO scope, but he doesn't have it attached to his gun. Do I have to do something else to get it on his gun or can't they use scopes?

Thanks




Guest

I didn't make it!

0 XP

 
#2 10 years ago

Best bet is to attach it before you give them the gun.




Guest

I didn't make it!

0 XP

 
#3 10 years ago
bando144;4244298Best bet is to attach it before you give them the gun.

I just have a quick question about gving NPC's guns....

It seems like I have no luck giving them something unless they ar unarmed like nimble.....

Is there a trick to getting them to accept a new gun?




Guest

I didn't make it!

0 XP

 
#4 10 years ago

Trading? I dont remember how vanilla stalker works anymore. I havnt played it in ages. I usualy just find a gun better then theres and trade it to them. Works for me. I think it worked in vanilla too.




shadow_state

The Internet ends at GF

50 XP

27th January 2008

0 Uploads

107 Posts

0 Threads

#5 10 years ago

If you open up gamedata\\config\\gameplay\\character_desc_darkvalley.xml and search for NAP1 (this is the code name for "Bullet") you will see this code, it is a good reference for spawning NPCs with wpn addons:

[spawn] \n wpn_pb \n ammo_9x18_fmj \n wpn_abakan = 1, scope \n ammo_5.45x39_ap = 1 \n wpn_addon_scope \n

You will see that it pay to give him the scope, and set it to be attached to the rifle. Note, if you want to do the same for NATO wpns, it will need to look like this:

[spawn] \n wpn_walther \n ammo_9x19_pbp \n wpn_lr300 = 1, grenade_launcher_m203, silencer, scope_susat \n ammo_5.56x45_ap = 1 \n wpn_addon_scope_susat = 1 \n wpn_addon_silencer = 1 \n wpn_addon_grenade_launcher_m203 = 1 \n

Shadow Out.




Chickenfeed

I don't spend enough time here

50 XP

26th January 2008

0 Uploads

27 Posts

0 Threads

#6 10 years ago

shadow_state;4245238If you open up gamedata\\config\\gameplay\\character_desc_darkvalley.xml and search for NAP1 (this is the code name for "Bullet") you will see this code, it is a good reference for spawning NPCs with wpn addons:

[spawn] \n wpn_pb \n ammo_9x18_fmj \n wpn_abakan = 1, scope \n ammo_5.45x39_ap = 1 \n wpn_addon_scope \n

You will see that it pay to give him the scope, and set it to be attached to the rifle. Note, if you want to do the same for NATO wpns, it will need to look like this:

[spawn] \n wpn_walther \n ammo_9x19_pbp \n wpn_lr300 = 1, grenade_launcher_m203, silencer, scope_susat \n ammo_5.56x45_ap = 1 \n wpn_addon_scope_susat = 1 \n wpn_addon_silencer = 1 \n wpn_addon_grenade_launcher_m203 = 1 \n

Shadow Out.

Thanks for explaining it :)




Chickenfeed

I don't spend enough time here

50 XP

26th January 2008

0 Uploads

27 Posts

0 Threads

#7 10 years ago

Right, it still isn't working. But I think this has nothing to do with the scope anymore. I made a unique weapon for him, and everytime I try to load the game:

Expression : fatal error Function : CInifile::r_section File : E:\stalker\patch_1_0004\xrCore\Xr_ini.cpp Line : 342 Description : Arguments : Can't open section 'wpn_ak74_m2, scope'This is really annoying :mad: This has happened to me before, it seems that if I make more than one unique item, the game breaks...

EDIT: Ah, I think I fixed it, I just added a '= 1' to the 'wpn_ak74_m2' it works now. But I dunno if I can put it into a trader's inventory, that didn't work before either...




Guest

I didn't make it!

0 XP

 
#8 10 years ago

Chickenfeed;4245634Right, it still isn't working. But I think this has nothing to do with the scope anymore. I made a unique weapon for him, and everytime I try to load the game:

Expression : fatal error Function : CInifile::r_section File : E:\stalker\patch_1_0004\xrCore\Xr_ini.cpp Line : 342 Description : Arguments : Can't open section 'wpn_ak74_m2, scope'This is really annoying :mad: This has happened to me before, it seems that if I make more than one unique item, the game breaks...

EDIT: Ah, I think I fixed it, I just added a '= 1' to the 'wpn_ak74_m2' it works now. But I dunno if I can put it into a trader's inventory, that didn't work before either...

Go read through niphtys modding walkthru and you shouldnt have any problems.

I also made a nice gun to give to wolf, and could never get him to equip it, so good luck!!




shadow_state

The Internet ends at GF

50 XP

27th January 2008

0 Uploads

107 Posts

0 Threads

#9 10 years ago

What does your unique_items entry look like? it should be similar to this:

[wpn_ak74_m2]:wpn_ak74 $spawn = "weapons\uniq\wpn_ak74_m2" description = "AK-74 with permanent scope attached" inv_name = "AK-74, Scoped" inv_name_short = "AK-74, Scoped" scope_status = 1

If you do it this way, you won't need to add the scope into the character_desc file.

Like Rkteckt said, make sure you read Niphty's guide: http://forums.filefront.com/s-t-l-k-e-r-modding-editing/307191-basic-modding-playable-examples.html




Chickenfeed

I don't spend enough time here

50 XP

26th January 2008

0 Uploads

27 Posts

0 Threads

#10 10 years ago

I've fixed it now. As I said, I just added a = 1 to the wpn_ak74_m2. Works fine now and Wolf has his very own gun :D Thanks for the help everyone