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 11th Oct 2023 at 2:28 PM
Scholarship memory mod
Hey folks!

I would like to modify this mod so it adds memories for the new scholarships. Furthermore I would like to set the strength of the new memories so they match this.

Unfortunately I have little experience with SimPE and only very basic programming skills with Java.

Phantomknight was so kind to already provide me with some information:
https://modthesims.info/showthread.php?t=526965
https://modthesims.info/showthread....572#post1884572

So I created a first memory following the beforementioned thread. Creating the memory was easy. For the GUID I used a randomly created hex as the SimPE features didn't work. I have a few questions though:

- Which value do I change to make the memory exclusive? I opened the Pop-up Wizard but I didn't know which value I had to change. Couldn't find "labels" as mentioned in the tutorial
- Where do I set the strength of the memories so it matches simler90's mod? And how can I find out which values they use?

Modifying Cyon's mod was not so easy. I added the two lines of code as Jasana_BugBreeder decribes it, but I didn't know how to set the 'arguments':
Quote:
args: <neighbor ID of the sim you are adding memory to>, <ID of the object which should be memorized - for example, the bed>, <was unused in the memory I cloned, look into your memory's CT-AddMemory to see what it supposed to be; probably quality?>

I would really appreciate your help! Thanks a lot in advance
Rumpertumskin
Advertisement
Inventor
#2 Old 12th Oct 2023 at 5:52 AM
The action starts with "CT - Add Memory", which is called after the memory "object" is created, and adds the memory item with subject to the inventory, plus influences the person's mood. If you cloned, you already have something in this script. Be careful, as some mems take the ObjectID as the subject, and others take NeighborID. Keep the same as other scholarships with Object. If you want the easiest time, clone an existing scholarship memory.

You'll need the following 3 lines in CT - Add Memory. The easiest to paste them them is to click the quotation mark to pop up the Raw Input Box. They will be decyphered into text format. You can then modify using the Tools button for Pop-Up Wizard.

primitive 0002: Stack Object's [semi] attribute 0x0004 ("Strength") := Const 0x2006:0x00 .. 0x2006:0x02 (strong to mild - choose one)

040001230005051A0000000000000000

semiglobal 201E: STFX - Create Happy w/ Person
Param 0x0000 (Memory Owner nID), Param 0x0001 (Subject), Literal 0x0000, Const 0x2008:0x04 (Intensity 1..4)

0900000901000700001A042401000000

semiglobal 2000: Sub - Add Memory
Param 0x0000 (Memory Owner nID), Param 0x0001 (Subject), Const 0x2002:0x00 (Bronze = 0 "green"), Const 0x2005:0x02 ("Unique Per Sim" Value: 0x0002) - choose uniqueness 0..2 here

0900000901001A00211A822201000000


If you want to replicate the strength tuning of the other modder, take his BCON resource called "Tuning" (0x7F9F5AFB) and copy into your mod changing the group number to yours (probably 0xFFFFFFFF if you use single memory per package, or whatever you number you use).

All together the relevant scripts look like on the screenshots. You will of course have more files for the complete memory.
Screenshots
Test Subject
Original Poster
#3 Old 12th Oct 2023 at 12:27 PM
Thanks a lot for your reply!

Ok, got it. "CT - Add Memory" must contain the lines you mentioned.

So what I have to do is this: make clones of an original scholarship memory, edit the mentioned BHAV and modify Cyon's mod, so that somewhere in the code "memory objects" are created. Then I add the existing resource "Tuning" which I have to "link" in some way. Is that roughly it?

What is unclear to me:
- How do I clone a memory? I looked for a tutorial but could'nt find one.
- I assume I need to modify each "Sub - Inc" in Cyon's mod. To do that I add the lines Jasana_BugBreeder mentions here, right? What do I do with "Run Tree by Name"? Is that what "activates" "CT - Add Memory"?

I'm sorry. I know it's tedious to explain everything in detail. I only begin to understand what is going on here So your help is much appreciated!
Inventor
#4 Old 13th Oct 2023 at 2:17 AM Last edited by jonasn : 13th Oct 2023 at 2:29 AM.
Maybe you can clone through Tools -> Object Creation -> Object Workshop. I understand that you already cloned and started modifying something, and could proceed the same way. Memories in the workshop are found under Other > Memory > Won the X. Then click Next and choose Clone. After you've cloned it, you need a new GUID and Name Reference. "Tuning" and "CT - Add Memory" are already copied and need to be edited minimally or not at all. What you want to change is the Catalog Description and jpg/tga/png Image. After cloning you can only have 1 memory per package, because you haven't given it a group number (which comes from Name Reference).

Yes, you can do as the other person instructed. Add the code in Sub - Inc - Witchcraft (and others).

If you click the right-pointing arrow near any opcode and temporarily import "Sub - Inc - Cleaning" (1012) into the package, you can look at that as an example, how it adds a Cleaning memory 0x0ED2D3C7 "Memory - Scholarship05" within "Memory - Cleaning" (102B). Then you can create copies with yet unused instance numbers, and only change the GUID to one of yours, with everything else left as is. Make "Memory - Witchcraft" (1060), and so on. Remember that GUIDs are written backwards in little-endian in the raw entry box. The extra lines in the script basically check if the person is physically present, and are not strictly needed, and can be left alone. You probably won't see a text label next to the GUID and have to work with the number alone, but you can name your BHAV descriptively.

Run Tree by Name serves as an insertion point for a script from another object. You are running Add Memory at this point as the Scholarship Controller. The Stack Object ID now is the memory object because you created it a moment ago. You pass in 2 arguments into RTbN: The memory owner and the subject (can be the same).
Screenshots
Back to top