Creating the .Opportunities file
We’re now going to create the basis of the opportunity. First, create another new XML file by following the steps in the previous post. Instead of CareerEvents, put Opportunities so the Resource Window looks like this:
Press OK and save your package. Open the new file in your text editor and paste the following:
Now a lot of the code for this, I can’t help you with because every opportunity will be different. I will, however, talk you through each section and explain what it does. The data for this section will be largely up to you to decide and the best way to go about this is to research and look through EA’s existing Opportunities (or any of my careers) to see how things were done.
Let’s break it down and take each section at a time.
OpportunitySetup
This will hold the backbone of your opportunity.
GUID ~ This should be the same as the OpportunityName you selected in the .CareerEvents file.
Icon ~ The icon used for the opportunity. I usually use the small picture from your career file for this, as you can see in the above example.
EventListenerInfo ~ This is an important line. This is what needs to happen for your Sim to participate in the opportunity. I can’t tell you what to put here. Check out some of the existing opportunities to get some ideas.
CompletionEvent ~ This indicates what needs to happen before the opportunity is considered finished. Usually, this is when your sim goes into work. Therefore a common parameter is ‘kWentToWork’.
There are often many other fields used, depending on your career. An example, taken from my Bartender career, is shown below for you to examine.
Example:Most of these fields are self explanatory, as you can see. If you’re not sure what they mean, answer this thread with your question.
I cannot go into every single possibility here, the thread would go on forever. I really cannot stress how much I recommend you peruse EA’s existing opportunities to really get a feel for the possibilities available to you. If you’re really stuck on what to do, or how to make the opportunity in your head become a reality, by all means ask. TheRealAnimeSpot is developing a comprehensive list of values so
I recommend having a look here!
Let’s move on now.
Names
This bit is nice and easy. You simply copy the GUID from the section above and paste it into each line here. These will be the lines of code you add into your UnhashedKeys file later.
Example:Moving on!
OpportunitiesRequirements
Another simple section. All you need to do here is copy the GUID from above into the GUID field here and state the requirements for your opportunity. Again, I can’t tell you what to put here – it depends on the opportunity. An example from my Bartender career is pasted below:
This opportunity requires a City Hall rabbithole in the world, because that’s where the opportunity takes place.
Some opportunities don’t require anything in particular. These look like this:
Once again, I strongly recommend you look at other opportunities to determine whether yours requires anything or not. If you’re not sure, just ask.
OpportunitiesCompletion
This section deals with rewards your Sim gets when they successfully completes the opportunity, or penalties they incur if they fail it. I’ll go through some of the field types for you to clarify what they do.
GUID ~ Self explanatory
CompletionWinChance ~ This is a percentage chance that when your Sim completes the opportunity, it’s successful. This can be anything from 0 to 100, 0 being impossible to succeed and 100 being definite. (I personally leave this on 100 unless I’m writing an opportunity where there’s a chance it might not work. Handy if you’re designing a competition of some kind and there’s no guarantee your Sim will win).
CompletionWinReward ~ When your Sim successfully completes their opportunity, the rewards are put here. You can have up to 4 rewards. These can be Moodlets, Celebrity Points, Money, Career Performance, Raise, Relationship with Coworkers or Boss or Skills. I recommend browsing existing opportunities for examples, depending on what you want.
CompletionModifier ~ This field if for any skills you want your Sim to have gained while they were working on the opportunity. Again, see existing opportunities for this field.
FailureReward ~ Similar to the CompletionWinReward, this stipulates what penalties are incurred if your Sim should fail the opportunity (not necessary is there is no chance of failing).
There is another field that is worth mentioning.
CompletionLossReward ~ If your CompletionWinChance is set to anything other that 100, you’ll need this field. This stipulates what rewards your sim gets if they complete the opportunity but don’t win. For example, if your sim enters a competition at a rabbithole, there might be a 70% chance they will win the competition. However if they lose, this field stipulates what rewards they still gain. See examples for usage of this field in other opportunities.
Example:Save the file and close. Save your package.