help making my first mod - Abigail's guinea pig!

jammydodger

Cowpoke
hello there! i'm new 'round here, so very nice to meet y'all! <3

i am a lover of Stardew Valley, as are we all, obviously. I have something like 600 hours in the game and have been playing modded for the better part of this year (I just started year 3 in my save!). i'm currently studying JavaScript and thought it would be a great idea to try and apply what i'm learning to one of my favourite games as a way of motivation. so, here i am, trying to make my first mod!

as a rodent owner i cringe watching my lovely wife Abigail's guinea pig all by himself in a cage far too tiny for anything bigger than a single bachelor boy mouse or a hamster, MAYBE. also, what kind of a name is David (Jr)?! she did him SO DIRTY. i know her care for poor little David (Jr) has been a source of controversy in the past. honestly, Abigail, do your research before you get a pet! we expected better from you! tsk tsk! 😂

so ANYWAY. here's my idea for my first mod, at escalating levels of ambitiousness;
1. i would love to at the very least make the game consider him a mouse or hamster, whatever that means.
2. rename David. i imagine both of these would require changes to the game's dialogue which i have no idea how to do.
3. what i would REALLY like to do, though, is replace the cage with a more appropriate large floor level cage and add a friend for him.
4. even more ambitious than THAT, have multiple configurable options for rodents of the player's choice; so the ability to choose between guinea pigs, rabbits, a boy mouse/two female mice, rats, or a hamster.

how doable is any of this? my guess was that my best bet would be Content Patcher. i've had a read of the Content Patcher wiki page as well as pathoschild's official guide but i'm honestly still incredibly lost as to how to specifically apply it to this idea. what would i choose as the target to just change the cage? because i can't seem to find anything within the entire contents folder that is just the cage. the closest i've found is the little sprite within the giant townInterior sprite sheet and i have no idea how to change only that. especially since i would want to change the dimensions and etc.

to make myself a bit clearer, here is the two specific questions i can narrow down to - but honestly any advice and/or guidance would be greatly appreciated!
1. how do you change the dialogue so I can change David's name (plus any potential dialogue that refers to him as a guinea pig, though i don't recall seeing any admittedly)?
2. how would i set the target to be just the area of the cage in Abigail's room, both in her room at home and her spouse room in our house? am i correct in thinking that so long as it replaces it that it can be whatever dimensions i want? do i just make my own sprite image at that point?

thank you so much in advance for any assistance! <3 i have many more ideas i would love to bring to life so if i can figure this out that would be awesome!
 
I hate to disappoint but You need to learn c# to create a mod
This isn't necessarily true. A lot can be done with just JSON and the existing frameworks.

1. how do you change the dialogue so I can change David's name (plus any potential dialogue that refers to him as a guinea pig, though i don't recall seeing any admittedly)?
2. how would i set the target to be just the area of the cage in Abigail's room, both in her room at home and her spouse room in our house? am i correct in thinking that so long as it replaces it that it can be whatever dimensions i want? do i just make my own sprite image at that point?
1) You would need to find out where in the dialogue the guinea pig is referred to as David and where he's called a guinea pig. This can be changed with Content Patcher.
2) You can use Content Patcher as well to edit vanilla maps to target the cage area. You could also use Content Patcher to replace the sprites on the tilesheet instead of the map since I think those are the only two places the cage is used if you want to keep it the same size.

I would first recommend reading over the Content Patcher documentation and if you have more in depth questions head over to #making-mods in the main SDV server.
 

Lew Zealand

Helper
I wish you good luck in this as I gave up even simple programming over 3 decades ago, though there are few reasons more compelling to learn to do this than Rodentia expansions.

Speaking of expanded Rodentia, if instead Abigail had a capybara I'd have to marry her at least every other Season and maybe thrice in Year 2.
 

jammydodger

