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!
Inventor
Original Poster
#1 Old 7th Nov 2015 at 10:18 PM Last edited by douglasveiga : 17th Dec 2015 at 1:22 PM.
Default CCLoader - Creation Thread
I am scripting some changes for CCLoader for the next update. I will post the test version and some tutorials about it in this thread.

Upcoming Features:
- Easy AutoSoil for plants.
- Recipe supports ingredient substitutions.
- Load custom buffs and trigger them by Event.

Any other change required?

Arsil, icemunmun, SimsMatthew, anak_ponti


I updated the test version:
http://modthesims.info/showthread.p...090#post4930090
Advertisement
Icy Spicy
#2 Old 7th Nov 2015 at 11:27 PM
Quote: Originally posted by douglasveiga
I am scripting some changes in CCLoader for the next update. I will post the test version and some tutorials about it in this thread.

Upcoming Features:
- Easy AutoSoil for plants.
- Recipe supports ingredient substitutions.
- Load custom buffs and trigger them by Event.

Any other change required?



Wow......the changes you mentioned are going to be really useful especially the ingredient substitution and autosoil !Thank you !
Will you consider adding support for custom fishes ( and maybe alchemy potions) in a future update? Ignore me if it requires too much work :p
Inventor
Original Poster
#3 Old 8th Nov 2015 at 2:21 AM Last edited by douglasveiga : 17th Dec 2015 at 12:54 PM.
Example of Ingredient substitution for Recipes:

When the default Ingredient_1 ("Sugar") isn't found, the loader will test each item from SubstIngredient_1 tag and automatically use the first valid ingredient found.

Quote:
<?xml version="1.0"?>
<RecipeMasterList>
<!-- Start - Keep this block of data untouched. MUST be before any Data tuning -->
<Data>
<Recipe_Key></Recipe_Key>
.................................
<Ingredient_1></Ingredient_1>
<Ingredient_2></Ingredient_2>
<Ingredient_3></Ingredient_3>

<SubstIngredient_1></SubstIngredient_1> You must include these new tags.
<SubstIngredient_2></SubstIngredient_2>
<SubstIngredient_3></SubstIngredient_3>


................................

</Data>
<!-- End -->
<!-- Place your Data tunings below this line -->
<Data>
<Recipe_Key>StrawberryPie</Recipe_Key>
.......................................
<Ingredient_1>Sugar</Ingredient_1>
<Ingredient_2>Kiwi</Ingredient_2>
<Ingredient_3>Strawberry</Ingredient_3>

<SubstIngredient_1>Mycenas,SweetGrass,Apple</SubstIngredient_1> Recommendation: Always set basegame ingredient at the last position of the sequence.
<SubstIngredient_2>Spotlight Mushrooms,Cheese</SubstIngredient_2>
<SubstIngredient_3>Pumpkin,Apple</SubstIngredient_3>

......................................
</Data>
</RecipeMasterList>




