Page 8 of 21

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 1:23 am
by Fritz
Ok, that's what I expected. I just wanted to make sure!

But this is really very strange. I've saved again after the 2nd destruction, and the next reincarnation is again behind the sun, but at a different position.

I finally looked at the populator code, but it says

Code: Select all

location: "PLANET_ORBIT_HIGH",
Is there a mistake in the vector and position calculations? To be honest, I don't understand them completely yet, including how the populator and the reading and writing of the "mission" data work in detail. But isn't this.$hermitPointer undefined when used the first time in this.systemWillPopulate()? And shouldn't this this give an error or warning in the log file? It doesn't, so perhaps I'm overlooking something.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 11:03 am
by spara
A new version (0.6). Not much new, but tuning the earlier work.

* Pirate Hermits have been granted a little more energy.
* Pirate Hermit AI tweaked so that, if there are hunters about, the base orders the pirates in it's group to attack. Otherwise it's up to the pirates themselves, if they wish to engage or not.
* Relocator tweaked so that the relocation happens using region LANE_WPS, which means the new hermit will be located at some of the three lanes weighted by their length. This better follows the original population regions that are LANE_PS, LANE_WP and rarely PLANET_ORBIT_HIGH. Trying to keep the game fun, not tedious here.
* Pirate Hermit should now have it's BGS docking tunnel effect back.

Download: https://app.box.com/s/q4bwefafdgo1dohsdsj7gbsj8ze9k0b9
Fritz wrote:
...But isn't this.$hermitPointer undefined when used the first time in this.systemWillPopulate()? And shouldn't this this give an error or warning in the log file? It doesn't, so perhaps I'm overlooking something.
Population works so that this.systemWillPopulate() sets the populator callback functions, but it does not run them. In this case, enough populator callback functions are created to move all destructed hermits to new places and finally this.$hermitPointer is set to 0. Next the callback functions trigger in priority order. Priority goes by default so that the core population happens first (priority < 100) and then oxp population (priority 100 by default). The this.$hermitPointer is used to iterate through an array inside this.$movedHermits object. The array holds original positions and new location seeds for all destructed hermits.
ocz wrote:
@Friendly fire: Is there an option in AI script programing to let the AI check, what is in there aiming cross? if not, maybe the AI could be made to stop firing and to change its position, when hitting the hermit trice in a row. Maybe even in direction of the docking bay, to take position over it, but only if it's easy to write.
I'm not doing any pirate AI tweaking here, just using the core AI trying to produce "interesting" situations. Most likely possible, but I'll rather up the station energy. On the other hand, if the station blows, then it blows. It's an interesting event as long as it does not happen too often. If it does happen too often, I'll need to harden the station.
ocz wrote:
Or: Is there en eventhandler when the station is hit, that also gives the attacker? (I'm using my android tablet right now and the browser keeps chrashing, so I'm having trouble to look it up myself.) This way the done damage could be given back to the station, to nearly turn damage by friendly fire off.
Yes there is and this is a viable idea. I'll keep it in mind, if the station still keeps on constantly destructing with the higher energy reserve.
ocz wrote:
@features for chaotic hermits: The only thng I came up with quickly is, that I never have been attacked by standard offeners in the Savezone of the main station. Can this be easily transfered to hermits, too? Even if it's a chaotic hermit, I wouldn't allow brawls at my frontdoor.
The idea I'm shaping into reality here is a couple of "grunts" patrolling the station, keeping order by attacking all ships that get aggressive. Sort of a private security service provided by the shady businessperson the local miner has made the deal with.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 12:16 pm
by ocz
Always glad if some suggestions might help. Grunts sound awesome as an idea. Looking forward to it. (Only if feasible to implement though. I for my part try to limit myself to implement easy features when needed and try to drop features, that would eat up to much time. It's a good working practice and OXPs get done. :D)

Something happened while playing and I had 0.3 installed. In Quator there is a hermit in the near of the sun. (PS-Lane) I guess it's a pirate one. Sometimes vessels nearby or vessels that launched from it, turn hostile and demand compensation for the vacuum-air I breathed away from them I guess. Now, it went this way: I dropped by for the sweat deals, but before I landed some vessels turned hostile. I don't know any more, if I fired a shoot in retaliation on them. Then I bought stuff and went away to watch castle or the mentalist or something. I didn't paused the game. While the commercial break was on I returned, launched and the hermit was SWARMING with red bleeps. I regret I didn't take a screenshot. Before this happened I noticed, that if I engage in battle with pirates in proximity to the station, It launches more of them. So I figured at that point It might be a pirate base. But the hermit has also some mining operations on the way (mining transporters. mining contracts OXP is also installed). It's just odd, plainly odd, that I can idyll around for 15-20min on there base, while they HATE ME that much, that they launch a whole swarm to kill me.

Just saying :roll:

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 12:39 pm
by spara
There are two mechanics for the pirate hermit to launch ships on top of the normal npc traffic (if there's such).

1. If shot at, the station launches max 3 ship with "pirate-interceptor" role.
2. If ai.conditionScannerContainsHuntableOffender is false, 3-5 ships with "pirate" role are launched. These are added to station's group, which more or less means that they stay around the station, which is the group leader. Their behavior on attacking or not attacking comes from the standard pirate AI, except for hunters.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 1:02 pm
by Cody
spara wrote:
Busy spicing chaotic hermits.
Spicing chaotic hermits, eh... Holy Joe?

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 1:11 pm
by Fritz
ocz wrote:
... and the hermit was SWARMING with red bleeps ...
The core game has a similar behaviour too: The longer the game runs, the longer you stay in one system, the more assassins leave the main station, and some of them stay and accumulate there. It is not evident in every system, but I found it to be extreme at Laxema Station in G4.

I have the impression that the number of Vipers inside the station is limited at least in anarchy systems (probably everywhere, but with higher numbers). So you can kind of win the battle around the station if you destroy enough Vipers. This could be done at pirate hermits too. A well armed player could at some point "take over" the hermit, but even then, he wouldn't own it, he only controls the space around it.

I imagine that the hermit owner is not a pirate himself - perhaps he had been one in earlier times, and he tolerates them, but he also tolerates traders because he is economically dependent from them. Also, not all pirates are allies. This explains why you can fight with some pirates while others stay peaceful, and why you can dock, trade, and buy equipment after you have killed several pirates outside.

@spara: I'm testing the new repositioning right now, but it takes some time because Laxema is a very crowded system, and these ***** have damaged my fuel injectors again! But I'm still wondering what went wrong in the old version.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 1:32 pm
by Fritz
There seems to be a rounding issue with the float coordinates in the save file. The original coordinates for "my" pirate hermit are (396662.71875, -1427911.25, 947278.5). Randomshipnames has stored exactly the same values as Spicy Hermits 0.5. But version 0.6 has saved the coordinates (-396663.987041533, -1427911.2256799769, 947279.3123642802), which is slightly different.

The new hermit seems to be at the same place on the P-S lane, but it's difficult to say, perhaps it's a coincidence. It does have a different name though, which means that Randomshipnames hasn't found the hermit at the old location.

Question: Is the new location random or will it be the same after each destruction of the original hermit?

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 1:41 pm
by spara
Fritz wrote:
I imagine that the hermit owner is not a pirate himself - perhaps he had been one in earlier times, and he tolerates them, but he also tolerates traders because he is economically dependent from them. Also, not all pirates are allies. This explains why you can fight with some pirates while others stay peaceful, and why you can dock, trade, and buy equipment after you have killed several pirates outside.
With the current configuration (0.6), no mining takes place around the pirate hermits. I imagine that the original owner has either been retired or he/she/it has found a better income from pirates and other shady individuals. And to be honest, the pirates around the station are quite independent, so launching in a mining vehicle is quite likely a suicide.
Fritz wrote:
@spara: I'm testing the new repositioning right now, but it takes some time because Laxema is a very crowded system, and these ***** have damaged my fuel injectors again! But I'm still wondering what went wrong in the old version.
It might also be, that the behavior is not erraneous, 7 radii is quite a long way from the planet anyway.
Fritz wrote:
There seems to be a rounding issue with the float coordinates in the save file. The original coordinates for "my" pirate hermit are (396662.71875, -1427911.25, 947278.5). Randomshipnames has stored exactly the same values as Spicy Hermits 0.5. But version 0.6 has saved the coordinates (-396663.987041533, -1427911.2256799769, 947279.3123642802), which is slightly different.

The new hermit seems to be at the same place on the P-S lane, but it's difficult to say, perhaps it's a coincidence. It does have a different name though, which means that Randomshipnames hasn't found the hermit at the old location.
Nothing has changed in that department, except the region. The original place should be the same as it comes from the core game. It's possible, but quite unlikely, that the new place is that close to the original. Maybe you could wipe the values from the save file and see if it happens again?
Fritz wrote:
Question: Is the new location random or will it be the same after each destruction of the original hermit?
It's random. Every time a hermit gets destroyed, a new seed is drawn randomly.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 1:51 pm
by Fritz
spara wrote:
It might also be, that the behavior is not erraneous, 7 radii is quite a long way from the planet anyway.
Definitely not, because I have Sensible Sun installed, so my sun is very far from the planet, at least 2000 km. Laxema has a radius of only 41,15 km.
It's possible, but quite unlikely, that the new place is that close to the original.
I'm busy testing this. Currently my impression is that it is close but not identical. And as I said, Randomshipnames is assuming a new hermit too.
Maybe you could wipe the values from the save file and see if it happens again?
I'll try.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 2:27 pm
by Fritz
I've made some precise astronomical measurements (ruler on the screen), and I can now confirm that the hermit position was a new one.

After I have destroyed the poor original hermit once more, the saved coordinates differ slightly again. I wonder if hermits can move slightly during the process of destruction?

The changed coordinates aren't a problem though, because, as far as I can see, you don't use them as a key, you just move all rocks and hermits within a big radius of this position. Some centimeters or even meters won't make a difference.

By the way, have you considered that there sometimes are two or (if I remember correctly) even three rock hermits within scanner range? The additional hermits would be relocated too, if I understand your code correctly.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 2:46 pm
by spara
Fritz wrote:
I've made some precise astronomical measurements (ruler on the screen), and I can now confirm that the hermit position was a new one.

After I have destroyed the poor original hermit once more, the saved coordinates differ slightly again. I wonder if hermits can move slightly during the process of destruction?

The changed coordinates aren't a problem though, because, as far as I can see, you don't use them as a key, you just move all rocks and hermits within a big radius of this position. Some centimeters or even meters won't make a difference.

By the way, have you considered that there sometimes are two or (if I remember correctly) even three rock hermits within scanner range? The additional hermits would be relocated too, if I understand your code correctly.
Good point. I have never seen two hermit within scanner range, but I suppose it's possible. Hmmm. Maybe I should just move the destructed hermit using a smaller hermitage radius and create a new asteroid field around it.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 2:47 pm
by Cody
I've seen them in sets of three, all in a row with identical orientation.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 3:26 pm
by Fritz
spara wrote:
Maybe I should just move the destructed hermit using a smaller hermitage radius and create a new asteroid field around it.
That would be a good solution, because it seems logical that the other asteroids would remain on scene. You could even replace the destroyed hermit by some boulders, splinters, cargo pods, or even a derelict ship to mark the scene of destruction!

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 6:19 pm
by Cody
On first spawn (after a restart), space around my hermit is empty - pirate patrols only launch after I've launched.
The denizens of Rubic's Auger like me now that I'm a fugitive too - we've been having mock jousts.

Re: [WIP] Spicy Hermits

Posted: Sun Jan 10, 2016 6:26 pm
by spara
One more version (0.7) for the weekend.

* Relocation tries it's best to just move the hermit and nothing more. A new asteroid field is spawned around the new place.
* Chaotic Hermits now have 2-4 nice fellows guarding the station. They'll only react, if someone shoots at the station, the miner or them. It's written in their contract and they follow it by the letter. Oh, and they have a little bounty on their heads, but they have sworn not to do it again. Ever.

Download: https://app.box.com/s/oor0pcp28fs0slbbohlzs7oinb2bytvj
Cody wrote:
On first spawn (after a restart), space around my hermit is empty - pirate patrols only appear after I've launched.
It's the same with the main station. I'll ponder it a bit, shouldn't be too hard to spawn a couple of pirates around the station after spawn.
Cody wrote:
The denizens of Rubic's Auger like me now that I'm a fugitive too - we've been having mock jousts.
:lol: Glad you're making new friends out there.