Raised This Month: $ Target: $400
 0% 

[L4D2] Dynamic Path Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-13-2010 , 04:34   Re: [L4D2] Dynamic Path Manager
Reply With Quote #1

And are those working on versus without stripper?
I was hoping for something like c1m3. I wonder why valve diden't include more
Visual77 is offline
SkaP
Senior Member
Join Date: Dec 2009
Old 02-13-2010 , 04:46   Re: [L4D2] Dynamic Path Manager
Reply With Quote #2

There is 0 dynamic paths in the 5 Valve campaigns for versus, the map will play the same each time. With stripper you can force a certain direction like C1M3 but thats it. I have tried to strip the logic relays to force a certain direction on some maps but it will never be dynamic or change. I believe Stripper is limited in what it can do.

Unless I am missing something I don't think dynamic pathing is possible without direct control over the creation of the map like the LFD1-LFD2 conversion maps. One idea I came up with to overcome this this would be to create multiple strips of the same map and have a plugin(or stripper itself) randomly choose between a group of strips for the map but even this would be limited.

Example:
7 Strips of C5M1 where each one does the following:
1. Allows all the paths like it does now.
2-4: Block one way each.
5-7. Block two ways each.

Don't know if this is possible though. If someone could make this type of plugin, I would be willing to work on the strips. Although I am uncertain about fixing the graveyard as it would be really hard to strip without using other props and changing the whole look.

All in all though I think Valve dropped the ball when they decided not to include dynamic paths(even if there are only a few). They said it would be to confusing but technically it would help the losing team going second. They get a better advantage since they would know which paths are open after team 1 goes allowing them maybe to catch up.

Last edited by SkaP; 02-13-2010 at 05:09.
SkaP is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 02-13-2010 , 05:35   Re: [L4D2] Dynamic Path Manager
Reply With Quote #3

I see what you mean. I hope someone else can support you
with the dynamic paths then since I have no knowledge about how you'd even find them or change them.

And agreed, the paths woulden't be confusing at all but like you said, it would rather be an advantage for the 2nd team to catch up. Valve's thinking
Visual77 is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 02-14-2010 , 06:44   Re: [L4D2] Dynamic Path Manager
Reply With Quote #4

It could be done quite natively if one modded the Director Anger queries in the map props to return random values instead. There is this function PickRandom but im unsure how it works - there doesnt seem to be min or max set.


Alternatively, Stripper could be used to create new Relays with the same name for all maps, like relay_buildeasypath, relay_buildmediumpath, relay_buildhardpath.

Inside these relays would the necessary props for each path type be created. This was all Stripper until now.

As for calling these unified relays, a plugin could be written quite easily, reading scores and setting paths accordingly.


Did you know you can shift the escalators around in C1M3? ^^
AtomicStryker is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 02-14-2010 , 10:32   Re: [L4D2] Dynamic Path Manager
Reply With Quote #5

Quote:
Originally Posted by AtomicStryker View Post
It could be done quite natively if one modded the Director Anger queries in the map props to return random values instead. There is this function PickRandom but im unsure how it works - there doesnt seem to be min or max set.
the random pickers, just pick 1 of the outputs available.

the real issue is getting that to work in l4d2 versus. ive tried getting random spawns to work and either get every option spawning or nothing spawning for the 2nd team. it does however, work correctly for the 1st team. and this is using identical code i used in l4d1 to spawn random weapons on nm4. everything spawns if you dont use a point template (which ive seen valve do in l4d2 on some of their random spawns), yet nothing spawns if you do use the point template (as valve did in l4d1).

