Home | Download | Discussion | Help | Site Map | New Posts | Sign in
Quick Reply
Search this Thread
Replies: 10 (Who?), Viewed: 1374 times.
Test Subject
Original Poster
#1 Old 12th Feb 2019 at 5:32 PM
Default Tea-/Coffee Single Cups

Me again. Every now and then I remember old mods and then I miss them again. No, I will not update other creators mods without their permission.

I was just, again, looking through the files for the tea- and coffemakers and the option to brew single cups is already there, in the xml-files.
So, I wonder, is it really necessary to make a script mod? Can't the option be simply activated like any other override or is that what the injectors in script mods are doing?

I tried looking at the old, unfortunatly outdated and possibly abandoned mod and surprise, python itself had an update since 2016 but of course you know that.
I just can't help but think that there is an easier way to do this, I just don't know how.

In the files, a "single cup" isn't mentioned anywhere, but, for instance, this:

<L n="at_states">
<V n="set_states" t="Set_state_list">
<L n="Set_state_list">
<E n="trigger_operation">OR</E>
<L n="at_states">

I really don't understand why the option to brew single cups isn't already active and why the heck can't children drink tea (aside from pitch black, maybe) but stop, one by one.

Any help would be apprechiated, after all, I'm just getting started I just really can't shake the feeling that it can't be that hard and/or complicated.
#2 Old 13th Feb 2019 at 4:27 AM
Pbox's mod was done as a script to avoid the chance of another mod conflicting with it. Back then it was a simple matter of adding the two single cup interactions to the coffee and tea makers. Those interactions have been removed from the game though, so they would have to be rewritten from scratch in order to work anymore. Then those new interactions would need to be added to the coffee and tea makers either by overriding the objects (can conflict) or by using a script or the XML Injector (no conflicts).

I'll look back at some of my XML archives to see if there's any chance of it being resurrected, or if something like animations for it were removed as well which would make it much more difficult.
Test Subject
Original Poster
#3 Old 13th Feb 2019 at 5:44 AM
Oh. So much for "never change a running system", eh. I'm really hoping that there still is an easier way. I haven't looked at any other mods that alter the tea- or coffeemaker, also I think there aren't any others but what I see when I search for teaMaker in the extracted files (yes, I'm concentrating on the teamaker first, when I can make it brew single cups, it can also be done for the coffe machines). Plus, the vendors and the npc's at the café, they brew single cups all the time.
#4 Old 13th Feb 2019 at 6:33 AM Last edited by scumbumbo : 13th Feb 2019 at 6:44 AM.
I scrabbled something together, wasn't too tough. The recipes for the single-cup teas were still in the game and I rewrote the old single-cup crafting interaction to use those and attached it to the tea maker object.

The single-cup coffees were a bit more involved as the recipes for the flavored coffees were gone (rewritten for the espresso machine); however, as the plain coffee single-cup recipe was still intact I was able to clone those with the closest replacements and they work on the various coffee machines. Doesn't seem to interfere with the espresso machine at all, so any of the restaurant stuff shouldn't be affected either.

This is quick n' dirty and isn't really something that should be released as a mod "as-is" but is a valid start that could be setup properly if you wanted to release it.
  • The two rewritten interactions (13168 & 14368) should be renumbered as modded instances (high-bit set, using a hashed name)
  • The four rewritten recipes (15668, 15670, 15671 & 15672) should also be renumbered rather than using the old numbers from older versions of the game. The recipe numbers would also need updating in the coffee crafting interaction then as well, only 15669 would stay the same as that's still built into the game and did not require changing.
  • Ideally the object overrides should be redone as a script or using XML Injector. The only change was to add the two crafting interactions (13168 for the coffee makers & 14368 for the tea) to the _super_affordances list.
Download - please read all instructions before downloading any files!
File Type: zip SingleCupTeaCoffee.zip (26.0 KB, 9 downloads) - View custom content
Test Subject
Original Poster
#5 Old 13th Feb 2019 at 4:30 PM
Thank you! Ah, backup-files, yes, I should've thought of that before overwriting the old extracted files with the new ones. I'm gonna do that from now on because I hate that nagging feeling that something that could've been easily prevented is gonna bite me one day. Catastrophe prevented, for now.

