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!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 12th Oct 2014 at 6:37 PM
Default Number to the name of the career
Hello. I created a career of type "Self Employed" based in the Tawllan Mod. . Everything works, but the name of the career does not appear in gameplay. I need a random number, but I don't know how I can get it. Can you help me???

My STBL:


Tawllan MOD:

Attached files:
File Type: rar  Daniel_Paparazzi.rar (17.9 KB, 10 downloads) - View custom content
Advertisement
Lab Assistant
#2 Old 12th Oct 2014 at 7:14 PM
Hello! I got stuck on this part too and the advice in this thread helped me: http://www.modthesims.info/showthread.php?t=469640

Look for the first post by ThomasRiordan. Good luck!
Inventor
#3 Old 14th Oct 2014 at 9:35 AM Last edited by Arsil : 14th Oct 2014 at 2:12 PM.
Did you solve that?

If the problem is that you don't know what the number is,
you can use NRaas_UntranslatedKey to see in game the
key to hash instead of an empty string.

Thanks for sharing your work, I'm struggling with a custom
skill-based career too and so far I was only able to achieve it
by editing directly the NRaas_CareerDataSelfEmployed package
(very impractical of course if I want to release my career).

EDIT: I'm so grateful that I'll do it for you.
The number you are looking for is 1508022588885602471
(I think it depends on the name you choose for the career)
so the key to hash is Gameplay/Occupation/XpBasedCareer:1508022588885602471.
The system I mentioned earlier is the only way I know to get it,
if there are easier ways please let me know.

A few things (if I'm wrong please correct me):
- I don't use an unhashedkeys stbl and it seems to work fine anyway. Is that really necessary? What's its purpose?
Just to remember the keys' names if you have to add/remove them or there's more than that?
- I think you can use a meaningful - but unique - name for the bootstrap, both for script and xml,
like DanielPaparazziBootStrap.dll, it doesn't have to be a number
- I guess we should use that magic number (the one you asked for) to refer to the career in the code,
with something like this (I haven't tested it yet)

Code:
internal static void UpdateSkillBasedCareerEarning(SimDescription sd, int amount)
{
  if (((sd != null) && (sd.Occupation != null)) && sd.Occupation.IsSkillBased)
  { 
    //if (sd.OccupationAsSkillBasedCareer.Guid == (unchecked((OccupationNames)(971566230179199611L))))
    if (sd.OccupationAsSkillBasedCareer.Guid == (OccupationNames) 971566230179199611L)    
    {    
      sd.OccupationAsSkillBasedCareer.UpdateXpForEarningMoneyFromSkill(SkillNames.Charisma, (float) amount);
    }                   
  }
}


EDIT: Yep, it works!
Is there a way to reference the custom career from an ITUN resource,
for example to use it in the CareerThreshold tag?
Test Subject
Original Poster
#4 Old 16th Oct 2014 at 1:07 AM
Quote: Originally posted by Arsil
Did you solve that?

If the problem is that you don't know what the number is,
you can use NRaas_UntranslatedKey to see in game the
key to hash instead of an empty string.

Thanks for sharing your work, I'm struggling with a custom
skill-based career too and so far I was only able to achieve it
by editing directly the NRaas_CareerDataSelfEmployed package
(very impractical of course if I want to release my career).

EDIT: I'm so grateful that I'll do it for you.
The number you are looking for is 1508022588885602471
(I think it depends on the name you choose for the career)
so the key to hash is Gameplay/Occupation/XpBasedCareer:1508022588885602471.
The system I mentioned earlier is the only way I know to get it,
if there are easier ways please let me know.

A few things (if I'm wrong please correct me):
- I don't use an unhashedkeys stbl and it seems to work fine anyway. Is that really necessary? What's its purpose?
Just to remember the keys' names if you have to add/remove them or there's more than that?
- I think you can use a meaningful - but unique - name for the bootstrap, both for script and xml,
like DanielPaparazziBootStrap.dll, it doesn't have to be a number
- I guess we should use that magic number (the one you asked for) to refer to the career in the code,
with something like this (I haven't tested it yet)

Code:
internal static void UpdateSkillBasedCareerEarning(SimDescription sd, int amount)
{
  if (((sd != null) && (sd.Occupation != null)) && sd.Occupation.IsSkillBased)
  { 
    //if (sd.OccupationAsSkillBasedCareer.Guid == (unchecked((OccupationNames)(971566230179199611L))))
    if (sd.OccupationAsSkillBasedCareer.Guid == (OccupationNames) 971566230179199611L)    
    {    
      sd.OccupationAsSkillBasedCareer.UpdateXpForEarningMoneyFromSkill(SkillNames.Charisma, (float) amount);
    }                   
  }
}


EDIT: Yep, it works!
Is there a way to reference the custom career from an ITUN resource,
for example to use it in the CareerThreshold tag?


Wooow! You're incredible!! Thank you very much for helping me. Everything worked, I wouldn't make it without your help.
-----

Cinderellimouse thank you also!
Inventor
#5 Old 16th Oct 2014 at 7:53 AM
Stop that, for a second you made me feel like a real modder :P

Hey, I saw that in your STBLs you kept some of the keys already present in
the NRaas CareerDataSelfEmployed, probably because you were still
experimenting, but put in your package only the keys/string for your career.
Test Subject
Original Poster
#6 Old 16th Oct 2014 at 1:18 PM
Hahahahahahaha. ^^
Hmmm. I hadn't realized. This is the first time I use STBL. Thank you!
Lab Assistant
#7 Old 16th Oct 2014 at 2:07 PM
You're welcome, I'm glad you both got it working! \o/
Back to top