Page 6 of 9

Re: Musings for v.1.92

Posted: Fri Jul 15, 2022 4:16 pm
by Redspear
another_commander wrote: Fri Jul 15, 2022 3:39 pm
Edit2: Darn, I completely missed cim's message earlier - could have saved myself the trouble of researching :roll:
I haven't got the hang of this summarising business have I? :lol:

Re: Musings for v.1.92

Posted: Fri Jul 15, 2022 4:20 pm
by cim
The majority of randomness - with the JS AIs, anyway - is provided by the player role list. The player gets various roles (reputations, in intent) assigned to this list as they do stuff in the game, which then decay away again back to "player-unknown" (which is responded to roughly like the old "player" role was - pirates attack, everyone else ignores if Clean).

The higher the player's Elite rank, the slower their reputation decay is - some newish Mostly Harmless pilot you've never seen before could be anyone; some Deadly pilot you've never seen before you probably have at least vaguely heard the name and know what side they're on. Things which clear bounties - escape pods, galactic hyperspace - also clear out a good chunk of rep (though not all of it, especially not at Elite rank) ... normal jumping between systems clears down rep much faster if you're doing a cross-chart run than if you're hopping around the same A-B trade route for weeks.

Each AI then picks a random role from the list - so a player who does both trading and bounty hunting, some AIs will treat them as a trader, and some as a hunter, in rough proportion to how much they've done each activity lately. AIs in groups will take their lead from the group leader.

This is also used by the police AIs if they stumble across a fight between two Clean ships: does the player have a better rep than the ship they're fighting? If so, it was probably the other one that started it, so they'll then start allocating bounties on that basis. (OXPs have a fair bit of flexibility to poke this so that the assassin pre-emptively attacking the player is the locally highly respected Earl of Tree Grubs, so clearly the scruffy outsider started it when the cops show up). Various other things like friendly fire forgiveness work in a similar way; traders are likely to run away from a "pirate" role player even if the player hasn't got anywhere near being hostile today; etc.

In general the idea is that your actions give you a reputation, AIs respond to that reputation, and escaping an established reputation can be done but takes some effort.

Re: Musings for v.1.92

Posted: Fri Jul 15, 2022 5:56 pm
by Switeck
cim wrote: Fri Jul 15, 2022 7:20 am
If it *does* include the player, then yes, if the player is detected first by them as a matter of scanner range, the pirates will engage the player in a dogfight (after the odds calculation), and a standard trader group will then (because pirates are in the role category "oolite-trader-dislike") not only not help the player but actively try to skirt around the fight rather than ploughing right through it.
Following 15-25 km back means the traders are detected by pirates long before the player is...and the pirates have more time to solidly latch onto a trader instead of randomly breaking off to attack the player.

Re: Musings for v.1.92

Posted: Fri Jul 15, 2022 6:08 pm
by Cody
Using poor merchants as cannon fodder? As someone once said: "There's no honour out there, only survivors!"

Re: Musings for v.1.92

Posted: Fri Jul 15, 2022 10:41 pm
by Switeck
If the trader is badly outnumbered and doesn't at least TRY to flee until it's <25% max energy ...it's not cannon fodder, it's committing suicide.
Why should I join it?

Re: Musings for v.1.92

Posted: Tue Oct 04, 2022 12:24 pm
by Cholmondely
Cholmondely wrote: Wed Jul 06, 2022 6:23 pm
*Part of the point in adding things in is the difficulty inherent in mastering a list of 700+ oxz's in the in-game Expansions Manager and the additional 400+ oxp's outside it.
Heh! We're now up to 751!

Re: Musings for v.1.92

Posted: Wed Oct 05, 2022 3:28 am
by Switeck
Cholmondely wrote: Tue Oct 04, 2022 12:24 pm
Cholmondely wrote: Wed Jul 06, 2022 6:23 pm
*Part of the point in adding things in is the difficulty inherent in mastering a list of 700+ oxz's in the in-game Expansions Manager and the additional 400+ oxp's outside it.
Heh! We're now up to 751!
Those are only the official ones. Everyone who works long with tweaking/making OXPs/OXZs will have some testing stuff of their own which may not get released because of their pure cheat nature.

There's also a bit of tweaks to existing OXPs/OXZs of behavior that really bothers people which may not see regular release as well.

The combinations of them all are nearly infinite.

Re: Musings for v.1.92

Posted: Mon Oct 31, 2022 10:13 am
by Cholmondely
Appendix 3: AI turns Scavengers into Miners With a Pulse Laser

