Replies: 12 (Who?), Viewed: 289 times.
Field Researcher
Original Poster
#1 Old 2nd Apr 2021 at 3:19 AM Last edited by MissPat : 5th Apr 2021 at 11:03 AM.
Default [SOLVED] Store Skills GUID and CommodityKinds ?
Hello all,

I'm trying to create an ITUN mod that'd allow active and townie sims (but mostly designed for townies) to learn all levels of the store skills by reading custom skill books. I'm struggling with finding the precise data to target those skills. Here is what I have so far:



*Skill GUID Found by @MissyHissy, as per her "Skills" masterlist forum post here, under "Store Skills":
https://missyhissysjobcentre.proboa...d/38/skills-wip

EDIT: I hadn't properly read the Store's spellbook skill. It is spelled "CastingStore" and not "CastingSkillStore" as I had listed it above originally, feeling quite dumb right now . So now the only question remaining is: where are those CommodityKinds *if* they exist.

Has anyoned worked on Store skills for script modding or XML / ITUN modding?

Really lost as to where to look in the code to progress with my mod plans.
Advertisement
Field Researcher
#2 Old 2nd Apr 2021 at 10:55 AM
Hello MissPat,
you can see the spellGuids within the store object for the spellbook it would be "kCastingSkillID" (2305)

As for the commodity kinds i dont know if store objects introduce custom ones but you can add new ones yourself for custom interactions.
Field Researcher
Original Poster
#3 Old 2nd Apr 2021 at 12:14 PM
Heya @Battery! Is there a tutorial to follow, for creating new commodity kinds?
Scholar
#4 Old 3rd Apr 2021 at 2:30 AM
I wanted to create a custom commodity kind for my vampirism skill but wasn't sure how. At the moment I don't know how to create custom commodity kind. (We can reasearch it together though).

However if the goal is to create autonomous reading then we can make autonomy based on traits or skill. Like sims with virtuoso will go read violin book. LovesToSwim trait for surfing skill. And witch trait towards the Raven dancer magic book.

Also I believe store skills already have their own commodity kind so there's no need to make a custom one. We just have to find the right one in the code. I will look at the commodity kind in the script to find what I can.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Field Researcher
Original Poster
#5 Old 3rd Apr 2021 at 7:08 AM Last edited by MissPat : 3rd Apr 2021 at 2:53 PM.
1) "At the moment I don't know how to create custom commodity kind." > I figured it would be difficult! I'm really just getting started with modding so I think you'll find out if and how it's possible way before me!

2) "if the goal is to create autonomous reading then we can make autonomy based on traits or skill" > I'd be fine with making autonomy based on the 6x skill stores only. I do not mind *all* traits reading all 6 store skills custom skill books to allow sims with any trait to be able to progress in careers and towards lifetime wishes completion, that have any one of the store skills as a requirement for success.

3) "I believe store skills already have their own commodity kind [...]. We just have to find the right one in the code. I will look [...]". > Please, let me know! I couldn't find anything myself but maybe I've been looking in the wrong places. Hope we can solve this code mystery! If not, we always have the autonomy script modding solution, at least.
Field Researcher
Original Poster
#6 Old 3rd Apr 2021 at 2:52 PM Last edited by MissPat : 3rd Apr 2021 at 8:27 PM.
@PuddingFace I looked up the code of each store object and you were *so* right, I have been able to find the Commodity Kinds of all store objects, it seems!

They have such an *odd* format, with numbers next to their name instead of the usual "SkillSomething", I'd never in a million years have figured them out. Here is what I have found:



I discovered amazing things about the store skills when looking up the code, it was a great modding exercise. Thanks for making it happen!

Going to try the above values in my game , to confirm it pushes townies to grab the store skills custom skill books from my mod.
Will report back if it was successful, fingers crossed.
Field Researcher
Original Poster
#7 Old 5th Apr 2021 at 11:01 AM
I'm confirming that the Commodity Kinds shared in my former message worked in my game! They successfully pushed townies to want to grab the store skills custom skill books I have created using Battery's S3SE tool.

Quote:
Originally Posted by PuddingFace
I wanted to create a custom commodity kind for my vampirism skill but wasn't sure how. At the moment I don't know how to create custom commodity kind. (We can reasearch it together though).


In Arsil's custom programming skill, there is this code (inside XML file "ArsilProgrammingSkill_SkillData"):



So it seems it would require implementing a check in the code of your Vampirism custom skill?

Then inside of the ITUN files of his custom skill package, he has this comment under the <ouput> lines:



Not sure what he means by "it's added by the script", do you know?

