9 years ago
Custom careers and 64 bits hash/high bit
I dabble a bit in custom careers and so far things are looking good, except my custom career raise an exception when I attempt to save after assigning the career to a Sim :
File "T:\InGame\Gameplay\Scripts\Server\careers\career_tracker.py", line 452, in save
File "T:\InGame\Gameplay\Scripts\Server\careers\career_base.py", line 2872, in get_persistable_sim_career_proto
File "T:\InGame\Gameplay\Scripts\Core\google\protobuf\internal\cpp_message.py", line 107, in Setter
ValueError: Value out of range: 12464470167094854350
with 12464470167094854350 being the decimal ID of my custom careers.career_tuning, and which is a 64bits hash with high bit set. The career assigned to my Sim is not saved when I exit/reload but it works fine when I use a 32 bits hash instead.
Am I supposed to use a 32 bits hash in this case or is this an oversight in the saving script ?
File "T:\InGame\Gameplay\Scripts\Server\careers\career_tracker.py", line 452, in save
File "T:\InGame\Gameplay\Scripts\Server\careers\career_base.py", line 2872, in get_persistable_sim_career_proto
File "T:\InGame\Gameplay\Scripts\Core\google\protobuf\internal\cpp_message.py", line 107, in Setter
ValueError: Value out of range: 12464470167094854350
with 12464470167094854350 being the decimal ID of my custom careers.career_tuning, and which is a 64bits hash with high bit set. The career assigned to my Sim is not saved when I exit/reload but it works fine when I use a 32 bits hash instead.
Am I supposed to use a 32 bits hash in this case or is this an oversight in the saving script ?