[SOLVED] .wepn recoil & a question about Sensor Distortion

Where is the line in .wepn script files that tell the weapon to recoil/not recoil? I can’t seem to find it.

Also, I’m considering giving a ship of mine a sensor distortion ability, does that effect AI?

setMiscValues(NewWeaponType, 1, 2)

setMiscValues(, , )


Determines barrel recoil and slave firing delay for the associated weapon (this function is found in the *.wepn file.)


setMiscValues(NewWeaponType, 1, 2)


<vObjectType>: should always be NewWeaponType. 
<fRecoilDistance>: how far (in meters) the barrel recoils after firing. 
<fSlaveFireDelay>: delay (in seconds) between the weapon firing and the slave firing. Note: The total time it takes to fire the weapon and all of its slaves must be less than the weapon's firing time (see StartWeaponConfig.)

It effects sensor range detection and as far as I know, AI doesn’t cheat in that.


@Pouk You’re awesome, thanks!

1 Like

Sorry for the double post, but I realized I had another question and it didn’t really need its own full thread.

When I make my own .wepn files, where do I place them so they will work in-game?

…\HomeworldRM\your mod’s folder\weapon\hgn_weapon_name\hgn_weapon_name.wepn

For instance:

1 Like

Eh? What’s this? Something I didn’t know? How does this get used in the shortcut commandline args?

1 Like

it’s an alternate way to the -overrideBigFile thing, specific to HwRM. The corresponding command is -moddatapath your mod’s folder if I remember correctly (note that I don’t know if we can have space in the folder name)

I got it from here: https://steamcommunity.com/sharedfiles/filedetails/?id=398897438

Oh, so it’s also working for the classic versions in the steam release, I didn’t know that ! I though it was only for HwRM !