For the Plant AutoSoil:
Duplicate the files (OBJD and OBJK) from the "Autosoil_test.package" and change the instance value (hash a new unique file name for them and don't forget to update the TGI resource from the OBJD to correct link your OBJK). Edit the OBJD and change the "InstanceName" property to the Ingredient_Key value of your ingredient (See the image). Ready.

Attention: You can only plant ingredients that have the correct plantable data (*_Plants.xml).

Screenshots
Attached files:
File Type: zip  Autosoil_test.zip (659 Bytes, 39 downloads) - View custom content
Instructor
#4 Old 8th Nov 2015 at 3:16 AM
Looks awesome! And thanks for considering my opinion!
Honestly I don't even know if I am still using the latest version of CCLoader... The newest one supports books??
Have been away from modding too long... Doing stuffs here and there...

I agree the substitution ingredient thing really helps with compatibility, we now only have to create just one package...
Custom fish would be nice but definitely not a straight must.

Also, care to put the last CCloader (ie not this beta one) here in this thread? Most of your creations are scattered around, I don't really know where things are sometimes. I don't think Mods will hate you for establishing a thread of CCloader stuff mods hosted here at one single place!
Icy Spicy
#5 Old 8th Nov 2015 at 5:46 PM
Quote: Originally posted by douglasveiga
For the Plant AutoSoil:
Duplicate the files (OBJD and OBJK) from the "Autosoil_test.package" and change the instance value (hash a new file name for them and don't forget to update the TGI resource from the OBJD to correct link your OBJK). Edit the OBJD and change the "InstanceName" property to the Ingredient_Key value of your ingredient (See the image). Ready.



Do I hash using S3PE or using your modelInstancekeyHash generator?

I will test them out and let you know how it goes.
Inventor
Original Poster
#6 Old 8th Nov 2015 at 7:19 PM
Quote: Originally posted by icemunmun
Do I hash using S3PE or using your modelInstancekeyHash generator?

I will test them out and let you know how it goes.


s3pe.

icemunmun,
Hum, Fish looks too much. It's hard to see anyone talking about the fishing stuff in ts3.
I guess the alchemy potion is possible but without proper custom script, they are useless.

SimsMatthew,
Yes, it's hard to find the ccloader stuff. I want to keep this thread as a "Creation" support. The other one is for download.
Icy Spicy
#7 Old 8th Nov 2015 at 8:05 PM
Quote: Originally posted by douglasveiga
s3pe.

icemunmun,
Hum, Fish looks too much. It's hard to see anyone talking about the fishing stuff in ts3.
I guess the alchemy potion is possible but without proper custom script, they are useless.



Ah thanks for the info!
Yes...you are right...nobody seems interested in fishes!

About the alchemy potions......I thought changing the CommodityDecayModifier , SetCommodity and Buff (using buffs from different EPs) for <Effect1> will change the effects without additional scripting.My bad it will be of no use if additional scripting is required for all individual custom potions
Inventor
Original Poster
#8 Old 9th Nov 2015 at 9:07 PM Last edited by douglasveiga : 10th Nov 2015 at 6:09 PM.
I will spend some additional time to implement the Moodlet feature and to update the generator too.

Edit: I would like to make something different with the moodlet. I mean something like the potion, as you mention, apply some basic effects without major coding. I think this option is better because if I implement just the potion loader, we might not have many options because most of them have the almost the same effects. Example: people will create dozens of potions to fulfill hunger.

I still need to confirm if it's possible. I didn't check the code yet. Too busy with the final college tests.
Icy Spicy
#9 Old 10th Nov 2015 at 4:49 PM
Quote: Originally posted by douglasveiga
I will spend some additional time to implement the Moodlet feature and to update the generator too.

Edit: I would like to make something different with the moodlet. I mean something like the potion, as you mention, apply some basic effects without major coding. I think this option is better because if I implement just the potion loader, we might not have many options because most of them have the almost the same effect. Example: people will create dozens of potions to fulfill hunger.

I still need to confirm if it's possible. I didn't check the code to yet. Too busy with the final college tests.


A custom moodlet loader sounds much more versatile and interessting .Awesome . But College Finals first!

And i want to take the opportunity to thank you again for doing this :lovestruc
Inventor
Original Poster
#10 Old 28th Nov 2015 at 12:51 AM Last edited by douglasveiga : 23rd Apr 2016 at 2:50 AM.
Helpful Recipe/Ingredients/Books Creation Threads:

Adding custom ingredients/plants:
http://modthesims.info/showthread.php?t=540902

Arsil explain about XML Recipe tunnings:
http://modthesims.info/showthread.p...658#post4610658

How to create a custom plant (Weed Mod)?
http://modthesims.info/showthread.php?t=547351

Custom Recipe with CCLoader:
http://modthesims.info/showthread.php?t=566571

ModelInstanceKeyHash - Generate instance key for ingredient/recipe models:
http://modthesims.info/showthread.p...020#post4599020
Field Researcher
#11 Old 5th Dec 2015 at 9:59 PM
I have been using the CCLoader Generator and it used to create the Books file, but does not now. Does anyone know what happened to it? Thank you.
Inventor
Original Poster
#12 Old 17th Dec 2015 at 12:53 PM Last edited by douglasveiga : 28th Jan 2016 at 2:41 AM.
I updated the test version of the ccloader and the ccloader generator.

Now support events and load moodlets into the game.

The new update is available at:
http://modthesims.info/showthread.p...598#post4660598

BuffsAndEvents_Test.zip > example of moodlets and events.
Contains:
- "Apple of Inspiration" Ingredient (Gives the "Feeling Inspired" custom moodlet that increase the writing skill learning rate).
- "Taste Like Cheese" moodlet (Everytime a Sim eat MacAndCheese, he receives this moodlet).
- Everytime a Sim Cook HotDog or TofuDog, he receives the Excited moodlet (from basegame).
- Everytime a Sim Eat HotDog or TofuDog, he receives the GarlicBreath moodlet (from basegame).
- Everytime a Sim read the TheAdventuresOfRayRmazza book he receives the Excited or Intriged moodlet (from Basegame).

For those people that would like to create new mods with custom moodlets. Please, don't create "too cheaty" moodlets and don't explore all the possible moodlet effects in a small set of items.
Examples:
An item that increase 200% the learning skill rate (too cheaty).
A small set of items that almost fullfil all the possible motives (Hunger, Energy, Social, etc).

I included the reference data from the game for Events, BuffNames and BuffOrigin. You can use them as reference, so don't override them with custom one.

Probably you did notice that we need to hash the BuffNames (Hex Tag) and BuffOrigin (Hex Tag), you can use the hash tool from S3PE without problems.

Just a small note regardless the BuffOrigin STBL localization key.
You need to hash something like this: "Gameplay/Excel/buffs/BuffOrigins:780026DD6BD6414C", where 780026DD6BD6414C represents your BuffOrigin hashed without the "0x".
BuffNames and BuffOrigin hash value needs to be positive. Just convert the value from Hexadecimal to Decimal value to check it.

05 Jan 2015 - Updated the CCLoader test version.

-Now it will show a very basic report regardless the loading process after an error happens.
-Small fix regardless the DelegateMethod.
Attached files:
File Type: zip  BuffsAndEvents_Test.zip (9.0 KB, 84 downloads) - View custom content
File Type: zip  ReferenceData_BuffaNames_Origin_Events.zip (35.7 KB, 63 downloads) - View custom content
Icy Spicy
#13 Old 17th Dec 2015 at 7:15 PM Last edited by icemunmun : 17th Dec 2015 at 7:31 PM.
This is seriously awesome...thank you!

1) Will the ingredient substitution work if we insert the relevant data in the recipes xml as elaborated in post 3 ?

2) Can we have a custom thumbnail for the buffs? How do I link that?
Inventor
Original Poster
#14 Old 18th Dec 2015 at 2:07 AM
Quote: Originally posted by icemunmun
1) Will the ingredient substitution work if we insert the relevant data in the recipes xml as elaborated in post 3 ?


