Post here your problems/questions with hammer. Post & Reply

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
User avatar
Umbrae
prop_static
prop_static
Posts: 87
Joined: Wed Aug 17, 2011 11:24 pm
Location: A nice place :P

Re: Post here your problems/questions with hammer. Post & Re

Post by Umbrae » Sat Jun 23, 2012 7:34 pm

Does anyone have any idea how to add lives mode to your map?
~Umbrae~

User avatar
Maestro Fénix
Team Member
Team Member
Posts: 2457
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Maestro Fénix » Sat Jun 23, 2012 9:34 pm

Umbrae wrote:Does anyone have any idea how to add lives mode to your map?
Hmm yes, put this in your map_cfg:

"mp_livesmode" "0"

(i dont remember now what modes it has, check it).

For manage lives, use the game_lives_manager: http://wiki.obsidianconflict.net/?title ... es_manager
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos


Image

User avatar
TESLA-X4
Level 10 Bug Hunter
Level 10 Bug Hunter
Posts: 572
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: Post here your problems/questions with hammer. Post & Re

Post by TESLA-X4 » Sun Jun 24, 2012 2:58 am

The ConVar in question is mp_livesmode.

If you are targeting 1.35 stock (almost no dedicated servers out there use this anymore, but listen servers are still stuck with this), only values 0 and 1 are supported (which mean disabled and enabled, respectively). If enabled and all players run out of lives, the game changes to the following map.

If you are targeting 0.1.3.5 Hotfix 3, then values 0, 1, and 2 are supported (which stand for disabled, change to next map on all players dead, and restart map on all players dead, respectively).

0.1.3.5 Hotfix 4 will add a third mode that will fire a new OnAllPlayersDead output on all game_lives_manager entities in the map before halting itself (so level designers will have full control over what happens next, depending on whether they want to restart the map, or change to a new one).
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.

User avatar
Maestro Fénix
Team Member
Team Member
Posts: 2457
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Maestro Fénix » Sun Jun 24, 2012 11:04 am

TESLA-X4 wrote: 0.1.3.5 Hotfix 4 will add a third mode that will fire a new OnAllPlayersDead output on all game_lives_manager entities in the map before halting itself (so level designers will have full control over what happens next, depending on whether they want to restart the map, or change to a new one).
My pray have been listened.
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos


Image

User avatar
Umbrae
prop_static
prop_static
Posts: 87
Joined: Wed Aug 17, 2011 11:24 pm
Location: A nice place :P

Re: Post here your problems/questions with hammer. Post & Re

Post by Umbrae » Tue Jul 03, 2012 10:21 pm

How would you have the player's score set to 0 automatically on spawn? I noticed that the game score manager can add negative points, but I don't want the player's score to go into negative numbers, just 0.
~Umbrae~

Axel_m3sh
npc_combine_elite
npc_combine_elite
Posts: 469
Joined: Wed Nov 05, 2008 5:52 am
Location: lolwut L0C4tI0n?

Re: Post here your problems/questions with hammer. Post & Re

Post by Axel_m3sh » Tue Jul 03, 2012 11:29 pm

I know there was a convar (I think) that disallows the game scores to go into the negatives. Or perhaps that's just me, someone clarify for me please!

User avatar
TESLA-X4
Level 10 Bug Hunter
Level 10 Bug Hunter
Posts: 572
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: Post here your problems/questions with hammer. Post & Re

Post by TESLA-X4 » Wed Jul 04, 2012 12:19 am

Yes, indeed there is - IIRC it was sv_allownegativepoints 0, but I can only confirm it when I return home... In about 13-14 hours' time.
If desired, I could add an input to game_score to allow setting points directly.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.

Axel_m3sh
npc_combine_elite
npc_combine_elite
Posts: 469
Joined: Wed Nov 05, 2008 5:52 am
Location: lolwut L0C4tI0n?

Re: Post here your problems/questions with hammer. Post & Re

Post by Axel_m3sh » Thu Jul 05, 2012 9:48 am

I think adding a bunch of small misc features either way would be useful in the long run lol

User avatar
Plasma HeadCrabD
Beta Tester
Beta Tester
Posts: 167
Joined: Sat Mar 27, 2010 1:21 am
Location: china
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Plasma HeadCrabD » Fri Jul 06, 2012 2:37 pm