Cowpoke
I hate to disappoint but You need to learn c# to create a mod
i'm sure for more complicated modding you probably do need a more complex coding language, but from the research i've done it looks like my idea/s are probably accomplishable with content patcher which uses mostly javascript :)

This isn't necessarily true. A lot can be done with just JSON and the existing frameworks.



1) You would need to find out where in the dialogue the guinea pig is referred to as David and where he's called a guinea pig. This can be changed with Content Patcher.
2) You can use Content Patcher as well to edit vanilla maps to target the cage area. You could also use Content Patcher to replace the sprites on the tilesheet instead of the map since I think those are the only two places the cage is used if you want to keep it the same size.

I would first recommend reading over the Content Patcher documentation and if you have more in depth questions head over to #making-mods in the main SDV server.
i would ideally want to be changing the size of the cage to be guinea pig appropriate but plan B is to just make "David" a hamster or something! it's the changing the size of the cage that's confusing me though because the "townInterior.png" tilesheet is the only thing containing it i've found and i've been through all the content folders, and i'm not sure how i would make the cage different than that if it's within a giant tilesheet.
it's promising to hear that the dialogue could be changed with content patcher as well, though, thank you! i'll have to have another look for instructions regarding that!
i've read both the content patcher official documentation and the wiki page and i'm still a little confused, i will continue going over it and keep the SDV server in mind though, thank you! <3

I wish you good luck in this as I gave up even simple programming over 3 decades ago, though there are few reasons more compelling to learn to do this than Rodentia expansions.

Speaking of expanded Rodentia, if instead Abigail had a capybara I'd have to marry her at least every other Season and maybe thrice in Year 2.
it sure is a bitch, but i do enjoy all things tedious, maybe i'm just a masochist 😂 thank you for the good luck wishes though, i'm gonna need them! lol!
i hadn't thought of a capybara, but that would be pretty cool too! though they're so big i don't think even if i made the cage as big as possible it would be big enough for one! 😂
 

mouse

Farmer
To echo what Para said earlier, everything you mentioned is doable with CP, you'd just patch different things or use different tools to edit the assets themselves. "New friends" could just be editing a tile, or probably also animating it, so you'd need to make/frankensprite (hack together from existing game sprites) the pixel art part still!

it's the changing the size of the cage that's confusing me though because the "townInterior.png" tilesheet is the only thing containing it i've found and i've been through all the content folders, and i'm not sure how i would make the cage different than that if it's within a giant tilesheet.
So, when you're walking around areas in Stardew Valley, the map related stuff you're looking at mostly consists if 2 things: the sprites (like what you saw in townInterior), which are the textures of everything you see on the tiles; and the map itself, which is a file that has something like a big list of all the stuff about that map, like what tilesheets to use in the first place, a list of all the tiles from those tilesheets on different layers, how they are arranged, etc. You won't see anything without the tilesheets, but, well, you don't have a map without the map :D

When Para said you could just edit the tilesheet if you kept it the same size, the "size" in this case would be in tiles -- map tiles are 16x16 pixels, and the map file (Maps/SeedShop) is saying "put this tile from townInterior next to this tile from townInterior". To actually make it use up more tiles than you see on the map you'd do one of at least two things:

  1. Edit the map with a custom tilesheet to insert your own 4x4 tile cage into the map in place of the old one. This is what I'd recommend, personally.
  2. Edit just the tilesheet, but both the cage tiles and the dresser it sits on, to make it look like you want without changing the map arrangement. I feel like this looks simpler on the surface, but because you don't want that dresser to be the bottom of a cage everywhere, you'd need to add a condition to your CP patch to say "only change this in this location". Even then, there's the possibility that some other map modder might add the dresser somewhere else in Abigail's house even if it isn't normally there, and it'd be weird.
The maps page on the Wiki explains the basics (and has a section for tile animation if you decide to add animated friends, but note you can skip the SMAPI part and go to "if using Tiled"), and the docs Paradigm linked explains simple map edit patches, including an example that would be serve fine as a complete content.json with 1 map patch.

