[Rseding91] FlowStatistics gui resets on player inventory size changed
[Rseding91] FlowStatistics gui resets on player inventory size changed
While viewing a FlowStatistics window (like kills, power, or production stats), every time a player joins the timeframe is reset to 5s.
To recreate:
Open a FlowStatistics window (such as production stats)
Change time frame to 10m
Have another player join the game.
Time frame window is reset to 5s
Expected behavior:
Time frame remains at 10m
To recreate:
Open a FlowStatistics window (such as production stats)
Change time frame to 10m
Have another player join the game.
Time frame window is reset to 5s
Expected behavior:
Time frame remains at 10m
Re: FlowStatistics gui resets on player join
And now I can't seem to recreate it. :/
Re: FlowStatistics gui resets on player join
I'm not able to reproduce any such problem either. If you find out for sure how to reproduce it let us know. In the mean time I'm going to move this to pending.
If you want to get ahold of me I'm almost always on Discord.
Re: FlowStatistics gui resets on player join
It just happened to me. Player "juusatsi" was dropped for the game. My power display screen is currently set to filter only miners and is set to 10 minutes. Juusatsi rejoins the game. Power display screen is back to the 5s view.
This occurred in 0.15.30
I knew I wasn't crazy.
This occurred in 0.15.30
I knew I wasn't crazy.
Re: FlowStatistics gui resets on player join
Something like this happens also in the blueprint librairy, when you scroll down in the user list (when i user joins the list gets resetted back to the top)Mylon wrote:It just happened to me. Player "juusatsi" was dropped for the game. My power display screen is currently set to filter only miners and is set to 10 minutes. Juusatsi rejoins the game. Power display screen is back to the 5s view.
This occurred in 0.15.30
I knew I wasn't crazy.
Also very annoying.
Re: FlowStatistics gui resets on player join
I still can't reproduce what you describe. Are you sure there's no other steps involved? Are you on the very latest (0.15.30 as of writing this)?
If you want to get ahold of me I'm almost always on Discord.
Re: FlowStatistics gui resets on player join
On testing I found that the gui is reset by modifying the player inventory size.
Altering player.character_inventory_slots_bonus or force.character_inventory_slots_bonus or calling force.reset_technology_effects() (if force.character_inventory_slots_bonus is non-zero) will reset several guis, but only if the number is changed. This all happens on player login as part of my server so that is why I was seeing it happen then.
Production stats will be reset, power production will be reset, logistic network gui, achievements gui, and probably more will be reset all as if they had been closed and re-opened.
Altering player.character_inventory_slots_bonus or force.character_inventory_slots_bonus or calling force.reset_technology_effects() (if force.character_inventory_slots_bonus is non-zero) will reset several guis, but only if the number is changed. This all happens on player login as part of my server so that is why I was seeing it happen then.
Production stats will be reset, power production will be reset, logistic network gui, achievements gui, and probably more will be reset all as if they had been closed and re-opened.
Re: FlowStatistics gui resets on player join
Ah, that's a known thing that we plan on addressing in 0.16.Mylon wrote:On testing I found that the gui is reset by modifying the player inventory size.
Altering player.character_inventory_slots_bonus or force.character_inventory_slots_bonus or calling force.reset_technology_effects() (if force.character_inventory_slots_bonus is non-zero) will reset several guis, but only if the number is changed. This all happens on player login as part of my server so that is why I was seeing it happen then.
Production stats will be reset, power production will be reset, logistic network gui, achievements gui, and probably more will be reset all as if they had been closed and re-opened.
Although I do wonder why would your inventory size change on login/disconnect? That makes no sense to me and sounds like what ever mod(s) you're using might be broken.
If you want to get ahold of me I'm almost always on Discord.
Re: [Rseding91] FlowStatistics gui resets on player inventory size changed
It's my RPG mod. Players contribute bonuses to the team, but only when online. So players can boost team carrying capacity when they log in. This involves calling force.reset_technology_effects() and setting the force.character_inventory_slots_bonus.
I'm running into a different bug where force.reset_technology_effects() causes players to dump inventory, even if the inventory space is readded within the same tick. Players shouldn't reduce inventory on logout
Eg:
I'm running into a different bug where force.reset_technology_effects() causes players to dump inventory, even if the inventory space is readded within the same tick. Players shouldn't reduce inventory on logout
Eg:
Code: Select all
/c game.player.force.character_inventory_slots_bonus = 5
/c game.player.insert{name="iron-plate", count=10000}
/c game.player.force.reset_technology_effects(); game.player.force.character_inventory_slots_bonus = 5
Re: [Rseding91] FlowStatistics gui resets on player inventory size changed
Why are you resetting the technology effects? You can modify the slot bonus count and it immediately updates everyones inventory size.Mylon wrote:It's my RPG mod. Players contribute bonuses to the team, but only when online. So players can boost team carrying capacity when they log in. This involves calling force.reset_technology_effects() and setting the force.character_inventory_slots_bonus.
I'm running into a different bug where force.reset_technology_effects() causes players to dump inventory, even if the inventory space is readded within the same tick. Players shouldn't reduce inventory on logout
Eg:Code: Select all
/c game.player.force.character_inventory_slots_bonus = 5 /c game.player.insert{name="iron-plate", count=10000} /c game.player.force.reset_technology_effects(); game.player.force.character_inventory_slots_bonus = 5
If you want to get ahold of me I'm almost always on Discord.
Re: [Rseding91] FlowStatistics gui resets on player inventory size changed
I'm modifying a LOT of other factors at the same time. For example, I want to nerf ammo damage by 20%. This means nerfing base damage as well as the bonus damage from technology. Then I add back to ammo damage some variable based upon player's RPG stats. The easiest way to calculate this is to call reset_technology_effects(), then do "for each, ammo in pairs(ammotypes) do force.set_ammo_modifier(ammo, 0.8 * force.ammo_modifier - 0.2 + team_ammo_bonus) end"
I had a method to do this without reset_technology_effects(), but I had some kinks and it was giving bad numbers, and it was one hurdle among many.
I had a method to do this without reset_technology_effects(), but I had some kinks and it was giving bad numbers, and it was one hurdle among many.
Re: [Rseding91] FlowStatistics gui resets on player inventory size changed
I've fixed it for 0.16 so the game won't reset GUIs on inventory size change if the GUI has nothing to do with the inventory that changed.
If you want to get ahold of me I'm almost always on Discord.