materialPath: i:\steam\steamapps\30718815\half-life 2\hl2\materials
Loading I:\oc_nacht_der_untoten.vmf
Could not locate 'GameData' key in i:\steam\steamapps\30718815\half-life 2\hl2\gameinfo.txt
fixing up env_cubemap materials on brush sides...
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 1292 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
NODRAW on terrain surface!
NODRAW on terrain surface!
NODRAW on terrain surface!
NODRAW on terrain surface!
NODRAW on terrain surface!
done (2)
writing I:\oc_nacht_der_untoten.prt...Building visibility clusters...
done (0)
material "skybox/grimmnightrt" not found.
Can't load skybox file skybox/grimmnight to build the default cubemap!
Can't load skybox file skybox/grimmnight to build the default cubemap!
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (2) (671446 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 3952 texinfos to 2566
Reduced 148 texdatas to 140 (8296 bytes to 8033)
Writing I:\oc_nacht_der_untoten.bsp
14 seconds elapsed



2 threads
reading i:\oc_nacht_der_untoten.bsp
reading i:\oc_nacht_der_untoten.prt
949 portalclusters
3384 numportals
0...1...2...3...4...5...6...7...8...9...10Optimized: 58377 visible clusters (0.00%)
Total clusters visible: 752476
Average clusters visible: 792
Building PAS...
Average clusters audible: 949
visdatasize:227966 compressed from 227760
writing i:\oc_nacht_der_untoten.bsp
3 seconds elapsed



[Reading texlights from 'lights.rad']
[45 texlights parsed from 'lights.rad']

Loading i:\oc_nacht_der_untoten.bsp
12467 faces
16 degenerate faces
117166 square feet [16871978.00 square inches]
92 Displacements
4386 Square Feet [631680.94 Square Inches]
12451 patches before subdivision
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
409359 patches after subdivision
23 direct lights
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...


materialPath: i:\steam\steamapps\30718815\half-life 2\hl2\materials
Loading I:\oc_nacht_der_untoten.vmf
Could not locate 'GameData' key in i:\steam\steamapps\30718815\half-life 2\hl2\gameinfo.txt
fixing up env_cubemap materials on brush sides...
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 1292 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
NODRAW on terrain surface!
NODRAW on terrain surface!
NODRAW on terrain surface!
NODRAW on terrain surface!
NODRAW on terrain surface!
done (2)
writing I:\oc_nacht_der_untoten.prt...Building visibility clusters...
done (0)
material "skybox/grimmnightrt" not found.
Can't load skybox file skybox/grimmnight to build the default cubemap!
Can't load skybox file skybox/grimmnight to build the default cubemap!
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (2) (671446 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 3952 texinfos to 2566
Reduced 148 texdatas to 140 (8296 bytes to 8033)
Writing I:\oc_nacht_der_untoten.bsp
14 seconds elapsed



2 threads
reading i:\oc_nacht_der_untoten.bsp
reading i:\oc_nacht_der_untoten.prt
949 portalclusters
3384 numportals
0...1...2...3...4...5...6...7...8...9...10Optimized: 58377 visible clusters (0.00%)
Total clusters visible: 752476
Average clusters visible: 792
Building PAS...
Average clusters audible: 949
visdatasize:227966 compressed from 227760
writing i:\oc_nacht_der_untoten.bsp
3 seconds elapsed



[Reading texlights from 'lights.rad']
[45 texlights parsed from 'lights.rad']

Loading i:\oc_nacht_der_untoten.bsp
12467 faces
16 degenerate faces
117166 square feet [16871978.00 square inches]
92 Displacements
4386 Square Feet [631680.94 Square Inches]
12451 patches before subdivision
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
zero area child patch
409359 patches after subdivision
23 direct lights
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10transfers 95723355, max 1708
transfer lists: 730.3 megs


after that, crashed
Current Projects:
oc_Maestro Fénix_HeadCrabD_Nz(just for boring)
oc_der_riese(don't even think about it.)
oc_nacht_der_untoten (work again!)
(also,you can see some pics about this map on my moddb blog.)
http://www.moddb.com/members/headcrabd
Image

User avatar
Dominic
Donator
Donator
Posts: 54
Joined: Thu May 13, 2010 7:02 am
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Dominic » Sun Aug 19, 2012 5:27 am

I noticed there are 3 fgd's in oc's obsidian sdk folder, what exactly the purpose of all three? I thought only one could really be used at a time otherwise there would be conflicting values? Reason why I'm asking this is because I might be able to create some custom editor icons for custom entities added into the fgd and I was wondering which fgd exactly I would have to do this in.

User avatar
TESLA-X4
Level 10 Bug Hunter
Level 10 Bug Hunter
Posts: 572
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: Post here your problems/questions with hammer. Post & Re

Post by TESLA-X4 » Sun Aug 19, 2012 12:06 pm

Obsidian_Base.fgd: Entities common to all Source games, with Obsidian-specific keyvalues and I/O options.
Obsidian_HalfLife2.fgd: Half-Life 2 entities, with Obsidian-specific keyvalues and I/O options.
Obsidian.fgd: Obsidian-specific entities.

All three have unique contents, so they will not conflict. In fact, all three FGDs will be loaded simultaneously by Hammer since they cross-reference one another.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.

User avatar
Maestro Fénix
Team Member
Team Member
Posts: 2457
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Maestro Fénix » Sun Aug 19, 2012 6:49 pm

Making custom weapons is always a headache, since you have to deal with the typical problems like when you can´t pick them or weird behavior. But this time i have a problem that i´m unable to fix it.

I want use a custom shotgun with a npc (npc_hgrunt), but when i test it in the game, i see how the npcs use it, but the sound not play, doesn´t shoot (doesn´t make damage), and doesn´t have muzzleflash, only the cartriges and the animations of using it.

I looked everything, and the only thing that maybe is causing this problem, is that maybe the npcs only use the double fire to attack (and this is unable to be made with scripted weapons at the moment).

Here is my script:

Code: Select all

"WeaponData"
{
	// Weapon data is loaded by both the Game and Client DLLs.
	"printname"			"SPAS12"
	"viewmodel"			"models/weapons/v_spas12.mdl"
	"playermodel"			"models/weapons/w_spas12.mdl"
	"anim_prefix"			"shotgun"
	"bucket"			"2"
	"bucket_position"		"20"

	"clip_size"			"10"
	"primary_ammo"			"Buckshot"
	"secondary_ammo"		"None"

	"weight"			"4"
	"item_flags"			"0"

	"BuiltRightHanded" 		"1"
	"AllowFlipping" 		"0"

	"csviewmodel"			"0"

   	"ironsightoffset"
	{
		"x"   "-4.00"
		"y"   "-6.70"
		"z"   "4.80"
   	}


	// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
	"SoundData"
	{
		"empty"				"weapon_Shotgun.Empty"
		"reload"			"weapon_Shotgun.Reload"
		"special1"			"weapon_Shotgun.Special1"
		"single_shot"		"weapon_spas12.Single"
		"double_shot"		"Weapon_Shotgun.Double"
		// NPC WEAPON SOUNDS
		"reload_npc"		"weapon_Shotgun.Reload"
		"single_shot_npc"	"Weapon_Shotgun.Single" 
	}

	// Weapon Sprite data is loaded by the Client DLL.
	"TextureData"
	{
		"weapon"
		{
				"font"		"CustomWeaponIcons"
				"character"	"S"
		}
		"weapon_s"
		{	
				"font"		"CustomWeaponIconsSelected"
				"character"	"S"
		}
		"ammo"
		{
				"font"		"WeaponIcons"
				"character"	"s"
		}
		"crosshair"
		{
				"font"		"Crosshairs"
				"character"	"Q"
		}
		"autoaim"
		{
				"file"		"sprites/crosshairs"
				"x"			"0"
				"y"			"48"
				"width"		"24"
				"height"	"24"
		}
	}
	"Advanced" // only for Weapon_Scripted
	{

	// **Primary Attack**

		// 0 = none, 1 = Basic Bullet, 2 = Burst, 3 = shotgun, 4 = autoshotgun, 5 = laser, 6 = warp
		"FireType1"	"3"


		// Rate of Weapons Fire ( Not for laser or warp )
		"FireRate1"	"0.2"

		// Allow a refire as fast as the player can click, Basic Bullet Only.
		"FastFire1"	"0"

		// Allow Fire Underwater?
		"FireUnderWater1"	"0"

		// How many bullets in a burst. ( For Burst Weapon Only! )
		"BurstAmount1"	"0"
		"BetweenBurstTime1"	"0.05"

		// For Bullet accuracy
		"FireCone1"		"9" // Starting Value ( 0-20 )
		"FireConeLerp1"		"0" // Bool
		"FireConeLerpto1"	"0" // Value to lerp accuracy too ( 0-20 )

	// **Secondary Attack**

		// 0 = none, 1 = Basic Bullet, 2 = Burst, 3 = shotgun, 4 = autoshotgun, 5 = laser, 6 = warp, 8 = scope
		"FireType2"	"3"

		// Rate of Weapons Fire ( Not for laser or warp )
		"FireRate2"	"0.1"

		// Allow a refire as fast as the player can click, Basic Bullet Only.
		"FastFire2"	"0"

		// Allow Fire Underwater?
		"FireUnderWater2"	"0"

		// How many bullets in a burst. ( For Burst Weapon Only! )
		"BurstAmount2"	"4"
		"BetweenBurstTime2"	"0.05"

		// Secondary Fire uses Secondary Ammo Type. If 0, will use primary ammo.
		"SecondaryAmmoUsed"	"0"

		// For Bullet accuracy
		"FireCone2"		"2" // Starting Value ( 0-20 )
		"FireConeLerp2"		"1" // Bool
		"FireConeLerpto2"	"6" // Value to lerp accuracy too ( 0-20 )

	// **Global Weapon Settings**

		// Number of Recoil Animations, weapon models with ACT_VM_RECOIL animations.
		// ( Only if a weapon has recoil animations, Not for laser or warp )
		"NumberOfRecoilAnims"	"0"

		// Shots fired till next recoil animation. ( Only if a weapon has recoil animations )
		"RecoilIncrementSpeed"	"1"

		// 1 = Pistol, 2 = AR2, 3 = crossbow, 4 = physgun, 5 = shotgun, 6 = smg1
		// This is the player animation set that will be used on all players you view ingame.
		"PlayerAnimationSet"	"5"

		// NPCs use a ShotRegulator in code, these settings corrispond with it.
		"NPCRateofFire"		"1"
		"NPCMinBursts"		"1"
		"NPCMaxBursts"		"1"
		"NPCMinRest"		"0.3"
		"NPCMaxRest"		"0.6"

		// Range the NPC can fire this weapon at, if the player is less than min, the npc cant fire and will try to get a better vantage point.
		"NPCMinRange1"		"2"
		"NPCMaxRange1"		"1500"
		"NPCMinRange2"		"2"
		"NPCMaxRange2"		"200"
	}
}
Note: I tried changing all the values (a new and clean script), different script file name and slot position. The sounds are fine, because if i pick the weapon, it works. The w_model has act_range_attack animations.
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos


Image

User avatar
Maestro Fénix
Team Member
Team Member
Posts: 2457
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Maestro Fénix » Wed Sep 26, 2012 9:28 pm

Wow, i forgot this post :P


After investigate, i found that the problem is caused by the command mp_weaponstay. Looks like that command makes the mod think that two or more scripted weapons are in fact the same weapon (maybe due the weapon_scripted entity itself?).

I reported this problem to the bugtracker, so is only a matter of time they fix it: http://bugs.obsidianconflict.net/view.php?id=140

Anyway, the command has more bugs, because this isn´t the only problem it gives: http://bugs.obsidianconflict.net/view.php?id=138
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos


Image

JMP
Pixel
Posts: 2
Joined: Tue Oct 16, 2012 6:38 pm

Re: Post here your problems/questions with hammer. Post & Re

Post by JMP » Tue Oct 16, 2012 7:01 pm

Is there a way to have your players spawn with specific weapons?

User avatar
Maestro Fénix
Team Member
Team Member
Posts: 2457
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Post here your problems/questions with hammer. Post & Re

Post by Maestro Fénix » Tue Oct 16, 2012 8:34 pm

JMP wrote:Is there a way to have your players spawn with specific weapons?
Of course. In your map, use a yournamemap_modify.txt

Take a look in obsidian/maps/cfg.

I´ll put you an example:


yourmapname
{
"SpawnItems"
{
"weapon_healer" "1"

"item_battery" "7"
"custom_bluBeretta" "1"
"item_ammo_smg1" "5"
"custom_blump5k" "1"
"item_box_buckshot" "10"
"item_ammo_357_large" "3"
"item_ammo_pistol_large" "5"
}
}

Put in SpawnItems the weapons and items you want. The more ammo/batteries you put, the more you will have on respawn.

The weapons can be weapon_ (the default) or custom_ (custom weapons). Take a look here if you want to create your own weapons: http://wiki.obsidianconflict.net/?title ... ed_Weapons
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos


Image

Post Reply