Random Events

I don't think the problem is the frequency so much as that you're seeing volcano events in unrevealed territory. The problem is that player events (I think these are player ones?) have a fixed probability, so when it only put them in city vicinity it meant far too much geographic concentration of the volcanos. Now that it puts them anywhere it leads to this report of events in unrevealed territory.

@Ori - how does it pick a plot?

@AIAndy - does the event trigger probability support dynamic expressions? If it did could we have an event that always chooses a revealed plot, but whose trigger probability is dynamically calculated to be inversely proportional to the number of revaled (to the target player) plots?
In principle I think it is one that can use expressions and I have already planned to rewrite some of it to do so (for now I have started with outcomes to use integer expressions for chance and the like).
 
Wow I just experienced a volcano emerging from the sea. It was very cool. But I think it killed off my fish resource. :(
 

Attachments

  • volcanoisland.jpg
    volcanoisland.jpg
    159.7 KB · Views: 163
I have no objection to the level of Volcanic Event activity in the games I have been playing of late. However I am a little ticked off that the screen zooms to volcanic eruptions that are close to me but still in unexplored territory. When a Volcano errupts in my own territory the screen doesn't zoom to it (if I've left the map centered on a unit out exploring) and unless it destroys some improvements there is no message.

I know you guys are busy with lots of different things and fixing other issues but this one does seem to contribute to CtD's, at least for me.
 
I have a volcano that has been hit by erruption events again and again and again - its basically been active for over 30,000 years. It would be nice if things would spread around a litle more.
 
I have no objection to the level of Volcanic Event activity in the games I have been playing of late. However I am a little ticked off that the screen zooms to volcanic eruptions that are close to me but still in unexplored territory. When a Volcano errupts in my own territory the screen doesn't zoom to it (if I've left the map centered on a unit out exploring) and unless it destroys some improvements there is no message.

I know you guys are busy with lots of different things and fixing other issues but this one does seem to contribute to CtD's, at least for me.

This might be a viewports bug - are you using viewports?
 
I have no objection to the level of Volcanic Event activity in the games I have been playing of late. However I am a little ticked off that the screen zooms to volcanic eruptions that are close to me but still in unexplored territory. When a Volcano errupts in my own territory the screen doesn't zoom to it (if I've left the map centered on a unit out exploring) and unless it destroys some improvements there is no message.

I know you guys are busy with lots of different things and fixing other issues but this one does seem to contribute to CtD's, at least for me.

I believe that the problem is that the volcano event is triggered for a player but the location of the event may not be inside the player's visibility range. If it is your event you get notified even if it is outside where you have explored. If it is another player's event and it happens inside your explored area then you don't get a message.

@Ori would you like a second pair of eyes to look at the volcano event? Perhaps one of us could suggest some changes. BTW, I have not seen a volcano event happen on a resource, not even fish. Although I did have one that wiped out four fishing fleets.:)
 
ok - the improvement destruction is as designed.

@DH: if you like, have a go. I am planning to put in the message fixes that AI_Andy proposed but simply had no time to code currently - I should have some time this weekend or next week - and I regard it as bug fixes so even if I run into the freeze it will go in. This will also ensure that the owner of a volcano tile will get the game centered on an erupting volcano.

@Koshling: the Volcanos should now be truly random in which one gets chosen to erupt - if its always the same one I'd suspect its the only one on the map. If it just continues erupting and others do as well: volcanos currently have a somewhat higher chance to remain active than to go dormant, so that may very well happen even of there are a few more active volcanos elsewhere.
 
ok - the improvement destruction is as designed.

@DH: if you like, have a go. I am planning to put in the message fixes that AI_Andy proposed but simply had no time to code currently - I should have some time this weekend or next week - and I regard it as bug fixes so even if I run into the freeze it will go in. This will also ensure that the owner of a volcano tile will get the game centered on an erupting volcano.
Mind that with the Viewport code now Python scripts should not call functions that change the camera vie engine calls directly. Instead you should use the respective methods that are handled by the DLL.
 
Fine - so I'll have to find out what those are :p
Is there a specific file in the DLL where I could have a look?

Isn't it a tag on the XML not something that is done in the Python. Or is moving to the plot both? I ask because a number of events don't move to the plot even though it would be really useful.
 
Fine - so I'll have to find out what those are :p
Is there a specific file in the DLL where I could have a look?
I think the right method to use now is
void bringIntoView(int iX, int iY, bool bDisplayCityScreen);
in CyMap.
 
Isn't it a tag on the XML not something that is done in the Python. Or is moving to the plot both? I ask because a number of events don't move to the plot even though it would be really useful.

the xml tag only centers the map for the player triggering the event - if it happens on a tile that someone else owns the owner will nto be notified about it. I would like it to center for the owner and maybe also for the triggering player but having the owner notified about a volcano eruption in his lands is probably the more important thing here...

Edit: Thanks, AIAndy
 
I think the right method to use now is
void bringIntoView(int iX, int iY, bool bDisplayCityScreen);
in CyMap.

You should probably also check that neither getViewportXFromMapX() nor getViewportYFromMapY() return INVALID_PLOT_COORD and refrain from bringing into view if they do - essentially that would be checking that the plot is in the current viewport, and not forcing a viewport switch if it isn't. Calling bringIntoView on a plot that is not in the current viewport will force a veiwport switch, which seems a bit over the top for an event (the event already gives you a message anyway).

Edit - not sure how easy it is for the Python to test for INVALID_PLOT_COORD (which is -MAX_INT in the C++). I'll add CyMap.isInViewport() for a simple check - will post on the SVN thread when it's available.
 
You should probably also check that neither getViewportXFromMapX() nor getViewportYFromMapY() return INVALID_PLOT_COORD and refrain from bringing into view if they do - essentially that would be checking that the plot is in the current viewport, and not forcing a viewport switch if it isn't. Calling bringIntoView on a plot that is not in the current viewport will force a veiwport switch, which seems a bit over the top for an event (the event already gives you a message anyway).

Edit - not sure how easy it is for the Python to test for INVALID_PLOT_COORD (which is -MAX_INT in the C++). I'll add CyMap.isInViewport() for a simple check - will post on the SVN thread when it's available.

Just to reiterate: the aim is to have a user who does not trigger the event to be notified of it when it happens in his territory - the user currently does not get a message to that effect.
 
You should probably also check that neither getViewportXFromMapX() nor getViewportYFromMapY() return INVALID_PLOT_COORD and refrain from bringing into view if they do - essentially that would be checking that the plot is in the current viewport, and not forcing a viewport switch if it isn't. Calling bringIntoView on a plot that is not in the current viewport will force a veiwport switch, which seems a bit over the top for an event (the event already gives you a message anyway).

Edit - not sure how easy it is for the Python to test for INVALID_PLOT_COORD (which is -MAX_INT in the C++). I'll add CyMap.isInViewport() for a simple check - will post on the SVN thread when it's available.
Maybe add a boolean to bringIntoView that if false will only bring it into view if it is within the current viewport?
 
Maybe add a boolean to bringIntoView that if false will only bring it into view if it is within the current viewport?

Could do, but it's not really necessary if I expose isInViewport() since the Python can do it easily enough. Easy enough to do though so I may do.
 
Back
Top Bottom