Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

2018 MTS Calendar Contest - posted on 12th Nov 2017 at 8:48 PM
Replies: 71 (Who?), Viewed: 87780 times.
Page 1 of 3
Forum Resident
Original Poster
#1 Old 27th Jan 2015 at 9:16 PM Last edited by douglasveiga : 22nd Jan 2016 at 6:06 AM.
Default Custom Content Loader - CCLoader
Last update: 19th Jan 2016

Requires basegame patch v1.67

This mod will be able to load into the game custom content tunings for Ingredients, Recipes, Books, Plants and Buffs/Moodlets created by third party modders.

Files:
CCLoader.zip -> Contains the required mod to load CC tunings.
CCLoader_Generator.zip -> For custom content creators . Contains the required files to create new CC tunings.


How to install CCLoader:
1- Unzip the content from the 'CCLoader.zip' inside your mods folder. Like any other mod.

Updates:
- 19th Jan 2016:
  • Loads Events and custom Buffs/moodlets into the game.
  • Recipe supports ingredient substitutions.
  • Easy autosoil for custom plants.
  • Shows a very basic report regardless the loading process, after an error happens.
- 1st Jun 2015:
  • Cross reference between CC mods are correctly handle.

How to create new CC tunings:


Additional files for testing purposes:
GreenApple_Ingredient.zip -> GreenApple Ingredient example.
ChocolatePie_Snack.zip -> ChocolatePie Snack example.

Credits and Help:
Arsil, Inge and Peter Jones.
icemunmun

Tools
s3pe, s3oc, Notepad++,
Microsoft visual studio
Download - please read all instructions before downloading any files!
File Type: zip CCLoader.zip (13.7 KB, 21671 downloads) - View custom content
File Type: zip CCLoader_Generator.zip (17.8 KB, 4535 downloads) - View custom content
File Type: zip GreenApple_Ingredient.zip (435.7 KB, 6917 downloads) - View custom content
File Type: zip ChocolatePie_Snack.zip (294.7 KB, 6653 downloads) - View custom content
Advertisement
Inventor
#2 Old 28th Jan 2015 at 10:25 AM
Thanks for sharing your hard work. If it is not clear, this mod/tool creates skeletons/templates of the XML
resources used to define new recipes, ingredients and plants, and also automates the scripting needed
to load and make them available into the game (like the NRaas tool to generate the script/S3SA to load
custom careers). Very useful for creators without coding expertise.