example.. this is stripper code i tried using to create a random pack spawn in the park (to replace the current random packs which suck):
PHP Code:
{
    
"origin" "-3755 -2183 -187"
    "spawnflags" "1"
    "classname" "logic_auto"
    "OnMapSpawn" "fak_spawn1,PickRandom,,0,-1"
}
{
    
"origin" "-3735 -2183 -187"
    "targetname" "fak_spawn1"
    "classname" "logic_case"
    "OnCase01" "spawn_fak1_template,ForceSpawn,,0,-1"
    "OnCase02" "spawn_fak2_template,ForceSpawn,,0,-1"
    "OnCase03" "spawn_fak3_template,ForceSpawn,,0,-1"
}
Statue
{
    
"origin" "-6610 -2227 -218"
    "Template01" "spawn_fak1"
    "targetname" "spawn_fak1_template"
    "spawnflags" "2"
    "classname" "point_template"
}
{
    
"origin" "-6610 -2227 -238"
    "targetname" "spawn_fak1"
    "spawnflags" "2"
    "solid" "6"
    "skin" "0"
    "model" "models/props/terror/ammo_stack.mdl"
    "disableshadows" "1"
    "angles" "90 185 0"
    "classname" "weapon_first_aid_kit_spawn"
}
Gazebo
{
    
"origin" "-7247 -3506 -114"
    "Template01" "spawn_fak2"
    "targetname" "spawn_fak2_template"
    "spawnflags" "2"
    "classname" "point_template"
}
{
    
"origin" "-7247 -3506 -134"
    "targetname" "spawn_fak2"
    "spawnflags" "2"
    "solid" "6"
    "skin" "0"
    "model" "models/props/terror/ammo_stack.mdl"
    "disableshadows" "1"
    "angles" "90 300 0"
    "classname" "weapon_first_aid_kit_spawn"
}
Restroom
{
    
"origin" "-7715 -838 -201"
    "Template01" "spawn_fak3"
    "targetname" "spawn_fak3_template"
    "spawnflags" "2"
    "classname" "point_template"
}
{
    
"origin" "-7715 -838 -221"
    "targetname" "spawn_fak3"
    "spawnflags" "2"
    "solid" "6"
    "skin" "0"
    "model" "models/props/terror/ammo_stack.mdl"
    "disableshadows" "1"
    "angles" "90 285 0"
    "classname" "weapon_first_aid_kit_spawn"

first team gets 1 pack of the 3, 2nd team gets no packs and there are error messages in the console about the point_templates having nothing to spawn..

removing the point_templates and point directly to the kits. still works for the first team, but all 3 spawn for the 2nd team.

Last edited by dirka_dirka; 02-14-2010 at 10:40.
dirka_dirka is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 02-14-2010 , 12:58   Re: [L4D2] Dynamic Path Manager
Reply With Quote #6

You have to do it like Valve is doing it - roundspecific stuff is not hooked to OnMapSpawn but to Player Triggers.

OnMultiNewRound?
AtomicStryker is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 02-14-2010 , 17:21   Re: [L4D2] Dynamic Path Manager
Reply With Quote #7

adding an onmultinewround doesnt change anything. the only thing i noticed was on the 2nd round, the point_template would complain twice about not having anything to spawn - except the 2nd complaint would be about only 1 (of the 3) cases, and i believe it would be a different case (meaning 2nd half would/could have a different result)

valve obviously changed something on the spawning logic because i found a situation where they had (at least started) a random spawn like in l4d1 but ditched it or gave up on it...

from the dump of c5m4:
Code:
{
"origin" "-2304 -192 192"
"spawnflags" "1"
"classname" "logic_auto"
"hammerid" "1646600"
"OnMapSpawn" "ammo_casePickRandom0-1"
"OnMultiNewRound" "ammo_casePickRandom0-1"
}
{
"origin" "-2304 -192 160"
"targetname" "ammo_case"
"classname" "logic_case"
"hammerid" "1646598"
"OnCase03" "ammo_template3ForceSpawn0-1"
"OnCase01" "ammo_template1ForceSpawn0-1"
"OnCase02" "ammo_template2ForceSpawn0-1"
}
{
"origin" "-128 2240 128"
"Template01" "ammo_spawn1"
"targetname" "ammo_template1"
"spawnflags" "2"
"classname" "point_template"
"hammerid" "1646564"
}{
"origin" "-512 704 448"
"Template01" "ammo_spawn2"
"targetname" "ammo_template2"
"spawnflags" "2"
"classname" "point_template"
"hammerid" "1646578"
}{
"origin" "-2304 -192 128"
"Template01" "ammo_spawn3"
"targetname" "ammo_template3"
"spawnflags" "2"
"classname" "point_template"
"hammerid" "1646588"
}
its exactly the same (except its using <- arrows instead of , commas)

they either changed or stopped using this, because there are no ammo_spawnX entities.

on the same map i found this:
Code:
{
"origin" "-3360 4688 112"
"spawnflags" "1"
"classname" "logic_auto"
"hammerid" "3324881"
"OnMapSpawn" "chainsaw_casePickRandom3-1"
}
{
"origin" "-3360 4688 80"
"targetname" "chainsaw_case"
"classname" "logic_case"
"hammerid" "3324879"
"OnCase01" "chainsawKill0-1"
"OnCase02" "null_relayTrigger0-1"
"OnCase03" "null_relayTrigger0-1"
}
; 1 of 12 "chainsaw" spawns
{
"origin" "-1059 2161 234.335"
"targetname" "chainsaw"
"item9" "0"
"item8" "0"
"item7" "0"
"item6" "0"
"item5" "0"
"item4" "0"
"item3" "0"
"item2" "0"
"item17" "1" ; chainsaw or grenade launcher
"item16" "1" ; chainsaw or grenade launcher
"item15" "0"
"item14" "0"
"item13" "0"
"item12" "0"
"item11" "0"
"item10" "0"
"item1" "0"
"angles" "0 75 0"
"classname" "weapon_item_spawn"
"hammerid" "3324517"
}
; this does nothing..
{
"origin" "-3360 4688 144"
"targetname" "null_relay"
"classname" "logic_relay"
"hammerid" "3324883"
}
dont know if it works or not, but it appears as though it is supposed to spawn chainsaws/grenade launchers only 66% of the time (1 in 3 chance of killing all chainsaw spawns).

i tried changing the code i posted for packs into something like the chainsaws, except it wouldnt kill the entities. changing my weapon_faks to weapon_item_spawns and using item2 = 1 didnt help either.

i tried as many mutations of code combinations as i could think of, none of which worked. either first half works and second half doesnt, or it doesnt work at all. and if second half doesnt work, it either spawns everything, or nothing.

figuring out how to get any random logic working in versus, will lead to getting proper dynamic pathing.
dirka_dirka is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 02-15-2010 , 15:35   Re: [L4D2] Dynamic Path Manager
Reply With Quote #8

Youre doing it wrong, man.


Understand some principles:

OnMapSpawn gets called ONCE when a map loads.

OnMultiNewRound gets called on every round_start even in L4D2, which means twice in a versus round.


Using BOTH is unwise and will only lead to confusion, particularly if you want something random to happen.

Then, youre spawning the wrong shit. weapon_first_aid_kit_spawn is a medkit "spawning entity". Once a new round starts, the Director will fill it as he sees fit (which usually means spawning all meds he can). You do not want to create those 'Spawners', but medkits themselves.

Alternatively, create a code that wipes existing medkits in these spawns on a new round, and then randomly forces new spawns to happen.
AtomicStryker is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode