Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
38 user(s) are online (22 user(s) are browsing Forum)

Members: 0
Guests: 38

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +30€

Current balance: -190€
(last updated 04/2017)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 50 users playing Freelancer on 40 servers.
September. 22, 2017

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Not too shy to talk
Joined:
2015/1/18 12:56
From The Hague, EU
Group:
Registered Users
Posts: 73
Offline
I have a couple of questions/requests regarding AI:

1) (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.

2) State_graph.db.
Is there anything known regarding the values in state_graph.db? What they do? How they relate?

3) Formation leader independent of escorts.
A formation leader of a patrol of size >= 2 adapts his behavior to his escorts. For example he turns very slow in order for his escorts to remain in position, and he waits for his escorts (13DF88 in common.dll,which is unfortunately also used by a lot of other things -- see Limit Breaking 101). Instead, the leader should operate independently of his escorts, just like the player does. The escorts can still catch up using thruster and formation speed catch up multiplier.

EDIT: fixed.

4) Let Autopilot use thruster.
Especially in formation, like NPCs do.

5) Let Multiple Ship Patrol launch from base or jumphole/gate.
This can't be done because the escorts need to be created simultaneously with the leader - they can't join formation at a later moment.

6)
Quote:

Gold_Sear wrote:
Code:
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.


7) (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).

Posted on: 2016/1/7 12:20

Edited by Gold_Sear on 2016/8/10 18:03:49
Edited by Gold_Sear on 2016/8/24 14:44:49
Edited by Gold_Sear on 2016/8/24 14:45:21
Edited by Gold_Sear on 2017/7/13 19:48:41
Pirate Nation mod -- under construction
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 466
Offline
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, Delay

I think they represent percentage values how high the chance is to change the state.

Open in new window

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.

Posted on: 2016/1/7 17:11
How to create .SUR files - Tutorial
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Not too shy to talk
Joined:
2015/1/18 12:56
From The Hague, EU
Group:
Registered Users
Posts: 73
Offline
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)

Posted on: 2016/1/11 18:01

Edited by Gold_Sear on 2016/8/10 18:07:21
Pirate Nation mod -- under construction
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Just popping in
Joined:
2014/6/28 19:21
Group:
Registered Users
Posts: 10
Offline
Quote:

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, Delay

I think they represent percentage values how high the chance is to change the state.

Open in new window

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?

Posted on: 2016/1/13 10:33
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Just can't stay away
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 490
Offline
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.

Posted on: 2016/1/13 19:05
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Just popping in
Joined:
2014/6/28 19:21
Group:
Registered Users
Posts: 10
Offline
Quote:

Schmackbolzen wrote:
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.

It would be cool

Posted on: 2016/1/14 9:44
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Just can't stay away
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 490
Offline
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?

Posted on: 2016/8/19 16:11
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Not too shy to talk
Joined:
2015/1/18 12:56
From The Hague, EU
Group:
Registered Users
Posts: 73
Offline
@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

Posted on: 2016/8/24 14:43
Pirate Nation mod -- under construction
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Just can't stay away
Joined:
2008/5/28 18:04
From Maine, USA
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 457
Offline
Quote:
Gold_Sear wrote:
1) (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.

Quote:
Code:
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.

Quote:
7) (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.

Posted on: 2016/9/22 17:49
88 Flak for Freelancer
1.27 Betas | Wiki | Forums
Top
Re: Disable PlayerEnemyClamp and other Questions/Requests regarding AI
Home away from home
Joined:
2008/5/21 19:32
Group:
Registered Users
FLServer Admins
$$$ Supporters $$$
Senior Members
Posts: 854
Offline
Quote:

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.


Posted on: 2016/10/2 14:10
Gun control is like fighting drunk driving by making it harder for sober people to buy a car...
Top
Re: Disable PlayerEnemyClamp (fixed) and other Questions regarding AI
Not too shy to talk
Joined:
2015/1/18 12:56
From The Hague, EU
Group:
Registered Users
Posts: 73
Offline
So, did some testing with patrol zones, and stumbled onto something weird. Added the following patrol zones to Omicron Minor.
Code:
[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:
Code:
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.)

Tested it: changed y coordinate of second patrol zone (above) to 8000, and value mentioned above to -3000f, strange behavior. Changed to 8000f, normal behavior.

Of course, this doesn't fix it, and it's a universal value.

Greets,
Gold

Posted on: 1/14 14:42

Edited by Gold_Sear on 2017/1/14 15:43:13
Edited by Gold_Sear on 2017/1/14 17:06:01
Pirate Nation mod -- under construction
Top