Republic Blaster to... anything

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
Call me crazy, but I cannot stomach wielding a Republic Hairdryer, I mean Blaster. Can someone create a mod that swaps the model with that of another blaster - any other blaster, even a CDEF - so I can use one without shame? Or give me a quick guide on how to do so myself?
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Look here:

http://www.modthegalaxy.com/forums/thread-turn-powerhammer-into-2h-lightsaber?pid=5734#pid5734

But instead of object/weapon/melee/2h_sword/, you'll want to go into object/weapon/ranged/pistol/.

This should be done with the TreExplorer, of course.
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
Bam. Switched it with the Black Falcon, no less. Fitting that the best (non-DE-10) energy blaster now looks the part. Thanks for the tip Timbab.
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
I am now wondering about swapping sounds. Where in TreExplorer do I find which sound files are associated with which weapons? I presume it would then be a matter of extracting and renaming them, and dropping them in the appropriate folder?
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
That tends to get a bit tricky in PreCU if you want to do it right, due to SOE being idiotic and using generic names that have nothing to do with the weapons, inside the datatables/weapon/weapon.iff, which one has to cross reference to each weapon object .if to see which ID they use.

Fortunially, I already did that in the past for a mod, so here is the list to figure out what is what in the weapon.iff:
Code:
Bolt
00
01
02	DE10
03	Lightning Rifle
04
05	Elite Carbine, Laser Carbine
06	CDEF Pistol, CDEF Pistol Corsec, CDEF Pistol Noob, D18, FWG5, FWG5 Quest, Power5, Scout Blaster, Scout Blaster Corsec, SRS Combat, Striker Noob
07	Beam, CDEF Rifle, DLT20, DLT20a, Laser Rifle, Laser Rifle Noob, T21
08	CDEF Carbine, CDEF Carbine Corsec, DH17, DH17 Black, DH17 Snub, DH17 Pistol, DL44, DL44 Metal,
09	E11 Rifle, E11 Carbine, E11 Carbine Quest, EE3
10	DXR6 Carb, DX2
11
12	Jawa
13	SG82
14	
15	Bowcaster
16	Spraystick
17	Pistol Launcher
18	Scatter Pistol
19	Republican Blaster, Republican Blaster Quest
20	Heavy Lightning Beam
21	Flame Thrower
22
23	
24	Geo Blaster
25
26
27
28	E11 Carbine Victor Quest
29
30
31
32
33
34	DXR6 Rifle
35	Berserker
36
37
38
39	Acid Beam
40
41	

Slug
projectile_pistol - Striker, Tangle
projectile_rifle - Tusken Rifle, Tusken Rifle Victor, Nym


Rocket
00	Heavy Rocket Launcher
01	Heavy Particle Beam
02	Heavy Acid Launcher
03	Lighting Rifle
Okay, so, as I've mentioned, go to datatables/weapon/weapon.iff, first look for the gun's sound you want to replace, then find the gun with the sounds you want, then look at the Fire Client Effect column, get the .cef name, then in treExplorer look for that .cef, open it, look into the PSND chunk, see what .snd file is attached (.SND links to .wav and .mp3 files). Do the same for both guns, so you know the .cef and .snd name for both.

.cef would be:
DE-10: clienteffect/combat_bls_1_blue_muz_flash_01.cef
Republic clienteffect/combat_ep1_republic_blaster_fire.cef

There are multiple ways of doing it, depending on if you want to overwrite a whole weapon group or just a single weapon (Some weapons do have unique sounds though, like the Republic Blaster, in this case).

Simplest way of doing it, which would work for the Republic blaster, since the effect is not shared, is to replace the .snd with the one you want.

So for example, with the DE-10 sound to overwrite the Republic blaster, the .snd would be:

DE-10: sound/wep_fire_blaster.snd
Republic: sound/wep_ep1_republic_blaster.snd

If you want to edit a particular weapon that has a shared effect, it gets a bit more hassling, but I can explain it to you in detail if you want to know (Will most likely write a guide for it in the next few days anyway, been planned).
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
Thanks for that. I'm having some trouble though.

I have your NGE ranged weapon mod installed, I've traced the appropriate .snd files, and I've replaced the wep_ep1_republic_blaster.snd file with wep_pistol_blaster_dh17.snd...

However, I'm getting a fairly generic blaster sound. I'm not getting either the NGE Republic blaster sound OR the DH17 sound. I've tried a few tweaks here and there, but nothing I do seems to change the sound. Is it something to do with changing the model to the Black Falcon? I can't see how that would affect the sound.

Perplexing! What am I doing wrong?
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
Ok, I think I got it. The Black Falcon object file specifies no weapon effect. But I can't edit the file - I have a hex editor, but no idea how to use it. I can stick with the default blaster sound for now - unless there is an easy way to modify the Black Falcon object file to point it towards a specific weapon effect...
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Sorry, only slept 3 hours, head wasn't awake yet earlier.

