Duplicating existing guns problem -1 reply

Please wait...

jzuidema

I'd rather just drink beer

50 XP

3rd May 2007

0 Uploads

13 Posts

0 Threads

#1 8 years ago

Ok guys, this is my problem:

Ive been modding for stalker for quite some while, especially weapons, but nothing more complicated than textures and properties. For example, I modded an AK47 (base:AK74) with a different texture and stats.

However, for retexturing I use the DDS file of the AK74. This means that not only my AK47 looks kickass =p, so does every AK74 based weapon in the game. My question is two fold:

How can I change the texture of a unique weapon, but NOT its base weapon, i.e. WHERE in the config (or else) does the game refer to the needed texture?

Probably this is not possible through config editing as I suspect this data to be within the mesh files. If that's the case, my question becomes: HOW and/or WHAT do I duplicate/edit to achieve my goal?

Can I duplicate/rename the OGF file of the base weapon (e.g. AK74>AK47) without problems? And do I need to edit the OGF file to refer to my own texture (and how)?

Some further info which might be useful in answering: Im familiar with most of the config editing concerning weapons (weapon/trader/unique) and can edit the texture files. Im less familiar with OGF files and modelling. Ive read the "basic weapon editing" sticky and searched the forum archives, but cant find anything that applies.

Thanks in advance for any replies!:)




SacriPan

Long live ze STALKER Devs

50 XP

16th September 2009

0 Uploads

103 Posts

0 Threads

#2 8 years ago

If you want a gun to have two different textures, you need 2 models (meshes). The texture is referenced inside the mesh file (*.ogf in stalker)

Make your ltx file, point to a model, which refers to the texture.

The model has to be hex-edited and the new name of the texture in the model file must be the exact same length as before.

I uploaded an example of 2 vanilla AK-74 with a different texture each.

Notepad++ and the hex plugin works very well for that, and its very easy to use.

Download Hex Editing For Stalker.7z from Sendspace.com - send big files the easy way




jzuidema

I'd rather just drink beer

50 XP

3rd May 2007

0 Uploads

13 Posts

0 Threads

#3 8 years ago

He SacriPan,

Thank you very much for your help. Ive been trying some OGF hex editing myself, to no avail....but before asking any questions, Ill take your upload as an example... I just have one problem: Where can I find it? Im unable to locate it in the downloads section and wouldnt know where to look else ...could you post the link or something?

Thanks in advance again!




SacriPan

Long live ze STALKER Devs

50 XP

16th September 2009

0 Uploads

103 Posts

0 Threads

#4 8 years ago

Lol,

the link is the the yellow (orange?) thing at the end of my previous post.

:deal::deal::deal::deal::deal::deal::deal::deal::deal:

Tell me if you succeded.




jzuidema

I'd rather just drink beer

50 XP

3rd May 2007

0 Uploads

13 Posts

0 Threads

#5 8 years ago

OMFG I already clicked that link, but thought it was simply a hex editing program, which I already have...hahaha I feel retarded right now :>

Anyways, I'll let you know how I coped :)




jzuidema

I'd rather just drink beer

50 XP

3rd May 2007

0 Uploads

13 Posts

0 Threads

#6 8 years ago

Ok, this is gonna work, thank you very much for your help! I assume that instead of making a new base weapon, I could also make a unique which points to a different texture then? and one last question: Is it really necessary to rename the HUD portion in the weapon's LTX file? In version 2, you rename it to "wpn_ak74_bis_hud", but is this really needed, seeing as the HUD could still point to a different OFG file while retaining its original name?

anyways, once again: thank you very much for your help!!




jzuidema

I'd rather just drink beer

50 XP

3rd May 2007

0 Uploads

13 Posts

0 Threads

#7 8 years ago

so update:

I tried doing it in uniques.ltx, but it crashed on loading, with the log saying it could find one of the mesh files. So I did it your way and just made a new bas weapon: IT WORKS!!! wohoo....except for one thing....when I run with my new gun, it doesnt show the run-gun-to-the-chest animation anymore?! Any clue what might be causing it? It is definitely not in the ltx file of the base weapon, as it si a direct copy of the original ak74 ltx with only the name, hud and model references altered.....

EDIT: fixed the animation problem. Added the run animation line an extra time to be sure and rebooted, that seemed to do the trick!




SacriPan

Long live ze STALKER Devs

50 XP

16th September 2009

0 Uploads

103 Posts

0 Threads

#8 8 years ago

Regarding the animation problem:

Problems like that can happen with unique_weapons.ltx

Even if a weapon inherits the properties from an other one, it can be necessary to add some lines again (don't know why, don't care).

For the hud section:

Yes, you have to rename the hud section in the ltx file.

In STALKER games, each "section" is define like: [something_here]. Each one has to be unique, through all the game files. So when you copy a weapon file like I did, you have to change it.

So you have to edit the .ogf (the texture path), and as you can see, I didn't rename the .ogf file, as it's not a section but a ... file. Though, the one for ak_74 is in a different folder that the one for the modified. Same name, different path, you can benefit from two different textures.

For info, try to rename the hud "section" in the ltx file so the two AKs have the same. You will see that the game crashes saying that the section already exists or something like that.

Bye, Bye, I hope you'll survive in the Zone.