floogen / solidfoundations Goto Github PK
View Code? Open in Web Editor NEWStardew Valley framework which allows for custom buildings with lots of extra features.
License: GNU General Public License v3.0
Stardew Valley framework which allows for custom buildings with lots of extra features.
License: GNU General Public License v3.0
This is what should be drawn in the carpenter menu for the default greenhouse texture with a SourceRect of "0 160 112 160". (Ignore the little icon on the upper right, that's something else)
This is what is currently being drawn in the carpenter menu
Is it possible to draw the border over the image or imitate vanilla behavior?
When I use a custom Indoor Type like Dimensional Pockets and build a shed, the game physics inside it don't work. I can't use tools or place things inside.
Is possible to add a option for load a vanilla asset istead of a building.png, based on a building ID? Since the buildingManager class is internal, other SMAPI mods can use it to change directly?
Feature Request(If it's not too much to ask):
This would allow mod authors to limit the amount of times a specific building can be built on the farm.
Would be nice to have the AutoFeed
map property backported, so custom barn/coop-type buildings can use it.
the buildings and its contents vanish when sleeping in a chain of more than 3 days without entering the farm map. I used the hibernate mod to achieve this effect.
I've created the building.png and interior map using tiled, and I've used the example pack (based on the AlternativeTent) to successfully add it to Robin.
I ordered the upgrade, but on going to sleep the night before it's due to finish the build, the game freezes and loops this error in the console.
I've attached my manifest.json and building.json for reference. Is this me missing something or have I found a bug?
[14:20:57 ERROR game] An error occurred in the base update loop: System.Exception: Error on new day:
---------------
Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at StardewValley.GameLocation.spawnObjects() in stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 13211
at StardewValley.GameLocation.DayUpdate(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 4371
at StardewValley.Buildings.Building.dayUpdate(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\Buildings\Building.cs:line 820
at StardewValley.Locations.BuildableGameLocation.DayUpdate(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\Locations\BuildableGameLocation.cs:line 32
at StardewValley.Farm.DayUpdate(Int32 dayOfMonth) in stardewvalley\Farmer\Farmer\Locations\Farm.cs:line 301
at StardewValley.Game1._newDayAfterFade()+MoveNext() in stardewvalley\Farmer\Farmer\Game1.cs:line 9694
at StardewValley.Game1.<>c.<newDayAfterFade>b__716_2() in stardewvalley\Farmer\Farmer\Game1.cs:line 8714
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
---------------
at StardewValley.Game1._update(GameTime gameTime) in stardewvalley\Farmer\Farmer\Game1.cs:line 4154
at StardewValley.Game1.Update(GameTime gameTime) in stardewvalley\Farmer\Farmer\Game1.cs:line 3974
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 1080
manifest.json
{
"Name": "[SF] Deluxe Shed",
"Author": "marvnrawley",
"Version": "1.0",
"Description": "Order a Deluxe Shed from Robin with even more space.",
"UniqueID": "marvnrawley.SolidFoundations.DeluxeShed",
"UpdateKeys": [],
"Dependencies": [],
"ContentPackFor": {
"UniqueID": "PeacefulEnd.SolidFoundations",
"MinimumVersion": "1.12.0"
}
}
building.json
{
"Name": "Deluxe Shed",
"Description": "Add an extra floor to your Shed.",
"DrawShadow": false,
"Size": {
"X": 7,
"Y": 3
},
"IndoorMap": "Deluxe_Shed",
"IndoorMapType": "StardewValley.Shed",
"HumanDoor": {
"X": 4,
"Y": 1
},
"BuildCost": 50000,
"BuildMaterials": [
{
"ItemID": 709,
"Amount": 75
},
{
"ItemID": 388,
"Amount": 300
},
{
"ItemID": 390,
"Amount": 200
}
],
"BuildDays": 2,
"BuildingToUpgrade": "Big Shed"
}
Could mimic Alternative Texture's menu. Would need to figure out how to display costs / description.
I've created a small personal (for now) mod that adds a building with a production that I want to take more than a single in game day (think of it like a "keg" building). The building appears and accepts inputs and produces the proper output, however no matter what value (greater than 1 day of time) I use for MinutesPerConversion
it always seems to provide output the next morning.
I've used values of over 4000 (which should be far more than a single day's worth of minutes) and still get output the next morning.
The SMAPI logs show the building loading (as it should - since it does work otherwise) but there are no other errors or output that appear related.
There is nothing explicitly documented that says that productions can't take more than a single day so I assume this is unintended behavior - if it is intended than perhaps an adjustment to note that in the documentation would be helpful.
Would prevent buildings from being placed on certain tiles based on given list.
Would allow for refilling / fishing / water effect.
Add ability to change water color similar to fish pond.
I've made a custom Indoor Type inheriting from GameLocation (I've tried inheriting from BuildableGameLocation and others), and the issue is that when I place furniture in the indoors, after saving and loading, the furniture is gone from the inside.
I've ran the GenericBuilding.load() method in debugging and before it call gameLocation.furniture.Set(...), both collections have the right furniture, but as soon as Set is called the collections are emptied.
Here's the code in SolidFoundations where this happens. I haven't added any overridden funcationality to my custom location type. This could still be something I've done wrong though. Both gameLocation
and this.indoors.Value
are of the type I've set.
GenericBuilding.cs, Line 1333
if (this.indoors.Value != null)
{
// gameLocation and this.indoors.Value refer to the same GameLocation instance
gameLocation.furniture.Set(this.indoors.Value.furniture); // HERE
foreach (Furniture item in gameLocation.furniture)
{
item.updateDrawPosition();
}
}
Edit: After more debugging, I've found that the NetCollection.Set() method Clears itself before it adds the "other" collection from the parameter, but gameLocation and this.indoors.Value refer to the same GameLocation. This doesn't happen when my building.json doesn't have "IndoorMapType" and the indoors is just a plain GameLocation.
I believe this roots to this.nonInstancedIndoors
never being set properly because of GenericBuilding.cs, Line 1279:
GameLocation locationFromName = Game1.getLocationFromName(this.Model.NonInstancedIndoorLocation);
getLocationFromName() uses the unique ID of building indoors, but we're passing in the Model's NonInstancedIndoorLocation, which is set from the building.json file which has no way of knowing the GUID.
My building.json file:
{
"Name": "Cafe Building",
"Description": "Cafe",
"Size": {
"X": 3,
"Y": 2
},
"IndoorMap": "CafeMap",
"IndoorMapType": "FarmCafe.Locations.CafeLocation",
"IndoorMapTypeAssembly": "FarmCafe",
"BuildCost": 300,
"BuildDays": 0,
"HumanDoor": {
"X": 1,
"Y": 1
},
}
My CafeLocation derived class is empty, just deriving from GameLocation. The reason I want to do this in the first place is because I want to override the cleanupBeforeSave() method in my interior location, so I can remove some stuff that can't be serialized.
Use the following format as a basis:
"Name": "Example building",
...
"Lights": [
{
"Tile": {
"X": 3,
"Y": 3
},
"TileOffsetInPixels": {
"X": 3,
"Y": 3
},
"TextureID": 4
"Radius": 1.0,
"Color": [ 255, 255, 255, 255 ]
}
]
Refer to Fashion Sense's Light property for vanilla light textures.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.