|
Post by frankk on Jun 13, 2020 11:56:40 GMT -5
((I hope I'm posting on the right forum - if not, please let me know where to take this discussion))
Hello everyone!
So, I'm just getting into modding - I have spent a couple of days reading the docs, familiarizing myself with the codebase, and making tiny practice mods (cheat codes/minor tuning things), and now I want to try and make a slightly bigger one on my own. For additional context, I'm not new to programming (I'm a web and app developer), but I am completely new to modding.
My idea is essentially this - whenever a sim gains fame, they also gain some followers on social media (for example, publishing a book will perhaps get you 5k followers, while working a day as an actor may get you 50k).
The only way I can think to do it right now is to modify every tuning file in which fame is gained, and add a line that adds followers as well (looking to a file like `loot_Statistic_SocialNetwork_Followers_Add_UploadViralVideo_Success` for reference). Obviously, this would be a massive undertaking, and the result would be pretty brittle and subject to conflicts with other mods (not to mention, pretty bulky for such a tiny feature).
Since I am a total noob at this, I wanted to ask for some better ideas of how I could go about this. Is there even a better way? Could I somehow write a script that watches for fame gains and automatically add followers? What about for fame loss and losing followers?
Any feedback is welcome! Thanks in advance.
|
|
|
Post by MizoreYukii on Jun 13, 2020 13:47:54 GMT -5
You should do loot injection! Mod Constructor can create the loot and injector for you, then you just choose which loots to inject into after the loot has been made. Same can be done for losing followers, just requires a new loot. It's still a bit of work, but faster and better than overriding. Hopefully this will be published? Sounds like a useful feature!
|
|
|
Post by frankk on Jun 13, 2020 14:03:08 GMT -5
You should do loot injection! Mod Constructor can create the loot and injector for you, then you just choose which loots to inject into after the loot has been made. Same can be done for losing followers, just requires a new loot. It's still a bit of work, but faster and better than overriding. Hopefully this will be published? Sounds like a useful feature! Thank you so much for that idea! I have not heard of loot injection before, I will look into it. Assuming I can pull it off (which, I think with some help from the community, I can), I will definitely be publishing it! I will return to this thread with a link to my website when/if it is ready.
|
|
|
Post by frankk on Jun 13, 2020 14:53:44 GMT -5
You should do loot injection! Mod Constructor can create the loot and injector for you, then you just choose which loots to inject into after the loot has been made. Same can be done for losing followers, just requires a new loot. It's still a bit of work, but faster and better than overriding. Hopefully this will be published? Sounds like a useful feature! So, I was checking out Mod Constructor, but unfortunately, it appears to only work with Windows. Currently, I only have a Mac, so I cannot use it. I tried to look for other similar tools, but haven't had any luck. Do you (or anyone else reading this thread) have some recommendations, or perhaps an alternate way to implement my idea?
|
|
|
Post by MizoreYukii on Jun 13, 2020 15:26:59 GMT -5
|
|
|
Post by frankk on Jun 13, 2020 16:43:39 GMT -5
I've always been a little wary of installing another OS on my personal computer, but I suppose I could give it a try later today. As for XML Injector, I actually came across that a few times, but I would rather not make a mod of mine dependent on someone else's work, especially because it is my understanding that the creator (Scumbumbo) has unfortunately passed away, and other modders are updating his work for him. Thank you very much for the link to that tutorial, and for responding to my messages! I really, really appreciate it
|
|
|
Post by MizoreYukii on Jun 13, 2020 16:50:09 GMT -5
I've always been a little wary of installing another OS on my personal computer, but I suppose I could give it a try later today. As for XML Injector, I actually came across that a few times, but I would rather not make a mod of mine dependent on someone else's work, especially because it is my understanding that the creator (Scumbumbo) has unfortunately passed away, and other modders are updating his work for him. Thank you very much for the link to that tutorial, and for responding to my messages! I really, really appreciate it I understand that! It's still being updated though, no worries of anyone ever abandoning it because it's such an important mod. You could also try this script here: sims4studio.com/thread/20719/add-actionloot-interaction-using-python?page=1&scrollTo=141686And tutorial for getting started on scripting: sims4studio.com/thread/15145/started-python-scriptingI believe PyCharm works for Mac as well.
|
|
|
Post by frankk on Jul 9, 2020 11:56:22 GMT -5
MizoreYukii Hey there! I know it's been a while since I was on this thread (real life got in the way for a bit...), but I'm back and am finally getting the hang of this. Thank you so, so, SO much for that first link! I was able to get it to add followers and display a notification when selling a painting (I used the code you provided in that thread)! Now, I just need to inject the loot for other fame gains, and it should be good to go I do have one more question, though. Context: I am planning on using a custom loot for each follower gain (EX: `frankkulak:loot_FollowerGain_SellPainting`, `frankkulak:loot_FollowerGain_PublishBook`, etc.). The reason I am thinking of doing this is because each one should have a different amount of followers, as well as a customized message that explains why they gained followers (EX: "[Name]'s painting has caught some attention on Simstagram! He/She has gained XXX followers, and now has XXX followers total."). Question: Does this decision make sense or not? Should I be creating a custom loot for each and every follower gain, or is there a way for me to create one loot that uses a custom amount of followers / message depending on properties it is passed? I'm guessing the answer is no, but I wanted to ask someone more knowledgable than me before needlessly making work harder for myself. Thanks again, you've been a tremendous help
|
|
|
Post by MizoreYukii on Jul 9, 2020 16:10:22 GMT -5
Glad you got it working so far! Doing it that way is a lot of work, but it's fine otherwise. It should be possible to create a single loot for all of them as long as you put in the appropriate tests, though which tests you would use I'm not sure about, probably an interaction running test so the correct one only fires when that specific interaction is running. If you dig through the files there are some long loots you can come across with lots of parts and tests. I don't have experience with fame and custom numbers but it should work similarly. If you haven't yet you should download the TDESCs and TDESC Browser so you know how to build files and can see what tests you can use (the interaction running test might be enough).
|
|
|
Post by frankk on Jul 16, 2020 8:08:16 GMT -5
You should do loot injection! Mod Constructor can create the loot and injector for you, then you just choose which loots to inject into after the loot has been made. Same can be done for losing followers, just requires a new loot. It's still a bit of work, but faster and better than overriding. Hopefully this will be published? Sounds like a useful feature! Hey - I finally got a working version of this mod, and added it to my site! It's nothing too too major at this point, but it is working and I have quite a fair amount of interactions that now generate followers. I also have a ton of future plans for it, but for now, find it here: mods.frankkulak.com/#/ts4/followersforfame
|
|