ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Change texture for weapon variant, unique items etc

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  16:59:47  23 August 2017
profilee-mailreply Message URLTo the Top
Bakarat
(Novice)
 
On forum: 08/23/2017
Messages: 15
Change texture for weapon variant, unique items etc

I'd like the change the texture for the Sniper Abakan weapon (wpn_abakan_m1), so that it has a unique look rather than being the same as the normal Abakan, I don't want to change the normal one.

Was hoping someone would be kind enough to tell me how to go about doing this.

Thanks.
  00:26:46  24 August 2017
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
1. Copy the texture and edit however you like. Make sure the name you give it is the exact same length as the original texture.
2. Copy the two Abakan meshes, doesn't matter what you name them.
3. Open the new meshes in a hex editor or (probably simpler) Notepad++; search for the name of the original texture and replace it with the name of the new texture. Remember, do NOT change the total length.
4. Add the new mesh paths to the unique AN like you would any other weapon.
  05:47:21  24 August 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
Messages: 433
You can also use the AXR toolset made for Call of Chernobyl. It has an OGF editor, where you input the path to your new meshes, and you can right click on them to edit their properties.

This method lets you make use of textures of differing character length (though this is more useful for NPC meshes).
  16:31:37  24 August 2017
profilee-mailreply Message URLTo the Top
Bakarat
(Novice)
 
On forum: 08/23/2017
 

Message edited by:
Bakarat
08/24/2017 16:36:00
Messages: 15
Thanks for the help, though I feel a bit more detail would help me better understand as I'm new to this.

I copied the default Abakan "wpn_abakan.ogf" and "wpn_abakan_hud.ogf" (extracted from the original game .db files) and edited them replacing all two instances in both files of "abakan" to "abaka1". Renamed the edited files to "wpn_abaka1.ogf" and "wpn_abaka1_hud.ogf"

Placed the edited meshes into "\gamedata\meshes\weapons\abaka1\"

Placed the textures into "\gamedata\textures\wpn\" named "wpn_abaka1.dds" "wpn_abaka1_bump#.dds" and "wpn_abaka1_bump.dds"


So far I feel comfortable with that, though at this point I'm not sure what to do/edit in order to apply the new mesh/textures to the Sniper Abakan weapon (wpn_abakan_m1). I'm not sure what's meant by adding the paths to "unique AN".

I found mention of what I presume is for the mesh/texture in
"\gamedata\config\weapons\w_abakan.ltx"
where it says "visual = weapons\abakan\wpn_abakan"
but if I changed that to abaka1 I suspect it would change the texture for all Abakans?

Also found something in "gamedata\config\misc\unique_items.ltx" where the wpn_abakan_m2 had and entry called [wpn_abakan_m2_hud] which had a value "visual = " So I tried creating adding "[wpn_abakan_m1_hud]" with the entry "visual = weapons\abaka1\wpn_abaka1_hud.ogf" but that didn't work.

So I'm not sure what to edit at this point.
  11:06:48  25 August 2017
profilee-mailreply Message URLTo the Top
MrSeyker
Senior Resident
 

 
On forum: 03/21/2010
 

Message edited by:
MrSeyker
08/25/2017 11:09:46
Messages: 433

---QUOTATION---
I found mention of what I presume is for the mesh/texture in
"\gamedata\config\weapons\w_abakan.ltx"
where it says "visual = weapons\abakan\wpn_abakan"
but if I changed that to abaka1 I suspect it would change the texture for all Abakans?

Also found something in "gamedata\config\misc\unique_items.ltx" where the wpn_abakan_m2 had and entry called [wpn_abakan_m2_hud] which had a value "visual = " So I tried creating adding "[wpn_abakan_m1_hud]" with the entry "visual = weapons\abaka1\wpn_abaka1_hud.ogf" but that didn't work.

So I'm not sure what to edit at this point.
---END QUOTATION---



In wpn_abakan_m1 add:

visual = weapons\abaka1\wpn_abaka1
hud = wpn_abakan_m1_hud

Then, create a new section called [wpn_abakan_m1_hud]:wpn_abakan_hud, and add:

visual = weapons\abaka1\wpn_abaka1_hud


Make sure that any new section you create (they are defined by the brackets) doesn't have the same name as an exisitng one (if there is an existing one you modify those). Repeated section names make the engine CTD.
  18:39:40  25 August 2017
profilee-mailreply Message URLTo the Top
Bakarat
(Novice)
 
On forum: 08/23/2017
Messages: 15
Hi MrSeyker, thanks for the continued help.

I've edited and now in first-person view the gun changes to the new texture, however in third-person view or if I drop it on the ground it still looks like the old default texture.


In "unique_items.ltx" under the "[wpn_abakan_m1]:wpn_abakan" section I've added this at the end of that section..

visual = weapons\abaka1\wpn_abaka1
hud = wpn_abakan_m1_hud


Then just below that section I've added

[wpn_abakan_m1_hud]:wpn_abakan_hud
visual = weapons\abaka1\wpn_abaka1_hud



Any idea what I might have missed or messed up to get the weapon's texture to also change when it's dropped / third person view?

I re-checked the mesh files
gamedata\meshes\weapons\abaka1\wpn_abaka1.ogf
gamedata\meshes\weapons\abaka1\wpn_abaka1_hud.ogf
to make sure they state "abaka1" and not "abakan" and re-did them in a hex-editor this time but that doesn't seem to have been the problem.

Still appreciating the help.



Oh on another note, you probably know but just incase, when editing .ltx files in Notepad++ its handy to set the language to .ini (INI File), that way you can collapse/expand those sections you mentioned. Also if in the Style Configurator you select the "ini file" entry then add "ltx" as a user extension it will automatically open .ltx files with the ini language so you don't have to change it manually each time.
  20:27:22  25 August 2017
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
 

Message edited by:
TKGP
08/25/2017 20:27:52
Messages: 454
World models are saved for each object after creation. Spawn a new one and you should see the new texture.
  23:56:56  25 August 2017
profilee-mailreply Message URLTo the Top
Bakarat
(Novice)
 
On forum: 08/23/2017
Messages: 15
Thanks for all your help guys, really appreciate it.

Went and bought a new weapon, dropped it, and can clearly see the unique Sniper Abakan now looks different.

Thanks
 
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.