Disable PlayerEnemyClamp and other Questions/Requests regarding AI
-
About the stategraph:
It represents a matrix of the following entries:
NULL, Buzz, Goto, Trail, Flee, Evade, Idle, Dock, Launch, InstantTradeLade, Formation, Large Ship (move), Cruise, Strafe, Guide, Face, Loot, Follow, DrasticEvade, FreeFlight, DelayI think they represent percentage values how high the chance is to change the state.
Most of them actually influence non-combat behaviour only. Once they are in combat, the pilots/AI is mainly overwritten. So basically changing the stategraph doesn’t change that much to your situatuon.
-
Thanks for the info, Skotty.
About the PlayerEnemyClamp, if it’s not possible/needed to disable it, is there any other way to randomize NPC target selection? And if yes, how is it done? When I encounter a 4 Nomad patrol always exactly 2 of them will attack me, and the others never will, unless I’m alone. I want this to be random, like when NPCs attack each other. Can no one help me with this?
EDIT: fixed (see first post)
-
Skotty. wrote:
About the stategraph:
It represents a matrix of the following entries:
NULL, Buzz, Goto, Trail, Flee, Evade, Idle, Dock, Launch, InstantTradeLade, Formation, Large Ship (move), Cruise, Strafe, Guide, Face, Loot, Follow, DrasticEvade, FreeFlight, DelayI think they represent percentage values how high the chance is to change the state.
Most of them actually influence non-combat behaviour only. Once they are in combat, the pilots/AI is mainly overwritten. So basically changing the stategraph doesn’t change that much to your situatuon.
What is this tool?
-
It is a tool Skotty and I wrote for testing since I was pretty sure I got the states via hooking stuff. I even wrote a hook to print out which state a selected npc currently has. We never released it because without proper explanation and state output of the npcs it isn’t helping you much.
If there is enough interest we can release it and I can try to write a proper flhook plugin which gives you the info for debugging / verifying.
-
Since the first one got solved (which actually sounds like a nice feature - thanks for that), I thought about NPCs and cruise disruptors. Now as far as I remember they don’t use them if players have engine kill enabled. So players hit engine kill and go to cruise speed so that they can flee. Would it be possible to disable that behaviour or does it break them?
-
@Schmackbolzen: added your request to the first post (you should correct me if you mean something else).
Currently I’m learning some basics about assembly code, so maybe that helps -
Gold_Sear wrote:
- (most important one) Disable PlayerEnemyClamp.
PlayerEnemyClamp decides how many enemies will attack the player (if the player is not the only enemy of the attacking NPCs). It has two ints, one for minimum and the other for maximum. But I want my NPCs to randomly select target, player or NPC.
EDIT: fixed by adoxa.
Wow, this is awesome! I can’t believe this is fixed! This always bothered me to no end with FL, especially since my preferred experience is heavily NPC team-fight oriented - so the clamp always felt unfair.
content.dll, C4C01, 500f, min distance from player position at spawn moment that an NPC patrol with arrival = cruise will fly to when spawned ~Gold_Sear, M0tah content.dll, C4C06, 2000f, max distance from player position at spawn moment that an NPC patrol with arrival = cruise will fly to when spawned ~Gold_Sear, M0tah ```This poses a problem when spawn range is big. Instead, it should be from the spawn position, not player position.
Increasing these does help large spawn ranges, but it is annoying. It’d be nice if this behavior could be eliminated altogether. As it stands, even with higher ranges, there’s a good chance high-range NPCs will end up cruising behind you, since this point is picked at spawn time and could be picked to the side of (or behind) your position at the time.
- (added by Schmackbolzen - see post #7) Let NPCs use cruise disruptors against engine kill.
To prevent NPCs to always fire cruise disruptor when engine killed, it should only be done when over a certain speed (like thruster speed or custom speed).
A partial work-around for this is to set CD weapons to auto_turret = true. This allows NPCs to unconditionally fire CDs at targets. Obviously, this is not ideal, but it does at least allow them to catch players floating by at cruise speeds with their engines off.
- (most important one) Disable PlayerEnemyClamp.
-
foxUnit01 wrote:
A partial work-around for this is to set CD weapons to auto_turret = true. This allows NPCs to unconditionally fire CDs at targets. Obviously, this is not ideal, but it does at least allow them to catch players floating by at cruise speeds with their engines off.
This is perfect! I notice the nomad cruise disruptor doesn’t have an auto_turret entry. I’m adding one to see if it works.
-
So, did some testing with patrol zones, and stumbled onto something weird. Added the following patrol zones to Omicron Minor.
[zone] nickname = Zone_St01_pop_1 pos = 8000, 0, 24000 shape = SPHERE size = 10000 sort = 80 toughness = 10 density = 8 repop_time = 25 max_battle_size = 8 pop_type = background relief_time = 35 faction_weight = ku_n_grp, 10 encounter = area_assault, 10, 0.29 faction = ku_n_grp, 1 [zone] nickname = Zone_St01_pop_2 pos = 8000, 0, 10000 shape = SPHERE size = 10000 sort = 80 toughness = 10 density = 8 repop_time = 25 max_battle_size = 8 pop_type = background relief_time = 35 faction_weight = li_n_grp, 10 encounter = area_assault, 10, 0.29 faction = li_n_grp, 1 ```Everything works fine. Then I changed pos = 8000, 0, 10000 -> pos = 8000, 42900, 10000 and pos = 8000, 0, 24000 -> pos = 8000, 43200, 24000. Strange things happen. Every 10 seconds, the ships stand still for about 2 seconds, and they all fly to the exact center of the zone and freeze. This is probably because the zone doesn't intersect the y=0 horizontal plane. If it does, though, everything works fine, except the ships will always fly toward the y=500 plane, no matter what the y coordinate of the zone is (as long as the zone intersects this plane, as it seems). Changing the y coordinate to -43200 and -42900 didn't help. Changed size to 50000 -> works fine. Changed size back to 10000, changed height to -9000 -> everything works fine, however changing size to 9500 -> strange behavior (freeze at center, etc) Forgot to mention, I didn't tested it in other systems, I don't think that's the problem though. Anyone found a fix? EDIT: so I looked up the offset that controls the height patrols will fly to:
Content.dll v1.1 11811C 500f y coordinate patrols with behavior = wander will return to, unless patrol zone doesn’t intersect with that height, in which case strange behavior will occur (freezing at center, etc.)
Of course, this doesn't fix it, and it's a universal value. Greets, Gold
-