I wish I would be done with my final exam already, I really want to start learning how to write script mods, already got python and pycharm but just like the blender interface made me think that the controls of a spaceship couldn't possibly be any more complicated, pycharm could be written in some cryptic code, wouldn't make a difference to me just yet.
Although I have found a very neat tutorial on how to write a simple script mod, it's gonna take me some time and it's really not that high on my list of priorities right now.

I couldn't even update one of my own mods yet, the file has been rewritten so much with the last patch and yet, no actual game-changing behavior occured. Go figure. Way to go, EA.

I am so thankful to you for taking the time to explain it all to me.
I'm also annoyed by a few other things that came with the get famous-update and who knows how many other patches and updates may come within the next 2 months (and 3 weeks) so, there's that.

Enough rambling now tho, I know what to do next and how to do it and -again- thanks to you!
#6 Old 14th Feb 2019 at 7:48 PM
Originally Posted by Anonymouse85
Enough rambling now tho, I know what to do next and how to do it and -again- thanks to you!

No problem, glad to help out when I can. And if I wasn't clear, you're certainly free to use what I sent out for your own mod release if you wish.
Test Subject
Original Poster
#7 Old 15th Feb 2019 at 4:17 PM
Thanks for reassuring me! You already did most of the work so I'm gonna call it what it is: A shared effort. I can't take all the credit for it.
#8 Old 15th Feb 2019 at 6:17 PM
Oh, I know you'd give me credit for the assist - if you were the type that doesn't do that I probably wouldn't help
Test Subject
Original Poster
#9 Old 20th Feb 2019 at 5:44 PM
So, I finished the mod for the tea machine and it's working without any errors but I have a problem with the coffee machine; I've looked through all the files for the coffee maker and I can't find the files for the receipes anywhere.
I re-extracted all my files to make sure there wasn't an error on my part but they're just gone. Just why do they keep changing things all the time (without fixing anything) that make it harder and harder and eventually, even impossible to mod those files? It's really getting on my nerves already.
#10 Old 22nd Feb 2019 at 12:59 AM
The ones I enabled in my test version I sent were:
  <L n="recipes">
    <T>15668<!--Recipe: recipe_Drink_Brewed_Coffee_Single_Americano--></T>
    <T>15669<!--Recipe: recipe_Drink_Brewed_Coffee_Single_Coffee--></T>
    <T>15670<!--Recipe: recipe_Drink_Brewed_Coffee_Single_Latte--></T>
    <T>15671<!--Recipe: recipe_Drink_Brewed_Coffee_Single_RaspberryMocha--></T>
    <T>15672<!--Recipe: recipe_Drink_Brewed_Coffee_Single_SoyMintMocha--></T>

Only the 15669 recipe still exists in the game, I had to resurrect the others from old XML and alter them to point to the new object definitions and string table entries (for instance, the SoyMintMocha no longer exists, I changed it to point to the "Macchiato".

I used the old instance IDs, so that's probably why it looks like those were taken from the current XML but those four are not. Those are the numbers they used to be in by-gone times, and realistically all but 15669 should be renumbered to be 64-bit custom content IDs.
Test Subject
Original Poster
#11 Old 22nd Feb 2019 at 3:33 PM
Oh, I was looking for the current files to renumber them and I wondered if I could even, essentially, make up numbers but, looking at some other old mods I found out: Yup, could and it would work. All the grocery-store-mods (a total of 2, as far as I know) are outdated and abandoned but I don't wanna update them, I want to mod the produce stall to sell all the existing fruits and vegetables and herbs, not just some.

But, I'm getting ahead of myself again Thank you for your help (again), it happens more often than not that I find myself in xml-situations where I don't know what to do.

It seems tho, that xml-files are perfecty logical and actually, not complicated at all so there's a good chance that I'll be able to make more than just no-autonomy-mods very, very soon. All after my final exam but hey, only 2 more months and one week left. Until then, learing by doing and asking if I get hopelessly stuck
Back to top