#I literally looked at the raw hexadecimal code
Explore tagged Tumblr posts
soo... Fun fact! When you export a .txt file in Google Docs, it adds a Carriage Return before the Line Feed character (or, in hexadecimal terms, writes 0x0A 0x0D instead of just 0x0D). This will make your TXT file that you were 100% sure would be 6 KB into one that's 7 KB. In other news, I just wasted an hour of my life.
4 notes · View notes
midgethetree · 5 years ago
Note
Hi Midge! Anon who asked about the careers and the newspaper. I was able to follow your instructions for the newspaper and it worked, kinda, lol. I wanted to change the number of jobs offered to 5 and while 5 do come up, the first job offered comes up 3 times (1st, 2nd, & 4th). Is there a way to make it so that the jobs don't repeat or did I edit the wrong line? (I edited 0x16 (22): [prim 0x0002] Expression (Local 0x0002 := Literal 0x0003). I appreciate your help and any advice you can give!
Hi again Midge; anon who asked about the paper. Sorry to bother you but I did further research on my newspaper issue (www(.)modthesims(.)info/showthread(.)php?p=5202387#post5202387) and it looks like the number of jobs offered is hard coded. So my new question is would it be possible to create a new, local token that overrides this, that the paper can then choose from? Idk anything about tokens so any insight would be appreciated.
Ah, I see! After looking into it myself I think that MTS thread is inaccurate, though. For one, you don’t need a token for this. Extract the OBJD and in the raw data increase ‘num attributes’ by 6 (to 1b in hexadecimal or 27 in decimal). Now attribute 0x0015 and 0x0016 will be the 4th and 5th adult jobs, 0x0017 and 0x0018 will be teen jobs, 0x0019 and 0x001a will be pet jobs. There’s three BHAVs, “Sub - Set Daily Jobs”, “Sub - Set Daily Pet Jobs”, and “Sub - Set Daily Teen/Elder Jobs” which now need to be expanded to set the new attributes; make sure in the beginning when it sets the first two job attributes equal to 0 it sets the first four, and then essentially make two more loops: first count the available jobs, check if the returned value is greater than the number of jobs you’ve already set, get a random job, make sure the returned value isn’t zero or equal to any of the already-set jobs; otherwise, go find another random job. Once a suitable job has been found, set the next job attribute to that job. Finally, edit ‘offer job’, ‘offer pet job’, and ‘offer teen/elder job’: currently if Param 0x0001 != Literal 0x0003 and Param 0x0001 != Literal 0x0002 it defaults to the same job offer, so you need to add two more checks of Param 0x0001 (if it’s literal 5 or literal 4) and if it’s literal 5 set the stack object id to the first of the new attributes for that job type, if it’s literal 4 set it to the other.
If you want to save some time by not having to worry about pets/teens, you can go back to the “Read” BHAV and have it set local 2 to 5 only if local 4 == Const 0x0106:0x20 (“JobData” Value: 0x0020), or maybe if you want all human sims to get 5 offers but pets only need 3 set local 2 to 5 only if local 4 != Const 0x016C:0x1B (“JobData - Pets” Value: 0x009B). If whatever conditions you pick aren’t satisfied, set local 2 to the original value of 3. You can ignore the two BHAVs for the jobtypes where local 2 gets sets to 3, and only increase the number of attributes by 2 x the number of types of jobs that get 5 offers.
Also worth noting extracting the OBJD means the object gets a custom star. You can always put it in the game install files (eg. your bins folder) to remove it.
Feel free to message me again if you need elaboration/clarification!
3 notes · View notes