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!
Test Subject
Original Poster
#1 Old 1st Feb 2015 at 2:42 PM
Default How to create a custom plant?
I want to create a custom plant, which will support gardening skill, could be harvestable etc. Just like an original plant. However I am very new to the Sims 3 modding and I am looking for some help
Advertisement
Inventor
#2 Old 1st Feb 2015 at 2:45 PM
This will simplify a lot the process: http://modthesims.info/showthread.php?t=546986.
It automatizes some of the steps needed, you still will have to make the meshing work,
at least for the fruit/vegetable if you decide to use an already existing plant.
Test Subject
Original Poster
#3 Old 2nd Feb 2015 at 4:08 PM Last edited by dawg : 4th Feb 2015 at 5:25 PM.
Thank you for this, however I don't have any idea what to do right now and I would appreciate any help.

Inventor
#4 Old 2nd Feb 2015 at 5:08 PM
OK. First thing I'll suggest you is to choose an existing basegame plant to clone.

You already have an idea of what plant you wanna do? Will it be bush-like or tree-like?
Based on that clone the plant that more resembles the one you wanna do, for example
the apple plant (tree like) or the potato plant (bush like).

Are you familiar with S3OC?
Test Subject
Original Poster
#5 Old 2nd Feb 2015 at 5:53 PM Last edited by dawg : 4th Feb 2015 at 5:25 PM.
I want my plant to be tree-like. I have downloaded S3OC and watched a few tutorials but I don't think it's some valuable experience.
Inventor
#6 Old 2nd Feb 2015 at 6:40 PM
So, are you serious about this? It's gonna be a lot of work, it's gonna be a hell of a ride:
you'll laugh, you'll cry, you'll ask if this is worth it, you'll wonder if Arsil really knows what
is talking about, but eventually you'll be proud of yourself.

And know that If you end up to be one of those modderfucHers that ask for help and then
suddenly disappears, I'll hunt you down and when I'll find you, because I will, I'll delete
your thumbnails' cache. And then what are you gonna do, eh? Eh? Play without thumbnails
for at least a couple of minutes, here's what, so you better think twice before doing that.

Gotta go now, see you later.

EDIT: make sure you have the latest version of S3PE.
Test Subject
Original Poster
#7 Old 2nd Feb 2015 at 6:53 PM Last edited by dawg : 4th Feb 2015 at 5:26 PM.
Well I try to challenge my self and I want to accomplish my goal which I set looooong time ago. So I don't want to fool you by any means, as a matter of fact I would be very pleased if you could spend some time with me and help me achieve my goal.

I have the latest version of S3PE.
Inventor
#8 Old 2nd Feb 2015 at 8:31 PM
I forgot. You have to laugh at my lame jokes. Do we have a deal?

Enough with the silliness. I'm aware that I'm not Anne Rice when it comes to writing,
so if something is not clear don't hesitate to point that out.

Before we clone the plant, maybe it's better doing something else first.
Let's see how the apples' plant is defined, so we'll use its definition as a base to define our plant
(hope you don't mind if I say "our"). Where are plants defined?
In the Plants _XML in GameplayData.package (instance id 0xD9C5...).
So open that file with S3PE (is in the TS3 installation directory, inside Game/Bin/Gameplay)
and search the resource named simply "Plants" of type _XML
(you can use the name filter in the bottom of the window to find it easily: write "plants" in the
"Name" inputbox, tick the checkbox on the left, click on the "Set" button and tick "Filter active").

Once you find it, right click on it and, in the pop-up menu, select "Notepad" (it should be the bottom entry).
Now from the notepad do a search for the word "apple". The first result should be the right one ("Apple tree").
I want you to select and copy in the clipboard all the data relative to the apple tree - starting from the previous
line, that with "<PlantList>", till the closing tag "</PlantList>". Something like this:

Code:
<PlantList>
  <PlantName>Apple Tree</PlantName>
  ...
</PlantList>


Close the notepad - DON'T SAVE THE FILE IF YOU DID ANY CHANGE BY MISTAKE.
Now from the main window of S3PE, open the package you showed me in post #3,
by the way, how did you call that file?
If you previously set a filter, now you'll probably see nothing or only one resource, so untick "Filter active".
Right click on the "blahblahblah_plants" _XML, select Notepad and paste the text in the clipboard
where it says... wait for it... <!-- Place your PlantList tunings below this line -->

Once you do what I asked, we'll go on. I'm not in a rush, take all the time you want.
This may need some clarification: I don't want to boss you around, I just want to be
sure that you do the work yourself, so you'll learn how to do it (and maybe someone
else who will read this).

