Force CAS "CC Only" Filter always on
Hi MTS,
I am new to modding, but I have plenty of scripting experience. If this thread is in the wrong place, please refer me to the correct place.
As title says, my goal is to make sure that the "CC Only" filter in CAS is ALWAYS on, for every category.
I have tried several things already to try and accomplish this goal, but I'm not having any succes yet. As such, please help!
Let me explain the things I tried already. First starting with this code in CASAPI.as
Code:
public static function GetCatalogBaseItems(param1:int, param2:Array = null, param3:Array = null, param4:Boolean = false, param5:Boolean = false, param6:Boolean = false, param7:Boolean = false, param8:Array = null, param9:Object = null, param10:int = 0) : Array
{
param2 ||= new Array();
param8 ||= new Array();
return CommunicationManager.CallGameService("GetCatalogBaseItems",{
"state":param1,
"tags":param2,
"excludeTags":param3,
"unlocks":param4,
"locked":param5,
"mtx":param6,
"mods":param7,
"packIds":param8,
"genusOverride":param9,
"bodyType":param10
}) as Array;
}
public static function GetCatalogBaseItemsUsingFilter(param1:CASCatalogFilter, param2:Object = null) : Array
{
return GetCatalogBaseItems(param1.menuState,param1.tags,param1.excludeTags,param1.filterByGameplayUnlocks,param1.filterLocked,param1.filterPurchasedProducts,param1.filterModdedContent,param1.packIds,param2,param1.body_type);
}
To me, this part looks like it dictates what parts will be visible in the catalog. However it seem like it fetches just the items itself in the end, since editing it made no changes. I think this part of code actually deals with just displaying the items?
Then I had another thing that seemed of interest to me, this part in CASFilterPane:
Code:
protected function RefreshGenderPreference(param1:SimInfo, param2:Boolean = false) : void
{
var _loc7_:String = null;
var _loc8_:Object = null;
var _loc3_:int = CommunicationManager.CallGameService("GetSimClothingGenderPreference") as int;
if(this.mClothingGenderPreference == _loc3_ && !param2)
{
return;
}
this.mClothingGenderPreference = _loc3_;
var _loc4_:Array = new Array();
var _loc5_:Array = new Array();
var _loc6_:Boolean = Species.IsHuman(param1.speciesType) && !CASConfiguration.IsFashionMode;
for(_loc7_ in this.mGenderTypeTags)
{
_loc4_.push(this.mGenderTypeTags[_loc7_]);
_loc5_.push(_loc6_ && parseInt(_loc7_) == _loc3_);
}
this.mFilterTagMgr.SetTagsForAllCategories(_loc4_,_loc5_);
for(_loc7_ in this.mGenderTypeTags)
{
_loc8_ = this.mGenderTypeTags[_loc7_];
this.mFilterTagMgr.SetTagSelected(_loc8_,_loc6_ && parseInt(_loc7_) == param1.gender,MenuState.CLOTHING_HAIR);
this.mFilterTagMgr.SetTagSelected(_loc8_,false,MenuState.CLOTHING_FACE_FACIAL_HAIR);
this.mFilterTagMgr.SetTagSelected(_loc8_,false,MenuState.CLOTHING_BODY_TATTOOS);
this.mFilterTagMgr.SetTagSelected(_loc8_,false,MenuState.CLOTHING_BODY_MEDICAL);
}
}
It seemed to me this is where it sets the Gender tag to always show, so I tried to add a tag for the custom cc only here too, but doing something like
Code:
this.mFilterTagMgr.SetTagsForAllCategories([CASCatalogFilter.CONTENT_FILTER_MODS],[true]);
had no effect.
Finally, I also saw blocks like this in CASAPI.as:
Code:
else if(_loc3_.data == CASCatalogFilter.ID_MODS)
{
_loc2_.filterModdedContent = true;
}
But it seems to me that this is just a check that dictates if the CC Only checkbox is present at all. Again, changing had zero influence for some reason. Nothing seems to have an influence, am I just patching the wrong files or is there something wrong with my workflow of editing files (if anyone has a tutorial, i would gladly check it, didnt see one fast)?
What is even more frustrating: There is so much redundancy in this code. How do I know if i have to edit caslibrary, cascustomizer, or anything else? Very confusing lol
So in general, I am pretty lost right now. Anyone with ideas? Thanks in advance