Just to add in Frame's issue which is followed by cim's potential fix

Re: Musings for v.1.92

Posted: Mon Oct 31, 2022 1:53 pm
by Milo
FYI, I’ve been using cag’s revised core scripts (see viewtopic.php?p=270782) and the fix suggested by cim for Frame’s issue is already implemented in cag’s scripts.

Several other core script issues and fixes are also noted in the comments on that thread.

"This just BUGS me!"

Posted: Mon Oct 31, 2022 2:12 pm
by Switeck
Thanks to LongRangeScanner OXP, I'm spotting traders that are being spawned in >170,000 m away from everything else.
This is really bad in interstellar space, where the occasional arrival of traders is supposed to offer the player an escape route on their wormhole.

Many of the traders I see appear at the witchpoint buoy decide to head off away from the planet, station, or sun...so there seems to be something broken there as well.

I'm also seeing NPC ship 'combat' that's an awful joke -- like WORSE than v1.72 levels of bad!
Freighters with escorts especially will hardly shoot at all, twitch and briefly use injectors for like 1/3 second if shot, and do little to either flee or fight till they die.

Re: "This just BUGS me!"

Posted: Mon Oct 31, 2022 3:39 pm
by Milo
Switeck wrote: Mon Oct 31, 2022 2:12 pm
Thanks to LongRangeScanner OXP, I'm spotting traders that are being spawned in >170,000 m away from everything else.
This is really bad in interstellar space, where the occasional arrival of traders is supposed to offer the player an escape route on their wormhole.

Many of the traders I see appear at the witchpoint buoy decide to head off away from the planet, station, or sun...so there seems to be something broken there as well.

I'm also seeing NPC ship 'combat' that's an awful joke -- like WORSE than v1.72 levels of bad!
Freighters with escorts especially will hardly shoot at all, twitch and briefly use injectors for like 1/3 second if shot, and do little to either flee or fight till they die.
How much of this problematic behavior do you see if you disable all OXPs other than LongRangeScanner?

Possibly relevant to your combat observations: https://wiki.alioth.net/index.php/OXP_NPC_Combat_AI

If you use the debug console you can inspect the ships in question and check their accuracy and AI scripts.

Re: Musings for v.1.92

Posted: Mon Oct 31, 2022 9:19 pm
by Switeck
I'll test some more...I am pretty sure I haven't found an OXP causing the problems so far though.

Re: Musings for v.1.92

Posted: Mon Oct 31, 2022 10:03 pm
by Reval
Oops, someone changed the name of this thread from "this just BUGs me' to the above, causing a deletion, double-take, and re-post...

In another discussion I might have given the erroneous impression that I believed Oolite to be perfect. For the most part, it is.

But what TRULY bugs me, and always has, is the masslock before Hyperspace after exiting Main. I know there are sound lore/history/technical in-game reasons for this, but it raises my hackles almost every time. Mostly because I forget to do certain things lik hit the "i" straight away or merely just increase speed to max.

So I now herewith vow to try and circumvent/cancel this exasperating 'feature' for Elite Trader 1.19!

I've done something in 1.18 that might have already accomplished it, but it requires much further testing... I think I'm almost starting to smile.

D.R. of X.

Re: Musings for v.1.92

Posted: Tue Nov 01, 2022 2:56 am
by Switeck
I'm pretty sure I found at least part of the ai-going-stupid problem...

Code: Select all

