Post by zhudy on Nov 8, 2023 4:06:38 GMT -5
Dear modders,
I was always bothered by my immortal sim whose simology only shows "days left" to next stage, instead of showing their "days lived" as vampires and elders. It makes me feel that my sim is stuck in this day.
So I said to myself, enough is enough. But I'm very new to modding. I tried to find some tutorials and understand to download JPEXS, to look through binary files.
These are what I've done:
1. I found the Scale from GFX instance: DA7597EAEB9BA388, which controls the simology panel.
2. I exported it and change the suffix to .gfx, opened with JPEXS.
3. I looked through the scripts and found the one controls the panel:
4. I found the function code and it's like this:
5. To simplify and test my work, I simply copied the vampire code and changed it to "WITCH", but unfortunately, I failed, nothing changed in game. I tried "SPELLCASTER", still failed. I even tried to delete the line of vampires, but vampires still appear to show "days lived", so basically my editing doesn't work at all. I ensured my package is working and in the list also not overridden by other mods.
I wonder what goes wrong and I really need help here. Any suggestions would be greatly appreciated.
Thank you all for reading this.
I was always bothered by my immortal sim whose simology only shows "days left" to next stage, instead of showing their "days lived" as vampires and elders. It makes me feel that my sim is stuck in this day.
So I said to myself, enough is enough. But I'm very new to modding. I tried to find some tutorials and understand to download JPEXS, to look through binary files.
These are what I've done:
1. I found the Scale from GFX instance: DA7597EAEB9BA388, which controls the simology panel.
2. I exported it and change the suffix to .gfx, opened with JPEXS.
3. I looked through the scripts and found the one controls the panel:
protected function HandleSimAgeProgressTooltipData(param1:AgeProgressTooltipData) : void
{
var _loc2_:LocKey = null;
if(this.mbAgeProgressTooltipDisabled)
{
(this.mcAgeBar.GetExtension(TooltipExtension) as TooltipExtension).Data = null;
return;
}
var _loc3_:uint = GameplayStateData.SimAge.age;
if(SimAgeTypes.CanSimAge(_loc3_))
{
_loc2_ = KeysGP.SUMMARY_PANEL_DAYS_LEFT.Clone([param1.ready_to_age_day - param1.current_day]);
}
else
{
_loc2_ = KeysGP.SUMMARY_PANEL_DAYS_LIVED.Clone([param1.days_alive]);
}
(this.mcAgeBar.GetExtension(TooltipExtension) as TooltipExtension).Data = {
"type":Tooltip.TYPE_DESCRIPTION_ONLY,
"text":_loc2_
};
}
As you can see, what defines panel showing "days_left" or "days_lived", is a function called CanSimAge().4. I found the function code and it's like this:
public static function CanSimAge(param1:uint) : Boolean
{
if(IsElder(param1))
{
return false;
}
if(GameplayStateData.SimOccultType.Type == OccultTypes.OCCULT_VAMPIRE && IsYoungAdultOrOlder(param1))
{
return false;
}
var _loc2_:* = GameplayStateData.GetTraitInfoByType(SimTraitsInfo.TRAIT_ROBOT).length > 0;
if(_loc2_)
{
return false;
}
return true;
}
Apparently, there are three conditions leads to a sim cannot age, which are:1. elders; 2. YA or older Vampires; 3. Robots.5. To simplify and test my work, I simply copied the vampire code and changed it to "WITCH", but unfortunately, I failed, nothing changed in game. I tried "SPELLCASTER", still failed. I even tried to delete the line of vampires, but vampires still appear to show "days lived", so basically my editing doesn't work at all. I ensured my package is working and in the list also not overridden by other mods.
I wonder what goes wrong and I really need help here. Any suggestions would be greatly appreciated.
Thank you all for reading this.