OT: This reminded me that some time ago I tried to do an auto soil plant for your strawberry mod.
I tried again and this time I was able to do it. Do you mind if I share it here? If you like you can put
it as optional download along with the main mod, no need to credit me (and I'll delete the attachment).
EDIT: Sorry if it was inappropriate to mention that here, I don't want to diverge the focus from this tool.
Forum Resident
Original Poster
#3 Old 28th Jan 2015 at 10:24 PM
Quote:
Originally Posted by Arsil
Thanks for sharing your hard work. If it is not clear, this mod/tool creates skeletons/templates of the XML
resources used to define new recipes, ingredients and plants, and also automates the scripting needed
to load and make them available into the game (like the NRaas tool to generate the script/S3SA to load
custom careers). Very useful for creators without coding expertise.


Thank you for the additional explanation. I avoided all the technical details and didn't notice that the text is unclear.

Quote:
Originally Posted by Arsil
OT: This reminded me that some time ago I tried to do an auto soil plant for your strawberry mod.
I tried again and this time I was able to do it. Do you mind if I share it here? If you like you can put
it as optional download along with the main mod, no need to credit me (and I'll delete the attachment).
EDIT: Sorry if it was inappropriate to mention that here, I don't want to diverge the focus from this tool.


That is awesome, of course you can share here. I believe it will be useful for learning purpose.
Inventor
#4 Old 28th Jan 2015 at 11:35 PM Last edited by Arsil : 3rd Feb 2015 at 11:09 AM.
I tested it extensively and it seems to work like any other auto soil plant.
You'll find it in the Buy Catalog, under ByFunction/Debug/PlantAndSeedSpawners.
It has the CC icon, so to find it quickly you can filter for that if you have many items
in that category.

Don't ask me how it works, I don't know I just tried to copy how existing auto soil plants work.
I guess it's simply a matter of referring to the name (string) of the ingredient/fruit "strawberry",
since that also works as the seed of the plant, and the game will create the exact same plant
but already in the "mature"/"ready to harvest" stage (my game is localized, probably they are
not the correct English terms) that doesn't need any maintenance and never withers
(if put in a community lot).

Feel free to modify it, change my lame/awkward STBL strings and rename the package.
If you want to put it with your main mod as optional download (I repeat, no need to credit me),
please let me know so I'll delete my attachment (no need to have more copies in multiple places).

It's NOT compatible with the strawberry auto soil plant of Bohemian Garden Fruits and Nuts,
and with that I mean that there will be 2 auto soil plants but both will generate the same plant based on
the priority of the mod vs the store content (I think .package wins over .Sims3Pack, otherwise is the path
plus packageName that determines the priority between 2 .package files).
EDIT: how moron can I be? It's not about the priority (that is only true if 2 packages have resources with
the same TGIs) but about what resource is parsed/read/initialized before the other, based on the TGI I guess.

I also tried to optimize the package (I hoped I could only leave OBJD, OBJK, S3SA, NGMP and STBLs)
but when I tried to cut some resources (even just FTPT, _RIG, LITE and RSLT) using instead "links" to
the resources of the cloned auto soil potato plant it didn't seem to work correctly[***], so I gave up and left all
resources. Maybe the NGMP isn't even needed (the hashing key is the class name of the auto soil plant).
If you are interested you can try to experiment with that more, I may have not tried hard enough
(and also never cleared the cache between an attempt and the other). I'm a lazy ass modder ^^

[***] EDIT: trying to optimize it and understand what resources are strictly needed is worth another shot,
I was very tired when I tried to do that and maybe I misread the results: at first when a plant had no
fruits I though it wasn't working correctly, then I discovered that when you place an auto soil plant it
doesn't always already has fruits to harvest, I didn't figure out if it's random or how else it works.
I'm not in the mood to try again right now, I'll leave that experimentation to others.
Download - please read all instructions before downloading any files!
File Type: zip DV_Strawberry_AutoSoilPlant.package.zip (186.8 KB, 313 downloads) - View custom content
Inventor
#5 Old 30th Jan 2015 at 7:04 PM Last edited by Arsil : 15th Feb 2015 at 11:43 AM.
I found the time (not the mood) to try again. It works fine with this minimalistc set of resources:
OBJD, OBJK (refers to the VPXY of the potato plant), S3SA and STBLs. The NGMP apparently
is not needed, I put it there in the first place because that's what the store auto soil plants do.
About how auto soil plants work: the script just return a string, which is the name of the ingredient,
now in the ingredient definition it is specified the plant associated with that ingredient, so when
you place an auto-soil plant the game create the normal plant associated with that ingredient.
This is only my speculation, I haven't checked the code to verify if it's true.
EDIT: I took a peek at the code and, yep, I guessed right, that's pretty much what happens.

Another thing I noticed is that when you place an auto soil plant, two objects are created:
the auto soil plant and the normal plant (you can verify that there are indeed two objects
clicking on the "dirt" of the plant and NRaas Debug Enabler will display pie menu entries
for two items: the frostable plant and the autosoilplant - you can also verify that with
NRaas Master Controller clicking on the ground and examining all object in the radious).
EDIT: That happens also with regular plants (the second one, in this case, is of class soil).
Sorry for the confusion, I never played much with gardening.

I noticed something else very creepy though: if you put an auto soil plant in a residential lot,
sims will start to continually route fail trying to wet them. This behaviour continues also if you
delete all plants (and I verified they were actually deleted with Master Controller). Do you know
if this is a well known issue or maybe is it caused by a mod or a combination of "conflicting" mods?
EDIT: I got it. Some time ago I've ITUNed some gardening interactions so they are executed
autonomously, so the routing fails happen because auto soil don't need watering (but doesn't
explain why sims still try to water plants after I utterly destroy/remove them...)