17:44:40.334 [ai.message.failed.overflow]: ***** ERROR: AI message "ENERGY_FULL" received by 'Navy Asp Mark II 768' AI while pending messages stack full; message discarded. Pending messages:
("AGGRESSOR_SWITCHED_TARGET 4006 799", "AGGRESSOR_SWITCHED_TARGET 3998 809", "AGGRESSOR_SWITCHED_TARGET 1853 807", "AGGRESSOR_SWITCHED_TARGET 2690 730", "AGGRESSOR_SWITCHED_TARGET 713 767", "AGGRESSOR_SWITCHED_TARGET 2690 767", ENERGY_FULL, "AGGRESSOR_SWITCHED_TARGET 1850 776", "AGGRESSOR_SWITCHED_TARGET 2688 100", "AGGRESSOR_SWITCHED_TARGET 3999 727", "AGGRESSOR_SWITCHED_TARGET 1852 748", "AGGRESSOR_SWITCHED_TARGET 704 772", "AGGRESSOR_SWITCHED_TARGET 713 726", "AGGRESSOR_SWITCHED_TARGET 1846 755", "AGGRESSOR_SWITCHED_TARGET 4002 744", "AGGRESSOR_SWITCHED_TARGET 2690 729", "AGGRESSOR_SWITCHED_TARGET 1846 748", "AGGRESSOR_SWITCHED_TARGET 1844 721", TARGET_LOST, "AGGRESSOR_SWITCHED_TARGET 704 769", "AGGRESSOR_SWITCHED_TARGET 1853 789", "AGGRESSOR_SWITCHED_TARGET 2689 100", "AGGRESSOR_SWITCHED_TARGET 2688 730", "AGGRESSOR_SWITCHED_TARGET 713 792", "AGGRESSOR_SWITCHED_TARGET 4007 823", "AGGRESSOR_SWITCHED_TARGET 1845 754", TARGET_DESTROYED, "AGGRESSOR_SWITCHED_TARGET 1853 717", "AGGRESSOR_SWITCHED_TARGET 713 772", "AGGRESSOR_SWITCHED_TARGET 1845 756", "AGGRESSOR_SWITCHED_TARGET 2682 777", "AGGRESSOR_SWITCHED_TARGET 713 774", "AGGRESSOR_SWITCHED_TARGET 2682 767")
17:44:40.501 [ai.message.failed.overflow]: ***** ERROR: AI message "ENERGY_FULL" received by 'Navy Asp Mark II 768' AI while pending messages stack full; message discarded. Pending messages:
("AGGRESSOR_SWITCHED_TARGET 4006 799", "AGGRESSOR_SWITCHED_TARGET 3998 809", "AGGRESSOR_SWITCHED_TARGET 1853 807", "AGGRESSOR_SWITCHED_TARGET 2690 730", "AGGRESSOR_SWITCHED_TARGET 713 767", "AGGRESSOR_SWITCHED_TARGET 2690 767", ENERGY_FULL, "AGGRESSOR_SWITCHED_TARGET 1850 776", "AGGRESSOR_SWITCHED_TARGET 2688 100", "AGGRESSOR_SWITCHED_TARGET 3999 727", "AGGRESSOR_SWITCHED_TARGET 1852 748", "AGGRESSOR_SWITCHED_TARGET 704 772", "AGGRESSOR_SWITCHED_TARGET 713 726", "AGGRESSOR_SWITCHED_TARGET 1846 755", "AGGRESSOR_SWITCHED_TARGET 4002 744", "AGGRESSOR_SWITCHED_TARGET 2690 729", "AGGRESSOR_SWITCHED_TARGET 1846 748", "AGGRESSOR_SWITCHED_TARGET 1844 721", TARGET_LOST, "AGGRESSOR_SWITCHED_TARGET 704 769", "AGGRESSOR_SWITCHED_TARGET 1853 789", "AGGRESSOR_SWITCHED_TARGET 2689 100", "AGGRESSOR_SWITCHED_TARGET 2688 730", "AGGRESSOR_SWITCHED_TARGET 713 792", "AGGRESSOR_SWITCHED_TARGET 4007 823", "AGGRESSOR_SWITCHED_TARGET 1845 754", TARGET_DESTROYED, "AGGRESSOR_SWITCHED_TARGET 1853 717", "AGGRESSOR_SWITCHED_TARGET 713 772", "AGGRESSOR_SWITCHED_TARGET 1845 756", "AGGRESSOR_SWITCHED_TARGET 2682 777", "AGGRESSOR_SWITCHED_TARGET 713 774", "AGGRESSOR_SWITCHED_TARGET 2682 767")
17:44:41.210 [ai.message.failed.overflow]: ***** ERROR: AI message "ENERGY_FULL" received by 'Navy Asp Mark II 768' AI while pending messages stack full; message discarded. Pending messages:
("AGGRESSOR_SWITCHED_TARGET 4006 799", "AGGRESSOR_SWITCHED_TARGET 3998 809", "AGGRESSOR_SWITCHED_TARGET 1853 807", "AGGRESSOR_SWITCHED_TARGET 2690 730", "AGGRESSOR_SWITCHED_TARGET 713 767", "AGGRESSOR_SWITCHED_TARGET 2690 767", ENERGY_FULL, "AGGRESSOR_SWITCHED_TARGET 1850 776", "AGGRESSOR_SWITCHED_TARGET 2688 100", "AGGRESSOR_SWITCHED_TARGET 3999 727", "AGGRESSOR_SWITCHED_TARGET 1852 748", "AGGRESSOR_SWITCHED_TARGET 704 772", "AGGRESSOR_SWITCHED_TARGET 713 726", "AGGRESSOR_SWITCHED_TARGET 1846 755", "AGGRESSOR_SWITCHED_TARGET 4002 744", "AGGRESSOR_SWITCHED_TARGET 2690 729", "AGGRESSOR_SWITCHED_TARGET 1846 748", "AGGRESSOR_SWITCHED_TARGET 1844 721", TARGET_LOST, "AGGRESSOR_SWITCHED_TARGET 704 769", "AGGRESSOR_SWITCHED_TARGET 1853 789", "AGGRESSOR_SWITCHED_TARGET 2689 100", "AGGRESSOR_SWITCHED_TARGET 2688 730", "AGGRESSOR_SWITCHED_TARGET 713 792", "AGGRESSOR_SWITCHED_TARGET 4007 823", "AGGRESSOR_SWITCHED_TARGET 1845 754", TARGET_DESTROYED, "AGGRESSOR_SWITCHED_TARGET 1853 717", "AGGRESSOR_SWITCHED_TARGET 713 772", "AGGRESSOR_SWITCHED_TARGET 1845 756", "AGGRESSOR_SWITCHED_TARGET 2682 777", "AGGRESSOR_SWITCHED_TARGET 713 774", "AGGRESSOR_SWITCHED_TARGET 2682 767")
17:44:41.403 [ai.message.failed.overflow]: ***** ERROR: AI message "ENERGY_FULL" received by 'Navy Asp Mark II 768' AI while pending messages stack full; message discarded. Pending messages:
("AGGRESSOR_SWITCHED_TARGET 4006 799", "AGGRESSOR_SWITCHED_TARGET 3998 809", "AGGRESSOR_SWITCHED_TARGET 1853 807", "AGGRESSOR_SWITCHED_TARGET 2690 730", "AGGRESSOR_SWITCHED_TARGET 713 767", "AGGRESSOR_SWITCHED_TARGET 2690 767", ENERGY_FULL, "AGGRESSOR_SWITCHED_TARGET 1850 776", "AGGRESSOR_SWITCHED_TARGET 2688 100", "AGGRESSOR_SWITCHED_TARGET 3999 727", "AGGRESSOR_SWITCHED_TARGET 1852 748", "AGGRESSOR_SWITCHED_TARGET 704 772", "AGGRESSOR_SWITCHED_TARGET 713 726", "AGGRESSOR_SWITCHED_TARGET 1846 755", "AGGRESSOR_SWITCHED_TARGET 4002 744", "AGGRESSOR_SWITCHED_TARGET 2690 729", "AGGRESSOR_SWITCHED_TARGET 1846 748", "AGGRESSOR_SWITCHED_TARGET 1844 721", TARGET_LOST, "AGGRESSOR_SWITCHED_TARGET 704 769", "AGGRESSOR_SWITCHED_TARGET 1853 789", "AGGRESSOR_SWITCHED_TARGET 2689 100", "AGGRESSOR_SWITCHED_TARGET 2688 730", "AGGRESSOR_SWITCHED_TARGET 713 792", "AGGRESSOR_SWITCHED_TARGET 4007 823", "AGGRESSOR_SWITCHED_TARGET 1845 754", TARGET_DESTROYED, "AGGRESSOR_SWITCHED_TARGET 1853 717", "AGGRESSOR_SWITCHED_TARGET 713 772", "AGGRESSOR_SWITCHED_TARGET 1845 756", "AGGRESSOR_SWITCHED_TARGET 2682 777", "AGGRESSOR_SWITCHED_TARGET 713 774", "AGGRESSOR_SWITCHED_TARGET 2682 767")
...and the problem is quite old:

Thargoids added as groups crash game.
Instead of overflowing the stack, any extra message is now discarded, until the stack is back to decent numbers.

Removing extra messages apparently isn't quick enough to reach "decent numbers", as the stack keeps overflowing.

Similar problem/example:
viewtopic.php?p=136440#p136440
viewtopic.php?p=136801#p136801
(recursive ai fleeing!)

Re: Musings for v.1.92

Posted: Tue Nov 01, 2022 3:28 am
by Milo
Switeck wrote: Tue Nov 01, 2022 2:56 am
Navy Asp Mark II
Galactic Navy OXP?