[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4280: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression'
Oolite Bulletins • PopulationControl.oxz - Page 2
Page 2 of 3

Re: Too many pirates...

Posted: Wed Apr 17, 2019 1:07 pm
by stranger
Tweaking population rules based on system government / TL / maybe GNP seems most logical solution. We have already such dependencies in vanilla populator, so you can just enhance its magnitudes.
Tweaking AI (parameter accuracy) is another approach and it was realized in Skilled NPCs. It really works for me, making system danger levels very different without redefining populator.

Re: Too many pirates...

Posted: Thu Apr 18, 2019 7:59 am
by Mikkail
Disembodied wrote:
Tue Apr 16, 2019 8:54 am
I think - and this would preserve the non-player-centric nature of things - that it might be better to change the populator by government type rather than by player rank. Keep pirate groups small (from lone-wolf raiders to a larger ship plus two fighter escorts max) in Corporate States, Democracies, Confederacies, and Communist worlds. Start bringing in larger packs from Dictatorships on. Allow the total number of pirates and pirate packs in a system to increase as government levels drop.

Players of all ranks can then avoid big pirate packs by sticking to safer systems. If a beginning player - or an experienced player in a big, slow, or otherwise non-combat-optimised ship - gets attacked by large gangs in a dangerous system, then it's their own fault.
I've been playing the OXP today, and it seems to work well. I agree with the above - once one gets to a certain level, then it is up to the player how many pirates they wish to take on, also depending on the role they take on in-game (trader, bounty hunter, or ...)

Re: Too many pirates...

Posted: Thu Apr 18, 2019 8:04 am
by Mikkail
phkb wrote:
Tue Apr 16, 2019 12:27 pm
A general question - should this limitation on the size of pirate packs in safer systems have an expiry? eg when the player reaches a certain score? After a certain number of in-game days has passed? Or just keep it in place permanently?
I'd vote for leaving it in place permanently - it is removable if someone finds it unnecessary after a while, and to me it takes it back to the Elite I used to play. Also like the idea of still risking running into larger packs in "unsafe" systems; if you go there, you were warned to keep enough fuel to jump to safety or be prepared to eject ship... :D

Re: PopulationControl.oxz

Posted: Thu Apr 18, 2019 10:54 am
by phkb
Mikkail wrote: I've been playing the OXP today, and it seems to work well.
That's good news! If everything keeps hanging together I'll add this to the download manager.

And hat-tip to Disembodied for splitting this discussion into its own thread.

Re: Too many pirates...

Posted: Thu Apr 18, 2019 12:54 pm
by Redspear
phkb wrote:
Tue Apr 16, 2019 12:27 pm
A general question - should this limitation on the size of pirate packs in safer systems have an expiry? eg when the player reaches a certain score? After a certain number of in-game days has passed? Or just keep it in place permanently?
As others have said, I don't think it needs an expiry and would be better without one.

However, as you've included a small chance of a large pirate pack appearing, I'd consider applying it to that i.e. no chancr of them apparing until expiry conditions met. If a player is unlucky enough to meet a large pirate pack on on of their first few trips then it remains a major inconvenience, however unlikely.

Suppose such packs inly start appearing once the player has reached Above Average rank, he or she should have a challenging but not impossible time of it.

Re: PopulationControl.oxz

Posted: Fri Apr 19, 2019 10:05 am
by Rustem
Also may be reset a large missionVariables.deep_space_pirate_kills via special mission(for advanced players) in the hacker outpost?

Re: PopulationControl.oxz

Posted: Sat Apr 20, 2019 3:35 am
by phkb
Rustem wrote:
Fri Apr 19, 2019 10:05 am
Also may be reset a large missionVariables.deep_space_pirate_kills via special mission(for advanced players) in the hacker outpost?
I’m trying to keep this OXP close to the core functionality, rather than getting into what other expansion packs do. To keep this one simple.

Re: PopulationControl.oxz

Posted: Sat Apr 20, 2019 12:36 pm
by Switeck
Something semi-player-centric could be added in the form of slightly reduced pirates in Galaxy Chart 1, where the player normally starts.
This would be on top of reduction of pirates in "unsafe" systems.
Likewise, Galaxy Chart 4 could have more pirates, reflecting the extra Anarchy and Multi-Government systems.

Re: PopulationControl.oxz

Posted: Tue Apr 23, 2019 3:24 am
by Mikkail
phkb wrote:
Sat Apr 20, 2019 3:35 am
I’m trying to keep this OXP close to the core functionality, rather than getting into what other expansion packs do. To keep this one simple.
An excellent idea. The OXP seems to be working well at what it does. There are expansion packs to add missions, modify ships/weapons and so on to make the game challenging. For me, this OXP allows me to have a lot of fun (currently doing courier runs all over the place, taking on hostiles when I need to and always on the lookout for lone Pythons with Offender status :) ).
I'm always wary of "feature creep" as I've seen it be the ruin of many a good idea in the real world. The old KISS formula - Keep It Simple for Success. :D

