ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
Need a good modding tutorial

« Previous 10 events | 1 2 | All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  05:12:22  16 May 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
@Firament
You do realize that that value only applies to offline alife combat? It doesn't work like that. Its the xr_combat_ignore that makes NPCs' and mutants ignore combat under certain conditions, such as allowing engagements at much larger ranges, or attacking enemies that have wondered out of their smart terrain.
  17:19:29  16 May 2013
profilee-mailreply Message URLTo the Top
Firmament
Senior Resident
 

 
On forum: 06/02/2009
 

Message edited by:
Firmament
05/16/2013 17:22:07
Messages: 268

---QUOTATION---
@Firament
You do realize that that value only applies to offline alife combat? It doesn't work like that. Its the xr_combat_ignore that makes NPCs' and mutants ignore combat under certain conditions, such as allowing engagements at much larger ranges, or attacking enemies that have wondered out of their smart terrain.
---END QUOTATION---



Agreed with the second part, but definitely not with the first. Several people I helped with that simple hint confirmed that it was working like a charm. Myself I can 100% prove it in my own mod: for example, a smart terrain respawns a mutant squad with the attack_power set on 800. It's already extremely agressive, and mutants of that squad can happen to be found really far away from their initial location. But, if the squad gets killed, then later on the game respawns one this time with a attack power set on 900 or 1000. And trust me, having experienced this one hundred of time while playing my mod, I can guarantee you that the difference is very, very noticeable ingame. This is just not something you can deny because it actually gives results.

That being said, I'm not saying that there aren't other means to get a "better" result. Actually, it depends on what you hear by "better" because I personnally tried once to get the mutant behavior modified by script, and it caused them to hunt the player *forever* on the map, without any reason to stop at all. Imagine this, you get chased by one mutant, you run, another one spots you and starts chasing you along with the other one, and so on, and so on... I didn't want this, so I decided to stick with the ltx modification, which still guarantees that the mutants will normally forget about you after a said distance.
I'm not a very good scripter, for sure, but I really do think that script is not always the best solution.
  00:04:28  17 May 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
And have you looked at the scripts? attack_power is a squad parameter override for offline alife calculations. The squads attack power is calculated from the ranks of all squad members at squad creation, but when a custom attack_power is set in the squads ltx, it uses that instead. It is an *offline* parameter only. And it is set for scripted squads only - generic squads (90%+ of the squads in a game) don't have an option for this to be set via an ltx file.
The effect of mutants moving to attack the player further than normal is because of the modified xr_combat_ignore, which places restrictions on how the AI will target and attack. Its main purpose is to prevent NPC's in one squad killing other NPC's in another squad unless their attacking or defending against them. The player, however, isn't squad based, so it skips that logic, and goes straight to the 2nd part - engagement distances. This is what has been modified.
More aggressive mutants is achieved via editing the mutants ltx files, since a bulk of the AI is internal to the engine, and takes parameters from the ltx files. The scripts just allow us to enable/disable combat under certain conditions.

Online combat has many factors. Armour, resistances, damage, accuracy, starting health, speed, attack strategy, morale, etc. All of this is internally calculated, processed and executed by the engine. attack_power parameter is processed *only* via the games lua scripts, and *only* used when both attacking and defending squads are offline either on another level, or on the other side of the level outside of switch distance on a newly visited level, or freshly loaded game. And it is a squad only parameter, and squads are a script only construct.

Also, the default combat AI for stalkers means they can't aim at most mutants properly, and given mutants tendancy to close in to melee, Stalkers always have a handicap that favours mutants that can get close enough. Bloodsuckers being invunerable while invisible, and only decloaking when they are close enough to attack means they always have very good chances of scoring a kill. Psuedogiants - high amounts of armour and resistance means they can take the damage while closing in. And their AOE attack can damage an entire squad at once. Boars, Dogs, and Snorks - Due to their horizontal skeleton, and directly line of attack, Stalkers have trouble scoring hits on vulnerable points. Tushkano's - when their morale isn't broken, their small size means they are hard to kill. Flesh - big, fat, low resistances and armour, and poor morale. Possibly the easiest quadrupedal mutant to kill.

Hope I've made myself clear. Stalkers dynamic online combat implementation means no two encouters are the same.
  18:05:37  17 May 2013
profilee-mailreply Message URLTo the Top
Firmament
Senior Resident
 

 
On forum: 06/02/2009
Messages: 268
Actual playtesting proves you wrong, SetaKat. Once again, anyone can experiment that ingame. Give vanilla mutants squads a attack_power = 1000 and see how they behave.