To be honest, I never did a custom plant or ingredient myself, but I'm confident that
we can do it. Probably it wont be the most optimized process, maybe we'll trip along
the way, but we'll make it. I'm just planning one little step ahead, so I don't write
something terribly stupid, so probably we'll encounter some difficulties sooner or later,
but we'll handle them.

By the way, what kind of plant/fruit you wanna do?

EDIT: Please paste the entire "blahblahblah_Plants" _XML inside your package in your
next post and inside a "code" tag (like that I used above), so I'll check if it's all right.
Test Subject
Original Poster
#9 Old 2nd Feb 2015 at 10:33 PM Last edited by dawg : 4th Feb 2015 at 5:25 PM.
I want to thank you really much for taking your time to help me with my new "hobby" I uploaded the _Plants.xml so please check if it's all right. Can you tell me what is your timezone, because its getting late here and I just don't want to keep you waiting for my next response.

The plant I am creating with you is a secret for now, I want it to be a suprise; however I'm sure somebody suspects what it's going to be I don't want to be controversial or anything, I just have a big project and I want/need your help for as long as you can. Thank you again.
Inventor
#10 Old 3rd Feb 2015 at 9:15 AM
You forgot to upload the file. Anyway, don't upload it, just paste its content in your post using
the "code" tag (write the word "code" all lowercase) nested inside a "spoiler" tag, like this:

