move state data update (incl unreliable version) to scripting