Add New Weapons

KyralosKyralos Join Date: 2012-11-10 Member: 169226Members
edited November 2012 in Modding
Hellos.

I debuted with the NS2 modding, and I care about to create new weapons.

My goal is to create long-term duplicate already existing marine weapons, but with different characteristic.

For the moment, I managed to make it appear in the armory :

<img src="http://i42.servimg.com/u/f42/14/62/64/11/mr1310.jpg" border="0" class="linked-image" />

But the game crashes if I replace <b>[kTechDataModel] = Rifle.kModelName</b> by <b>[kTechDataModel] = MRRifle.kModelName</b> in the following line in <i>TechData.lua</i> :

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>{[KTechDataId] = kTechId.MRRifle [kTechDataMaxHealth] = kRifleHealth [kTechDataMaxArmor] = kRifleArmor [kTechDataTooltipInfo] = "MR13_TOOLTIP"
[kTechDataPointValue] = kWeaponPointValue [kTechDataMapName] = Rifle.kMapName [kTechDataDisplayName] = "MR13RIFLE" [kTechDataModel] = Rifle.kModelName
[kTechDataDamageType] = kRifleDamageType [kTechDataCostKey] = kMRRifleCost},</div>

I can not find the source of a problem is it lua <i>\Weapons\Marine\MRRifle.lua</i> is done wrong, or the problem is somewhere else?

Thank for helping !

EDIT : I tested in explore Mod and new server.

Comments

  • MaxunitMaxunit Join Date: 2005-02-01 Member: 39414Members, Reinforced - Shadow
    The MRRifle.lua...have you modified it as well and re-adjusted/re-named all the entries in it from Rifle to MRRifle? There are most likely conflicting entries, which cause the game to crash.

    Do you maybe have a Log.txt in your %APPDATA%/Natural Selection 2/ folder (or %APPDATA%/Roaming/Natural Selection 2/, depends on the OS), which logged stuff until the game crashes? This might help.
  • KyralosKyralos Join Date: 2012-11-10 Member: 169226Members
    Thx for helping, i found the problem : typo error in Shared.lua <.<
  • TharosTharos Join Date: 2012-12-18 Member: 175439Members
    Can you share your code please ?
Sign In or Register to comment.