Re: PopulationControl.oxz

Posted: Sat May 11, 2019 7:58 pm
by Redspear
Gave this thing a try, early days but here's what I've found so far.

Less pirates - good
Less pirate encounters - not necessarily good
More police - ok
More police encounters - not necessarily good

The problem as I saw it was not so much the number of pirate encounters but rather the numbers of pirates within each encounter.
So when the populator generates an oversized encounter, what happens to it?

Is it
  • Removed?
  • Replaced with a smaller encouter?
  • Regenerated until a suitable encounter results?

At the moment it looks to me like it is the first one which would appear to be the least desirable. Could be completely wrong as I haven't tested it much further than a few jumps.

As for police, I understand that it is a control factor re pirate population, and that encounter rate is a factor significant for player safety but there is a penalty to pay re masslocking. Would it be possible to make a greater proportion of viper patrols be from the station to the witchpoint rather than the other way around?

Potential benefits:
  • Less annoying as regards masslocking
  • Greater sense of monitoring - police are headed towards incoming traffic, not away from it
Anyway, it's a good start and I'll be trying it out some more. Thanks.

Re: PopulationControl.oxz

Posted: Sat May 11, 2019 10:53 pm
by phkb
@redspear Thanks for trying it out and testing so thoroughly.
Redspear wrote:
Sat May 11, 2019 7:58 pm
Is it
Removed?
Replaced with a smaller encouter?
Regenerated until a suitable encounter results?
For pirates, it just puts a cap on the maximum number in each group generated. No more or less groups are created.

For police, the number of groups are increased. Edit: Actually, it's the chance of police being spawned that is being increased. But there is an upper limit of 30 on the number of police that can be in any system at any given point in time. Once that number is hit, no more police will be spawned, no matter how high the chance is.
[Edit edit] Actually, it's both. The number I'm increasing is used as a chance factor, in addition to using it for the number of groups initially spawned.

Re: PopulationControl.oxz

Posted: Sat May 11, 2019 11:01 pm
by phkb
Redspear wrote:
Sat May 11, 2019 7:58 pm
Would it be possible to make a greater proportion of viper patrols be from the station to the witchpoint rather than the other way around?
The core population routine already is putting all police on outbound courses. If you're seeing police heading the other way in safe systems, I can only assume it's because they've completed their patrol and are returning to the station. Edit: <sigh> I really need to read the code better before posting. It looks like some police are being placed on the Witchpoint-Planet lane, but there doesn't appear to be any way to force that to be Planet-Witchpoint without core code changes (at least from my reading of the code, which I have just proved to be unreliable...)

[Edit to add] I put some debug messages into the log file for the change to police numbers. In the systems where you notice a substantial increase in police, it would be good to see what those messages are.

Re: PopulationControl.oxz