I didn't test it in this version because I forgot. I guess it works. I will include the new xml later.

Quote: Originally posted by icemunmun
2) Can we have a custom thumbnail for the buffs? How do I link that?


it's the <ThumbFilename>moodlet_example</ThumbFilename> tag. Just replace the tag with your own png filename, and don't forget to hash the instancekey in s3pe.
Field Researcher
#15 Old 21st Dec 2015 at 11:38 PM
Thank you for the update, douglasveiga.
Icy Spicy
#16 Old 4th Jan 2016 at 9:31 PM
@douglasveiga

I tried to create a custom buff with the following xml code:

Code:
<BuffList>
  <Hex>mc_DoYouWantToBuildASnowman=0x51C4730F6F2A5FFF</Hex>     
  <BuffName>mc_DoYouWantToBuildASnowman</BuffName>
  <BuffDescription>mc_DoYouWantToBuildASnowmanDescription</BuffDescription>
  <Version>0.1</Version>
  <SKU>BaseGame</SKU> 
  <ThumbFilename>moodlet_DoYouWantToBuildASnowman</ThumbFilename>
  <AxisEffected>Happy</AxisEffected>
  <EffectValue>5</EffectValue>
  <TimeoutLength>180</TimeoutLength>

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



<BuffOrigin>
  <Hex>mc_FromCCookies1=0x44B1DB699F73B839</Hex>
</BuffOrigin>



I added an IMAG resource with fn64 hashed 'moodlet_DoYouWantToBuildASnowman' as IID.

And I tried to assign the custom moodlet to an even with the following XML code:

Code:
<EventHandler>
  <EventTypeId>kAteMeal</EventTypeId>
  <Parameters>CCookies1</Parameters>
  <BuffName>mc_DoYouWantToBuildASnowman</BuffName>
  <BuffOrigin>mc_FromCCookies1</BuffOrigin>
  <DelegateMethod></DelegateMethod>
</EventHandler>