Actually, I asked Smoq2 to help me find a way to force NPCs to target mutants getting really far away from their smart terrain, which he did by sending me a modified xr_combat_ignore.script, after I priorly gave real high attack_power values to my mutants squads. Not the other way around. And before that, I wasn't even using the said xr_combat_ignore.script in my mod. How can you explain that?
Truth is, there's absolutely no reason to think that the only mean to alter online mutants behavior is to do it via script. Once again, facts are here.
  02:28:42  18 May 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Ok, you've proved me wrong about the offline only part after I checked the scripts (must have been thinking of a different attack power stat). However, I still stand by the rest: attack_power is read only by sim_squad_scripted.script. It gets set to squad_attack_power, which is only used for determining whether a squad will move to attack another smart terrain. Setting it to 1000 means that the squad will pretty much always move to attack another smart terrain.
It does not change the aggressiveness of mutants. It just means their squad won't get stopped by the smart terrain attack targeting logic caused by the defenders (normally) having a higher strength.
You want more aggressive mutants? Alter their ltx settings. There are some parameters there that can be used to tweak their aggressiveness.
  20:51:08  18 May 2013
profilee-mailreply Message URLTo the Top
Firmament
Senior Resident
 

 
On forum: 06/02/2009
 

Message edited by:
Firmament
05/18/2013 20:56:18
Messages: 268

---QUOTATION---
However, I still stand by the rest: attack_power is read only by sim_squad_scripted.script. It gets set to squad_attack_power, which is only used for determining whether a squad will move to attack another smart terrain. Setting it to 1000 means that the squad will pretty much always move to attack another smart terrain.
---END QUOTATION---



Well the real way I know to make a squad to move to attack another terrain (we're still talking about "scripted" squads in the ltx, not the ones that respawn via allspawn directive) is to do it using an explicit condition. At this point, there are two things to consider: conditions looking like this one -

target_smart = {+esc_take_habar_complete}esc_smart_terrain_6_3 , esc_smart_terrain_5_12

...will always act as an *immediate* order. As soon as the the story meets the condition, the squad moves to the target at once. You can even add many targets (esc_smart_terrain_6_3:esc_smart_terrain_8_6:esc_smart_terrain_9_7...), the squad will not stop until it has reached the final one (note: not 100% sure about this since I haven't tested it very deeply).


And conditions looking like this one -

target_smart = {+esc_take_habar_complete} nil, esc_smart_terrain_5_12

...Directly calls the faction strenght and logic to determine where the squad will move and when. For example, if the squad belongs to Loners, it won't do anything but keep holding esc_smart_terrain_5_12 until the actor collects Sidirovich's loot. But even when done with that, the game will check at which stage the Loner faction is, and if it is needed to send the squad to accomplish the current objectives of the faction_stalker.ltx or not. By "if it is needed", I'm refering to the strenght, logic, and ressources of the faction.
In this case, then, as opposed to the previous example, the squad will sometimes move to another smart terrain, and sometimes it will wait until a certain delay has passed before doing so.

My whole point is that, in both examples, I don't know what the attack power has to do with that.
Also, we'll both agree on the fact that a squad cannot move to another smart terrain just thanks to the attack power, even provided that it would work as you say. To move somewhere, it needs a condition, and a target; a direct one (example: esc_smart_terrain_6_3), or one that tells it to refer to the current state of the faction (nil).



---QUOTATION---

You want more aggressive mutants? Alter their ltx settings. There are some parameters there that can be used to tweak their aggressiveness.
---END QUOTATION---



I know about that, but still that would not be sufficient. And why making all mutants of the same kind (dog, pseudodog, burer...) behave the very same way? That would be boring and uncreative. The point with the attack power is that you can choose to create very agressive or very quiet squads.
I tell you, the attack power is what you really need. I'm not sure why you keep denying its role. Maybe that that's too easy for you (no irony, you know I respect your work) and you absolutely want to make things more complicated, but I think that the op rather wanted something simple and easy to be made
  01:48:29  19 May 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6340
Well, I say "always move", although there are a few extra restrictions on squad movement targeting, even at 1000 attack power. TZC's scripts simplify this down, which suits its alife design. They won't work well with vanilla unless carefully merged.
I think we can also both agree that alife in CS, particularly with squads, is quite heavily shackled. We're all looking for ways to break those shackles.
 
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 » Mod discussion
 

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.