(There's also a section on player configs, which is what you'd use to let players pick options within your mod! Configs are often as simple as the examples, but for some large mods can be sleepless nights of trying to figure out the best way to flow edits with combinations of choices depending on mod complexity :D cage choices seems like a good start!)

my idea/s are probably accomplishable with content patcher which uses mostly javascript :)
Just to clarify this part, Javascript is a programming language, but you're right that the vast majority of content mods available don't require any programming to make :) In this case JSON does stand for JavaScript Object Notation, but it's the file format that all our mods use/read. (I'd say they were just specially formatted text files, but you could argue the same about a lot of "actual" languages, and as Content Patcher has developed it's gotten capable of supporting very long and complex mods with all its tokens :D Still, much less of a hurdle than learning JS itself.)

By now you might have made it to #making-mods on Discord, in which case this would all probably be redundant as there are many helpful people there, but still, good luck!
 
Last edited:

jammydodger

Cowpoke
To echo what Para said earlier, everything you mentioned is doable with CP, you'd just patch different things or use different tools to edit the assets themselves. "New friends" could just be editing a tile, or probably also animating it, so you'd need to make/frankensprite (hack together from existing game sprites) the pixel art part still!



So, when you're walking around areas in Stardew Valley, the map related stuff you're looking at mostly consists if 2 things: the sprites (like what you saw in townInterior), which are the textures of everything you see on the tiles; and the map itself, which is a file that has something like a big list of all the stuff about that map, like what tilesheets to use in the first place, a list of all the tiles from those tilesheets on different layers, how they are arranged, etc. You won't see anything without the tilesheets, but, well, you don't have a map without the map :D

When Para said you could just edit the tilesheet if you kept it the same size, the "size" in this case would be in tiles -- map tiles are 16x16 pixels, and the map file (Maps/SeedShop) is saying "put this tile from townInterior next to this tile from townInterior". To actually make it use up more tiles than you see on the map you'd do one of at least two things:

  1. Edit the map with a custom tilesheet to insert your own 4x4 tile cage into the map in place of the old one. This is what I'd recommend, personally.
  2. Edit just the tilesheet, but both the cage tiles and the dresser it sits on, to make it look like you want without changing the map arrangement. I feel like this looks simpler on the surface, but because you don't want that dresser to be the bottom of a cage everywhere, you'd need to add a condition to your CP patch to say "only change this in this location". Even then, there's the possibility that some other map modder might add the dresser somewhere else in Abigail's house even if it isn't normally there, and it'd be weird.
The maps page on the Wiki explains the basics (and has a section for tile animation if you decide to add animated friends, but note you can skip the SMAPI part and go to "if using Tiled"), and the docs Paradigm linked explains simple map edit patches, including an example that would be serve fine as a complete content.json with 1 map patch.

(There's also a section on player configs, which is what you'd use to let players pick options within your mod! Configs are often as simple as the examples, but for some large mods can be sleepless nights of trying to figure out the best way to flow edits with combinations of choices depending on mod complexity :D cage choices seems like a good start!)


Just to clarify this part, Javascript is a programming language, but you're right that the vast majority of content mods available don't require any programming to make :) In this case JSON does stand for JavaScript Object Notation, but it's the file format that all our mods use/read. (I'd say they were just specially formatted text files, but you could argue the same about a lot of "actual" languages, and as Content Patcher has developed it's gotten capable of supporting very long and complex mods with all its tokens :D Still, much less of a hurdle than learning JS itself.)

By now you might have made it to #making-mods on Discord, in which case this would all probably be redundant as there are many helpful people there, but still, good luck!
thank you mouse, this is all super super helpful and i wasn't yet aware of a lot of it! i'm way too wiped out from a family christmas event to look into this right now, but i definitely will be when i recover some spoons! i just wanted to say really appreciate your help, though! ❤
 
Top