But I am getting an error.Image of the error is attached.No moodlets appear on grabbing a serving and eating the custom recipe(CCookies1)

Can we not use a custom recipe( defined in the same set) as a event parameter and buff origin?Or Am I getting something else wrong?
Screenshots
Inventor
Original Poster
#17 Old 5th Jan 2016 at 11:42 AM Last edited by douglasveiga : 5th Jan 2016 at 12:14 PM.
I created a similar buff to test it. Apparently, everything is fine.

Possible problems in your package:

1- Thumb image not found. To test it:
In:
<ThumbFilename>moodlet_DoYouWantToBuildASnowman</ThumbFilename>
try:
<ThumbFilename>placeholder</ThumbFilename>

2- BuffName not Localized yet or not found. Only Buffs with localized strings will be loaded by the game.

in:
<BuffName>mc_DoYouWantToBuildASnowman</BuffName>
<BuffDescription>mc_DoYouWantToBuildASnowmanDescription</BuffDescription>
try:
<BuffName>SawGreatConcert</BuffName>
<BuffDescription>SawGreatConcertDescription</BuffDescription>

these are BuffName and BuffDescription from the basegame so they are localized for test.

tip: You can test your buffs with nraas debug enabler. Use the Add Buff interaction to add the buff in your Sim, without events.

3- Something wrong with your recipe. Try to temporary disable the ingredient substitution (if you included).
Icy Spicy
#18 Old 5th Jan 2016 at 9:39 PM
Thank you so much for the suggestions!

Quote: Originally posted by douglasveiga
I created a similar buff to test it. Apparently, everything is fine.


2- BuffName not Localized yet or not found. Only Buffs with localized strings will be loaded by the game.


it seems I had somehow messed the localization.After starting afresh , the moodlet shows up!Thank you

Quote: Originally posted by douglasveiga
3- Something wrong with your recipe. Try to temporary disable the ingredient substitution (if you included).


The recipes did not throw any errors before adding buffs.They still function normally but I am just getting that one error.I disabled the ingredient subs for the concerned recipe (CCookies1) but I am still getting the error.
I will disable the subs for all the recipes in the set ( 10 recipes in total) and see whether that gets rid of the error.
Screenshots
Inventor
Original Poster
#19 Old 6th Jan 2016 at 1:16 AM
I updated the test version. I fixed something but probably won't help you regardless your error. You can send me your package to test it here, because it's hard to detect the problem.
Icy Spicy
#20 Old 6th Jan 2016 at 10:54 AM
Quote: Originally posted by douglasveiga
I updated the test version. I fixed something but probably won't help you regardless your error.


Thanks for the update! I figured out what was wrong from the new error report. I needed to delete the unused entries ( plants and ingredients) from the CCL885800831.dll XML (Earlier keeping them in place did not throw any error)...and now the error are gone.Thank you so much
Inventor
Original Poster
#21 Old 6th Jan 2016 at 2:40 PM
Quote: Originally posted by icemunmun
Thanks for the update! I figured out what was wrong from the new error report. I needed to delete the unused entries ( plants and ingredients) from the CCL885800831.dll XML (Earlier keeping them in place did not throw any error)...and now the error are gone.Thank you so much


both of them (plants and ingredients) xml files failed? are they "empty" (without any new plants or ingredients entries)?
Icy Spicy
#22 Old 6th Jan 2016 at 3:17 PM
Quote: Originally posted by douglasveiga
both of them (plants and ingredients) xml files failed? are they "empty" (without any new plants or ingredients entries)?


Yes they are empty.I did not add any new plant and ingredient entries to the set.The error vanished when I removed the 1) Empty plants.xml, 2)Empty ingredients.xml 3) The relevant lines( plants and ingredients) from the .dll xml.
Icy Spicy
#23 Old 30th May 2016 at 11:07 PM
hi...since we were discussing about buffs in this thread ( 4 months ago...lol),I decided to ask my questions here:

1. for Buff origin -- Do we have to maintain the format of 'From....' or can we change it? (we are hashing it so I assume we can change it?).Any other specifications?

2. Event handlers --- For moodlets on eating ingredient tagged as 'fruit'...do we use kAteHarvesatble or KEatIngredient ?

