00:27:42 20 April 2014 |
|
SacriPan
Senior Resident
 On forum: 09/20/2009
 Message edited by: SacriPan 04/20/2014 0:30:47
Messages: 319
|
But even if I go with xr_effect and info_portions and all, I still have to dynamically change his logic (which will be random, of course ), so what else than packet can I use?
I don't get it |
02:00:14 20 April 2014 |
|
SacriPan
Senior Resident
 On forum: 09/20/2009
 Message edited by: SacriPan 04/20/2014 2:03:27
Messages: 319
|
Ah.... I kinda abandoned the idea of Smart Terrain for this, and I think the main advantage of a ST is the respawn, which I don't want.
What you suggest is too complex for what I wanna do and I just made it work via logic only. I used what you told me about info_portions and these are what my script will randomly fire:
I will only use logic and it will look like this (this works, I just tested it, the NPC switches jobs smoothly)
[smart_terrains]
none = true
[logic]
active = walker@job1
;-- binocular
[walker@job1]
path_walk = pan_rookie_kamp
path_look = pan_rookie_binocular
def_state_moving = patrol
meet = meet
on_info = {+pan_npc_01_go_to_job2} walker@job2 %-pan_npc_01_go_to_job1%
on_info2 = {+pan_npc_01_go_to_job3} kamp@job3 %-pan_npc_01_go_to_job1%
;-- guard
[walker@job2]
path_walk = pan_rookie_kamp
path_look = pan_rookie_guard
def_state_moving = patrol
meet = meet
on_info = {+pan_npc_01_go_to_job1} walker@job1 %-pan_npc_01_go_to_job2%
on_info2 = {+pan_npc_01_go_to_job3} kamp@job3 %-pan_npc_01_go_to_job2%
;-- kampfire
[kamp@job3]
path_walk = <path_camp_name>_task
center_point = pan_rookie_kamp
radius = 2
def_state_moving = patrol
meet = meet
on_info = {+pan_npc_01_go_to_job1} walker@job1 %-pan_npc_01_go_to_job3%
on_info2 = {+pan_npc_01_go_to_job2} walker@job2 %-pan_npc_01_go_to_job3%
;-- meet
[meet]
use = true
use_wpn = true
meet_talk_enabled = true
meet_state = ward
use_medkit = true
For what I wanna do, I will have to define a lot more "on_info" lines (maybe 5 or 6) but it's just config, it's quite easy compared to messing with Smart terrain and packets.
Nonetheless, thanks for you efforts (both TKGP and Alundaio), I did learn things in this thread, and I'm sure I wasn't the only one |
02:24:27 20 April 2014 |
|
SacriPan
Senior Resident
 On forum: 09/20/2009
 Message edited by: SacriPan 04/20/2014 2:24:37
Messages: 319
|
Well, technically, that's what I want and I thought I'd use Smart terrains for that.
You know, have NPCs take jobs at a ST, deactivate this ST at a given time and in the meantime, activate an other ST, so NPCs would travel across the map (that part is important) and occupy other job on the newly activated ST.
But like we said, logic is far less complicated and allow the same level of control over NPCs taking jobs, at least for what I wanna do. |
13:05:21 21 April 2014 |
|
SacriPan
Senior Resident
 On forum: 09/20/2009
Messages: 319
|
Well, I did some test yesterday with mutants.
I want to spawn a pack of dogs, and have them settle in a camp (like my NPCs). When I give the proper info_portion, they will follow the new Logic and will travel to their new camp.
I did this with Logic only and it works like a charm
Though, configurating Logic will be quite long (to say the least...) because the number of possible camps will increase the number of info_portions, as well as the "on_info lines" for each behavior in the Logic files. But in the end, it will be a matter of copy and paste.
@Vintar
I wouldn't know about general_lager. What's it about exactly? Why doesn't it work in vanilla? |
21:38:59 21 April 2014 |
|
SacriPan
Senior Resident
 On forum: 09/20/2009
 Message edited by: SacriPan 04/21/2014 21:43:27
Messages: 319
|
I have a problem with 1 NPC's Logic.
He's supposed to go to sleep at night.
The thing is, he goes to the coordinates, but adopts a "camp" attitude, though, he snores...
I use this:
[logic@pan_st_test_kamp01_job02_night]
active = sleeper@pan_st_test_kamp01_job02_night
[sleeper@pan_st_test_kamp01_job02_night]
path_main = kamp01_job02_sleep
wakeable = true
meet = meet@pan Strangely, when I use "walker" instead of "sleeper", he does sleep, but he doesn't make any sound. Also, the "weakable" tag has no effect at all.
[logic@pan_st_test_kamp01_job02_night]
active = walker@pan_st_test_kamp01_job02_night
[walker@pan_st_test_kamp01_job02_night]
path_walk = kamp01_job02_sleep
wakeable = true
meet = meet@pan
The waypoint is defined as follows in "way_escape.ltx":
[pan_st_test_kamp01_job02_sleep]
points = p0
p0:name = name00|a=sleep
p0:flags = 0x1
p0:position = -69.7271, -4.0084, -87.9482
p0:game_vertex_id = 76
p0:level_vertex_id = 202911
Any clue on this strange behavior? |
21:46:38 21 April 2014 |
|
SacriPan
Senior Resident
 On forum: 09/20/2009
 Message edited by: SacriPan 04/21/2014 22:18:45
Messages: 319
|
@vintar
I tried that this afternoon:
[smart_terrains]
esc_kamp1 = {-info_kamp2}
esc_kamp2 = {+info_kamp2}
NPCs go effectively from kamp1 to kamp2 when the info_portion is given, but when I disable it, they just wander around...
I believe they are suppose to go back to kamp1, as the info_portion is disabled, therefore kamp2 is not available anymore and kamp is now available.
Is there a subtility I didn't catch here? |
|