Skip to content

Ion #Premade

Wanty edited this page Apr 4, 2018 · 7 revisions

Preparation

In thoose "guide" called premade I will consider that you know how to proprely setup / start modding your game. If it's not your case you must read the "General info", refer to this link

Any suggestion are welcome, you can submit your request / idea on NS Discord or even if you made your own premade weapon / set. You can reach me via contact details.

Laser core

Laser core 1

Laser core 1

Guide here

Editing

To get this laser core, you will need to edit 2 differents files who are in different location. No specific software exept your text editor.

File 1

For the first file you need to edit, go to this location

englishclient_mp_common.bsp.pak000_dir.vpk\scripts\vscripts\weapons

Open the file mp_titancore_lasercannon.nut with your text editor.

Find and replace the following values in your file. Note: Do not copy paste this entire code block into your original file, replace string by string or you might resolve with a none working file.

const FX_LASERCANNON_AIM = $"P_wpn_arcball_trail"
const FX_LASERCANNON_CORE = $"P_emp_body_titan"
const FX_LASERCANNON_MUZZLEFLASH = $"P_elec_screen"
#if SERVER
	weapon.e.onlyDamageEntitiesOncePerTick = true

	entity player = weapon.GetWeaponOwner()
	float stunDuration = weapon.GetSustainedDischargeDuration()
	float fadetime = 2.0
	entity soul = player.GetTitanSoul()
	if ( soul == null )
		soul = player

	if ( !player.ContextAction_IsMeleeExecution() ) //don't do this during executions
	{
		StatusEffect_AddTimed( soul, eStatusEffect.turn_slow, SEVERITY_SLOWTURN_LASERCORE, stunDuration + fadetime, fadetime )
		StatusEffect_AddTimed( soul, eStatusEffect.move_slow, SEVERITY_SLOWMOVE_LASERCORE, stunDuration + fadetime, fadetime )
	}

	if ( player.IsPlayer() )
	{
		player.Server_TurnDodgeDisabledOn()
		player.Server_TurnOffhandWeaponsDisabledOn()
		EmitSoundOnEntityOnlyToPlayer( player, player, "Weapon_BatteryGun_FireStart_1P" ) //edited
		EmitSoundOnEntityOnlyToPlayer( player, player, LASER_FIRE_SOUND_1P )
		EmitSoundOnEntityExceptToPlayer( player, player, "Weapon_BatteryGun_FireStart_3P" ) //edited
		EmitSoundOnEntityExceptToPlayer( player, player, "Titan_Core_Laser_FireBeam_3P" )
	}
	else
	{
		EmitSoundOnEntity( player, "Weapon_BatteryGun_FireStart_3P" ) //edited
		EmitSoundOnEntity( player, "Weapon_BatteryGun_FireStart_3P" ) //edited
	}
void function OnAbilityEnd_LaserCannon( entity weapon )
{
	weapon.Signal( "OnSustainedDischargeEnd" )
	weapon.StopWeaponEffect( FX_LASERCANNON_MUZZLEFLASH, FX_LASERCANNON_MUZZLEFLASH )

	#if SERVER
	OnAbilityEnd_TitanCore( weapon )

	entity player = weapon.GetWeaponOwner()

	if ( player == null )
		return

	if ( player.IsPlayer() )
	{
		player.Server_TurnDodgeDisabledOff()
		player.Server_TurnOffhandWeaponsDisabledOff()

		EmitSoundOnEntityOnlyToPlayer( player, player, "Weapon_BatteryGun_FireStop_1P" ) //edited
		EmitSoundOnEntityExceptToPlayer( player, player, "Titan_Core_Laser_FireStop_3P" )
	}

File 2

For the second file you need to edit, go to this location

englishclient_mp_common.bsp.pak000_dir.vpk\scripts\weapons

Open the file mp_titancore_laser_cannon.txt with your text editor.

Find and replace the following values in your file. Note: Do not copy paste this entire code block into your original file, replace string by string or you might resolve with a none working file.

"sustained_laser_effect_1p"				"P_wpn_charge_tool_beam"
"sustained_laser_effect_3p"				"P_wpn_charge_tool_beam"
"sustained_laser_impact_effect"				"dissolve_CH_arcs"
"tracer_effect"						"P_arcwave_exp_charged"
"impact_effect_table"					"P_arcwave_exp_charged"

Laser shot

Laser shot 1

Laser shot 1

Guide here

Editing

Go to this location in your extracted folder

englishclient_mp_common.bsp.pak000_dir.vpk\scripts\weapons

Open the file mp_titanweapon_laser_lite with your text editor.

Tracer

Laser shot tracer been changed to thoose values, more info about the tracers here, you can find on this link what are tracers, how to use them and all the different values you could change for.

"tracer_effect"                 "P_wpn_hand_laser_beam"
"tracer_effect_first_person"    "wpn_arc_cannon_beam"

Impact

Laser shot impact is changed to thoose values, more infor about the impacts here, you can find on this link what are impacts, how to use them and all the different values you could change for.

"impact_effect_table"		"exp_arc_ball"

Sound

Changed laser shot sound aswell. Link for more info / guide will be added soon as they will be added to the wiki.

"fire_sound_1_player_1p"				"Weapon_ShoulderLaser_Fire_3P"
"fire_sound_1_player_3p"				"Weapon_ShoulderLaser_Fire_3P"
"charge_sound_1p"					"arc_cannon_charge"
"charge_sound_3p"					"Weapon_EnergySyphon_Charge_3P"

Charge effect

Laser shot have charge effect values, link for more info / guide will be added soon as info will be added.

"charge_effect_1p"					"wpn_arc_cannon_charge_fp"
"charge_effect_3p"					"P_handlaser_charge"

Muzzle flash

"fx_muzzle_flash_attach"				"wpn_muzzleflash_arc_cannon_fp"	// on titan in 3p, on weapon in 1p