Page 1 of 2

Custom Career with Opportunities issue

Posted: March 30th, 2019, 7:43 pm
by t888
I was making a custom career and everything else works fine and when I added custom opportunities I got a message saying 'GroceryStore.CareerEvents: Constructor Fail ' Normally when I have an error I get something about this line or that and I can fix it easily but I'm not sure what to do here, can somebody help?

Also further down is this: Found: GroceryStore.Careers
Found: GroceryStore.CareerEvents
CareerList: Rows = 1
Row: 0
GroceryStore.CareerEvents: Found Grocery Store Events = 16
[E]GroceryStore.CareerEvents: Constructor Fail
[E]GroceryStore.CareerEvents: Bad Class
GroceryStore: Added to Rabbithole Grocery
CareerFile: Rows = 1
Row: 0

Custom Career with Opportunities issue

Posted: March 31st, 2019, 5:01 am
by Missy_Hissy
That's a new one. Are you using a custom opportunity class for any of the opportunities? Such as a Stay Late opportunity?

Custom Career with Opportunities issue

Posted: April 4th, 2019, 4:11 pm
by t888
Missy_Hissy wrote:
March 31st, 2019, 5:01 am
That's a new one. Are you using a custom opportunity class for any of the opportunities? Such as a Stay Late opportunity?
Yes, I have the very one you're mentioning, and for the other opportunities I've used none, is that significant?

Custom Career with Opportunities issue

Posted: April 5th, 2019, 3:59 am
by Missy_Hissy
It could be. Have you copied the class from an existing career, say an EA one? Because I'm wondering if there was a typo in the class.
[E]GroceryStore.CareerEvents: Constructor Fail
[E]GroceryStore.CareerEvents: Bad Class


That's what's making me suspect it could be a typo. Try copying exactly from an EA Stay Late opportunity, see if it stops the error.

Custom Career with Opportunities issue

Posted: April 5th, 2019, 1:26 pm
by t888
Missy_Hissy wrote:
April 5th, 2019, 3:59 am
It could be. Have you copied the class from an existing career, say an EA one? Because I'm wondering if there was a typo in the class.
[E]GroceryStore.CareerEvents: Constructor Fail
[E]GroceryStore.CareerEvents: Bad Class


That's what's making me suspect it could be a typo. Try copying exactly from an EA Stay Late opportunity, see if it stops the error.
As far as this part goes its copied from one of the games and so both look like this: <CustomOpportunityClass>Sims3.Gameplay.Careers.StayLateOpportunity,Sims3GameplayObjects</CustomOpportunityClass>

Did I forget to add something else related to class or what?

Custom Career with Opportunities issue

Posted: April 5th, 2019, 4:25 pm
by Chain_Reaction
It looks like you're trying to use a career opporunity as a career event. That's not going to work.

Custom Career with Opportunities issue

Posted: April 5th, 2019, 9:39 pm
by t888
Chain_Reaction wrote:
April 5th, 2019, 4:25 pm
It looks like you're trying to use a career opporunity as a career event. That's not going to work.
Crap, really? Thats whats wrong? Thats how its set up in -game as far as I can tell. So, how the heck doe sit really work then?

Heres how I set it up based on in-game versions:

In CareerEvents:
<GroceryStore>
<EventType>GroceryStore_StayLate</EventType>
<OpportunityName>GroceryStore_StayLate</OpportunityName>
<Likelihood>0.6</Likelihood>
<AvailableLevels>1:9</AvailableLevels>
</GroceryStore>

In opportunities:
<OpportunitiesSetup>
<GUID>GroceryStore_StayLate</GUID>
<CustomOpportunityClass>Sims3.Gameplay.Careers.StayLateOpportunity,Sims3GameplayObjects</CustomOpportunityClass>
<Icon>GroceryStore_Pic</Icon>
<RepeatLevel>Always</RepeatLevel>
<IsOrdered>False</IsOrdered>
<Timeout>WorkCanceled</Timeout>
<EventListenerInfo1>kCareerOpportunity_StayedLate</EventListenerInfo1>
</OpportunitiesSetup>

<Names>
<GUID>GroceryStore_StayLate</GUID>
<OpportunityName>GroceryStore_StayLateName</OpportunityName>
<OpportunityDescription>GroceryStore_StayLateDescription</OpportunityDescription>
<OpportunityHint>GroceryStore_StayLateHint</OpportunityHint>
<CompletionText>GroceryStore_StayLateCompletion</CompletionText>
<SecondaryCompletionText>GroceryStore_StayLateSecondaryCompletion</SecondaryCompletionText>
<FailureText>GroceryStore_StayLateFailure</FailureText>
<ProgressText>GroceryStore_StayLateProgress</ProgressText>
</Names>

<OpportunitiesRequirements>
<GUID>GroceryStore_StayLate</GUID>
</OpportunitiesRequirements>

<OpportunitiesCompletion>
<GUID>GroceryStore_StayLate</GUID>
<ShowRewardText>False</ShowRewardText>
<CompletionWinReward1>RelationshipWithBoss,20</CompletionWinReward1>
</OpportunitiesCompletion>

So, that snot right?

Custom Career with Opportunities issue

Posted: April 6th, 2019, 5:03 am
by Missy_Hissy
I cannot see a problem. That is how they're set up - I've just matched yours up to one of mine and one of EA's and the setup is fine.
What else do you have in the CareerEvents file? It's obviously not this opportunity that's having the problem so there must be another one having an issue.

Custom Career with Opportunities issue

Posted: April 6th, 2019, 5:30 pm
by t888
Should I send the whole file to you or what?

Custom Career with Opportunities issue

Posted: April 7th, 2019, 3:31 am
by Missy_Hissy
I was so convinced just now that you already had but it turns out not. Obviously I'm losing my mind completely :D
By all means. If not, you can just copy and paste the details of that file on here. I'm not fussed either way. There's got to be one naughty line of code in there causing all the trouble.