Sneaky Ion storms
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Sneaky Ion storms
This is Turn 5.
I ran this game to test the changes by Vezzra and didn't realize until turn 12 that an Ion Storm was already there for 6 turns.
I think they should start larger and a little bit more oustide to be noticed.
This is Turn 6. Spot the difference?
Correct! That's a sneaky Ion Storm brewing up just under the B of Bato Beta!I ran this game to test the changes by Vezzra and didn't realize until turn 12 that an Ion Storm was already there for 6 turns.
I think they should start larger and a little bit more oustide to be noticed.
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Re: Sneaky Ion storms
Sneaky storms are cool!
Anyway, feel free to tinker with the numbers. The starting sizes can be modified in turn_events.py, lines 15&18, and the rest is in fields.txt. Have fun
Anyway, feel free to tinker with the numbers. The starting sizes can be modified in turn_events.py, lines 15&18, and the rest is in fields.txt. Have fun
Re: Sneaky Ion storms
I tinkered around with the numbers and made changes that mostly affect smaller galaxies (width < 1000). I've created a PR: https://github.com/freeorion/freeorion/pull/238
Note: My testing galaxy was irregular and had 100 stars which resulted in a width of about 1000.
- Reduced the spawn rate on small and normal sized maps to 0.03.
0.03 was the spawn rate before your changes and for smaller galaxies 0.05 is just too much. I haven't changed the max value of "0.00015 * fo.get_universe_width" but it probably should be changed. Doesn't it need a very very large galaxy to kick in (like 10000+ systems)?
- The fields will start a little larger and added randomization to starting size.
They were hard to notice at size 5.
- Increased the minimum distance of spawn location and galaxy center on smaller maps (width < 1000).radius * 0.02 equals 1 when the width is 1000. So fields would end up very close (1 to 2.5 uu) to the border (and possibly systems). I've added a minimum distance to border of 10.
- Decreased the max growth and shrink amount of Ion Storms.Since the max size of Ion Storms is 50 the min function never did anything so i've replaced 5.0 with 3.0. Molecular Clouds were ok with 5.0 because they can grow larger.
Note: My testing galaxy was irregular and had 100 stars which resulted in a width of about 1000.
- Reduced the spawn rate on small and normal sized maps to 0.03.
0.03 was the spawn rate before your changes and for smaller galaxies 0.05 is just too much. I haven't changed the max value of "0.00015 * fo.get_universe_width" but it probably should be changed. Doesn't it need a very very large galaxy to kick in (like 10000+ systems)?
- The fields will start a little larger and added randomization to starting size.
They were hard to notice at size 5.
- Increased the minimum distance of spawn location and galaxy center on smaller maps (width < 1000).
Code: Select all
dist_from_center = radius + uniform(min(radius * 0.02, 50.0), min(radius * 0.05, 100.0))
- Decreased the max growth and shrink amount of Ion Storms.
Code: Select all
effects = SetSize value = Value + min(max(Value * RandomNumber(0.05, 0.1), 1.0), 5.0)
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Re: Sneaky Ion storms
Um, no? As you said, an irregular map with 100 systems has a width about 1000, in which case 0.00015 * 1000 would yield 0.15...?Sloth wrote:I haven't changed the max value of "0.00015 * fo.get_universe_width" but it probably should be changed. Doesn't it need a very very large galaxy to kick in (like 10000+ systems)?
That was kind of the point My idea was to let them appear as if they gradually brew up in empty space, so I can spawn them close to the map edges without it looking too ackward.- The fields will start a little larger and added randomization to starting size.
They were hard to notice at size 5.
I think you lost a "0" here. Width = 1000 means radius = 500, 0.02 * 500 = 10.[/code]radius * 0.02 equals 1 when the width is 1000.
That's fine though, even if it probably never kicks in.I've added a minimum distance to border of 10.
Yeah, right of course. Obviously I wasn't paying attentionSince the max size of Ion Storms is 50 the min function never did anything so i've replaced 5.0 with 3.0. Molecular Clouds were ok with 5.0 because they can grow larger.
Re: Sneaky Ion storms
Perception, I'm on turn 120ish of my first game with the changes, not added Sloth's most recent yet.
I'm seeing a lot of Ion Storms. Now, I like that there are more than I'm used to, not sure that there should be this many more. On the other hand, it might just be random chance.
I'm seeing a lot of Ion Storms. Now, I like that there are more than I'm used to, not sure that there should be this many more. On the other hand, it might just be random chance.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: Sneaky Ion storms
Oops, you are correct. Math failure the first.Vezzra wrote:Um, no? As you said, an irregular map with 100 systems has a width about 1000, in which case 0.00015 * 1000 would yield 0.15...?Sloth wrote:I haven't changed the max value of "0.00015 * fo.get_universe_width" but it probably should be changed. Doesn't it need a very very large galaxy to kick in (like 10000+ systems)?
In my testing with irregular width 2000 starts at about 300 systems which sounds reasonable.
Fair enough. But then the distance has to be increased (as my pictures show).Vezzra wrote:That was kind of the point My idea was to let them appear as if they gradually brew up in empty space, so I can spawn them close to the map edges without it looking too ackward.- The fields will start a little larger and added randomization to starting size.
They were hard to notice at size 5.
You are correct. Math failure the second. Then it looks like radius + 10 is still not enough.Vezzra wrote:I think you lost a "0" here. Width = 1000 means radius = 500, 0.02 * 500 = 10.[/code]radius * 0.02 equals 1 when the width is 1000.
That was also my impression and that's why i changed the spawn rate back to 0.03.MatGB wrote:I'm seeing a lot of Ion Storms.
So to sum up what needs to be changed:
Size down again
Safety distance up
I let the next volunteer do the tinkering...
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Re: Sneaky Ion storms
The relevant line in turn_event.py would be:MatGB wrote:I'm seeing a lot of Ion Storms. Now, I like that there are more than I'm used to, not sure that there should be this many more.
Code: Select all
if random() < max(0.00015 * fo.get_universe_width(), 0.03):
That might be the case. During my testing I very often observed "streaks" - long time no field, then several in a row. Or map areas with only a very few or no fields while others were covered by several fields.On the other hand, it might just be random chance.
Re: Sneaky Ion storms
I encountered a sneaky molecular cloud (Irregular 101 systems):
So i would suggest raising min distance to border to 50 (and reducing size to 5 again).
This is turn 3 (can't check turn 1 or 2), but even if it spawned turn 1 it must have been very close to Weizsacker already.So i would suggest raising min distance to border to 50 (and reducing size to 5 again).
Code: Select all
dist_from_center = radius + uniform(50.0, min(max(radius * 0.05, 50), 100.0))
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Sneaky Ion storms
The requirement should be a min distance from a system, not (just) from the galaxy centre.
Re: Sneaky Ion storms
Sloth wrote:So i would suggest raising min distance to border to 50 (and reducing size to 5 again).
Ok, what I've done now is reducing starting size back to 5 again, and implemented Geoffs suggestion to not spawn near systems. Fields spawn at least at a distance of 50 from systems now. That should hopefully be good enough for 0.4.5 (further tweaking can continue of course ).Geoff the Medio wrote:The requirement should be a min distance from a system, not (just) from the galaxy centre.
Re: Sneaky Ion storms
Ok, should be addressed by the changes mentioned above. No more spawning directly adjacent to a system.Sloth wrote:So to sum up what needs to be changed:
Size down again
Safety distance up
Re: Sneaky Ion storms
The spawn rate of fields is still too high for small maps. More fields spawn on screen than old ones vanish.
Leading to situations like this (101 stars, turn 200):
Leading to situations like this (101 stars, turn 200):
- Attachments
-
- fields.png (371.17 KiB) Viewed 907 times
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Re: Sneaky Ion storms
Um... did you pick the right screenshot?Sloth wrote:Leading to situations like this (101 stars, turn 200):
I'll agree on the very general point you raise, the number of Fields does still seem a bit too high. But that screenshot looks pretty much fine to me. Maybe the teensiest bit heavy on the Molecular Clouds.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Sneaky Ion storms
Well, as I said before, feel free to experiment with the numbers. The one you need to tweak in this case would be the "0.0003" constant on this line (you've already experimented with that piece of code):Sloth wrote:The spawn rate of fields is still too high for small maps.
Code: Select all
if random() < max(0.0003 * radius, 0.03):
That can't really happen... with that map size at turn 200, things must have consolidated. The age a field can reach is more or less fixed, if they don't dissipate quickly enough, they would accumulate at the map center, which doesn't seem to be the case according to your screenshot.More fields spawn on screen than old ones vanish.
Hm, like Dilvish said, that particular example does actually look quite normal. Anyway, another thing to keep in mind is that the RNG tends to produce streaks. Meaning, it's possible to get none or at least obviously too few fields for quite a lot of turns, and then suddenly a whole lot of them. If however you notice too much fields on average over 200-300 turns, then it's probably necessary to tone down things a bit.Leading to situations like this (101 stars, turn 200):
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Sneaky Ion storms
If the problem is too many spawns on small maps, shouldn't you lower the 0.03?Vezzra wrote:Well, as I said before, feel free to experiment with the numbers. The one you need to tweak in this case would be the "0.0003" constant on this line (you've already experimented with that piece of code):Sloth wrote:The spawn rate of fields is still too high for small maps.Try setting it to e.g. 0.0002.Code: Select all
if random() < max(0.0003 * radius, 0.03):