ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Archive
Need help modding Clear Sky

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  21:51:43  15 March 2019
profilee-mailreply Message URLTo the Top
optical_illusion
Senior Resident
 

 
On forum: 02/09/2013
Messages: 173
Need help modding Clear Sky

I have several questions; first off, how do I make mutants more hostile so to say, because they dont seem to attack unless they get to their smart terrain(try chasing a mutant pack which is transitioning, they arent going to turn around an attack until they reach their destination)

Another is, how do I make them assault other smart terrains? For example, i want the military blockpost in cordon to be constantly under attack by mutants. Im guessing you need to change the all.spawn but there is more to it i imagine
  04:40:35  17 March 2019
profilee-mailreply Message URLTo the Top
optical_illusion
Senior Resident
 

 
On forum: 02/09/2013
 

Message edited by:
optical_illusion
03/17/2019 14:40:00
Messages: 173
need our gods and saviors Decane or NatVak to guide me

plsss

xd
  11:32:58  20 March 2019
profilee-mailreply Message URLTo the Top
Decane
Senior Resident
 

 
On forum: 04/04/2007
 

Message edited by:
Decane
03/20/2019 11:37:08
Messages: 1690

---QUOTATION---
how do I make mutants more hostile so to say, because they dont seem to attack unless they get to their smart terrain(try chasing a mutant pack which is transitioning, they arent going to turn around an attack until they reach their destination)
---END QUOTATION---


It might be down to the following block of code in scripts/xr_combat_ignore.script:
if enemy:id() == db.actor:id() then
	local combat_smart_manager = board.smarts[my_squad_dest_smart or my_squad_src_smart].smrt.combat_manager
	if not_check_sim ~= true then
		combat_smart_manager:enemy_actor_callback(my_squad)
		if combat_smart_manager:get_squad_stage(my_squad) ~= "combat" then
			obj:enable_memory_object( enemy, false )
			return false
		end
	end
	return true
end

That gets called from, among other places, function action_process_enemy:enemy_callback() in the same file, with argument #4 set to false. Try setting the argument to true to see if that alters the mutants' behavior. But beware this change will also affect human NPCs.

---QUOTATION---
how do I make them assault other smart terrains? For example, i want the military blockpost in cordon to be constantly under attack by mutants.
---END QUOTATION---


In CS, there are both 'scripted' and 'non-scripted' squads. By 'sripted', I mean squads whose behavior is (often rigidly) pre-determined via configs/misc/squad_descr_*.ltx. By 'non-scripted', I mean squads whose behavior is instead determined by the objectives of their parent faction, as defined in configs/misc/faction_*.ltx and implemented in scripts/sim_*.script.

If you want to make a (repeatable?) 'scenario' of mutants attacking the military base, you could spawn a mutant squad or two somewhere near the base via a spawner logic script (see configs/scripts/escape/esc_support_military_spawn.ltx for an illustrative example of one) conditional on a squad of the same section not already existing. You should define the squad section in configs/misc/squad_descr_escape.ltx, setting it to have:
target_smart = esc_smart_terrain_3_16

You should also give them adequate attack_power to make sure they have confidence to attack the military squads.

Then you need to bind your spawner logic to a space restrictor. This is where editing all.spawn comes in. Search an unpacked all.spawn for "esc_support_military_spawn.ltx" to see how that gets bound.

Alternatively (or in addition) to the above, you can make the military base an attractive target for the mutant faction as a whole, to make even 'non-scripted' mutant squads want to go there all the time. You can do this by setting precondition_target = esc_smart_terrain_3_16 under the desired faction expansion section(s) in configs/misc/faction_monster.ltx.
  22:23:13  12 April 2019
profilee-mailreply Message URLTo the Top
optical_illusion
Senior Resident
 

 
On forum: 02/09/2013
Messages: 173

---QUOTATION---
how do I make mutants more hostile so to say, because they dont seem to attack unless they get to their smart terrain(try chasing a mutant pack which is transitioning, they arent going to turn around an attack until they reach their destination)
It might be down to the following block of code in scripts/xr_combat_ignore.script:
if enemy:id() == db.actor:id() then
	local combat_smart_manager = board.smarts[my_squad_dest_smart or my_squad_src_smart].smrt.combat_manager
	if not_check_sim ~= true then
		combat_smart_manager:enemy_actor_callback(my_squad)
		if combat_smart_manager:get_squad_stage(my_squad) ~= "combat" then
			obj:enable_memory_object( enemy, false )
			return false
		end
	end
	return true
end

That gets called from, among other places, function action_process_enemy:enemy_callback() in the same file, with argument #4 set to false. Try setting the argument to true to see if that alters the mutants' behavior. But beware this change will also affect human NPCs.
how do I make them assault other smart terrains? For example, i want the military blockpost in cordon to be constantly under attack by mutants.
In CS, there are both 'scripted' and 'non-scripted' squads. By 'sripted', I mean squads whose behavior is (often rigidly) pre-determined via configs/misc/squad_descr_*.ltx. By 'non-scripted', I mean squads whose behavior is instead determined by the objectives of their parent faction, as defined in configs/misc/faction_*.ltx and implemented in scripts/sim_*.script.

If you want to make a (repeatable?) 'scenario' of mutants attacking the military base, you could spawn a mutant squad or two somewhere near the base via a spawner logic script (see configs/scripts/escape/esc_support_military_spawn.ltx for an illustrative example of one) conditional on a squad of the same section not already existing. You should define the squad section in configs/misc/squad_descr_escape.ltx, setting it to have:
target_smart = esc_smart_terrain_3_16

You should also give them adequate attack_power to make sure they have confidence to attack the military squads.

Then you need to bind your spawner logic to a space restrictor. This is where editing all.spawn comes in. Search an unpacked all.spawn for "esc_support_military_spawn.ltx" to see how that gets bound.

Alternatively (or in addition) to the above, you can make the military base an attractive target for the mutant faction as a whole, to make even 'non-scripted' mutant squads want to go there all the time. You can do this by setting precondition_target = esc_smart_terrain_3_16 under the desired faction expansion section(s) in configs/misc/faction_monster.ltx.
---END QUOTATION---



Thank you

Got one problem tho....the only place mutants specifically refuse to attack is that military base esc_smart_terrain_3_16. Is there something that prevents them from attacking it? Mutants attack everything else even places I dont want them to attack like loner base(how would I script that for them to make it a less desirable target?).

I tried to use the precondition target thing.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Archive
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2019 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.