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

Latest Site News

Creator Theme: Space! - posted on 8th Jul 2018 at 6:02 PM
Replies: 15 (Who?), Viewed: 3048 times.
Test Subject
Original Poster
#1 Old 20th Jan 2018 at 8:04 AM
Create chance cards for new career
Hi Evereybody !

First of all, I would like to apologize for my bad english ^^ I am from Belgium ...

I created a new career with "Create a career Beta" created by Neia (If you see that, THANK YOU) . I tried it in my game and that works perfectly ! But that's too simple ...

I would like to add a lot of chance cards. But I don't know how to do that and which program we can use to do that.

If somebody can kindly explain me, I would be very happy !

I will post my new mod here after that. So you can test it in your game and you can leave me any comments you want
Advertisement
LeaderOfTheMantisShrimps
staff: administrator
#2 Old 21st Jan 2018 at 9:57 AM
Moved to modding discussions

In case you want people to give feedback on your download (which includes testing), please take a look at our Creator Feedback forums: http://www.modthesims.info/fd.php?f=473
Test Subject
Original Poster
#3 Old 22nd Jan 2018 at 1:37 PM
Thanks Lyralei !
Theorist
#4 Old 23rd Jan 2018 at 2:10 AM
I'm pretty sure there's some individuals who have made chance cards for their own careers, so hopefully they may yet speak up and fill in more details, but this should get you started. Feel free to ask any further questions as well.

You'll want an XML extractor program (e.g. XML Extractor, S4PE which you should already have, and a program to edit XML text files such as Notepad++ (a generic but powerful text file editor) or firstobject XML Editor (specifically for XML files and can help make XML friendlier to edit).

You'll want to learn the basics of creating new XML resources, including how to number the "Instance ID" for them using a hash generator. You'll also want to learn how to create STBL entries to display text in the game. There's several good tutorials listed on SimsWiki.

There's four main parts to career chance cards:
  1. The chance cards themselves, which are tuned in AdventureMoment snippet nodes. If you unpack the XML from the game and use the XML Extractor's file finder program, you can see dozens of these by just searching for "career chance card" and use those as an example to create your own. The chance card tuning specifies the text to be displayed, the choices available to the player, and what "loot" and "notifications" can randomly occur for each choice.
  2. The notification tunings (examples found by searching for "notification chance card") specify the details of what the notification chosen by the chance card should display.
  3. The loot tunings, e.g. loot_JobPerformance_Gain and Loss resources, specify what effect to apply to the Sim when a specific result is chosen. Typically these are just small or medium bosts to job performance, but they could include whatever loot you want to reward the Sim with, e.g. Simoleons, relationship changes, reward objects, death... whatever.
  4. Finally, the "rabbit hole" interaction for the career itself (e.g. si_Career_Business) controls which adventure moments are available for when the career is running. There should be an interaction like this one generated for your career, and that will be the one you want to edit. That superinteraction does a LOT more than just that, but if you look in the XML for the interaction you'll see the list in the "basic_extras" section of the XML. You can include up to 35 "Career_ChanceCard_##" entries for a career, as well as ones for responsible or irrespsonsible traits as well (the list of "keys" that can be used for chance cards can be seen in the "interactions.utils.adventure" module tuning (adding to that list of possible keys would not be trivial and would be incompatible with future game xpacs, etc). Each card entry can perform any number of tests to specify whether that card is available at any specific career level, or by trait, or Sim age, or well just about anything else you could think of to test for.
So... yeah, it's really quite complex but it's not really rocket science either. If you start out small with just a few chance cards to see how you get them working, you can then build up from there and learn how to code the more complex cards.
Test Subject
Original Poster
#5 Old 23rd Jan 2018 at 10:30 AM
Thanks Scumbumbo ! That's very kind of you for explaining me all of that. Like you said: That's not really rocket science. But I have one question, where do you find "interactions.utils.adventure"?
Theorist
#6 Old 23rd Jan 2018 at 7:27 PM
Quote:
Originally Posted by Laura2112
Thanks Scumbumbo ! That's very kind of you for explaining me all of that. Like you said: That's not really rocket science. But I have one question, where do you find "interactions.utils.adventure"?