For now I'm leaving the attachment of the "extended" version of the mod, just in case.
Download - please read all instructions before downloading any files!
File Type: zip DV_Strawberry_AutoSoilPlant.package.zip (3.1 KB, 200 downloads) - View custom content
Description: Minimalistc version of the auto soil plant (6.6kB instead of 231.2kB)
Inventor
#6 Old 3rd Feb 2015 at 7:05 PM Last edited by Arsil : 9th Feb 2015 at 1:29 PM.
I made a custom plant (and fruit, of course). This is not pretty enough to use it as is in your game,
I did it only as a learning experience and as a reference. Of course it needs douglasveiga's mod.
Feel free to use it and modify it, but please don't redistribute it because if more than one person
does that then there will be conflicts. Don't try to renumber the resources with S3OC, that will only
screw it up because it uses an NGMP resource (uhm... maybe this one is safely renumerable) and
also that particular hashing algorithm that connects plant/ingredient name to the IID of their
respective MODL.

This is organized in three packages, because that was very handy when developing it and I've
left it in this format because I though that maybe it's more "readable" this way. You can merge
them or import all resources in the same package. I didn't change the meshes (mostly because
the ingredient uses geostates and I can't use TSRW or the Blender plugin to handle them), but
as you can see in the screen shot I've put a mark on the textures to show that they are indeed
two different plants/fruits.