Ah okay you're using my mod, that should make it easier.

First of all, do you want the Black Falcon (Post CU item I assume) to replace a PreCU weapon? Just the effects of it? Tell me what you want to achieve with the Black Falcon so I can explain it better.

Any ranged weapon effect after PreCU is listed in datatables/weapon/combat_effects_ranged.iff, it's much easier to find stuff there in comparison to the weapon.iff. The problem being, while you get the name of the .prt and the .snd, you'll need a .cef (that links to both of those files) for a PreCU item.

Easiest way to do that, is get a generic PreCU weapon .cef, copy the .prt and .snd over to it and name it like, wep_fire_blackfalcon.cef, or whatever. Then what you want to do is, open the weapon.iff again and link whatever weapon you want to replace to that .cef, if that makes sense.


Sorry I give shitty advice today, head got lost in bed.
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
I followed most of that, thanks Timbab. I can see the Black Falcon (a looted DL44 with scope and muzzle, BTW) in combat_effects_ranged.iff and see that it links to basic DL44 effects.

I can also copy the generic DL44 .cef from pre-CU and rename it easily enough.

However, I have had trouble editing files. I take it I can't edit the DL44 .cef or the weapon.iff using TreExplorer? I have to use a Hex editor to link all the new bits together? I have frhed, but am unsure how to use it. I can experiment and see how I go though.
[hr]
Perhaps another alternative would be to copy the existing DL44 .cef, edit that to use the Black Falcon model, and rename that .cef to the Republic Blaster. That way it would keep the DL44 effects but just change the model. Still requires some file editing, but seems less fiddly than the approach I've taken above.
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
TreExplorer has a semi decent hex editor already built in, luckily. Just make sure you highlight and paste over that, instead of just pasting it in, otherwise it'll overwrite other data, look here:





CPAP = .prt (Particle) link chunk
PSND = .snd (sound) link chunk.

All the .cef (Literally: ClientEffect), does is link 'effect' files together, so like a particle and a sound, etc.

The object .iff is just the base file for an item, it makes it easy sometimes to just use that because it automatically gets and sets all needed file links (if they're in preCU, otherwise you'd need to find and export everything it links to) through just one file.

You can replace just a model (and it's shaders, again if it's preCU you just need one file, otherwise you need the whole chain) by using the .sat (if it has a skeleton/is 'morphable', like clothing) or .apt (same as .sat, just without the skeleton, like a weapon or some other static object).

Just a quick general run down:
.lod files = Level of Detail container for static models (.apt files link to these)
.lmg files = LoD container for files with skeletons or that use other skeletons (.sat files link to these)
.msh files = Static mesh
.mgn files = mesh with skeleton
.sht files = 'Shader' links to the .dds (texture) and the needed actual shader (.eft)
.eft files = 'Effect' files link to the actual HLSL shaders (.vsh (vertex shader), .psh (pixel shader)).

So, if you swap the .cef, you'd just get an effect swap, easiest would be, if you want just the model from the BF, grab the (you can see this if you look through the chunks of the object .iff, you'll stumble across an XXXX chunk that has 'appearanceFilename' inside of it, this will give ya the name. Now, this seems to just link to 'wp_pistol_dl44_combined.apt', which appears to be a preCU model, so that'll be easy. Simply rename whatever file is linked inside the appearanceFilenameto 'wp_pistol_dl44_combined'.

P.S. I just saw that if you open the .toc that loads all files at once, including NGE, it already links to 'combined', because it's a CU item. The PreCU has just 'wp_pistol_dl44", try to see if using the preCU object iff works, then you won't have to edit anything, if it crashes, you'd have too look for the preCU dl44 in the .tre files manually and grab that.

But here is the preCU one, just in case: https://mega.co.nz/#!8lJzDK4J!lShSpuPGzbQP_EhdOqAp_k74PbfQrAIE6GQOl6fj6Y0

You just need to edit the appearance XXXX chunk, remember, copy and paste over selected stuff, don't start writing inside it or it'll overwrite other stuf.
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
Thanks again for taking the time to explain all that Timbab. I really appreciate it.

I'll dive in and give it a shot and report back.
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Sure, no problem. :) Sorry though, I suck at explaining things lately, overly sleep deprived.

You can always hop on irc for faster replies, by the way. I'm usually on most of the day (EU times).
 

ockhamsbeard

New Member
Joined
Feb 11, 2014
Messages
14
You're a champion. I finally fixed it. I took the DL44 object file and simply edited the appearance in TreExplorer to that of the DL44 combined (used by the Black Falcon). That meant I didn't have to edit the Republic Blaster files to change the effects, and I didn't use the CU Black Falcon file, which I suspect had some foibles that were causing issues, and I didn't have to rename any other files.

Thanks again Timbab. I now have a Republic Blaster I'm happy to wave about. It's the little things that make the big differences...
 
Top Bottom