That's a module tuning file, so you'll find it in the "tun" subfolder assuming you're using the XML Extractor I wrote. The filename would be S4_03B33DDF_00000000_C11899C371C041F5.xml
Moderator
staff: moderator
#7 Old 8th Apr 2018 at 5:49 PM Last edited by Simmiller : 8th Apr 2018 at 6:11 PM.
Hi scumbumbo! I'm doing a career with several tracks, and I want the chance cards to be unique to each. Tons of work, I know. But, I'm wondering where in the xml does it specify the trigger for a chance card? Do they just randomly appear or in order? I've looked at interactions.utils.adventure, and I'm going through the tuning on several chance cards, and their behaviour is not obvious to me. For example, if one career level is about programming, I don't want a fitness chance card to come up, but it would be helpful in another level in the same career track. I think I'm asking how to specify an event trigger to a chance card, or how to determine when an adventure moment occurs.
Moderator
staff: moderator
#8 Old 8th Apr 2018 at 6:33 PM
Perhaps this is what I'm looking for. In the following xml, is it implying that when a sims's logic skill reaches level 5 and their mood is focused, this chance card will appear?
<?xml version="1.0" encoding="utf-8"?>
<I c="AdventureMoment" i="snippet" m="snippets" n="career_Business_ChanceCard_9" s="106429">
<U n="value">
<L n="_finish_actions">
<U>
<L n="action_results">
<U>
<L n="loot_actions">
<T>106752<!--loot_JobPerformance_Gain_Medium_Business--></T>
</L>
<V n="notification" t="enabled">
<V n="enabled" t="reference">
<T n="reference">107672<!--notification_ChanceCard_Business_9A_Success--></T>
</V>
</V>
<L n="weight_modifiers">
<U>
<V n="test" t="skill_test">
<U n="skill_test">
<T n="skill">16706<!--statistic_Skill_AdultMajor_Logic--></T>
<V n="skill_range" t="interval">
<U n="interval">
<U n="skill_interval">
<T n="lower_bound">5</T>
</U>
</U>
</V>
</U>
</V>
<T n="weight_multiplier">2</T>
</U>
<U>
<V n="test" t="mood">
<U n="mood">
<T n="mood">14639<!--Mood_Focused--></T>
</U>
</V>
<T n="weight_multiplier">1.5</T>
</U>
</L>
</U>
Moderator
staff: moderator
#9 Old 8th Apr 2018 at 6:52 PM
Also, since there's only one si in each package, how do I determine which chance card belongs to which branch of the career? I'm going to keep on looking at the different chance cards for different existing careers within the game with different branches to see if I can figure that out.
Theorist
#10 Old 8th Apr 2018 at 8:08 PM
Short answer - No

Long answer - forthcoming
Moderator
staff: moderator
#11 Old 8th Apr 2018 at 9:36 PM
Quote:
Originally Posted by scumbumbo
Short answer - No

Long answer - forthcoming


Thanks
Theorist
#12 Old 9th Apr 2018 at 5:13 AM
Just to clarify... forthcoming means it will take a bit. I think it will be worthwhile though, I'm creating a fairly stupid adventure example. While it's not all that complex I am trying to demonstrate some of the things you're specifically asking about, and so it does take some time to get everything working right. The XML will be commented, and it will include a script to demonstrate adding the appropriate card names without having to override the interactions.utils.adventure module tuning (which would be something that could easily cause mod conflicts to do so via XML). I'll probably write up a bit of an explanation of how it all fits together as well.

Might finish it up tomorrow if I get the time. For now I'm past the phase of getting things working and just to the fitting everything all together stage.
Moderator
staff: moderator
#13 Old 9th Apr 2018 at 4:16 PM
Quote:
Originally Posted by scumbumbo
Just to clarify... forthcoming means it will take a bit. I think it will be worthwhile though, I'm creating a fairly stupid adventure example. While it's not all that complex I am trying to demonstrate some of the things you're specifically asking about, and so it does take some time to get everything working right. The XML will be commented, and it will include a script to demonstrate adding the appropriate card names without having to override the interactions.utils.adventure module tuning (which would be something that could easily cause mod conflicts to do so via XML). I'll probably write up a bit of an explanation of how it all fits together as well.

Might finish it up tomorrow if I get the time. For now I'm past the phase of getting things working and just to the fitting everything all together stage.


That's wonderful news! And now I see why this has me so stumped, scripts. I'm so new to them. I'm waiting patiently and appreciate all your hard work.
Theorist
#14 Old 12th May 2018 at 6:09 AM
Just a quick note that I have NOT forgotten about this. My silly little example mod is all coded/working and the document to explain just what everything in it all means was largely done -- but real life has been hectic of late and it kind of got pushed into the "maybe I can work on that tomorrow" file, repeatedly. I'm honestly not sure when I'll get around to finishing it all up, but hopefully by the end of next week.
Test Subject
#15 Old 13th May 2018 at 1:00 AM
Quote:
Originally Posted by scumbumbo
Just a quick note that I have NOT forgotten about this. My silly little example mod is all coded/working and the document to explain just what everything in it all means was largely done -- but real life has been hectic of late and it kind of got pushed into the "maybe I can work on that tomorrow" file, repeatedly. I'm honestly not sure when I'll get around to finishing it all up, but hopefully by the end of next week.


That's awesome! I've been making custom careers as well, but am very new to coding so I'm trying to learn from scratch and have zero clue what I'm doing lol I can't wait to see yours! And maybe get some help? haha
Moderator
staff: moderator
#16 Old 21st May 2018 at 8:40 PM
Quote:
Originally Posted by scumbumbo
Just a quick note that I have NOT forgotten about this. My silly little example mod is all coded/working and the document to explain just what everything in it all means was largely done -- but real life has been hectic of late and it kind of got pushed into the "maybe I can work on that tomorrow" file, repeatedly. I'm honestly not sure when I'll get around to finishing it all up, but hopefully by the end of next week.


Your work is more than appreciated and I have no problem waiting!
Back to top