Messing around with NPC jobs.

morris
Scavenger
Posts: 12
Joined: 16 Feb 2017, 02:33

Messing around with NPC jobs.

Postby morris » 16 Feb 2017, 03:30

So, I made it to this forum, seeking for help in researching and learning how the stalker modding works. Here's the thing. Trying to implement a dynamic job, if Xenotech dies -- someone else will take his place. Did it as it was in the guide to Skinfint, just tweaked faction and squad names, aswell as smart terrain name. Now NPC takes the job, even mechanic's icon displayed on the radar, but... he doesnt fix anything. Meet dialog line was meet_dialog = meet@mechanic by default, when I changed it to meet_dialog = dm_add_repair -- NPC refused to talk to me, said "go talk to the commander". Well, I forced dialogue by copying use = {=actor_enemy} false, true from the logic below, still, no dialogue about fixing equipment, just talking like with anyone else -- joining my squad, giving dynamic task. Here's the full code

;loner mechanic
[logic@esc_smart_terrain_5_7_loner_mechanic]
suitable = {=smart_under_faction_control(esc_smart_terrain_5_7:stalker:false) =check_npc_name(esc_smart_terrain_5_7_loner_mechanic_stalker)} true, {!squad_exist(esc_smart_terrain_5_7_loner_mechanic_stalker_squad) =smart_under_faction_control(esc_smart_terrain_5_7:stalker:true)} true, false

;monolith mechanic
[logic@faction_controlled_monolith_mechanic]
suitable = {=smart_under_faction_control(esc_smart_terrain_5_7:monolith:true)} true

;bandit mechanic
[logic@faction_controlled_bandit_mechanic]
suitable = {=smart_under_faction_control(esc_smart_terrain_5_7:bandit:true)} true

;army mechanic
[logic@faction_controlled_army_mechanic]
suitable = {=smart_under_faction_control(esc_smart_terrain_5_7:army:true)} true

prior = 200
active = animpoint@stand
level_spot = mechanic
can_select_weapon = false

[animpoint@stand]
cover_name = esc_smart_terrain_5_7_smart_cover_mechanic
avail_animations = ward
use_camp = false
meet_dialog = dm_add_repair
combat_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true
combat_ignore_keep_when_attacked = true
invulnerable = {!actor_enemy} true, false
reach_distance = 10
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
enemy_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true
use = {=actor_enemy} false, true


[meet@mechanic]
close_snd_hello = esc_mech_meet
close_snd_bye = esc_mech_meet_bye
close_anim = nil
close_victim = nil
far_anim = nil
far_victim = nil
close_distance = 0
far_distance = 0
close_snd_distance = 3
use = {=actor_enemy} false, true
meet_on_talking = false
allow_break = false

All new logic functions are refered to in esc_smart_terrain_5_7.ltx aswell.

User avatar
Alundaio
S.T.A.L.K.E.R.
Posts: 1242
Joined: 26 May 2012, 22:26

Re: Messing around with NPC jobs.

Postby Alundaio » 16 Feb 2017, 20:40

meet_dialog = dm_add_repair

Should be put under the meet section.

meet = meet@mechanic needs to be in animpoint@stand
"I have a dream that one day this community will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident; that all mods are created equal."

morris
Scavenger
Posts: 12
Joined: 16 Feb 2017, 02:33

Re: Messing around with NPC jobs.

Postby morris » 17 Feb 2017, 07:10

Works perfectly now, thanks a bunch ^^


Return to “Modding Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest