ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
need help with adding unique weapon to the game

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  19:16:27  20 October 2012
profilee-mailreply Message URLTo the Top
Heinzfaust
Senior Resident
 

 
On forum: 04/07/2007
 

Message edited by:
Heinzfaust
10/20/2012 19:17:35
Messages: 201
need help with adding unique weapon to the game

Hi,

I'm trying to create a unique Vintorez that has a magazine capacity of 20 rounds.

I added this section to gamedata\config\unique_items.ltx


[wpn_vintorez_m1]:wpn_vintorez		;unique vintar bc
$spawn             				= "weapons\wpn_vintorez"	
$npc                     	= on
description						= enc_weapons1_wpn-vintorez_m1
inv_name						= wpn-vintorez_m1
inv_name_short					= wpn-vintorez_m1
inv_grid_width				= 5
inv_grid_height				= 2
inv_grid_x					= 0
inv_grid_y					= 4
ammo_mag_size					= 20



Then I added this to gamedata\config\text\eng\string_table_enc_weapons.xml

	</string>
	<string id="enc_weapons1_wpn-vintorez_m1">
		<text>A modified version of the VSS Vintorez, capable of fitting larger magazines.\n Ammunition:\n standard 9x39 mm PAB-9,\n armor-piercing 9x39 mm SP-6,\n sniper 9x39 mm SP-5.</text>
	</string>


And:

	<string id="wpn-vintorez_m1">
		<text>Modified VSS Vintorez</text>
	</string>


Then I added the gun to the Duty trader at the bar using the file: gamedata\config\misc\trade_dolg.ltx

In section [dolg_generic_buy]:
wpn_vintorez_m1 = 1, 0.3

In section [supplies_after_rg6]:
wpn_vintorez_m1 = 1, 0.7

In section [dolg_after_rg6_sell]:
wpn_vintorez_m1 = 1, 3

As soon as I walk halfway into the Bar level the game crashes to desktop (I assume it's the exact moment that the Duty trader is being loaded into the game).

Any ideas on what could be wrong here?
Is there a way to view a log after a CTD?

Thanks very much!!
  19:20:03  20 October 2012
profilee-mailreply Message URLTo the Top
xRatx
Senior Resident
 

 
On forum: 06/18/2008
 

Message edited by:
xRatx
10/20/2012 19:21:12
Messages: 1592
I guess that the crash log may be "can't find rank for wpn_***"
You need to add the new "unique" weapon to the mp_ranks.ltx in order to fix.

Regarding your question of the crash log, crash log are located in :
English XP: C:\Documents and Settings\All Users\Documents\STALKER-SHOC\logs
English Vista\Win7 : C:\Users\Public\Documents\STALKER-SHOC\logs
  19:43:06  20 October 2012
profilee-mailreply Message URLTo the Top
Heinzfaust
Senior Resident
 

 
On forum: 04/07/2007
Messages: 201

---QUOTATION---
I guess that the crash log may be "can't find rank for wpn_***"
You need to add the new "unique" weapon to the mp_ranks.ltx in order to fix.

Regarding your question of the crash log, crash log are located in :
English XP: C:\Documents and Settings\All Users\Documents\STALKER-SHOC\logs
English Vista\Win7 : C:\Users\Public\Documents\STALKER-SHOC\logs
---END QUOTATION---



Thanks for your help, but adding the gun to mp_ranks.ltx didn't help.
Here's the crash log:


FATAL ERROR
 
[error]Expression    : fatal error
[error]Function      : CInifile::r_section
[error]File          : E:\stalker\sources\trunk\xrCore\Xr_ini.cpp
[error]Line          : 342
[error]Description   : <no expression>
[error]Arguments     : Can't open section 'wpn_vintorez_m1'
 

  20:24:48  20 October 2012
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
 

Message edited by:
FatalFunnel
10/20/2012 20:25:07
Messages: 133

---QUOTATION---
I guess that the crash log may be "can't find rank for wpn_***"
You need to add the new "unique" weapon to the mp_ranks.ltx in order to fix.

Regarding your question of the crash log, crash log are located in :
English XP: C:\Documents and Settings\All Users\Documents\STALKER-SHOC\logs
English Vista\Win7 : C:\Users\Public\Documents\STALKER-SHOC\logs

Thanks for your help, but adding the gun to mp_ranks.ltx didn't help.
Here's the crash log:


FATAL ERROR
 
[error]Expression    : fatal error
[error]Function      : CInifile::r_section
[error]File          : E:\stalker\sources\trunk\xrCore\Xr_ini.cpp
[error]Line          : 342
[error]Description   : <no expression>
[error]Arguments     : Can't open section 'wpn_vintorez_m1'
 


---END QUOTATION---



"Can't open section" errors can be a number of things, usually this is caused by either the section not being named correctly, or it being an .ltx file that isn't included, however, your section is named correctly, and it's in the unique_items.ltx, the section also refers to an existing weapon.

xRatx is right, it could be the weapon is not included in the mp_ranks.ltx. If it's not that, try copying the vintorez config file into a new .ltx file and name it wpn_vintorezm1.ltx then rename each section to avoid duplicates, and include it in both the weapons.ltx and the mp_ranks.ltx
  22:05:48  20 October 2012
profilee-mailreply Message URLTo the Top
Muad'Dib
Senior Resident
 

 
On forum: 01/24/2011
 

Message edited by:
Muad'Dib
10/20/2012 22:07:00
Messages: 421
I had the same error when i added the mosin nagent in my mod.

The writing was good, and i don't forget files.
To correct it, i added the mosin in all trader .ltx files (with ;NO TRADE).
And it was ok.

I didn't understand why. Maybe it's cause by trader_generic.ltx.
  22:07:32  20 October 2012
profilee-mailreply Message URLTo the Top
angrydog
Senior Resident
 

 
On forum: 09/01/2009
 

Message edited by:
angrydog
10/20/2012 22:27:48
Messages: 3341

---QUOTATION---
need help with adding unique weapon to the game

Hi,

I'm trying to create a unique Vintorez that has a magazine capacity of 20 rounds.

I added this section to gamedata\config\unique_items.ltx

---END QUOTATION---



needs to be gamedata\config\misc\unique_items.ltx

since your modded file is in the wrong directory, the engine is using the vanilla file; hence it Can't open section 'wpn_vintorez_m1'
  23:31:06  20 October 2012
profilee-mailreply Message URLTo the Top
Heinzfaust
Senior Resident
 

 
On forum: 04/07/2007
Messages: 201

---QUOTATION---


needs to be gamedata\config\misc\unique_items.ltx

since your modded file is in the wrong directory, the engine is using the vanilla file; hence it Can't open section 'wpn_vintorez_m1'
---END QUOTATION---



zomg.
I r newb
u ist teh ownzor...

thanks!
  01:50:09  21 October 2012
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133

---QUOTATION---
need help with adding unique weapon to the game

Hi,

I'm trying to create a unique Vintorez that has a magazine capacity of 20 rounds.

I added this section to gamedata\config\unique_items.ltx


needs to be gamedata\config\misc\unique_items.ltx

since your modded file is in the wrong directory, the engine is using the vanilla file; hence it Can't open section 'wpn_vintorez_m1'
---END QUOTATION---



Ah, wrong file path, that old problem.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.