Posted: Sun May 12, 2019 11:30 pm
by phkb
After making all those post edits, it might be unclear what is happening with police population, so I'll describe it here in general terms to (hopefully) make it clear. Or at least clearer. Or something. Anyway...

Core Oolite calculates two numbers: "police" and "interceptors", which are used in a number of ways.

1. "police" is used to define the number of initial police packs in a system, 5/6th of the number going to LANE_WP (Witchpoint-Planet) lane, and the remaining 1/6 being applied to the LANE_WPS (Witchpoint-Planet-Sun) triangle. (There are more calcs being applied to the numbers, but that should be sufficient for this discussion).

2. "police" is also used as the chance factor in re-population of police ships, up to a maximum of 30 police with the primary role of "police". These ships launch from the main station and head to the WP.

3. "interceptors" is only calculated and applied in TL10 or greater systems, and is derived from the number of pirates (which is another complex calculation). Half of the interceptors are added to LANE_WP, the other half to being on station at the witchpoint.

4. During system repopulation, any new interceptors are launched from the main station and head to the WP, up to a maximum of 30 police with the primary role of "police-witchpoint-patrol".

Because the primary role of standard police and interceptors is different, there is a theoretical maximum of 60 police ships in a system.

So, that's what the core code is doing, in really general terms, and leaving out a lot of the nitty-gritty of the calcs.

For the Population Control OXP, I have made a small increase to the "police" value in Corp States, Democracy and Confederacy systems (ie safer systems). I have also adjusted the logic of when the "interceptors" value is calculated to include safe systems with a productivity of more than 19000MCr.

If both these factors combine there could be a significant increase in the number of police in a system, so any feedback here would be helpful. I may need to tweak things a bit more, perhaps reducing the factor by which I'm increasing the "police" value, or increasing the threshold on productivity.

Re: PopulationControl.oxz

Posted: Mon May 13, 2019 5:00 pm
by Redspear
phkb wrote:
Sun May 12, 2019 11:30 pm
1. "police" is used to define the number of initial police packs in a system, 5/6th of the number going to LANE_WP (Witchpoint-Planet) lane, and the remaining 1/6 being applied to the LANE_WPS (Witchpoint-Planet-Sun) triangle. (There are more calcs being applied to the numbers, but that should be sufficient for this discussion).

2. "police" is also used as the chance factor in re-population of police ships, up to a maximum of 30 police with the primary role of "police". These ships launch from the main station and head to the WP.

3. "interceptors" is only calculated and applied in TL10 or greater systems, and is derived from the number of pirates (which is another complex calculation). Half of the interceptors are added to LANE_WP, the other half to being on station at the witchpoint.

4. During system repopulation, any new interceptors are launched from the main station and head to the WP, up to a maximum of 30 police with the primary role of "police-witchpoint-patrol".
Could generated LANE_WPS police promptly be removed in order to facilitate their replacement by ships launching from the station?
That would/should/could remove inbound police traffic, right?

I should be doing some more testing in the near future so I'll be back in touch...

Re: PopulationControl.oxz

Posted: Tue May 14, 2019 11:57 pm
by phkb
Redspear wrote:
Mon May 13, 2019 5:00 pm
Could generated LANE_WPS police promptly be removed in order to facilitate their replacement by ships launching from the station?
That would/should/could remove inbound police traffic, right?
I dug a little deeper into the logic for a police ship heading back to the station. If the Witchpoint-Planet location where they are created is in the last 10% of the distance from the witchpoint to the planet, they will head back to the station. Otherwise they will be heading to the witchpoint.

I'm not sure how that explains your experiences in seeing a large number of police ships inbound to the station. But I think I read in one of cim's posts that a form of simulation takes place when the system is generated, forcing the game through a theoretical period of 20 minutes. In that case, I could imagine most of the WP police ships ending up on an inbound trajectory. I'll have to dig a little more into that forced simulation code.

[Edit] *shuffles through pages of source code* Hmm, maybe I was wrong about that simulation thing...