(If you reply to my message you'll see the tags needed for that, exactly above this line)

Please don't quote every time my whole message, especially if you are not making a
direct connection to what I wrote (in that case, just quote the relevant part of my post).

In this way posts will be shorter and more readable ^^

Don't worry about making me wait, as I said before I'm not in a hurry.

I understand what you say about the secrecy, but I'd like to make everything out in the open
so other readers can learn from our discussion and also because we have to give the plant
a name in order to make things work. Knowing what plant you want to make will also help us
to decide, later, which ingredient/fruit to clone (the one that more resembles what you wanna do).
Test Subject
Original Poster
#11 Old 3rd Feb 2015 at 2:22 PM Last edited by dawg : 4th Feb 2015 at 10:29 PM.
All right, here's the plants.xml, which i got from ccloader generator.



I'm not going to lie, the plant I want to implement in Sims 3 is cannabis. I know it's been requested by many sims players, and I thought I want to try and make it for other people. I don't want to discuss about morality of this plant (or drug for some people), I just want to make it happen and I don't want to give up on my project due to public opinion.
Inventor
#12 Old 3rd Feb 2015 at 4:04 PM Last edited by Arsil : 4th Feb 2015 at 9:22 PM.
To be honest I'm not really happy about it, but you wont get any judgement by me.
If admins/moderators tell us to, we'll use a generic name instead.

----------

Now I'd like you to focus on the last tag of the xml plant definition:
Code:
<MedatorName>PlantLargeTree</MedatorName>

Well, I've no freaking idea what medator means, but this is used to specify that this plant uses the
following medator (also defined in the Plants _XML in GameplayData.package, near the bottom of the list):
Code:
<MedatorInstanceList>
  <MedatorName>PlantLargeTree</MedatorName>
  <PlantHeight>High</PlantHeight>
  <ModelName>plantLargeTree</ModelName>
</MedatorInstanceList>


This metador is used by more than one plant (the one for apples, limes, etc), so this means that
if we don't need to change the plant's meshes we could use this one without any changes.
But in order to give more broad/generic indications on how to make custom plants, we are going to
make a custom one anyway. Let's analyze all tags of the metador:
- MetadorName: self explanatory, a string used as id for the metador. Now I'm not 100% sure,
but
there must be a NGMP (Name Guid MaP) resource that associates this name to the Instance
ID of the OBJD of the plant, in order for the game engine to create/retrieve the plant starting from this string.
[EDIT: Yep, I can confirm that the NGMP is indeed needed]
- PlantHeight: I've no clue, but I guess this is used for the harvesting animations and maybe also
for the growing stages of the plant. It doesn't matter, we'll not change this.
- ModelName: this is a little tricky, this name must be translated with a particular hashing algorithm
to get the instance id of the plant's MODL. To hash it you'll need douglasveiga's tool that you can find HERE.
If we try to hash "plantLargeTree" we get 0x0000000000EFA164, which is the instance id of the MODL
of the plantLargeTree object (it's in FullBuild0.package).

So, let's start editing the medator definition for our plant
Code:
<MedatorInstanceList>
  <MedatorName>dawg_CannabisPlant_MedatorName</MedatorName>
  <PlantHeight>High</PlantHeight>
  <ModelName>dawg_CannabisPlant_ModelName</ModelName>
</MedatorInstanceList>

EDIT: changed the MedatorName from "dawg_Cannabis_MedatorName" to "dawg_CannabisPlant_MedatorName"
EDIT: changed the ModelName from "dawg_Cannabis_ModelName" to "dawg_CannabisPlant_ModelName"

Select that text, copy it into the clipboard and paste it into your blahblahblah_Plants _XML
near the bottom after the line: <!-- Place your MedatorInstanceList tunings below this line -->

Now let's go back to S3PE main window, it's time to create the NGMP resource:
click on the menu Resource+Add:
- As type put: NGMP
- As group put 0
- There are no rules for the Instance but it must be unique, so go to Name and write: dawg_CannabisPlant_NGMP,
click on FNV64 (the Instance will be created for us) and click OK.

We don't have yet the Instance ID of our plant, but we can translate the medator name hashing it with FNV64.
So, go to menu Tools+FNVHash, in "Text to hash" put "dawg_CannabisPlant_MedatorName", click on Calculate
and then copy the text in the FNV64 inputbox. It should be 0xC86B32323DA75779 (double check).
Close the hashing tool window, go back to S3PE main window, select the NGMP resource we just created and
then click on "Grid": a new window opens. Select the line with "Data", then click on the "..." on the right: a new
window opens. Click on Add and paste the hashing we have on the clipboard into the NameHash field.
As I told before, we don't know yet what the instance of the plant will be, so click OK, then click Commit.
Save the package.

Now we can calculate to what hash the ModelName translates to. So we use the tool aforementioned
and for "dawg_Cannabis_ModelName" (without quotation marks) we get 0x000000000063D63E
(double check if it's correct). Oh, we only care about the Instance ID, the typeId and the GroupId
are always the same. So, write this number somewhere (digitally) because we'll need it later.

EDIT: we changed the ModelName, we'll recalculate the correct IID later.

[I ASK PERMISSION TO MODERATORS TO ALLOW ME TO MULTI-POST]
Inventor
#13 Old 3rd Feb 2015 at 4:05 PM Last edited by Arsil : 4th Feb 2015 at 9:15 PM.
Little parenthesis about the <PlantableNonIngredients> section in the Plants _XML.
I guess this is used to define plants that don't give regular fruits/vegetables/ingredients
(death flower, money tree, etc), but I don't know any details about that.

Now let's go back to edit our blahblahblah_Plants _XML resource, it's time to define our plant.
Of course I'm talking about editing the "Apple Tree" definition changing it into a custom one.

Code:
 <PlantList>
  <PlantName>dawg_Cannabis_Plant</PlantName>
  <LocalizationKeyPlantName>dawg_CannabisPlant_Name</LocalizationKeyPlantName>
  <LocalizationKeySeedName>dawg_CannabisSeed_Name</LocalizationKeySeedName>
  <LocalizationKeyDescription>dawg_CannabisPlant_Description</LocalizationKeyDescription>

  [CUT, leave all these tags as they are]

  <MedatorName>dawg_CannabisPlant_MedatorName</MedatorName>
 </PlantList>

EDIT: changed the Plant_Name from "dawg Cannabis Plant" to "dawg_Cannabis_Plant" (with underscores)
EDIT: changed the MedatorName from "dawg_Cannabis_MedatorName" to "dawg_CannabisPlant_MedatorName" (with underscores)

We'll change only the more important tags, once verified that the plant works in game
(it's a long road, don't hold your breath), you can experiment with the other settings.

Let's analyze the tags:
- PlantName: is the internal name of the plant, must be unique. With "internal" I mean that
this is not the name you'll see when playing the game, but it's used by the game engine
- the following 3 tags are used for localization, all keys have as prefix: "Gameplay/Excel/Plants/PlantList:",
so the complete keys are:
Gameplay/Excel/Plants/PlantList:dawg_CannabisPlant_Name
Gameplay/Excel/Plants/PlantList:dawg_CannabisSeed_Name
Gameplay/Excel/Plants/PlantList:dawg_CannabisPlant_Description
These must be used as hashing keys (FNV64) in STBL resources to translate in all languages the
seed's name and the plant's name and description. We'll create the STBLs later.
- MedatorName: this specifies which metador to use (the custom one we created earlier).

I'm very tired and I think I also have a fever. I'll stop here for now.
Tell me if it's all clear and if you were able to follow all the steps.
If you post, like you did before, your blahblahblah_Plants _XML I'll check it.

EDIT: in the meantime, look also for a fruit or vegetable to clone, choose the one
that more resembles the one you want to create (I mean the shape of the object).
Earlier I said that I would have made a step at a time together with you (and I'll do
that, don't worry), but I grew anxious so I went ahead to see if I could really make
a custom plant. It turns out that, apparently, I can ^^
Test Subject
Original Poster
#14 Old 3rd Feb 2015 at 7:28 PM Last edited by dawg : 4th Feb 2015 at 10:28 PM.
Wow. This is amazing. You are amazing too. Thank you again for the commitment. I checked everything and it's exactly as you wrote down.

EDIT: As for the clone... I think the coffee plant beans resembles the "buds" the best, I don't know much knowledge do you have on the cannabis :p

Inventor
#15 Old 3rd Feb 2015 at 9:25 PM
Quote:
I don't know much knowledge do you have on the cannabis :p

I'll tell you exactly how much knowledge I have. I remember that once, many years ago, when I
was in a ship for a scholastic trip (no pun intended), a guy asked me if I had a cigarette/rolling
paper using a word that in my first language also means map/chart. So I answered that maybe
he could find one at the news stand or in the souvenir shop...

----------

Everything seems correct in the xml (if I had to nitpick I'd say you changed the name of the plant,
I suggested to use your nickname even there to avoid possible conflicts, you'll never know, maybe
someone else will try to make the same plant) and my fever/headache seems gone, so let's go on a bit.

We'll do the last xml definition so that part is over. The thing is that there are many coffee beans...
I think they all use the same mesh though... look, I'll pick the first one, if it's a bad choice let me know.
The fact that comes from an EP complicates a bit things, but we'll manage somehow.

The xml definitions for ingredients are in the Ingredients _XML resource in GameplayData.package.
Start S3PE. Set as name filter "Ingredients", activate the filter and open that file. Right click on the resource
called "Ingredients" of type _XML and select Notepad. From the Notepad do a search for "KonaBean" and
copy all the block between <Data> and </Data> containing the definition of that ingredient. Close the Notepad.

With S3PE, open your package, right click on the blahblahblah_Ingredients _XML resource and
paste the text after the line that says: <!-- Place your Data tunings below this line -->

Post the content of your blahblahblah_Ingredients _XML here (since I guess that you learned
the mechanism well now, you can copy just the KonaBean definition if you prefer). Then we'll
proceed to edit it to transform it into the definition of our custom ingredient.
Once we have that, we'll make some hashish hashing. I'm a comedian.
Test Subject
Original Poster
#16 Old 3rd Feb 2015 at 10:54 PM Last edited by dawg : 4th Feb 2015 at 10:28 PM.
That's a corny story I want to change a name of that plant, but maybe not now, is it OK if we leave it for the end?



EDIT: Sorry for so many edits, I messed my grammar a little bit and the code was wrong too.
Icy Spicy
#17 Old 4th Feb 2015 at 11:18 AM
I am going to camp out in this thread.I have been wanting to make custom plant and recipes since forever!
Inventor
#18 Old 4th Feb 2015 at 3:33 PM Last edited by Arsil : 8th Feb 2015 at 10:43 PM.
Quote: Originally posted by icemunmun
I am going to camp out in this thread.I have been wanting to make custom plant and recipes since forever!

Oh, I'm so relieved, I can't thank you enough!
This was starting to sound like "Modding Bad" with Jesse dawg Pinkman and Walter Arsil White.

Quote: Originally posted by dawg
I want to change a name of that plant, but maybe not now, is it OK if we leave it for the end?


That's the internal name of the plant, used by the game engine, not the one people will see when playing.
We'll set its "public" name soon, but you'll be able to easily change that whenever you please.
And if you change something, you better tell me because if I fail to notice the change there are good
chances that this wont work.

Now let's analyze the most important tags (as far as we are concerned) of an ingredient definition:
  • Ingredient_Key : this is the internal name (or identifier if you want) of the ingredient.
    Must be unique, so it's always a good idea to put your nickname in it.
  • Ingredient_Name : this is used as key for the localization. This too must be unique.
    The prefix is: "Gameplay/Excel/Ingredients/Data:", so the complete key to hash is
    Gameplay/Excel/Ingredients/Data:<WhateverValueYouPutInThisTag>
  • DataVersion : this one tells where the ingredient comes from: basegame, EP1, EP2, etc.
    If you don't have the relative EP installed it is ignored (don't think that putting "Basegame"
    will make an ingredient available, because it will miss all the resources linked to that ingredient).
    This field is also very important because helps the game engine to retrieve the correct TGI
    (TypeId, GroupId and InstanceId) of the meshe[s] of the ingredient, in particular this is used
    to generate the right GroupId (because most of the resources coming from a particular EP
    have a specific GroupId). Now, there's also the CodeVersion tag and maybe I'm confusing
    or mixing them... let me check... damn it, I can't find it. Going by intuition and judging by
    their names (how scientific!) I'll say that CodeVersion prevents the ingredient to be considered
    if you don't have the EP installed, while DataVersion is used to calculate the right GroupId...
    Found it! Both are used to check if the relative EP/SP is installed, the CodeVersion is used
    to calculate the right GroupId but, hey, also DataVersion is used for that...
    Quick poll: who is bored to death by this? Yeah, me too. Anyway, we are going to remove both
    tags so the game will use the default values and our ingredient will be basegame compatible.
    Same thing can be done if you choose to clone a plant that comes from an EP.
    We'll have to remember this when we'll clone the plant or "clone" the ingredient.
  • Model_Name : this name must be translated with a particular hashing algorithm (I wonder if it
    can be called FNV24?) to get the IID (Instance ID) of the MODL of the ingredient.
    The value of this tag uses this format: modelName[#geostateName][:materialName]
    Where square brackets indicate an optional argument. So it could be the modelName
    plus any combination of the other two: just modelName, modelName#geostateName,
    modelName#geostateName:materialName or modelName:materialName.
    The "geostateName" is a string that FNV32 hashed returns the id of a geostate defined in the MODL/MLOD.
    The "materialName" is a string that FNV32 hashed returns the id of a MATD (MATerial Definition)
    which is an internal resource defined in the MODL/MLOD (MATD resources can be also external,
    i.e. you can find them listed in a .package file). Please don't ask me about these things because
    I barely understand them... well, like everything else to be honest :P
    EDIT: there's a slight chance that the materialName may instead reference a "material block", but since
    ingredients don't have their own OBJD resource (that's were the material blocks are defined) I doubt that,
    unless material blocks are also defined elsewhere (VPXY? TXTC?). Really, I know little or nothing about
    these things, so don't take what I say for granted.
    EDIT: maybe it's a MTST instead, beats me.
  • Plant_Name : here we have to put the internal name of the plant that will produce this ingredient.
    This probably is obvious, but not all ingredients are associated with a plant. Those wont use this tag.
  • CanBuyFromStore : I wont really call this tag essential, but seeing the nature of your plant...
    If it's not clear, this specifies if the ingredient can be bought in a rabbit hole with the grocery's features.
    Note to dawg: if you put "False" here you could create a custom protest about legalizing pot ;P
  • UiTab and Parent : I can't go into detail for every single field, but these two are interesting.
    UiTab is the tab where this ingredient is categorized/filtered in the shopping dialog.
    Parent defines what kind of ingredient this is (I haven't explored what this means exactly, it may have
    something to do with cooking).
    I suggest to study the default ingredients list of the game to see what values they can get. A few quick examples:
    cheese : UiTab "Meat", Parent "Ingredient"
    hot dogs : UiTab "Meat", Parent "Meat"
    lettuce : UiTab "Produce", Parent "Vegetable"
    apple: UiTab "Produce", Parent "Fruit"

Now let's change our custom ingredient definition. I'll make only the essential changes,
leaving the other values alone (but I'll remove some tags), the other tweaking is up to you.
For tags not defined will be used a default value (e.g. CodeVersion will be "Basegame").

Code:
<Data>
  <Ingredient_Key>dawg_Cannabis_Ingredient</Ingredient_Key>
  <Ingredient_Name>dawg_CannabisIngredient_Name</Ingredient_Name>
  <Rarity>Common</Rarity>
  <UiTab>Produce</UiTab>
  <Parent>Vegetable</Parent>
  <Model_Name>dawg_CannabisIngredient_ModelName</Model_Name>
  <Thumbnail_Model_Name>dawg_CannabisIngredient_ModelName#plantSurface</Thumbnail_Model_Name>
  <Plant_Name>dawg_Cannabis_Plant</Plant_Name>
  <Fertilizer_Value>10</Fertilizer_Value>
  <Fertilizer_Days>5</Fertilizer_Days>
  <Price>9</Price>
  <CanBuyFromStore>True</CanBuyFromStore>
  <IsMushrooms>False</IsMushrooms>
  <SpawnAtNightOnly>False</SpawnAtNightOnly>
  <IsEdible>True</IsEdible>
 </Data>

EDIT: changed Plant_Name from "dawg Cannabis Plant" to "dawg_Cannabis_Plant"

I almost forgot. The Thumbnail_Model_Name uses the same format of Model_Name.
But Arsil, why should a thumbnail reference a mesh? It doesn't make any sense.
That's a very good question! This is used to automatically generate a thumbnail of the ingredient
based on its mesh (optionally considering the specified geostate and material) and texture[s].
It can be overridden with a THUM resource, which uses a regular .png image, with the same IID
of the MODL, if I recall correctly... Not exactly, let's say that the IID of the THUM is partially derived
from the IID of the MODL, its last 6 hex digits to be precise, while the first 10 are... I don't remember
how they are calculated. Anyway, if you get an ugly thumbnail (usually that's the outcome with
custom ingredients) there's a workaround for that, courtesy of tenmang: once the thumbnail of the
ingredient has been auto generated, you can export the relative THUM resource that you'll find in
the thumbnail cache .package file (Electronics Arts/The Sims 3/Thumbnails/ObjectThumbnails.package),
change it with your favourite image editor software and import it into your own package.

Oh my, I'm tired of this post, it's taking a lifetime to write it and fix it.
Let me know if it's all clear and what you wanna do with the plant name then we'll go on.
In the meantime, if you are not familiar with STBL's creation/editing, I suggest to get Easy STBL Manager
by CmarNYC, since I'm going to use that and you'll be able to follow my indications more easily
(if you are already familiar with localization, feel free to handle that with your favourite system/tool).
Test Subject
Original Poster
#19 Old 4th Feb 2015 at 4:57 PM Last edited by dawg : 4th Feb 2015 at 10:27 PM.
Everything seems OK, I think that we should stay with the "dawg_Cannabis_plant" to not make things more complicated. The public name will probably be just "Cannabis" or "Marijuana" or "xxx420weedblazeitxxx" (I'm a comedian too).

I've changed the fertilizer value and days to 0 because as far as I know pot can't be used as a fertilizer, so tell me if these "0" are correct. The price is also higher, but I don't know if it's the price for the seed (that you find laying around the map) or yields that you harvest. I also don't understant rarity in this case; I'm not sure if this is a common and "wild" plant that you can find randomly in the world.

Oh, and I almost forgot, I've changed the IsEdible to false, because I plan to use "Cigarette/Smoking Mod" by cmomoney to make use of the buds... I know I'm crazy, but it can be done... right?

I hope that you don't feel overwhelmed by my ideas, and if it's too much for you then just let me know

Anyways, here's the code of ingredients xml, and I can't wait for your response because I really like working on our project.

Inventor
#20 Old 4th Feb 2015 at 6:37 PM Last edited by Arsil : 8th Feb 2015 at 9:58 AM.
A quick heads-up about the "Parent" tag: seems like this is used to refer to categories
of ingredients that are, in turn, ingredients themselves. In fact every value that the
Parent tag can get corresponds to a ingredient with that string as Ingredient_Key
and with the "Abstract" tag ticked. Still not sure what this is used for (maybe to
define common features shared by a family of ingredients), but I can't keep looking
for every detail or I'll go mad, pity me.

Quote: Originally posted by dawg
I think that we should stay with the "dawg_Cannabis_plant"


Ok. I think the string is not case sensitive, but better safe than sorry, so let's go with
"dawg_Cannabis_Plant", with the underscores (this symbol: "_").
Actually using underscores instead of spaces/blanks would be more consistent with the
naming style we've used overall so far, but if we leave it this way there are less changes
to make. Make sure to use the same exact string in the plant definition and I ask you to
edit your previous post[s], so who reads this thread doesn't get confused.

EDIT: we completely reviewed all names and used underscores.

Quote:
I've changed the fertilizer value and days to 0 because as far as I know pot can't be used as a fertilizer, so tell me if these "0" are correct.

No idea. It seems plausible. I can check if you want but this is a thing you can also fine tune later.
EDIT: remove completely both tags if you don't want the ingredient to be used as fertilizer.

Quote:
The price is also higher, but I don't know if it's the price for the seed (that you find laying around the map) or yields that you harvest.

Good question. It works as price for both the seed and the ingredient/vegetable.

Quote:
I also don't understant rarity in this case; I'm not sure if this is a common and "wild" plant that you can find randomly in the world.

I never played much with gardening but, unless I'm missing something, you wont find plants
randomly spawned in the world (I have the feeling I didn't get what you were saying though).
The "Rarity" tag we defined in the plant definition defines... (seriously?). Let me try again.
The rarity of the plant defines in what seed spawner[s] you'll find the seed of the plant.
The rarity of the ingredient defines... no idea... maybe it has something to do with cooking
and the quality of prepared food? I never played much with cooking either.

Quote:
because I plan to use "Cigarette/Smoking Mod" by cmomoney to make use of the buds... I know I'm crazy, but it can be done... right?

I'm positive it can be done, but only heavily modifying that mod, and you
need permission from the author to do that if you plan to re-distribute it.

Quote:
I hope that you don't feel overwhelmed by my ideas, and if it's too much for you then just let me know

I don't want to be rude but I have to be adamant on this. I'm helping you to make
a generic custom plant and a generic custom ingredient. Nothing more. I'm afraid
I wont even be able to help you with meshing because I'm not good at that.

Quote:
Anyways, here's the code of ingredients xml, and I can't wait for your response because I really like working on our project.

Glad you're having fun, that's very important. When you said you wanted to do this
because people would like something like this I was a little worried. Creating custom
content and modding can be really frustrating, I can't imagine how worse it can get
if you are not working on something that you'll be the first one to enjoy in game.

Let me spend two words about the seed of the plant. Once we localize its name,
we're done with it. That's all it takes to have it inserted automatically in the appropriate
seed spawner[s] (the common one[s] if we left the default setting of the cloned plant).
Test Subject
Original Poster
#21 Old 4th Feb 2015 at 7:11 PM Last edited by dawg : 4th Feb 2015 at 10:26 PM.
OK, I've removed the underscores from the ingredients.xml

and the plants.xml


I understand that you only can help me with plant side of the mod, I'm grateful that you are helping me right now. I'm posting right now to make our work quicker, in the meantime I'll edit my previous posts.
Inventor
#22 Old 4th Feb 2015 at 9:43 PM Last edited by Arsil : 5th Feb 2015 at 11:38 AM.
I blame myself, maybe I wasn't clear.
What I meant was to change only the Plant_Name, not everything.

Using blanks in the strings used for localization and for the model name is not an error in itself,
but it's kinda awful to see (I guess this is only a matter of tastes).

Let's take advantage of it to change everything back as it was before and let's make
some other improvements to the names we used so they will be more meaningful
and it will be more intuitive to understand what they are referring to.
It's a good habit to use a consistent naming style.
Give me a second to review also all my posts.
My attention to details is not striking, I hope I didn't make any mistake.

Now please pay close attention:
  • put back the underscore characters where you removed them (in my posts they are all still there, use them as reference)
  • use underscores also in the Plant_Name : dawg_Cannabis_Plant (change it in both the plant definition and in the ingredient definition)
  • change the MedatorName to dawg_CannabisPlant_MedatorName (change it in both the plant definition and in the medator definition)
  • change the Model_Data of the Medator to dawg_CannabisPlant_ModelName

Make these changes in your posts but also in the xml resources in your package!

Remember when we created the NGMP? Since we changed the name of the MedatorName,
we have to update that resource. Go back to post#12, I've already updated the instructions
there (don't copy directly the value of the IID that I wrote there, do the hashing yourself to
double check if you get the same value). Of course you don't have to use the "Add" button
this time, you have to edit the NameHash of the existing entry. If this confuses you, just
delete the NGMP and re-create it from scratch.
Test Subject
Original Poster
#23 Old 4th Feb 2015 at 10:25 PM
Alright, I've made the changes. I'm going to edit my previous posts now.
Inventor
#24 Old 5th Feb 2015 at 11:35 AM
Quote: Originally posted by dawg
Alright, I've made the changes. I'm going to edit my previous posts now.

Thank you. I apologize again, I'm terrible at organizing the work and giving directions.

One last thing about the XMLs resources and we should be done with them. Since we are using
douglasveiga's mod to load all our custom definitions into the game (and I can't stress enough
how that helps and reduces the amount of work to do) we better use it properly.
Start S3PE, open your .package file and edit (rightClick+Notepad) the resource called blahblahblah.dll
of type _XML inserting your data there: the name of your plant (you can put whatever you want there,
doesn't have to match anything used before) and your nickname. Save the file and commit the changes.
You'll probably notice that there's also a blahblahblah_Recipes _XML. We haven't changed that since
we are not going to create a custom recipe (see HERE if you are interested in that and read all posts
before trying
), so we could remove it or leave it, the script that loads the data can handle both cases.

Oh, I say this just to give a complete information: in the xml resources for the plant and the ingredient,
you can define as much items as you want, it's not limited to one. Of course we don't need that since
we are defining only one plant and only one ingredient.

Well, now it's time to create the STBL resources. These are used to convert an (hashed) "key" to a lolicazed
(language specific) text. There should be one STBL for each language supported by the game.
Now, I could point you to a tutorial for that, here's one (you can ignore the first part if you are not interested
in the coding), that would probably be the best solution, but, what the hell, I'm masochist so I'll try to explain
it directly here. Be warned that my method probably is not the most user friendly.

Ok, So we have S3PE running and our .package is the currently opened file.
In the menu, click Resources+Add and compile the form with this data:
- type: STBL
- group: 0
- Name: dawg_Cannabis_ENG_strings (it doesn't really matter what you write here, the important thing
is use a unique string - hence the nickname - and not a common/generic one to avoid potential conflicts)
- Press the FNV64 button and you'll see that an hexadecimal number will be create as Instance
- Now, BEFORE PRESSING OK, edit the Instance number replacing the first two digits with 00 (two zeros)
Example: if the Instance is 0x1111111111111111, change it to 0x0011111111111111
(if you want to know why then see the tutorial, explaining every detail is exhausting and takes a lot of time,
let's just say that the initial 00 indicates that this is the STBL for the English language).
- Press OK

Now right click on the STBL resource we just created and select "Edit STBL" (bottom entry of the popup menu).
A new window opens. In the inputbox (the one above the buttons Add, Change and Delete) you have to write
they unhashed keys (in other words, the strings) related to plant, seed and ingredient. To recap:
Gameplay/Excel/Plants/PlantList:dawg_CannabisPlant_Name
Gameplay/Excel/Plants/PlantList:dawg_CannabisSeed_Name
Gameplay/Excel/Plants/PlantList:dawg_CannabisPlant_Description
Gameplay/Excel/Ingredients/Data:dawg_CannabisIngredient_Name

So, let's start with the first one, select and copy Gameplay/Excel/Plants/PlantList:dawg_CannabisPlant_Name,
paste it into the little inputbox and press the button "Add". As you can see a new entry has been created with the hashing
of that string. Now select that entry and use the big inputbox on the top-right to write the name of the plant that users
will see in game. Now do the same thing for the other three keys and pay attention to this: to confirm a new text (the one
that goes in the big inputbox) or edit an existing one, you better, especially before clicking save, select another entry or
the editor may leave an empty (or the old) text. I explained that awfully... let's just say to double check that you have
translated correctly all keys after you press the "Save" button using the preview of S3PE or editing again the STBL.

I may be wrong, but I think the plant's description isn't used anywhere by the game, but you put that too anyway.

Save the package!

There's no need to exit from S3PE, but make sure you close the opened file (our .package).
Start Easy STBL Manager and open our package with that tool. As you can see in the Languages list
there's only an entry for English. Press the "Copy to Missing" button and the program will create the
STBL for all other languages (setting the right Instance Id) and copying the strings defined for the
English language for all the other languages. Save the package and close the program.
Test Subject
Original Poster
#25 Old 5th Feb 2015 at 12:22 PM
Everything seems to be working, I just don't have idea what these 2 highlighted strings do, as far as i remember we haven't done anything with them, they came with ccloader.

Page 1 of 3
Back to top