3. My moodlet appears when add it through NRaas debugler but not on eating the fruit/ingredient ? All the correct text appears except 'from eating....' part even though i localized it with the following key - Gameplay/Excel/buffs/BuffOrigins:0x780026DD6BD6414C (your BuffOrigin HASHED). Can you give me a clue as to where the problem lies as the moodlet is being loaded but is not being applied by the event.
Inventor
Original Poster
#24 Old 31st May 2016 at 12:09 AM
Quote: Originally posted by icemunmun
hi...since we were discussing about buffs in this thread ( 4 months ago...lol),I decided to ask my questions here:

1. for Buff origin -- Do we have to maintain the format of 'From....' or can we change it? (we are hashing it so I assume we can change it?).Any other specifications?

2. Event handlers --- For moodlets on eating ingredient tagged as 'fruit'...do we use kAteHarvesatble or KEatIngredient ?

3. My moodlet appears when add it through NRaas debugler but not on eating the fruit/ingredient ? All the correct text appears except 'from eating....' part even though i localized it with the following key - Gameplay/Excel/buffs/BuffOrigins:0x780026DD6BD6414C (your BuffOrigin HASHED). Can you give me a clue as to where the problem lies as the moodlet is being loaded but is not being applied by the event.


1. You can change it.

2. KEatIngredient.
The KEatIngredient, kAteMeal, kCookedMeal, kReadBook and kFinishedBook are the only events that are actually scripted to support custom content as "Parameters". Any other event will only add the buff without checking any condition or parameters.

3. Did you copy the "Ingredient_Key" (from ingredients.xml) inside the tag "Parameters" (from EventHandlers)?

Example:
Ingredients.xml:
<Data>
<Ingredient_Key>DV_AppleOfInspiration</Ingredient_Key>
....
</Data>

Buffs.xml
<BuffList>
<Hex>DV_FeelingInspired=0x773B11942C5BEDC4</Hex>
<BuffName>DV_FeelingInspired</BuffName>
<BuffDescription>DV_FeelingInspiredDescription</BuffDescription>
<Version>0.1</Version> <!-- Must have -->
<SKU>BaseGame</SKU>
.....
</BuffList>

EventHandlers.xml:
<EventHandler>
<EventTypeId>kEatIngredient</EventTypeId>
<Parameters>DV_AppleOfInspiration</Parameters> <------ Ingredient_Key
<BuffName>DV_FeelingInspired</BuffName> <------ BuffName
<BuffOrigin>DV_FromAppleOfInspiration</BuffOrigin> <------ BuffOrigin
<DelegateMethod></DelegateMethod>
</EventHandler>

In case the problem persists, send me the package.
Icy Spicy
#25 Old 31st May 2016 at 9:55 PM
Quote: Originally posted by douglasveiga
1. You can change it.

2. KEatIngredient.
The KEatIngredient, kAteMeal, kCookedMeal, kReadBook and kFinishedBook are the only events that are actually scripted to support custom content as "Parameters". Any other event will only add the buff without checking any condition or parameters.

3. Did you copy the "Ingredient_Key" (from ingredients.xml) inside the tag "Parameters" (from EventHandlers)?

Example:
Ingredients.xml:
<Data>
<Ingredient_Key>DV_AppleOfInspiration</Ingredient_Key>
....
</Data>

Buffs.xml
<BuffList>
<Hex>DV_FeelingInspired=0x773B11942C5BEDC4</Hex>
<BuffName>DV_FeelingInspired</BuffName>
<BuffDescription>DV_FeelingInspiredDescription</BuffDescription>
<Version>0.1</Version> <!-- Must have -->
<SKU>BaseGame</SKU>
.....
</BuffList>

EventHandlers.xml:
<EventHandler>
<EventTypeId>kEatIngredient</EventTypeId>
<Parameters>DV_AppleOfInspiration</Parameters> <------ Ingredient_Key
<BuffName>DV_FeelingInspired</BuffName> <------ BuffName
<BuffOrigin>DV_FromAppleOfInspiration</BuffOrigin> <------ BuffOrigin
<DelegateMethod></DelegateMethod>
</EventHandler>

In case the problem persists, send me the package.
\

Found the issue- I was looking through my previous packages and found a note that the Event handler localization should be - Gameplay/Excel/buffs/BuffOrigins:780026DD6BD6414C (buff origin hashed without the 0x).

Following that it shows up now!

Thanks!
Page 1 of 2
Back to top