ByAlpha_Omegasis
Updated3/7/16
*Notepostedon3/7/16
Welptherehavebeensomebigchangesgoingaroundthe
moddingforumslately.Asaresultthisguidewilleventually
changetomatchthecurrentreflection.Staytunedforthat.
AlsodecidedthatIllfinishupthe.XNBdocumentation
beforemovingontotheStormAPIdocumentation/helpsection
ofthisguide.
Disclaimer
(Becausethisissuperimportant)
1. IdonotowntherightstoStardewValley,thosebelongto
EricBarone,akaConcernedApewhichincludesallgame
content,resources,etc.Innoway/shape/formamI
affiliatedwithConcernedApe.
2. IdoownacopyofStardewValleyonSteam.
3. ThismoddingguideiswhatIconsider100%unofficial.
ConcernedApehasstatedthathewouldliketoadd
moddingsupportinthefuture,anduntilthen,thisistostart
upthemoddingcommunity.
4. Thisguidewasmadewiththepurposeinmindasan
entertainingsideprojectandasawaytodevelopthe
moddingcommunityforStardewValley.
Credits
(BecauseIcouldneverhavedonethisalone)
ConcernedApe!FormakingStardewValley!Withouthim,
therewouldbenoamazinggame!
ChuckleFishForpublishingStardewValley!Theseguys
helpedtogetthewordoutaboutStardewValley.
Stardewformmembercantorsdust(Fororganizingthethread
thatbroughtyouhere.Withouthim,ourworkwouldbe
scatteredacrossthenetprobably.)
StardewformmemberDraivin(formakingtheallsupercritical
xnb_node.cmdapplication.Withoutit,noneofthemoddingyou
seebelowwouldhavebeenpossible)
StardewformmemberZoryn(formakingtheStardewValley
API,whichwillbecrucialindaystocome)
ModderDrogeanfromtheSVforumsformakingthemodding
sectiononeditingmusic/sounds!
ModderSgtPineapple1stForfiguringouthowtoaddnewcrops
tothegame,andmakingagreatguide!
Allofyoureaders!Withoutyouall,therewouldbenomodding
communityandnointerestinStardewValley.Youallarejustas
importantinthisprocessasanybodyelse!
ChangeLog
(SothatwayyoucanseewhatIvedone)
https://docs.google.com/document/d/1hIofusLwfHx8ALaIMN
QE2KAqv7JED5zUIqT49m4c9E/edit?usp=sharing
CurrentProgress:
Incaseyouwerewonderingonallthethingsthatneedtobe
workedon,Icompiledalistofwhatseemstobeallofthe
editablefilesandmyprogressworkingwiththem.Illupdate
thisasIgoalong.ThefirstgoalistocompletetheDatasection.
HopefullylifewontbetoobusyandIllhavethistackled
withinthemonth.
https://docs.google.com/spreadsheets/d/1yJZ83E3zHmR5u_GP
YzY_DZEQB55qArLoXkmnW4xrIoE/edit?usp=sharing
QuestionsandFeedback
Ifyoufindanythingoffwiththeguide,orjusthavesome
generalquestions/thingsyoudiscoverpostithereandIllbe
abletoupdatetheguidewithlotsmoreusefulinformation.Trust
meitllhelpeveryone.Creditwillgotoyouofcourseif
anythingisaddedinthatyoudiscovered/wroteup.
http://community.playstarbound.com/threads/moddingguidefee
dbackhelpthread.107390/
FinalNotes:
Thisguideisprettyincomplete,andisconstantlybeing
updatedduetothefactthatStardewValleyjustcameout.Ihave
alsobeenmadeawarethatthereiscurrentlyamoddingAPIin
development.Firstthisguidewillcoverbasic.xnbfileediting
andhowtodoit,andoncethemoddingAPIisfurtheralong,Ill
gothroughandmakeanotherguidethatworksthroughjusthow
tousetheAPIandmakemodswiththat.Untilthenthough,this
moddingguidewillbecontinuedtobeupdatedincaseyoujust
wanttoeditthecontentfilesthemselves.
HappyFarming.
Alpha_Omegasis
TableofContents
(ThiswillbeshuffledonceIfixtheordering/format.Itspretty
cruderightnow).
I.0XNBModding
.IGettingStarted
.IIPhotoEditing
.IIIEditingNPCDialogue
.IVWeapons
.VCrops
.V.iAddingCrops
.VIFishing
.VIIMusic/SoundEditing(ShoutouttoDrogeanonSV
forums)
.VIIIFruitTrees
.VIVBundles
I.0XNBModding
=======================
ANotsoBriefNote
Heythere,welcometothemoddingguide,itsprobablypretty
importantthatyoureadthissolistenupreallyquick.
ThismoddingguidestarteddevelopmentDAY1from
whenStardewValleylaunched.Backthenwe(mostlyme)
believedthatmostifnotallofthegamescontentcouldbe
editedvia.XNBfiles.Westandcorrectedtoday.
Nowwehavemanygreatmoddingapis/toolsthathelpus
achieveatruer,muchmoreindepthformofmoddingtoday
whichhelpsuscreateamuchlargeramountofcontent.Asit
stands.XNBmoddingISNOTAGOODWAYTOMAKE
MODSFORPUBLICRELEASES.Dontgetmewrong,Ive
seenplentyofgood.XNBmodsouttherethataregreatin
content.HeckIveevenmadeafewmyself.
Theproblemwith.XNBmoddingisthatpeoplecanonly
useyourmodandnotanyothermodsalongwithitofthesame
type.ThatmeansthatIcanonlyhaveone.XNBmodthatedits
fishatatime.TheotherissueisthatisConcernedApemakesan
updatethatchangeshowfishingworks,ALLMODSthatedit
fishingsomewayarenowbroken.Thatsbadnewsformod
developersandforplayersaseveryupdaterunstheriskof
breakingthefunforus.
Now.XNBmoddingisagoodmethodtosimplygetyour
feetwet.Youcangetalotofinspirationfromitandmaybeeven
makesomethingcoolforpersonaluseorforyourfriends,but
makingitafeasiblemodtolasttheagesisprobablynotgoingto
happenunlessyouwanttomaintainconstantupkeeponit.
Istillrecommendreadingthissectionoftheguide,asthe
amountofcontenthereisstillquiteabitjusttogetanideaof
whatyoucanmod,andthentranslateyourdesireintoamore
viablesourceofmodding.
WhenthetimecomesIllexpandupontheguideonhowto
takethestepsfrom.XNBmodding,toactuallywritingactual
programsthatpeoplecanusealongsideothermods.Evenifyou
arentgoodwithprogramingorhavenocluehowitworks,we
willgothroughsomebasicstepstogetyoutounderstandthe
basicsofhowthingswork.Untilthen,keepthe.XNBscoming.
Illfinishupallofthedocumentationonthispart,and
awaitthereleaseofStormApi,whichwillhelpfurtherthe
StardewValleyModdingCommunity.
Untilthen,keepmodding
AlphaOmegasis.
.IGettingStarted
Heythereandwelcometoasimpletutorialonmodding
StardewValley.AsIhavetimeIwillupdatethiswithmore
findingsonallsortsofthingsbutfornowletsgetyouSettled
In
1. FirstyouwillneedtohaveStardewValleyonyour
computer.YoucanbuythisfrommultiplesourcessuchasGOG,
HumbleBundle,andSteam.
2. LocateyourStardewValleyContentfolderasthisis
whereallofourgamefilesarestored.Thisdependsonwhere
youinstallyours,butmineislocatedin
C:\ProgramFiles(x86)\Steam\steamapps\common\Stardew
Valley
3. DownloadXnbNodebyDravinandextractthecontents.
Youcanfinditonthisthreadhere:
http://community.playstarbound.com/threads/moddingprogress
sofar.106868/
3.1Makesureyouhave.7zipinstalledinordertoextractthe
contents!
3.2Itsheavilyrecommendedyouhaveatexteditingprogram
suchasnotepad++atthispointinordertobeabletoedityour
convertedfiles
4. Openupacommandpromptwindow.Youcandothisby
shift+rightclickinginthefolderandselectingOpenCommand
PromptHerefromthedropdownmenu.
5. Fromhereitsamatterofextractingandpackagingyour
files.Whenhavingthecommandpromptopen,typeoutany
validcommandasshownintheExamplesandUsagefields
directlybelow.Youllwanttomakesurethatthefiles/folders
youwishtoextractareinthesamedirectoryasxnb_node.cmd.
Note:Itisgoodpracticetoalwayscopyfilesoutofthe
Stardew/Contentdirectoryandstoretheminaseparatefolder
andeditthefilesthere.Makesureyoualsokeepabackupofthe
originalfilesincasesomethinggoeswrongaswell.Ifsomething
doesgowrong,simplyreinstallStardewValley.
Takendirectlyfromtheforumpostat
http://community.playstarbound.com/threads/moddingprogress
sofar.106868/
Usage:xnb_node.cmd<command><input><output>
Commands:
extract<input><output>extractXNBfileorallfilesindirectory
pack<input><output>packXNBfileorallfilesindirectory
Options:
h,helpoutputusageinformation
V,versionoutputtheversionnumber
Examples:
xnb_node.cmdextractContentExtContent
xnb_node.cmdpackExtContentRepacked
xnb_node.cmdextractContent/Characters/Abigail.xnbAbigail.yaml
6.Nowthatyouhaveextractedyourfile.xnbfileintoa.pngor
.xmlfileeditingwilldifferfromhere!Thoseguideswillbe
writtendownbelow.
7.Ifyouneedtorecompileyour.xmlfiletoa.xnbfilewhen
finishedjusttype
xnb_node.cmdpackfilename.xmlfilename.xnb
8.Replacethe.xnbfilewiththeoldfileandrunStardewValley!
!!!Note,Ihaverecentlydiscoveredthatifyouplantousethe
SVAPIalongwitheditingthe.xnbfilesthatallfileswillneedto
beplacedin
StardewValley\StardewModdingAPI\bin\Debug\Content
insteadof
StardewValley\Content.
forthechangestotakeeffect.
Ifyouwishtoedit.xnbfileswithoutusingSVAPIatthesame
timethensimplyreplacethecorrespondingfilesyoueditin
StardewValley\Content.
.IIPhotoEditing
1. Editinga.pngfileisassimpleasopeningitupwithany
sortofphotoeditingprogram(Iuse/recommendPaint.Net)and
editingithoweveryouplease.Makesureyouextractedthe
desired.pngfileusingxnb_noderunningthecommand
xnb_node.cmdextractmy_picture.xnbmy_picture.png
Wheremy_pictureisactuallythenameofthefileyouwantto
extract.
2. Replacetheold.xnbfilewiththenew.xnbfile.
3. LoadupStardewValleyandseethechangeshappen!
Results:
.IIIEditingNPCDialogue
1. LocateStardewValley\Content\Characters\Dialogue
2. Convertdesired.xnbfilesusingthemethodsdescribedin
theGettingStartedsectionofthisguide.
a. Makesurethatyouconvertthefiletoa.yamlfile
format.Asexamplethecommandyouwouldrun
wouldtoconvertAbigailsdialoguewouldbe
(assumingxnb_node.cmdisinthesamedirectoryas.
xnb_node.cmdextracttheDialogue)
i. xnb_node.cmdextractAbigail.xnbAbigail.yaml
3.Nowopenupyorudesireddialoguefilewithanysortoftext
editor(suchasNotePad++).
Hereyouwillseeabunchofvaluetokensandstringslooking
somethinglikethis.
"Tue":"Ugh...I'mnotinagoodmoodrightnow.$s#$e#Isaid
I'mnotinagoodmood...whatdoyouwant?$a",
ThefirstthinginquotemarksiswhatiscalledtheKeyvalue.
Thisbasicallytellsthegameifthisconditionistruefollowup
bysayingthestringafteritwhichinourcaseitis.
Key:Thingtosay.
Noticehowtherearethesymbols
$s#$e#
?Thesearethe
symbolsthatseparatethedialoguethatisspokeneachtimeyou
talktothecharacterandwhatemotionportraitwillbedisplayed.
Inthiscasethe$ssymbolwilldisplayAbigail'ssadportrait,
and$ewillbreakupthedialoguesbetweenthenumberoftime
youtalktoacharacter.The#betweeneachpairofsymbolstells
thecodetoexpectmultiplepairsofsymbolssothisiscrucial.
SothefirsttimeyouspeaktoAbigailonTuesdaywould
be
"Ugh...I'mnotinagoodmoodrightnow.
andthesecondtimeshewouldcommentwouldbe
IsaidI'm
notinagoodmood...whatdoyouwant?
Nowifwewanttoeditthis,wecansimplyreplacewhatshe
sayswithwhateverelsewewanttoput.Asanexample,Iedited
Pennysdialoguefileandreplaceditwiththismessage.
"Wed":"StardewValleyisnowModdable.Gohavefun.
Alpha_Omegasis.#$e#Everychilddeservesachancetobe
successful.#$e#Jasisverygoodatmathandreading.Vincentis
goodat...well,hehasanactiveimagination!",
theresult?
4.Onceyouaredoneeditingthedialoguetoyourhearts
content,simplysave,recompilethe.yamlfileusing
xnb_node.cmdasstatedintheGettingStartedsectionofthis
tutorial.
5.Replacethenew.xnbfileandloadupStardewValleytosee
thechanges!
==============================================
Dialogue.yamldocumentation.
Format:KeyValue:SpeechString,
KeyValue:Thishereisthevaluethatischeckedtoseeifthe
stringofdialoguefollowingwillberead.
SpeechString:ThisiswhattheNPCwillactuallysay
dependingontheKeyValue.
NotedKeyValues:<DaysoftheWeek>Mon,Tues,Wed,
Thurs,Fri,Sat,Sun.
<seasons>spring,summer,fall,winter
<events>event_<eventNameHere>//furtherresearchneeded
<numerical/heartvalues>2,4,6,8,10
Examples:
spring_Fri4Thiskeyvaluewilltriggerduringthespringtime,
onafriday,iftheNPCsaffectionvalueisatleastatavalueof
4.
MonThisdialoguewilltriggeronamonday.
Sat6DialoguewilltriggeronaSaturdayifaffectionlevelisat
least6.
NOTE:Unlessapieceofeventdialogueiscreated,adateseems
toalwaysbenecessaryasaKeyValuefortriggerstobeset.
Furthertestingwillbenecessary.
StringModifiers:
*********************************
Dialouge_Notes/DocumentationExtendedEditedon3/3/16
12:35A.M.TestedwithPenny'sDialogue.
#$e#//endasectionofdialogue,andallowsasectiontofollow
it.Ifno#$e#isstatedafterastringofdialogue,thecharacter
willnotsayanythingelsethatday.
$s//showsthesadcharacterportrait
$l//showstheblushing/loveportrait
$h//showsthehappyportrait
$b//showsthebashful/shyportrait.(Oratleastthat'swhatit
looksliketome.)
$a//showstheangryportrait
$010//showsthecharacterportraitatthecorresponding
locationonthesheet.Theorderissequentialwherethefirstrow
firstpictureis0,firstrowsecondpictureis1,secondrowfirst
pictureis2,etc.
$q//Asksaquestionfollowingthe$qsymbol.Seeexample
below.
$r//seemstobeaflagforthegametocheckthatthisisa
dialogueoptionafterthe$qisasked.Alsoseetheexample
below.
$p//nonoticeablechangethatIcoulddiscover
$u//nonoticeablechangethatIcoulddiscover
$d//checksifacertainconditionissetsuchas
bus/cc(communitycenter)/jojaaretrue/
|//seemstobeanoroperationthatchecksagamevariablethatis
checkedby$d.Thisisprobablycoupledwithevents.
@//statestheplayer'sname.
^//seemstoonlybeaccessiblewhenusedaspartofanevent's
dialogue.
%fork//onlyusedineventstostatethedialogueafteradecision
mustbemadeIbelieve.
cc#//seemstocheckifthecommunitycenterisbuilt/restored
bus#//seemstocheckifthebushasbeenputbackintooperation
Exampleshow$qand$rwork
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*sigh*...Mymotherdefinitelyhasaproblemwithgoingtothesaloontoo
much.$s#$q7/8Mon_old#Butit'sbestnottodwellonbadthings,right?#$r750
Mon_7#Right.It'sbesttobepositive!#$r810Mon_8#Ithinkit'sgoodtobe
realistic."#!String
*sigh*...Mymotherdefinitelyhasaproblemwithgoingtothesaloontoo
much.$s#$q//Thisisthedialoguethatcomesbeforethequestionbranch.
7/8Mon_old#Butit'sbestnottodwellonbadthings,right?#$r//thisisthepart
thatisthequestionstring
andinitiatesdialogueoptions
750Mon_7#Right.It'sbesttobepositive!#$r//option1.Callsthedialogue
associatedwithMon_7//Alsoseemstoaddabonusof50affectionpointswiththe
NPC.
810Mon_8#Ithinkit'sgoodtoberealistic."#!String//option2.Callsthedialogue
associatedwithMon_8.//Alsoseemstoaddabonusof10affectionpointswiththe
NPC/.
Mon_7:"That'showIfeel.I'mjustgoingtofocusonmakingthefuturebetter."
#!String//associateddialogueforanswer1
Mon_8:"Maybeyou'reright.It'sbettertocopewithreality.$u"#!String
//associateddialogueforanswer1
EndDialouge_Notes/DocumentationExtended
****************************************************
**************************************
Example
KeyValue:Hi,welcometothevalley!#String!//Thiswill
displayasingledialogueboxwiththesaidtext.
KeyValue:Heyhowisyourfarmgoing?#$e#Ifyouneed
anyhelpjustletmeknow.#!String
NOTE:Aftereverylineofdialogue#!Stringmustbeaddedso
thattheentire.yamlfilecanbeinterpretedbythegame
properly.
ENDDialogue.yamldocumentation.
==============================================
.IVWeapons
Alright,timetogetdowntobusiness.Youaregoingtoneedto
defendyourselfintheminesafterallandtheonlywaytodothat
istogetyouanewweapon.Letsbegin.
1.LocateStardewValley\Content\Data\weapons.xnb
2.Convertdesired.xnbfileusingthemethodsdescribedinthe
GettingStartedsectionofthisguide.
b. Makesurethatyouconvertthefiletoa.yamlfile
format.
i.
xnb_node.cmdextractweapons.xnbweapons.yaml
3.Nowopenupyourweaponsfilewithanysortoftexteditor
(suchasNotePad++).
Youaregoingtoseeabunchoftextinthecontentfield.An
exampleofwhatyouwouldseewouldbe.
"0":"RustySword/Arusty,dulloldsword./2/5/1/0/0/0/3/1/1/0/.02/3",
Thisistheformatofhowweaponsworkallvaluesare
list_id:Item_Name/Item_Description/min_damage/max_dam
age/knockback/speed/add_Precision/add_Defense/weapon_type/
added_area_of_effect/???/???/crit_chance/crit_multiplier
So,letseditsomevalues!
changing
"12":"WoodenBlade/Notbadforacraftedsword./3/7/1/0/0/0/3/1/1/0/.02/3",
to
"12":"SuperWoodenSword/Afantasticblade./10/17/1/0/0/0/0/3/1/0/.02/3",
4.Savethe.yamlfile
5.Recompileusingxna_node.cmd
6.replacetheoldweapons.xnbfilewiththenewweapons.xnb
file
Results?
Success!
==============================================
Weapons.yamlDocumentation
Format:
list_id:Item_Name/Item_Description/min_damage/max_dam
age/knockback/speed/add_Precision/add_Defense/weapon_type/
added_area_of_effect/???/???/crit_chance/crit_multiplier
Components:
list_idThisistheid_numberofthelistinweapons.yaml
Item_NameTheitemsingamename
Item_DescriptionTheitemsingamedescription
min_damageTheminimumdamagetheweapondeals
max_damageThemaximumdamagetheweapondeals
knockbackHowmuchyouknockbackafoe.
speedThespeedaddedtoswinging?Higher=faster?
add_PrecisionUnknowneffectasitstands.Needsmoretesting.
add_DefenseAdddefensewhileweaponequipped.
weapon_typeThetypeofweaponitis.Notsurewhatthis
does.
0.Stabbing/JabbingSword/Rapier
1. Daggers.
2. Clubs
3. SlashingSword
added_area_of_effect???
???Thisparameterwasnotknown/hasunknowneffects.
???Thisparameterwasnotknown/hasunknowneffects.
crit_chanceThisisthechancetocrit.Ex.0.2=20%chanceto
crit?//needsmoretesting
crit_multipliertheamountofdamagetheattackis
(multiplied/added)byiscriticalhitoccurs.
NOTE:Ihavetestedthateverygameobjecthasaunique
existenceintheworld.Anexamplewouldbebuyingabasic
swordandmoddingitssourcecodeintheweapons.yamlfile.
Thishasnoeffectontheweaponifitisintheinventorysince
inventoryitemsareboundtothecharacterdata.Insteadanynew
instancesoftheitemarecreatedasnewgameobjects.Theycan
beremovedviathetrashcanintheinventorythough.
anexamplewouldbetryingtomodtherustysworditem.We
cantchangethedataofitifitisalreadyinourinventory/chest,
butsaywehadtheopportunitytogetanewrustysword.Ifwe
moddedtherustyswordandtriedobtaininganewrustysword
wewouldreceivedourmodifiedswordinstead!
ENDWeapons.yamlDocumentation
==============================================
V.Crops
Alright,wevefinallycometothepointwhereyouneedsome
cash,andyouarewillingtogetdownanddirty.Inthatcaselets
learnhowcropswork!
1.LocateStardewValley\Content\Data\crops.xnb
2.Convertdesired.xnbfileusingthemethodsdescribedinthe
GettingStartedsectionofthisguide.
c. Makesurethatyouconvertthefiletoa.yamlfile
format.
i.
xnb_node.cmdextractcrops.xnbcrops.yaml
3.Nowopenupyourweaponsfilewithanysortoftexteditor
(suchasNotePad++).
4.Nowlookingcrops.yamlyoushouldseesomethinglikethis.
"475":"11121/spring/3/192/1/0/true128.2/false/false",
Lookslikeanabsolutemess,butdontworry,undercloser
inspectionwefindthattheformathereis.
Seed_indexNumber:Daystillnextphase(thisisrepeatedas
thevaluesare1,1,1,2,1)/Season(s)togrowin/index#insprite
sheet/index_of_harvest_object/regrow_days/harvest
method/additionalharvestvalues/minharvest/maxharvest/max
harvestincreaseperfarminglevel/chanceforextra
crops/raised_seeds/randomcolors
WOWthatwassomethingright?Thenumberofparameterscan
gettobequitelengthy,butfearnot,letstestsomestuffout.
changing
"475":"11121/spring/3/192/1/0/true128.2/false/false",
to
"475":"11121/spring/3/300/1/0/true128.2/false/false",
Nowtimetotest!
Itskindofhardtotellfromthedata,butitseemslikePotato
seedsaretheitemIeditedifIdidmycodingcorrectly.
Yup,Iguessedcorrectly.Guessthatfinishesupthecrops
sectionoftheguide.Nowwecaneditcropsintonsofways.
Maybewecouldevenmakeplantsthatgiveusoreasamod.
==============================================
Crops.yamlDocumentation
Seed_indexNumberThisistheseednumberthatthecrop
willmapto.Itseems475ispotatoseeds.
Daystillnextphase(thisisrepeatedasthevaluesare1,1,1,
2,1)Daysuntilthenextvisiblestageinthegrowthcycleis
shown.
Season(s)togrowinThisisthelistofseasonsthatthecrop
willsurvivein.Separateseasonnamestohaveitgrowin
multipleseasons.
index#inspritesheetthevisuallocationinthespritesheet.
ThankstoSgtPineapple1stfromSVforumsforcatchingthis.I
providedhispictureforreference!
index_of_harvest_objectthisisthegameobjectthatyouwill
receivewhenyourcropisreadytobeharvested.
regrow_daysa1valuemeansthecropcantregrow.Anything
highersuchasa3allowsforthecroptoregrow.
//Needstesting
toseeifnumericalvalueisassociatedwithdaystomaturityor
thestageitresetsto
harvestmethodhowyouharvestthecrop.0=hands/normal
1=withscythe
additionalharvestvaluesiftruemin_harvest,max_harvest,
maxharvestincreaseperfarminglevel,andchanceforextra
cropsarevalidvariablesforthecrop.Settofalsetoignore
theseparameters.
minharvesttheminimumnumberofitemstoreceivewhen
harvesting.Defaultis1ifadditional_harvest_values=false
maxharvestthemaximumnumberofitemstoreceivewhen
harvesting.Defaultis1ifadditional_harvest_values=false
maxharvestincreaseperfarminglevelthehigheryourfarming
levelthisisaffected.//
Needsmoretesting
chanceforextracropsthe%*100chanceofgettingmorecrops
fromtheharvest.
raised_seedsneedscropstandstogrow?
randomcolorstrue/false.Ifthisvalue=trueanysetof3values
afteritwillallowthegametomakeadifferentcolorvariationof
thecrop.Ex1232421851528599willaddtwosetsofrandom
colorsforthegametoshowforthecrop.<Redinfluence/Blue
influence/Greeninfluence>
ENDCrops.yamldocumentation
==============================================
.V.iAddingCrops
BigthankstoSgtPineapple1stfromtheSVforumsforfiguring
thisout!Hispostishere,incaseyouwerelookingforit,butjust
incaseIllpostitintheguideaswell.
http://community.playstarbound.com/threads/moddingguidefee
dbackhelpthread.107390/
Ok...areyouready?Herewego...
AddingCrops
AquicknotethattheRicecropIaddedsimplyoutputsthericethat'salreadyinthegame.Iwillbeworking
todayonaddingacustomriceforharvest,andeventuallytherewillbeamachinetoprocessthisintothe
cookingrice.Iwilladdimagesofmycodelatertodayaswell.I'mprettybadatexplainingstepsandstuffin
text...
1.
Thereare4xnbfilesthatyouwillneedtoextract.Undercontent\dataextractbothcrops.xnb
andobjectinformation.xnb.Nowgotocontent\tilesheetsandextractspringobjects.xnband
crops.xnb,butbesuretooutputitassomethingotherthancrops.yamlsothatyoudon'tgetit
confusedwiththecropdata.IsavedmineascropTile.yaml.
2. OntheCropsspritesheetyouwillneedtoaddyournewcrop.Eachcropgetsexactly128px
wideand32pxhigh.Thisareaisdividedinto8spacesforeachcropphase.Thenumberof
slotsyouusedependsonhowmanyphasesyourcropgrowsthrough.Whenyouopenthe
spritesheetadd32pxtothebottom.Thecropsarecountedlefttoright.Youcanbegin
addingyourcropsprites.
3. Onthesptingobjectsspritesheeteachobjectgetsa16x16area.Add16pxtotheheight.If
yourseedpacketcorrespondstoID792,youwillwanttomakethisspriteinleftmostcolumn.
YourharvestcropwillberightnexttoitwithanIDof793.
4.
5.
Nowyou'llneedtoopenupyourObjectInformation.yaml.Scrollyourselfallthewaytothe
bottom.NotehowtheIDsendat790.AddanewlineID'ed792(Edit:791correspondstothe
blackmissingtexturespritesoavoidit).I'dsuggestcopyingthetextfromanothercropseed
(formineIcopiedblackberry),andthenedititfromthere.
(Iwilleditthispostlatertoaddthe
codelayout)
Makesurethatthisitemisnotnamedafteryourcrop.Thisitemwillbeyour
Crop'sSeed.DONOTFORGETTOADD#!String.IFYOUDONOT,ITWILLNOTREPACK
objectinformation.xnb.Belowisthecodeformyrice.Toaddyourcrop'sharvestedoutput,
repeatthesestepsunderanewID(preferablytheverynextIDnumber)TheInfolayoutisas
follows:
6. Code:
7. ID#:"ItemName/SellPrice/ItemType(eachitemtype
hasacorrespondingnumber.Inoticedseedsareusually
74.Ifyouuseadifferentnumber,youwillbeunable
toplanttheseeds)/ItemDescription"#!String<andI
onceagainstress,IFYOUDONOTADDTHIS,ITWILLNOT
REPACKINTOANXNB!!!
8.
9.
Nowlet'smovetothecrop.yamlforthecropdata.Scrolltothebottomandaddyourcrop.
TheIDwillbethesameastheoneyouaddedinObjectInformation.yaml.Theindexnumber,
ifyoudidyourspritesheetcorrectly,willbe40(ifyouaddanothercrop,it'sindexwillbe41).
YouwillalsoneedtoaddtheIDoftheoutputcropforexamplemyricecropoutputIDisthe
IDforRice.Hereismy(terriblymadeplaceholder)ricecropphasesonthespritesheetwith
thecorrespondingcrops.yaml(notthecropTile.yaml)codeontheright
10. YouwillnotneedtotouchthecropTile.yaml.Nowrepackalltheyamlfilesandreplacethe
contentfiles.I'dhighlysuggestmakingbackupcopiesofthevanillaxnbfiles.
Ifyougetanyerrors,letmeknow.Iencounteredafewthatresultedfromcodingmistakes(likenotadding
#!String).
IDIDITREDDIT!I...DID...IT!ANDTHISISWHATYOU'LLSEEINGAME!HOLYMOTHERIAMSO
EXCITEDIDIDTHIS!(I'venevermoddedagamebeforeinmylife)
Edit:
IfIgetthechancetostreamlatertoday,IwillstreammymoddingendeavorsinStardewValley.Ifnot
today,thentomorrow.
Iwillbestreamingmymoddingendeavorsinafewhoursontwitchifanyonehas
questions,comments,orsuggestions.
SgtPineapple1stontwitch
.VIFishing
Manypeoplehavebeentalkingaboutthefishingminigameand
allofthedifficultyassociatedwiththat.Itstimetochangethat,
andyoucanedititanywayyoudesire.
Timetogetdowntosome
fishybusiness.
1.LocateStardewValley\Content\Data\Fish.xnb
2.Convertdesired.xnbfileusingthemethodsdescribedinthe
GettingStartedsectionofthisguide.
d. Makesurethatyouconvertthefiletoa.yamlfile
format.
i.
xnb_node.cmdextractfish.xnbfish.yaml
3.Nowopenupyourweaponsfilewithanysortoftexteditor
(suchasNotePad++).
Youaregoingtoseeabunchoftextinthecontentfield.An
exampleofwhatyouwouldseewouldbe.
"129":"Anchovy/30/dart/1/16/6002600/springfall/both/682.2/1/.25/.3/0",
Nowtheformatforthisdatahereis.
Key_Id:FishName/chancetodart/darting
randomness/dartingintensity/darting_duration/starttimeto
find/endtimetofind/season(s)tofindin/weathertofind
in/turn_frequency/turnSpeed/turnIntensity/minSpeed/maxSpeed.
/speedchangefrequency/bobberdifficulty
Letseditsomethings,shallwe?
Changing
"142":"Carp/15/mixed/15/50/6002600/springsummerfall/both/682.2/1/.45/.1/0",
"136":"LargemouthBass/50/mixed/11/30/6001900/springsummerfallwinter/both/685
.35/3/.4/.2/0",
"700":"Bullhead/46/smooth/12/30/6002600/springsummerfallwinter/both/681.25/2/.35/.2/0",
"702":"Chub/35/dart/12/24/6002600/springsummerfallwinter/both/684.35/1/.45/.1/0",
To
"142":"Carp/1/smooth/1/5/6002600/springsummerfall/both/682.1/1/.25/.1/0",
"136":"LargemouthBass/5/smooth/1/3/6001900/springsummerfallwinter/both/685
.20/1/.2/.1/0",
"702":"Chub/3/smooth/1/2/6002600/springsummerfallwinter/both/684.15/1/.25/.1/0",
"700":"Bullhead/4/smooth/1/3/6002600/springsummerfallwinter/both/681.15/1/.25/.1/0",
FromwhatIcantell,editingthefirstfourparametersafterthe
fishsnamemakesthefishingminigamemuchharderormuch
easier.Asanexample,Idividedallofthevaluesby10if
possible,andchangedthestyleofitsdartpatterntosmooth
incaseitdoesdart.Thismadeitwherethefishstayatthebottom
ofthemeterthemajorityofthetime.
*Notethatthesefishcanbefoundinthelakeinthemountainin
thespring.Iwillhostmyfish.xnbforthetimebeingsothatyou
canseetheeffectforitself.
Justinsertthefish.xnbIprovideinto
StardewValley/Content/Dataandoverwritetheoldfish.xnb.
!!!Makesuretobackupyourfish.xnb.
Fish.xnb:
https://drive.google.com/file/d/0Bz7ucDCzAILeTdmVDJJbG5r
VHM/view?usp=sharing
FullyEditedMod:EasyFishing(Makesallfisheasytocatch)
https://drive.google.com/folderview?id=0Bz7ucDCzAILX0pISj
lMRkdCTzQ&usp=sharing
Proofofconcept:
https://youtu.be/VmwG1zNzTi0
*Sorryabouttheawkwardvideoposition.Myvideosoftwareis
kindaglitchyandImlookingintosomedifferenttypesright
now.
==============================================
Fish.yamldocumentation.
Key_IdThisistheobjectid_numberofthefish.Itsbelieved
thatyoucantchangethisrightnowsinceitdirectlyreferences
thefishingobject.Howeverfurthertestingmightreveal
otherwise.
FishNameThisdidntactuallychangeanythingwhenIedited
it.Ibelievethiswasmoresoknowingwhatfishwasbeing
fishedcorrespondingtotheKey_Id
chancetodartThisisthechancethatthefishwilldart,aka
movequickly.Highernumbersmeanhigherchance.
dartingrandomnessTheseseemtobenamevaluesforhowthe
fishwilldart.Smoothseemstobenodartingwhatsoever,while
dartwillrapidlychange.SinkerandFloatseemtodartintheir
respectivedirectionandMixedseemstobemorerandom.
dartingintensityHowsharplythefishdarts.
darting_durationHowlongthefishdarts/sprints.Higher
values=moretimewhiledarting.
starttimetofind=Thisisathetimewhenyoucanstartfinding
thefish.600=6A.Mgametime.
endtimetofindTheendtimewherethefishstopsbeingfound
afterwords.2600is2A.M.thenextmorning.Orasexample
1400is2P.Mgametimesohavingthisvalueat1400meansthe
fishcantbefoundafter2P.M.
season(s)tofindin.Thedifferentseasonsthefishcanbefound
in.Multiplecanbeaddedsothatthefishcanbefoundin
multipleseasons.having/springsummerfallwinter/meansthat
thefishshouldbeabletobefoundyearround.
weathertofindinTheweatherthatthefishcanbecaughtin.
<sunny,rainy,both>areallpossiblevalues.Onlyoneofthem
though!
turn_frequencyHowoftenthefishgoestheotherdirection.
(Dontknowwhythisvalueissoohighthough)
turnSpeedHowfastthisfishchangesspeedwhen
turning/changingdirections.
turnIntensityHowsharplythefishturns.
minSpeedTheminimumamountofspeedthefishsspeed
changeswhenitsspeedchanges.
maxSpeedThemaximumamountofspeedthefishsspeed
changeswhenitsspeedchanges.
speedchangefrequencyHowfrequentthefishsspeedchanges.
bobberdifficultyHowrareitistofindthefish.Highervalues
heremeanthatitishardertofindthefish.(Inmyexperience
makingthisvalue100madeitimpossibletofindfish).
!NOTEchangingallofthesenumericvaluesto0causedthe
gametocrashformewhenItriedtofish.Itisrecommendedto
notchangethevaluesto0toavoidcrashing,butfeelfreeto
experimentaway!
!!Note#2Changingthefishnameheredidntchangethename
ofthefishitself.Iwilltestfurthertoseeifitispossibleto
changetheKey_IDvaluestofishdifferentitems.
EndFishingDocumentation
==============================================
.VIIMusic/SoundEditing
HugeshoutouttoDrogeanfromtheStardewValleyForumsfor
thisone.Ivealsoincludedsomeofthemodsthathemadeas
well.
AmbientMusicWithRainMod
Ihavecreatedamodtofixtheissuewhererainydayshadzeromusic.Therainwasactuallythemusic
track.Icreatedamoddedfilethataddsmusicaraintrack(rainymood).Italsoloopssoyouhearitallday.
AudioPreview
VanillaRain
ModdedRain
Installation
1.Makeacopyof\StardewValley\Content\XACT\WaveBank.xwbasabackup.
2.Extracttothesamefolder.
3.Play
DownloadHere
SOUND\MUSICMODDINGGUIDE
Alsohere'saquickanddirtyguidetosound/musicmodding,itssimilarto
terraria
.Ihavecreatedatoolspack
foreasyinstall.
Downloadmysoundextractingtoolspackhere
DownloadDirectXsoftwareKitandONLYinstalltheUtilitiesportiontogetXACT
1.ExtractWaveBankExtractPack.zipsomewhere.
2.CopyStardewValley\Content\XACT\WaveBank.xwbtothefolderyouextractedthefilesto.
3.Run"ExtractWaveBank.bat"anditshouldextractallthefilestothe"NEW"folder,whileautomatically
encodingthemtoafileformatXACTcanuse.
4.Atthispoint,youcanchangeanyofthe.wavfilesusingaudacityorimportingyourownandconvertingto
16bitwavfileaudio.Youcanexperimentwiththebitrateandothersettings.
5.Onceyourfilesarereplaced/modified,itstimetocompile.WithXACTalreadyinstalled,open
NEW\NEW.xapanditshouldalreadyopentheprojectreadytogo.
6.AllyouneedtodotocompileisgotoFile>Build.ThecompiledsoundpackagewillbeinthetheNew\Win
folder,named"Wavebank.xwb"
6.CopyitbacktotheStardewValley\Content\XACT(makingsuretobackupyouroldcopyfirst)andstart
thegame.Ifthemainmenumusicsoundsright,everythingshouldbeworking
.VIIFruitTrees
Alright,itstimetoexpandonthenumberofthingsthatyoucan
growonyourfarm.Timetointroducefruittreemodding,sothat
yourtreescangiveyouamultitudeofdifferentthings.Sounds
peachyyea?(sorryforthatawfuljoke.)
Letsbegin.
1.LocateStardewValley\Content\Data\fruitTrees.xnb
2.Convertdesired.xnbfileusingthemethodsdescribedinthe
GettingStartedsectionofthisguide.
e. Makesurethatyouconvertthefiletoa.yamlfile
format.
i.
xnb_node.cmdextractfruitTrees.xnbfruitTrees.yaml
3.Nowopenupyourweaponsfilewithanysortoftexteditor
(suchasNotePad++).
Youaregoingtoseeabunchoftextinthecontentfield.An
exampleofwhatyouwouldseewouldbe.
628:"0/spring/638/1700"
Nowtheformatforthisis
Item_ID:Fruit_tree_list_index/season_to_harvest_fruit/object_id_to_get/???
Letsdosometesting.
Changing
628:"0/spring/638/1700"#!String
629:"1/spring/634/1000"#!String
630:"2/summer/635/2000"#!String
631:"3/summer/636/3000"#!String
632:"4/fall/637/3000"#!String
633:"5/fall/613/2000"#!String
To
628:"0/spring/398/1700"#!String
629:"1/spring/398/1000"#!String
630:"2/summer/398/2000"#!String
631:"3/summer/398/3000"#!String
632:"4/fall/398/3000"#!String
633:"5/fall/398/2000"#!String
//thisshouldgivemeagrapeifIdothisright.
Nowletstestitout.
SUCCESS!Inowhaveatreethatwillgrowmegrapes!
Lookslikeusingthismethod,youcouldhavetreesthatgiveyou
virtuallyanythinginthegame!Prettycoolifyouaskme.
==============================================
fruitTreeDocumentation
Item_IDThisisthegame_objectidforthesaplingthatyouare
tryingtoplant.Thiscanbefoundin
Content/Data/ObjectInformation.xnb
Fruit_tree_list_indexThisisalistofallthepossiblefruittrees.
Eachfruittreehasauniquelistnumber.
season_to_harvest_fruitTheseasonthatthefruitcanbe
harvestedin.
object_id_to_getThegame_object_IDthatwillbeharvested
offofthefruittree.Game_object_IDscanbefoundin
Content/Data/ObjectInformation.xnb
???somevariablethatIcouldntfigureoutforthetimebeing.
//Moretestingneeded.
EndfruitTreeDocumentation
==============================================
I.VIVBundles
(Becausesomethingsneedtogotogether.)
Alright,youveallprobablyseenthembynow(andifyou
haventgoplaysomemore).Bundlesarethetopictoday,since
theyareprettymuchthewaytoprogressinthegame,unlessyou
sidewithJoja.
Letsbegin.
1.LocateStardewValley\Content\Data\Bundles.xnb
2.Convertdesired.xnbfileusingthemethodsdescribedinthe
GettingStartedsectionofthisguide.
f. Makesurethatyouconvertthefiletoa.yamlfile
format.
i.
xnb_node.cmdextractBundles.xnbBundles.yaml
3.Nowopenupyourweaponsfilewithanysortoftexteditor
(suchasNotePad++).
Youaregoingtoseeabunchoftextinthecontentfield.An
exampleofwhatyouwouldseewouldbe.
CraftsRoom/13:"SpringForaging/O49530/1610181020102210/0"#!String
Seemstobeabunchofnumbernonsense,butletsbreakit
downtowhatitactuallymeans.
Format:
Bundle_ID+Location:"Bundle_Name/String(BO/O/R)
/Rewardslist(Reward_ID/amount)
/BundleComponents(Object_ID/amount_needed/Component
Filled?)/Areatobundleto)"
Ifyouwanttofigurewhatsomeofthatstuffmeans,Irecomend
readinguponthedocumentationthatwillbedirectlybelowthis
section.
Letsstarttesting.
Changing
CraftsRoom/14:"SummerForaging/O49630/396103981040210/3"#!String
To
CraftsRoom/14:"SummerForaging/O11330/45610023323086170/3"#!String
Letsseetheresult!
Success!
Nowwecanmakebundlestakeanythingasareward.Thiscould
bemadeintoamodthatmakesbundleseithereasierorharderto
completeincaseyouwantedtoelongatethegameplay.
AsanaddedbonusIspentanadditionalminutemakingthislist
longerjusttomakesureitwasapossibility.Theresultfromthis
lineofinformation:
CraftsRoom/14:"SummerForaging/O11330/4561002332308617099670
34033032190/3"#!String
Yup,itsconfirmedfolks.Youcanadd/subtracttheitems
necessarytocompleteabundle.Goatit.
==============================================
BundlesDocumentation
Bundle_ID=LocationBasicallytheroomwhereyoufindthe
bundle.andthenumericalvalueofit.
BundleNameThenameofthebundlethatisshownwhen
lookingatthebundlescreen.Notethatthisstringdoesnot
includethewordBundleasthatisaddedinautomatically.
SomeString(BO/O/R)Nottoosurewhatthisdoesatthe
momentoftypingthis.Possiblyiswhatunlocksdifferentthings.
RewardsListThegoodiesyougetfromcompletingabundle.
Rewards_IDTheobjectassociatedwiththeIDnumberin
ObjectInformation.xnb.
AmountHowmanyoftherewardyouget.I.E.20will
giveyou20itemsasthatreward.
BundleComponentsThelistofitemsneededtocompletea
bundle.Thisalwayscomesinpairsof3foreachindividual
object,andthiscanbemadelonger/shorterbyadding/deleting
groupsof3numbers.
Object_IDTheobjectassociatedwiththeIDnumberin
ObjectInformation.xnb.
AmountHowmanyitemsofObject_IDareneededto
completethebundle
Componentfilled?Alwaysseemstobea0valueinthe
file.Probablysetstheinitialstateofthebundle.
AreatobundletoThisseemstobethelocationthebundlehas
tobeplaced.Not100%sure./
/Needsmoretesting
0=pantry
1=CraftsRoom
2=FishTank
3=BoilerRoom
4=Vault
5=BulletinBoard
EndBundleDocumentation.
==============================================