Finally I know that @Lyralei has successfully created a custom Commodity for her sewing skill, as follows (see her functional sewing table mod here: https://modthesims.info/d/643837/ts...a-v1-0-6.html):



Lyralei doesn't use the Commodity Kind in any of the ITUN files of her mod either, so I guess Arsil was right about making sure the CommodityChange is added by the script (whatever that means)?

Hope that helps somehow!
Lab Assistant
#8 Old 5th Apr 2021 at 3:09 PM
I still have no idea how to check if custom commodity kinds are working beyond whether they obviously break the whole mod or not, so anything you guys learn about how to work with them, I'd be really interested to know!
Quote:
Originally Posted by MissPat
Not sure what he means by "it's added by the script", do you know?
When I was trying to attach custom commodity kind changes to interactions for my polyamory mod, I had to do it using a script run on world load that says:
Code:
itun.mTradeoff.mOutputs.Add(commodityChangeItem)
with itun being an InteractionTuning object and commodityChangeItem a list of CommodityChange objects. The code before this just builds a few CommodityChanges (directly in the code instead of by reading from an ITUN) and adds each of them to commodityChangeItem, and then this line glues commodityChangeItem onto the list (mOutputs) of CommodityChanges already associated with the interaction.

I assumed all that was just necessary because my ITUNs caused an error if they referred to a custom commodity kind that I hadn't parsed into the game yet at the time the ITUN was read. In theory, though, I bet this could be used to modify interaction tuning any way you want without replacing the ITUN file, so multiple mods adjusting the tuning of the same interaction could potentially coexist.
Field Researcher
Original Poster
#9 Old 6th Apr 2021 at 12:57 PM
Thanks for the explanation! It helps a lot. And the idea of having multiple mods adjusting the tuning of the same one interaction is definitely interesting.

The only way I know + use to check if commodity kinds are working, is to leverage the "push townies to read skill books" custom interaction found inside of Buzzler's "Moar Interactions" mod. Using the interaction's ITUN file, I push all sims who possess any one of the game traits that can be targeted with commodity kinds, and who are on any one community lot that can be targeted with a commodity kind, to want to learn skills that have a commodity kind.

Through my testing explained in the original post, I found that because I did not use the proper commodity kinds for the store skills, townies had zero interest in the store skills custom skill books I had created - they only grabbed 1 or 2 out of the 6 skill books, then they only sat for 1 second to open the skill books and the books would then disintegrate in the thin air, never to be found again in their inventory or anywhere in the homeworld.

When I finally entered the correct commodity kinds for the store skills in my ITUN file, townies were drawn to the community lot bookshelves, they consistently grabbed all 6 custom skill books, they read the skill book for as long as they needed to learn the skill, and then the big deal is they actually autonomously put away the book back in the bookshelf. That's how I know it's working: this behavior is consistent with the way townies interact with EA skill books.

Hope that helps somehow! I saw that you have books in your Polyamory mod but they are not skill books, so not sure how this method could be leveraged in your specific case.
Lab Assistant
#10 Old 6th Apr 2021 at 5:02 PM
Ohhh, I see - you're right, that is a pretty skill-specific test. I was trying to use commodity kinds linked to custom traits to encourage social interactions, but maybe I could get a similar effect to your test by setting the advertising extremely high.
Field Researcher
Original Poster
#11 Old 6th Apr 2021 at 6:03 PM
Yeah I set my value to "400" to get a "swarming to skill book" effect lol.
Scholar
#12 Old 8th Apr 2021 at 2:55 AM
I will try out your suggestions. I did create a custom commodity kind for my skill because you kinds have to. But adding it to ITUN file wasn't having an effect but your research will really help out.

If you like my mods. Consider supporting me on Patreon

Follow me on
Twitter
Instagram
Virtual gardener
staff: administrator
#13 Old 8th Apr 2021 at 11:22 AM
Quote:
Originally Posted by MissPat
I'm confirming that the Commodity Kinds shared in my former message worked in my game! They successfully pushed townies to want to grab the store skills custom skill books I have created using Battery's S3SE tool.



In Arsil's custom programming skill, there is this code (inside XML file "ArsilProgrammingSkill_SkillData"):



So it seems it would require implementing a check in the code of your Vampirism custom skill?

Then inside of the ITUN files of his custom skill package, he has this comment under the <ouput> lines:



Not sure what he means by "it's added by the script", do you know?

Finally I know that @Lyralei has successfully created a custom Commodity for her sewing skill, as follows (see her functional sewing table mod here: https://modthesims.info/d/643837/ts...a-v1-0-6.html):



Lyralei doesn't use the Commodity Kind in any of the ITUN files of her mod either, so I guess Arsil was right about making sure the CommodityChange is added by the script (whatever that means)?

Hope that helps somehow!
I do wanna add that I indeed just basically did what Arsil did, which is doing everything inside the script. I've noticed that store skills do the same thing where they manually load them in  So that's why
Back to top