Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 21st Feb 2024 at 7:04 PM
Default Trying to create a buff
I'm trying to create a buff using CCLoader that should be linked to eating an ingredient but for some reason i can't manage to make it appear in game. I suspect that my problem has to do with the hash value that as I read in the CCLoader tutorial has to be a positive. As I'm not a programmer and my math knowledge is pretty basilar I don't even know how to check if the value is positive. Below is what I've done till now.

Code:
<BuffList>
  <BuffName>Milky</BuffName>
  <BuffDescription>MilkyDescription</BuffDescription>
  <Category>Mental</Category>
  <AxisEffected>Happy</AxisEffected>
  <EffectValue>20</EffectValue>
  <TimeoutLength>240</TimeoutLength>
  <SKU>BaseGame</SKU> 
  <Stackable>False</Stackable>
  <Hex>Milky=0xD456E260531B5C31</Hex>
  <ThumbFilename>MilkyThumb</ThumbFilename>
  <Version>0.1</Version>

  <Effect1>AddToCommodity,Fun,5</Effect1>
  <Effect2></Effect2>
  <Effect2></Effect2>
  <Effect3></Effect3>
 </BuffList>


Code:
<BuffOrigin>
  <Hex>FromMilk=0xEE0DD8A1FE90E654</Hex>
</BuffOrigin>


Code:
<EventHandler>
  <EventTypeId>kEatIngredient</EventTypeId>
  <Parameters>Milk</Parameters>
  <BuffName>Milky</BuffName>
  <BuffOrigin>FromMilk</BuffOrigin>
  <DelegateMethod></DelegateMethod>
</EventHandler>
Advertisement
Lab Assistant
#2 Old 22nd Feb 2024 at 10:56 AM
Quote: Originally posted by reira_chan
I'm trying to create a buff using CCLoader that should be linked to eating an ingredient but for some reason i can't manage to make it appear in game. I suspect that my problem has to do with the hash value that as I read in the CCLoader tutorial has to be a positive. As I'm not a programmer and my math knowledge is pretty basilar I don't even know how to check if the value is positive. Below is what I've done till now.

Code:
<BuffList>
  <BuffName>Milky</BuffName>
  <BuffDescription>MilkyDescription</BuffDescription>
  <Category>Mental</Category>
  <AxisEffected>Happy</AxisEffected>
  <EffectValue>20</EffectValue>
  <TimeoutLength>240</TimeoutLength>
  <SKU>BaseGame</SKU> 
  <Stackable>False</Stackable>
  <Hex>Milky=0xD456E260531B5C31</Hex>
  <ThumbFilename>MilkyThumb</ThumbFilename>
  <Version>0.1</Version>

  <Effect1>AddToCommodity,Fun,5</Effect1>
  <Effect2></Effect2>
  <Effect2></Effect2>
  <Effect3></Effect3>
 </BuffList>


Code:
<BuffOrigin>
  <Hex>FromMilk=0xEE0DD8A1FE90E654</Hex>
</BuffOrigin>


Code:
<EventHandler>
  <EventTypeId>kEatIngredient</EventTypeId>
  <Parameters>Milk</Parameters>
  <BuffName>Milky</BuffName>
  <BuffOrigin>FromMilk</BuffOrigin>
  <DelegateMethod></DelegateMethod>
</EventHandler>


You should also add the buff in the code at Sims3GameplaySystems/GameplayActorSystems/Buffnames and also add the conditions for the buff to appear.
Test Subject
Original Poster
#3 Old 22nd Feb 2024 at 11:12 AM
Ty! I thought that CCLoader loaded the xml files without needing to edit the script code :D
Instructor
#4 Old 23rd Feb 2024 at 3:59 AM
I've never actually seen a mod that used CCLoader for buffs (I'm sure they're out there, just much more familiar with the recipes), so I'm not sure if there is a specific method it was meant to be combined with.
But there is an archive of NonaMena's pure script buff tutorial here, which borrows one of EA's own buff booting methods without any need for modifying existing scripts.

Scribe of tutorials. Oracle of questions at NRaas. Blog staller at thecardinalsims. Feel free to @ me for input on any TS3/TS4 modding questions.
Test Subject
Original Poster
#5 Old 23rd Feb 2024 at 9:06 AM
Ty! I gonna try that tutorial!!!
Back to top