The thumbnail sucks (it's generated automatically based on the mesh/textures), to change it you
can use the smart workaround used by tenmang HERE (wait, that was for store ingredients,
maybe in this case it's easier to calculate the IID to assign to the THUM resource, whatever).

The _XML resources in the "main" package are heavily commented, but if you are interested
I'm making a kind of step by step guide to create a custom plant from scratch in this THREAD.

Thank you again douglasveiga ^^
Screenshots
Download - please read all instructions before downloading any files!
File Type: zip custom_plant_example.package.zip (938.6 KB, 235 downloads) - View custom content
Inventor
#7 Old 9th Feb 2015 at 3:17 PM Last edited by Arsil : 11th Feb 2015 at 2:18 PM.
Hello douglasveiga ^^
Are you interested in adding support to custom books in your CCLoader?

I wanted to come to you with a working code so you only had to fit it in yours,
but my loader still has some problem: it adds the book (as you can see with
the debug messages) but for some reason the book is not available (it is if I
override the whole Books _XML and I append my custom book data there,
but that system doesn't allow to share custom books easily).

EDIT: it's working now, see below.

I also got side tracked and spent some time trying to find out if custom covers
(books' textures) are possible. Unfortunately it doesn't seem likely.



The bottom line is: if you are interested, I'll try to make the loader work and all you'll
have to do is to integrate it with your code (I guess it will be very easy). Personally I'm
not very interested in adding custom books to my own game, but your CCLoader came
to mind, so I decided to ask.

I said that I don't care about custom books, but I was a bit disappointed after doing
an almost perfect replica of the cover of one of my favourite books and discovering
that I couldn't use it ^^

If someone is interested in helping me (honestly I have no idea why it's not working)
I'll post my source-code (it's very short) and also the package I'm using so you wont
have to make your own, as easy as it is.


EDIT: It's working fine now. Other than regular books (BookGeneral), I was also
successful creating a BookToddler (a book readable to toddlers) and a BookRecipe
(tested with my White Rice, removing the auto-learn flag from the recipe's definition).
I'm sure creating other kind of books is likewise easy. Unfortunately custom textures
really seems out of questions (and without those, custom books, at least for me, are
much less appealing), but I'd really like confirmation from someone expert in those
kind of resources. For example: what if we use "external" instead of "private" in the
field where the drop down menu is opened or in the RefType of the single entries?
Would that make any difference in the way the _IMG resource is retrieved?
Screenshots
Forum Resident
Original Poster
#8 Old 11th Feb 2015 at 5:23 PM
ok. I will include in the main mod. I never created any new books so I am not too familiar about the subject.
Field Researcher
#9 Old 11th Feb 2015 at 5:50 PM
Quote:
Originally Posted by Arsil
I also got side tracked and spent some time trying to find out if custom covers
(books' textures) are possible. Unfortunately it doesn't seem likely.

AFAIK, there are several 'classes' of books, and each class has one cover.

New books must use one of these classes; it seems to be impossible to add new classes that the game will recognize.

Here's a thread at SimsAsylum for a mod for modified book covers: http://simsasylum.com/tfm/index.php...dated-12-18-13/

Nobody is Perfect. I am Nobody. And I'm trying to make something wonderful for The Sims 3.
Inventor
#10 Old 11th Feb 2015 at 6:01 PM
Books are a piece of cake, you'll understand how they work in no time.
Basically you do the same thing explained HERE, but with a loader
that read the xml data from a custom resource, so there will be no more
need to override the Books _XML, so it will be more easy to add and share
custom books between users. I don't want to make you pressure, I'm aware
that books (especially without custom covers) aren't exciting as plants,
ingredients and recipes, so don't worry about saying no.

If you confirm that you want to include it, what you want me to do? Upload the package here?
If you have no problem about it, I'd also like to post directly the sourcecode,
so maybe it will be more easy to see what it does and spot if there are issues.
Of course you are free to modify it as you see fit, not only to integrate it with
your framework and the tool that generates the xml files, but in any way you want.
Inventor
#11 Old 13th Feb 2015 at 5:44 PM
Reading old posts, I found out that NRaas Careers already implements a loader to
read book data from a custom xml resource. I don't think that feature is used much
(but, on the other hand, I only use the self-employed careers that come with the
mod itself, so what can I know about it). There's also a new class derived from Book
(not sure why that's needed, but I've only gave a quick peek), it uses 1 or 2 custom
textures, but because it uses a custom MODL that "mentions" them, so not very
interesting for a more universal customization point of view.

Not sure if it's still worth it to add it to douglasveiga's CCLoader, anyway here's the
package and the source-code (mind that this will only read data from the xml
resource whose name is hard-coded in the script).

I post the source-code only because this way is more easy for me to highlight a few
things that I deem noteworthy and others that may need improving (mostly debugging
messages, I guess a better solution would be to use a delayed StyledNotification.Show).

All comments use italic to make them more distinguishable from the rest.

Download - please read all instructions before downloading any files!
File Type: zip Arsil_CustomBookLoader.package.zip (13.4 KB, 201 downloads) - View custom content
Lab Assistant
#12 Old 14th Feb 2015 at 7:30 PM
This is awesome! Thank you so much for providing this for those of us who cannot code!

I just tried it out and successfully transferred my existing plant/recipe/ingredient mod using your new tools, generating a new .dll! I just checked it alongside your green apple example and it was fine! I had errortrap in too and it didn't shout at me like it normally would when I break something! This means I can add new ingredients much more easily, without having to over-ride the master xmls each time. And now the ingredients can be optional, instead of all included in one big mod!

Thank you so much for doing this, you're awesome!
Field Researcher
#13 Old 2nd Mar 2015 at 2:32 AM
What is the difference between a autosoil plant and a normal plant?
Inventor
#14 Old 2nd Mar 2015 at 2:14 PM
The autosoil one is buyable from the catalog (debug), it's already in the mature or harvestable
stage when you place it, needs no maintenance and never withers (in a community lot).
Lab Assistant
#15 Old 14th Apr 2015 at 12:29 AM
Hi there !
So i'm having a little problem with your mod, it's not working.
I have installed it with my other mods as usual but once my game is done loading i get like a pop up. I took a picture but i don't know how to post the image on here.
The message says :

CCLoader
Name:Undefined
Creator:undefined
Error: System.NullReferenceException: A null value was found where an object instance was required.

It's not the entire message but i can't be bothered to copy all of it ... Can you help at all ?
Inventor
#16 Old 14th Apr 2015 at 9:48 PM
If you upload your package I'll gladly take a look at it to check what's the problem
(I guess there's something wrong in one of your xml resources).

When you reply to a post, see the "Manage Attachments" section below the textbox for the message.
Lab Assistant
#17 Old 14th Apr 2015 at 11:12 PM
Hum i'm not sure what you want me to send you. I'm trying to attach the picture but looks like it's to big of a volume cause it's not attaching if thats makes sence ..
Inventor
#18 Old 14th Apr 2015 at 11:21 PM
Unless there's the stacktrace included I doubt the screenshot (or the error message itself) can help much.

You should upload the file with ".package" extension you are trying to use with the CCLoader,
that's the easiest way to understand what's the problem and hopefully help you to fix it.
Lab Assistant
#19 Old 14th Apr 2015 at 11:55 PM Last edited by cinthila : 15th Apr 2015 at 8:57 PM.
Quote:
Originally Posted by Arsil
Unless there's the stacktrace included I doubt the screenshot (or the error message itself) can help much.

You should upload the file with ".package" extension you are trying to use with the CCLoader,
that's the easiest way to understand what's the problem and hopefully help you to fix it.


Ok no problem !
Well that's the one i'm trying to use. What i don't understand is why i seem to be the only having troubles with that mod. If there's a problem with the package it should limit everybody right?
Thanks again for helping me !
Inventor
#20 Old 15th Apr 2015 at 10:52 AM
Oh! You could have just said you had a problem with icemunmun's mod. Please remove the attachment.

Did you try to modify it or it's the original version?
Have you tried to re-download it?
Have you tried other packages that requires the CCLoader to work? If not, try with one posted by
douglasveiga on the opening post of this thread.
Is your game fully patched? Not sure if it's relevant, but better be safe than sorry.

EDIT: Have you downloaded only this file? You have to download both files. This only contains
the recipes, you also need the one with the ingredients and plants to make it work.
Icy Spicy
staff: moderator
#21 Old 15th Apr 2015 at 11:50 AM Last edited by icemunmun : 15th Apr 2015 at 1:39 PM.
Quote:
Originally Posted by cinthila
Hi there !

The message says :

CCLoader
Name:Undefined
Creator:undefined
Error: System.NullReferenceException: A null value was found where an object instance was required.


This error message generally pops up if the ingredients defined in the recipe is not present in game like for example CC ingredients/EP or store ingredients which you do not have.

As Arsil has pointed out,you need both the packages(Ingredient+Recipe) for the recipes to work.
Lab Assistant
#22 Old 15th Apr 2015 at 9:03 PM
Thank to both of you for you help! I did download both of the files and it was the original version.
After talking to you yesterday i tried to clean up my mods by removing the cache files and I redownloaded (if that makes sence) both CCloader and you mod icemunmun. I don't know what i did differently but it seemed to work after that. I only played for about 30 minutes though and then my game crashed. Am pretty sure it as nothing to do with any of these mods, I just have too much rubbish on my game and my computer can't handle it.
Anyway, if I have time today i'll try again and see if it's still working, I don't see why not.
Thank you for taking the time to help!
Theorist
#23 Old 9th May 2015 at 9:44 PM
I just wanna say: thank you very very much. You keep on stretching the possibilities of what Ts3 can do.
Who needs official game patches when you can have this?

#BlairWitchPetition
TS3 NEEDS: TENNIS COURTS > BUSES > PIGS/SHEEP
Can't find stuff in build and buy mode? http://www.nexusmods.com/thesims3/mods/1/?
Lab Assistant
#24 Old 25th May 2015 at 8:37 AM
First off, thank you for this awesome mod! I really appreciate it.

My problem is that I can't get the game to detect CCLoader at all. I've tried playing the game with a fresh Documents folder that had just CCLoader and some custom ingredients in, taking out all my mods except CCLoader and the custom ingredients, deleting caches and thumbnails, reinstalling CCLoader countless times... No dice. When I go to test it by entering the CCLoader cheat code, it just says "Unknown Command."

What am I doing wrong? I would really love to play with custom ingredients, but I just can't get it to work.
Forum Resident
Original Poster
#25 Old 2nd Jun 2015 at 2:31 AM
Quote:
Originally Posted by katiekatiekat
First off, thank you for this awesome mod! I really appreciate it.

My problem is that I can't get the game to detect CCLoader at all. I've tried playing the game with a fresh Documents folder that had just CCLoader and some custom ingredients in, taking out all my mods except CCLoader and the custom ingredients, deleting caches and thumbnails, reinstalling CCLoader countless times... No dice. When I go to test it by entering the CCLoader cheat code, it just says "Unknown Command."

What am I doing wrong? I would really love to play with custom ingredients, but I just can't get it to work.


Did you patch your game? requires v1.67.
Page 1 of 3
Back to top