|
Post by brittpinkiesims on Jul 17, 2016 2:22:47 GMT -5
I know this isn't exactly related to S4S, but I was wondering if anyone has experience working with custom traits and buffs? I have made a custom trait and a buff to go with it...the trait works as its supposed to in-game but the buff never shows up. Can anyone offer any insight to making buffs? I used Zerbu's Buff and Trait Factory to make it, but he offers no support on his tools so I thought I'd have better luck here from someone who has made a trait with success or from someone who has made their own from scratch. Thanks guys!
|
|
|
Post by phyre on Jul 17, 2016 14:59:25 GMT -5
There are a lot of different reasons why your buff may not be showing up. You might have defined the buff to be a hidden one (like most permanent trait-associated buffs), defined a specific buff trigger that your sims fail to meet, or the simdata input values may be wrong (which does seem unlikely considering the T&B factory automatically generates simdata files for each CML). Honestly, without the resource to look at, there is no way to tell where the issue lies.
I am only starting to venture into modding myself, but I am doing everything from scratch so I understand the coding. My XML is pretty decent, so if you upload the .package I can take a look at those resources for you. If the problem lies in the simdata file, however, I may not be able to find it as I am only just starting to understand that resource. The studio just came out with a beta that allows simdata editting however (which made me so flipping happy because for a non-programmer like me those binary files are a nightmare, Andrew and Orange, can I hug you?!), so if I can not find the issue in the XML file I can toss it in there, though technically it has no object reference so I am not sure how Studio will handle that, and finally test it out.
|
|
|
Post by myindiesims on Jul 17, 2016 17:42:29 GMT -5
You could always try asking Drewshivers on tumblr, too, as he's created very many custom traits and buffs. I do remember reading something that said all custom buffs stopped working with one of the past patches, though.
|
|
|
Post by brittpinkiesims on Jul 17, 2016 19:29:49 GMT -5
Hi pyre , thanks for the reply! I've uploaded the .package file as well as the files from the Buff and Trait factory; if you have it, you can load them and see exactly what I've done. If you need to upload anything for me, you can throw it back in that folder, it's a filedrop I don't think I made the buff hidden, I checked and double-checked everything, but it's entirely possible that I've just made a dumb mistake, as it's my first time creating a custom buff or trait. Thanks in advance!
|
|
|
Post by brittpinkiesims on Jul 17, 2016 19:32:33 GMT -5
You could always try asking Drewshivers on tumblr, too, as he's created very many custom traits and buffs. I do remember reading something that said all custom buffs stopped working with one of the past patches, though. Thanks for the suggestion, myindiesims! I've already bugged Drew a few times, but I sent him a message anyway, haha. Yeah, the custom buffs stopped working, but Zerbu updated the program after and released a fix; I was working with the newest version of the program, and even ran my buff/trait through the fix program and they still didn't work properly :(
|
|
|
Post by phyre on Jul 18, 2016 10:02:20 GMT -5
Hey there Britt, I took a quick look at the package for you and it turned out to be a very simple issue! The visibility definition was set to "false", which meant the buff was invisible. I changed it to "true", tested it in my own game, and the buff associated with your trait is now permanently visible. You can download my updated .package file from this link. However, you can also attempt to fix your own package (it is really easy) so you know what to do next time. To fix your own package: 1. Open your package with S4PE and look for the XML file that holds the trait buff (in your case the file with instance F0378D04C4E285AB). 2. Right click the file and export it as a .xml by using the "all files" extension. 3. Open the file you just exported with a XML editor (Notepad works just fine for such a small change if you do not have Notepad++). 4. Look for this piece of code all the way at the bottom of the file: <T n="mood_type">14634</T> <T n="mood_weight">1</T> <T n="refresh_on_add">True</T> <T n="show_timeout">False</T> <T n="success_modifier">0</T> <T n="ui_sort_order">1</T> <T n="visible">False</T> <V t="disabled" n="walkstyle"/> </I>
5. Replace the line <T n="visible">False</T> with <T n="visible">True</T> 6. Save the file. 7. Go back to S4PE, right click on the XML file again and click "replace". 8. Replace with the .xml file you just edited and save the entire .package with S4PE. 9. A quick double-check of the .tdesc file for buffs showed this tunable to not have export_modes associated with .simdata files, which means that editing the .simdata file for this buff is not necessary after this change. 10. Put in your game and enjoy!
|
|
|
Post by brittpinkiesims on Jul 18, 2016 14:50:28 GMT -5
Thank you so much for your help, Phyre! That wasn't exactly the issue I needed fixed, though...you made the trait visible as a buff, but I actually had an additional buff which was supposed to become visible with my trait (called Gryffindor House Pride). Anyway, the advice you gave me still helped to fix my problem....I looked into the SimData files using S4S and the visibility of that buff was also set to false, so I fixed it :D. i would post a screenshot but I'm on my way to work and only had time to briefly test it.
Odd that they were tuned to "false" as BAT factory has a toggle to make buffs/traits hidden or visible and I definitely made the buff visible, but oh well! Problem fized and now I know how to fix it in the future :D
I'll test it properly when I get home! Thanks again!
|
|
|
Post by phyre on Jul 18, 2016 16:11:16 GMT -5
When you mentioned you did not make the buff hidden after my comment about invisible permanent trait buffs I somehow assumed this was the buff you meant. I did not even look at the second buff because of that, sorry about that. I am happy though that, in the end, my advice still allowed you to fix your issue and get your trait working the way you intended for it to work! Have fun with it!
|
|
|
Post by brittpinkiesims on Jul 19, 2016 3:54:56 GMT -5
Hey phyre , I'm still having no luck with my buff :( When I flag the buff to "true", the trait doesn't show up in my game at all. I don't know how to fix it. I know how to make the trait just fine, it seems to be the buff that's the problem. Any suggestions? Do you make custom traits from scratch? How do you go about adding buffs?Nevermind...I figured it out. I was having the problem for the dumbest reason, actually...lol. I hadn't saved the trait and buff together after creating them and was therefore just exporting the trait by itself. Stupid rookie mistake, and it's super embarrassing, but I'm sharing in case anyone else runs across the same thing. Thank you for your help, though! I learned lots about buffs and traits thanks to you :D
|
|
|
Post by phyre on Jul 19, 2016 4:26:48 GMT -5
I do make my traits from scratch, yes. It is an ongoing project of mine where I am attempting to increase the difficulty of what each trait does and offers as an auto-didactic exercise. While Zerbu's tool is incredibly helpful and makes things a lot faster I am doing this so I can understand the game's coding myself. In order to help you further, I first need to understand what it is you are trying to do (I misunderstood the first time). You have a trait (Gryffindor), which has a permanent buff attached to it (invisible -- the only I made visible earlier) which makes some stat-based changes like any normal trait-buff. This one seems to work just fine. Now, as I understand it, you are trying to add another buff that comes from an interaction, and is visible (a moodlet called Gryffindor House Pride) which has a different effect, correct? The thing is, this buff is not in your .package. Your current .package includes:
- Your Gryffindor trait (xml and simdata)
- Your Gryffindor trait buff (xml and simdata - the one I made visible before)
- A custom interaction for sims with the Gryffindor trait (xml)
- And a loot list tied to this custom interaction that specifies sims get loot (in this case a buff) after performing this interaction (xml)
However, the buff that is supposed to come from this interaction is not specified. The buff it references does not exist within the .package file. If you look at your string table, you can also see that the only strings defined are your trait, your trait buff, and the reason for the custom interaction buff (defined in the loot list), but not another buff. What you are missing is a .xml and a .simdata file of your Gryffindor House Pride buff. At the moment, it does not exist (hence the earlier confusion). Because I do not work with the T&B factory I can not tell if you did not correctly specify this buff, or if the program simply failed to export its associated files. You can try to recreate the Gryffindor House Pride Buff in the T&B factory and check what it exports. Alternatively, you can also give me the specifics of your Gryffindor House Pride Buff and I will add it for you. At this point, I am not even sure you meant for it to come from a special interaction? Perhaps if you clarify the occurance and intend of the buff we can fix your trait. Update: I am really happy that you "found" your missing buff and its associated files :P That was indeed the only reason why you weren't seeing it!
|
|
|
Post by brittpinkiesims on Jul 19, 2016 8:26:31 GMT -5
Haha, yeah, phyre...I'm a dunce. It was my first time making a trait and using BAT factory, so I was bound to screw up, haha. I've made a second trait now (if you can't guess, I'm doing all the Hogwarts houses), and it was so much faster and easier to do the second time around! But while I've got you here, what do you know about making proximity buffs? Do you know how to make them? Could I make a proximity buff where the condition is one of my custom traits (i.e. Gryffindors get a happy moodlet when with other Sims that have the Gryffindor trait, or they get an angry moodlet when around Sims with the Slytherin trait, etc.)?
|
|
|
Post by phyre on Jul 19, 2016 10:09:58 GMT -5
It is great to hear your second trait went much smoother! It is always like that, though, making CC or mods for the game is trial-and-error and asking lots of questions along the way!
About the proximity buff, I am fairly sure that has to be possible. The question is how hard it will be to do, which is determined by the function that is used to test for this proximity. It is something that was next on my list to study so I wouldn't mind taking a look at it for you. However, I am going out tonight so I do not have access to my computer to check files for reference. Give me some time and I will get back to you probably tomorrow with an answer and hopefully a first idea of what is required (or in the best case a first example) and some references.
|
|
|
Post by brittpinkiesims on Jul 19, 2016 21:01:48 GMT -5
Thanks Phyre! Take your time! You've been extremely helpful and I'm learning a lot. I'd love to actually understand how the XML files work too, so I don't have to depend on Zerbu's program Edit: Another question (I know, I know, sorry if I'm bugging you, haha), but how would I go about importing a custom icon for my trait? I think I'm sorta there...I've figured out the size, that it needs to be modded in via it's own .package file, but what other information should the file include other than the .png or .dds? If you know?
|
|
|
Post by phyre on Jul 20, 2016 9:00:03 GMT -5
So, proximity buffs are just about as easy (or difficult, depending how you look at it) as I thought they would be.
I took a look at the "bro" trait, which gives sims with that trait a buff if they are around other "bros". To make it work, your current package would need to add another buff to your trait that calls for the proximity test, a new statistics (in this case a commodity) that does the actual proximity testing, and another buff which is applied if the proximity threshold is met (this is the buff the sims will end up seeing). All these files require both a .XML and a .simdata format. If you want to go ahead with this, I can give you the instances of the files you can use as templates for your own proximity buff. If you export and import them into S4S you will get both the .xml and the .simdata files which you can then edit. If you can't make sense of the files yourself (though reading the .xml is usually quite "obvious"), I could try to send you some pointer by adding comments into the .xml about which data to change, which you then mirror in the .xml and the .simdata file.
About the custom thumbnail, this is not something that I have looked at thus far. If you have the proper file size and format (all current ingame icons are .png), you can try to add it as _IMG file in your trait.package via S4PE and then edit both your main trait .xml and .simdata to point to that thumbnail (name and group:type:instance). I am not 100% sure on this, though. While it seems like the way it "should" work I could be wrong and it might be necessary to look for some other mods that use their own custom icons and check how they reference them.
|
|
|
Post by brittpinkiesims on Jul 20, 2016 16:25:04 GMT -5
Hey Phyre I totally forgot about the "bro" trait and how it does that. I have the XML broswer program at home; I'll have a look tonight and see if I can make any sense of it. I would appreciate the pointers anyway, just in case I get stuck. I did try adding the custom thumbnail as a .png to my package file...and changed all the .xml and .simdata to reflect that, but I had a weird issue where the trait wouldn't show up in my game at all after editing with S4S. It actually seems to happen with any edits I make on S4S (I even fixed a simple typo in my strings file once and it did the same); I'm not sure if it's some sort of weird incompatibility issue with Buff and Trait Factory and S4S. I will try it again with S4PE, because I *think* I know how to to do it, but I just don't feel as comfortable using S4PE as I do with S4S. Anyway, I'm at work now, so I'll try all this stuff when I get home in ten hours, hehe :D
|
|