Changed File Tree Structure. Started new modding approach.

This commit is contained in:
janavarro95 2016-07-08 23:39:44 -07:00
parent cd0691cdf8
commit 2014b88fef
172 changed files with 77450 additions and 54113 deletions

View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 14 for Windows Desktop
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fall28 Snow Day", "Fall28 Snow Day\Fall28 Snow Day.csproj", "{F173EF74-887F-41F4-B3DC-A66A44E80213}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F173EF74-887F-41F4-B3DC-A66A44E80213}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F173EF74-887F-41F4-B3DC-A66A44E80213}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F173EF74-887F-41F4-B3DC-A66A44E80213}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F173EF74-887F-41F4-B3DC-A66A44E80213}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewValley;
namespace Fall28_Snow_Day
{
public class Class1:Mod
{
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += TimeEvents_DayOfMonthChanged;
}
public void TimeEvents_DayOfMonthChanged(object sender, StardewModdingAPI.Events.EventArgsIntChanged e)
{
if (StardewValley.Game1.dayOfMonth == 27 && Game1.IsFall == true)
{
Log.Success("Weather checker now!!!");
Game1.weatherForTomorrow = Game1.weather_snow;
}
}
}
}

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F173EF74-887F-41F4-B3DC-A66A44E80213}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Fall28_Snow_Day</RootNamespace>
<AssemblyName>Fall28 Snow Day</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Stardew Valley">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe</HintPath>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Fall28 Snow Day")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Fall28 Snow Day")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f173ef74-887f-41f4-b3dc-a66a44e80213")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,252 +1,252 @@
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>
<member name="T:Microsoft.Xna.Framework.Input.Touch.GestureSample">
<summary>A representation of data from a multitouch gesture over a span of time.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Delta">
<summary>Holds delta information about the first touchpoint in a multitouch gesture.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Delta2">
<summary>Holds delta information about the second touchpoint in a multitouch gesture.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.GestureType">
<summary>The type of gesture in a multitouch gesture sample.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Position">
<summary>Holds the current position of the first touchpoint in this gesture sample.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Position2">
<summary>Holds the current position of the the second touchpoint in this gesture sample.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Timestamp">
<summary>Holds the starting time for this touch gesture sample.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.GestureType">
<summary>Contains values that represent different multitouch gestures that can be detected by TouchPanel.ReadGesture. Reference page contains links to related code samples.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.DoubleTap">
<summary>The user tapped the screen twice in quick succession. This always is preceded by a Tap gesture. If the time between taps is too great to be considered a DoubleTap, two Tap gestures will be generated instead.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.DragComplete">
<summary>A drag gesture (VerticalDrag, HorizontalDrag, or FreeDrag) was completed. This signals only completion. No position or delta data is valid for this sample.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Flick">
<summary>The user performed a touch combined with a quick swipe of the screen. Flicks are positionless. The velocity of the flick can be retrieved by reading the Delta member of GestureSample.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.FreeDrag">
<summary>The user touched the screen, and then performed a free-form drag gesture.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Hold">
<summary>The user touched a single point on the screen for approximately one second. This is a single event, and not continuously generated while the user is holding the touchpoint.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.HorizontalDrag">
<summary>The user touched the screen, and then performed a horizontal (left to right or right to left) gesture.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.None">
<summary>Represents no gestures.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Pinch">
<summary>The user touched two points on the screen, and then converged or diverged them. Pinch behaves like a two-finger drag. When this gesture is enabled, it takes precedence over drag gestures while two fingers are down.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.PinchComplete">
<summary>A pinch operation was completed. This signals only completion. No position or delta data is valid for this sample.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Tap">
<summary>The user briefly touched a single point on the screen.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.VerticalDrag">
<summary>The user touched the screen, and then performed a vertical (top to bottom or bottom to top) gesture.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchCollection">
<summary>Provides methods and properties for accessing state information for the touch screen of a touch-enabled device. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.#ctor(Microsoft.Xna.Framework.Input.Touch.TouchLocation[])">
<summary>Initializes a new instance of the TouchCollection structure with a set of touch locations. Reference page contains links to related code samples.</summary>
<param name="touches">Array of touch locations.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Add(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Adds a TouchLocation to the collection.</summary>
<param name="item">TouchLocation to add.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Clear">
<summary>Removes all TouchLocation objects from the collection.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Contains(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Checks if the current touch collection contains the specified touch location.</summary>
<param name="item">Touch location to be checked against the current collection.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.CopyTo(Microsoft.Xna.Framework.Input.Touch.TouchLocation[],System.Int32)">
<summary>Copies the touch location to the collection at the specified index.</summary>
<param name="array">Array receiving the copied touch location.</param>
<param name="arrayIndex">Target index of the collection.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Count">
<summary>Gets the current number of touch locations for the touch screen.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.FindById(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocation@)">
<summary>Retrieves the touch location matching the specified ID.</summary>
<param name="id">ID of touch location sought.</param>
<param name="touchLocation">[OutAttribute] Touch location item matching the specified ID.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.GetEnumerator">
<summary>Returns an enumerator that iterates through the TouchCollection.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.IndexOf(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines the index of a TouchLocation in the TouchCollection.</summary>
<param name="item">TouchLocation to locate in the collection.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Insert(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Inserts a new TouchLocation into the TouchCollection at a specified index.</summary>
<param name="index">Index in the touch collection for the new item.</param>
<param name="item">TouchLocation to be inserted.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.IsConnected">
<summary>Indicates if the touch screen is available for use.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.IsReadOnly">
<summary>Determines if the touch location array is read-only.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Item(System.Int32)">
<summary>Gets or sets the information of the specified touch location.</summary>
<param name="index">Index of the touch location to return.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Remove(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Removes the specified TouchLocation from the TouchCollection.</summary>
<param name="item">TouchLocation to be removed.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.RemoveAt(System.Int32)">
<summary>Removes a TouchLocation at the specified index in the TouchCollection.</summary>
<param name="index">Index of the TouchLocation to remove.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.System#Collections#IEnumerable#GetEnumerator">
<summary>Returns an enumerator that iterates through the TouchCollection.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator">
<summary>Provides the ability to iterate through the touch locations in a TouchCollection.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.Current">
<summary>Gets the current element in the TouchCollection.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.MoveNext">
<summary>Advances the enumerator to the next element of the TouchCollection.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.System#Collections#IEnumerator#Current">
<summary>Gets the current element in the TouchCollection as an object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.System#Collections#IEnumerator#Reset">
<summary>Sets the enumerator to its initial position, which is before the first element in the TouchCollection.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchLocation">
<summary>Provides methods and properties for interacting with a touch location on a touch screen device. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.#ctor(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocationState,Microsoft.Xna.Framework.Vector2)">
<summary>Initializes a new TouchLocation with an ID, state, position, and pressure.</summary>
<param name="id">ID of the new touch location.</param>
<param name="state">State of the new touch location.</param>
<param name="position">Position, in screen coordinates, of the new touch location.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.#ctor(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocationState,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Input.Touch.TouchLocationState,Microsoft.Xna.Framework.Vector2)">
<summary>Initializes a new TouchLocation with an ID, and a set of both current and previous state, position, and pressure values.</summary>
<param name="id">ID of the new touch location.</param>
<param name="state">State of the new touch location.</param>
<param name="position">Position, in screen coordinates, of the new touch location.</param>
<param name="previousState">Previous state for the new touch location.</param>
<param name="previousPosition">Previous position for the new touch location.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Equals(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines whether the current TouchLocation is equal to the specified TouchLocation.</summary>
<param name="other">The TouchLocation to compare with this instance.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Equals(System.Object)">
<summary>Determines whether the current TouchLocation is equal to the specified object.</summary>
<param name="obj">The Object to compare with the touch location.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.GetHashCode">
<summary>Gets the hash code for this TouchLocation.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Id">
<summary>Gets the ID of the touch location.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.op_Equality(Microsoft.Xna.Framework.Input.Touch.TouchLocation,Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines whether two TouchLocation instances are equal.</summary>
<param name="value1">The TouchLocation to compare with the second.</param>
<param name="value2">The TouchLocation to compare with the first.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.op_Inequality(Microsoft.Xna.Framework.Input.Touch.TouchLocation,Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines whether two TouchLocation instances are unequal.</summary>
<param name="value1">The TouchLocation to compare with the second.</param>
<param name="value2">The TouchLocation to compare with the first.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Position">
<summary>Gets the position of the touch location.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchLocation.State">
<summary>Gets the state of the touch location.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.ToString">
<summary>Gets a string representation of the TouchLocation.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.TryGetPreviousLocation(Microsoft.Xna.Framework.Input.Touch.TouchLocation@)">
<summary>Attempts to get the previous location of this touch location object.</summary>
<param name="previousLocation">[OutAttribute] Previous location data, as a TouchLocation.</param>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchLocationState">
<summary>Defines the possible states of a touch location. Reference page contains links to related code samples.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Invalid">
<summary>This touch location position is invalid. Typically, you will encounter this state when a new touch location attempts to get the previous state of itself.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Moved">
<summary>This touch location position was updated or pressed at the same position.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Pressed">
<summary>This touch location position is new.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Released">
<summary>This touch location position was released.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchPanel">
<summary>Provides methods for retrieving touch panel device information. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayHeight">
<summary>Gets or sets the display height of the touch panel.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayOrientation">
<summary>Gets or sets the display orientation of the touch panel.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayWidth">
<summary>Gets or sets the display width of the touch panel.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnabledGestures">
<summary>Gets or sets the gestures that are enabled for the touch panel. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetCapabilities">
<summary>Gets the touch panel capabilities for an available device. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetState">
<summary>Gets the current state of the touch panel. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.IsGestureAvailable">
<summary>Used to determine if a touch gesture is available. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchPanel.ReadGesture">
<summary>Reads an available gesture on the touch panel. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.WindowHandle">
<summary>The window handle of the touch panel.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchPanelCapabilities">
<summary>Provides access to information about the capabilities of the touch input device. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanelCapabilities.IsConnected">
<summary>Indicates if the touch panel device is available for use.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanelCapabilities.MaximumTouchCount">
<summary>Gets the maximum number of touch locations that can be tracked by the touch pad device.</summary>
</member>
</members>
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>
<member name="T:Microsoft.Xna.Framework.Input.Touch.GestureSample">
<summary>A representation of data from a multitouch gesture over a span of time.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Delta">
<summary>Holds delta information about the first touchpoint in a multitouch gesture.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Delta2">
<summary>Holds delta information about the second touchpoint in a multitouch gesture.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.GestureType">
<summary>The type of gesture in a multitouch gesture sample.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Position">
<summary>Holds the current position of the first touchpoint in this gesture sample.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Position2">
<summary>Holds the current position of the the second touchpoint in this gesture sample.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.GestureSample.Timestamp">
<summary>Holds the starting time for this touch gesture sample.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.GestureType">
<summary>Contains values that represent different multitouch gestures that can be detected by TouchPanel.ReadGesture. Reference page contains links to related code samples.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.DoubleTap">
<summary>The user tapped the screen twice in quick succession. This always is preceded by a Tap gesture. If the time between taps is too great to be considered a DoubleTap, two Tap gestures will be generated instead.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.DragComplete">
<summary>A drag gesture (VerticalDrag, HorizontalDrag, or FreeDrag) was completed. This signals only completion. No position or delta data is valid for this sample.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Flick">
<summary>The user performed a touch combined with a quick swipe of the screen. Flicks are positionless. The velocity of the flick can be retrieved by reading the Delta member of GestureSample.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.FreeDrag">
<summary>The user touched the screen, and then performed a free-form drag gesture.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Hold">
<summary>The user touched a single point on the screen for approximately one second. This is a single event, and not continuously generated while the user is holding the touchpoint.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.HorizontalDrag">
<summary>The user touched the screen, and then performed a horizontal (left to right or right to left) gesture.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.None">
<summary>Represents no gestures.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Pinch">
<summary>The user touched two points on the screen, and then converged or diverged them. Pinch behaves like a two-finger drag. When this gesture is enabled, it takes precedence over drag gestures while two fingers are down.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.PinchComplete">
<summary>A pinch operation was completed. This signals only completion. No position or delta data is valid for this sample.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.Tap">
<summary>The user briefly touched a single point on the screen.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.GestureType.VerticalDrag">
<summary>The user touched the screen, and then performed a vertical (top to bottom or bottom to top) gesture.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchCollection">
<summary>Provides methods and properties for accessing state information for the touch screen of a touch-enabled device. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.#ctor(Microsoft.Xna.Framework.Input.Touch.TouchLocation[])">
<summary>Initializes a new instance of the TouchCollection structure with a set of touch locations. Reference page contains links to related code samples.</summary>
<param name="touches">Array of touch locations.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Add(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Adds a TouchLocation to the collection.</summary>
<param name="item">TouchLocation to add.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Clear">
<summary>Removes all TouchLocation objects from the collection.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Contains(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Checks if the current touch collection contains the specified touch location.</summary>
<param name="item">Touch location to be checked against the current collection.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.CopyTo(Microsoft.Xna.Framework.Input.Touch.TouchLocation[],System.Int32)">
<summary>Copies the touch location to the collection at the specified index.</summary>
<param name="array">Array receiving the copied touch location.</param>
<param name="arrayIndex">Target index of the collection.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Count">
<summary>Gets the current number of touch locations for the touch screen.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.FindById(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocation@)">
<summary>Retrieves the touch location matching the specified ID.</summary>
<param name="id">ID of touch location sought.</param>
<param name="touchLocation">[OutAttribute] Touch location item matching the specified ID.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.GetEnumerator">
<summary>Returns an enumerator that iterates through the TouchCollection.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.IndexOf(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines the index of a TouchLocation in the TouchCollection.</summary>
<param name="item">TouchLocation to locate in the collection.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Insert(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Inserts a new TouchLocation into the TouchCollection at a specified index.</summary>
<param name="index">Index in the touch collection for the new item.</param>
<param name="item">TouchLocation to be inserted.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.IsConnected">
<summary>Indicates if the touch screen is available for use.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.IsReadOnly">
<summary>Determines if the touch location array is read-only.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Item(System.Int32)">
<summary>Gets or sets the information of the specified touch location.</summary>
<param name="index">Index of the touch location to return.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Remove(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Removes the specified TouchLocation from the TouchCollection.</summary>
<param name="item">TouchLocation to be removed.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.RemoveAt(System.Int32)">
<summary>Removes a TouchLocation at the specified index in the TouchCollection.</summary>
<param name="index">Index of the TouchLocation to remove.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.System#Collections#IEnumerable#GetEnumerator">
<summary>Returns an enumerator that iterates through the TouchCollection.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator">
<summary>Provides the ability to iterate through the touch locations in a TouchCollection.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.Current">
<summary>Gets the current element in the TouchCollection.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.MoveNext">
<summary>Advances the enumerator to the next element of the TouchCollection.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.System#Collections#IEnumerator#Current">
<summary>Gets the current element in the TouchCollection as an object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchCollection.Enumerator.System#Collections#IEnumerator#Reset">
<summary>Sets the enumerator to its initial position, which is before the first element in the TouchCollection.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchLocation">
<summary>Provides methods and properties for interacting with a touch location on a touch screen device. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.#ctor(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocationState,Microsoft.Xna.Framework.Vector2)">
<summary>Initializes a new TouchLocation with an ID, state, position, and pressure.</summary>
<param name="id">ID of the new touch location.</param>
<param name="state">State of the new touch location.</param>
<param name="position">Position, in screen coordinates, of the new touch location.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.#ctor(System.Int32,Microsoft.Xna.Framework.Input.Touch.TouchLocationState,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Input.Touch.TouchLocationState,Microsoft.Xna.Framework.Vector2)">
<summary>Initializes a new TouchLocation with an ID, and a set of both current and previous state, position, and pressure values.</summary>
<param name="id">ID of the new touch location.</param>
<param name="state">State of the new touch location.</param>
<param name="position">Position, in screen coordinates, of the new touch location.</param>
<param name="previousState">Previous state for the new touch location.</param>
<param name="previousPosition">Previous position for the new touch location.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Equals(Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines whether the current TouchLocation is equal to the specified TouchLocation.</summary>
<param name="other">The TouchLocation to compare with this instance.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Equals(System.Object)">
<summary>Determines whether the current TouchLocation is equal to the specified object.</summary>
<param name="obj">The Object to compare with the touch location.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.GetHashCode">
<summary>Gets the hash code for this TouchLocation.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Id">
<summary>Gets the ID of the touch location.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.op_Equality(Microsoft.Xna.Framework.Input.Touch.TouchLocation,Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines whether two TouchLocation instances are equal.</summary>
<param name="value1">The TouchLocation to compare with the second.</param>
<param name="value2">The TouchLocation to compare with the first.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.op_Inequality(Microsoft.Xna.Framework.Input.Touch.TouchLocation,Microsoft.Xna.Framework.Input.Touch.TouchLocation)">
<summary>Determines whether two TouchLocation instances are unequal.</summary>
<param name="value1">The TouchLocation to compare with the second.</param>
<param name="value2">The TouchLocation to compare with the first.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchLocation.Position">
<summary>Gets the position of the touch location.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchLocation.State">
<summary>Gets the state of the touch location.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.ToString">
<summary>Gets a string representation of the TouchLocation.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchLocation.TryGetPreviousLocation(Microsoft.Xna.Framework.Input.Touch.TouchLocation@)">
<summary>Attempts to get the previous location of this touch location object.</summary>
<param name="previousLocation">[OutAttribute] Previous location data, as a TouchLocation.</param>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchLocationState">
<summary>Defines the possible states of a touch location. Reference page contains links to related code samples.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Invalid">
<summary>This touch location position is invalid. Typically, you will encounter this state when a new touch location attempts to get the previous state of itself.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Moved">
<summary>This touch location position was updated or pressed at the same position.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Pressed">
<summary>This touch location position is new.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Input.Touch.TouchLocationState.Released">
<summary>This touch location position was released.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchPanel">
<summary>Provides methods for retrieving touch panel device information. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayHeight">
<summary>Gets or sets the display height of the touch panel.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayOrientation">
<summary>Gets or sets the display orientation of the touch panel.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.DisplayWidth">
<summary>Gets or sets the display width of the touch panel.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.EnabledGestures">
<summary>Gets or sets the gestures that are enabled for the touch panel. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetCapabilities">
<summary>Gets the touch panel capabilities for an available device. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchPanel.GetState">
<summary>Gets the current state of the touch panel. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.IsGestureAvailable">
<summary>Used to determine if a touch gesture is available. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Input.Touch.TouchPanel.ReadGesture">
<summary>Reads an available gesture on the touch panel. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanel.WindowHandle">
<summary>The window handle of the touch panel.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Input.Touch.TouchPanelCapabilities">
<summary>Provides access to information about the capabilities of the touch input device. Reference page contains links to related code samples.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanelCapabilities.IsConnected">
<summary>Indicates if the touch panel device is available for use.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Input.Touch.TouchPanelCapabilities.MaximumTouchCount">
<summary>Gets the maximum number of touch locations that can be tracked by the touch pad device.</summary>
</member>
</members>
</doc>

View File

@ -1,283 +1,283 @@
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>
<member name="T:Microsoft.Xna.Framework.Audio.AudioCategory">
<summary>Represents a particular category of sounds. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Equals(Microsoft.Xna.Framework.Audio.AudioCategory)">
<summary>Determines whether the specified AudioCategory is equal to this AudioCategory.</summary>
<param name="other">AudioCategory to compare with this instance.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Equals(System.Object)">
<summary>Determines whether the specified Object is equal to this AudioCategory.</summary>
<param name="obj">Object to compare with this instance.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.GetHashCode">
<summary>Gets the hash code for this instance.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.AudioCategory.Name">
<summary>Specifies the friendly name of this category.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.op_Equality(Microsoft.Xna.Framework.Audio.AudioCategory,Microsoft.Xna.Framework.Audio.AudioCategory)">
<summary>Determines whether the specified AudioCategory instances are equal.</summary>
<param name="value1">Object to the left of the equality operator.</param>
<param name="value2">Object to the right of the equality operator.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.op_Inequality(Microsoft.Xna.Framework.Audio.AudioCategory,Microsoft.Xna.Framework.Audio.AudioCategory)">
<summary>Determines whether the specified AudioCategory instances are not equal.</summary>
<param name="value1">Object to the left of the inequality operator.</param>
<param name="value2">Object to the right of the inequality operator.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Pause">
<summary>Pauses all sounds associated with this category.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Resume">
<summary>Resumes all paused sounds associated with this category.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.SetVolume(System.Single)">
<summary>Sets the volume of all sounds associated with this category. Reference page contains links to related code samples.</summary>
<param name="volume">Volume amplitude multiplier. volume is normally between 0.0 (silence) and 1.0 (full volume), but can range from 0.0f to float.MaxValue. Volume levels map to decibels (dB) as shown in the following table. VolumeDescription 0.0f-96 dB (silence) 1.0f +0 dB (full volume as authored) 2.0f +6 dB (6 dB greater than authored)</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Stop(Microsoft.Xna.Framework.Audio.AudioStopOptions)">
<summary>Stops all sounds associated with this category.</summary>
<param name="options">Enumerated value specifying how the sounds should be stopped.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.ToString">
<summary>Returns a String representation of this AudioCategory.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.AudioEngine">
<summary>Represents the audio engine. Applications use the methods of the audio engine to instantiate and manipulate core audio objects. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.#ctor(System.String)">
<summary>Initializes a new instance of this class, using a path to an XACT global settings file.</summary>
<param name="settingsFile">Path to a global settings file.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.#ctor(System.String,System.TimeSpan,System.String)">
<summary>Initializes a new instance of this class, using a settings file, a specific audio renderer, and a specific speaker configuration.</summary>
<param name="settingsFile">Path to a global settings file.</param>
<param name="lookAheadTime">Interactive audio and branch event look-ahead time, in milliseconds.</param>
<param name="rendererId">A string that specifies the audio renderer to use.</param>
</member>
<member name="F:Microsoft.Xna.Framework.Audio.AudioEngine.ContentVersion">
<summary>Specifies the current content version.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Dispose(System.Boolean)">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
<param name="disposing">[MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.AudioEngine.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Finalize">
<summary>Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.GetCategory(System.String)">
<summary>Gets an audio category. Reference page contains links to related code samples.</summary>
<param name="name">Friendly name of the category to get.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.GetGlobalVariable(System.String)">
<summary>Gets the value of a global variable. Reference page contains links to related conceptual articles.</summary>
<param name="name">Friendly name of the variable.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.AudioEngine.IsDisposed">
<summary>Gets a value that indicates whether the object is disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.AudioEngine.RendererDetails">
<summary>Gets a collection of audio renderers.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.SetGlobalVariable(System.String,System.Single)">
<summary>Sets the value of a global variable.</summary>
<param name="name">Value of the global variable.</param>
<param name="value">Friendly name of the global variable.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Update">
<summary>Performs periodic work required by the audio engine. Reference page contains links to related code samples.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.AudioStopOptions">
<summary>Controls how Cue objects should stop when Stop is called.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Audio.AudioStopOptions.AsAuthored">
<summary>Indicates the cue should stop normally, playing any release phase or transition specified in the content.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Audio.AudioStopOptions.Immediate">
<summary>Indicates the cue should stop immediately, ignoring any release phase or transition specified in the content.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.Cue">
<summary>Defines methods for managing the playback of sounds. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Apply3D(Microsoft.Xna.Framework.Audio.AudioListener,Microsoft.Xna.Framework.Audio.AudioEmitter)">
<summary>Calculates the 3D audio values between an AudioEmitter and an AudioListener object, and applies the resulting values to this Cue. Reference page contains code sample.</summary>
<param name="listener">The listener to calculate.</param>
<param name="emitter">The emitter to calculate.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.Cue.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.GetVariable(System.String)">
<summary>Gets a cue-instance variable value based on its friendly name.</summary>
<param name="name">Friendly name of the variable.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsCreated">
<summary>Returns whether the cue has been created.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsDisposed">
<summary>Gets a value indicating whether the object has been disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPaused">
<summary>Returns whether the cue is currently paused.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPlaying">
<summary>Returns whether the cue is playing.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPrepared">
<summary>Returns whether the cue is prepared to play.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPreparing">
<summary>Returns whether the cue is preparing to play.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsStopped">
<summary>Returns whether the cue is currently stopped.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsStopping">
<summary>Returns whether the cue is stopping playback.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.Name">
<summary>Returns the friendly name of the cue.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Pause">
<summary>Pauses playback. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Play">
<summary>Requests playback of a prepared or preparing Cue. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Resume">
<summary>Resumes playback of a paused Cue. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.SetVariable(System.String,System.Single)">
<summary>Sets the value of a cue-instance variable based on its friendly name.</summary>
<param name="name">Friendly name of the variable to set.</param>
<param name="value">Value to assign to the variable.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Stop(Microsoft.Xna.Framework.Audio.AudioStopOptions)">
<summary>Stops playback of a Cue. Reference page contains links to related code samples.</summary>
<param name="options">Enumerated value specifying how the sound should stop. If set to None, the sound will play any release phase or transition specified in the audio designer. If set to Immediate, the sound will stop immediately, ignoring any release phases or transitions.</param>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.RendererDetail">
<summary>Represents an audio renderer, which is a device that can render audio to a user.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.Equals(System.Object)">
<summary>Returns a value that indicates whether the current instance is equal to a specified object.</summary>
<param name="obj">Object to compare to this object.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.RendererDetail.FriendlyName">
<summary>Gets the human-readable name for the renderer.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.GetHashCode">
<summary>Gets the hash code for this instance.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.op_Equality(Microsoft.Xna.Framework.Audio.RendererDetail,Microsoft.Xna.Framework.Audio.RendererDetail)">
<summary>Compares two objects to determine whether they are the same.</summary>
<param name="left">Object to the left of the equality operator.</param>
<param name="right">Object to the right of the equality operator.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.op_Inequality(Microsoft.Xna.Framework.Audio.RendererDetail,Microsoft.Xna.Framework.Audio.RendererDetail)">
<summary>Compares two objects to determine whether they are different.</summary>
<param name="left">Object to the left of the inequality operator.</param>
<param name="right">Object to the right of the inequality operator.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.RendererDetail.RendererId">
<summary>Specifies the string that identifies the renderer.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.ToString">
<summary>Retrieves a string representation of this object.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.SoundBank">
<summary>Represents a sound bank, which is a collection of cues. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.#ctor(Microsoft.Xna.Framework.Audio.AudioEngine,System.String)">
<summary>Initializes a new instance of this class using a sound bank from file.</summary>
<param name="audioEngine">Audio engine that will be associated with this sound bank.</param>
<param name="filename">Path to the sound bank file.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.Dispose(System.Boolean)">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
<param name="disposing">[MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.SoundBank.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.Finalize">
<summary>Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.GetCue(System.String)">
<summary>Gets a cue from the sound bank. Reference page contains links to related code samples.</summary>
<param name="name">Friendly name of the cue to get.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.SoundBank.IsDisposed">
<summary>Gets a value that indicates whether the object is disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.SoundBank.IsInUse">
<summary>Returns whether the sound bank is currently in use.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.PlayCue(System.String)">
<summary>Plays a cue. Reference page contains links to related code samples.</summary>
<param name="name">Name of the cue to play.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.PlayCue(System.String,Microsoft.Xna.Framework.Audio.AudioListener,Microsoft.Xna.Framework.Audio.AudioEmitter)">
<summary>Plays a cue using 3D positional information specified in an AudioListener and AudioEmitter. Reference page contains links to related code samples.</summary>
<param name="name">Name of the cue to play.</param>
<param name="listener">AudioListener that specifies listener 3D audio information.</param>
<param name="emitter">AudioEmitter that specifies emitter 3D audio information.</param>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.WaveBank">
<summary>Represents a wave bank, which is a collection of wave files. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.#ctor(Microsoft.Xna.Framework.Audio.AudioEngine,System.String)">
<summary>Initializes a new, in-memory instance of this class using a specified AudioEngine and path to a wave bank file.</summary>
<param name="audioEngine">Instance of an AudioEngine to associate this wave bank with.</param>
<param name="nonStreamingWaveBankFilename">Path to the wave bank file to load.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.#ctor(Microsoft.Xna.Framework.Audio.AudioEngine,System.String,System.Int32,System.Int16)">
<summary>Initializes a new, streaming instance of this class, using a provided AudioEngine and streaming wave bank parameters.</summary>
<param name="audioEngine">Instance of an AudioEngine to associate this wave bank with.</param>
<param name="streamingWaveBankFilename">Path to the wave bank file to stream from.</param>
<param name="offset">Offset within the wave bank data file. This offset must be DVD sector aligned.</param>
<param name="packetsize">Stream packet size, in sectors, to use for each stream. The minimum value is 2.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.Dispose(System.Boolean)">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
<param name="disposing">[MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.WaveBank.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.Finalize">
<summary>Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.WaveBank.IsDisposed">
<summary>Gets a value that indicates whether the object is disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.WaveBank.IsInUse">
<summary>Returns whether the wave bank is currently in use.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.WaveBank.IsPrepared">
<summary>Returns whether the wave bank is prepared to play.</summary>
</member>
</members>
<?xml version="1.0" encoding="utf-8"?>
<doc>
<members>
<member name="T:Microsoft.Xna.Framework.Audio.AudioCategory">
<summary>Represents a particular category of sounds. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Equals(Microsoft.Xna.Framework.Audio.AudioCategory)">
<summary>Determines whether the specified AudioCategory is equal to this AudioCategory.</summary>
<param name="other">AudioCategory to compare with this instance.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Equals(System.Object)">
<summary>Determines whether the specified Object is equal to this AudioCategory.</summary>
<param name="obj">Object to compare with this instance.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.GetHashCode">
<summary>Gets the hash code for this instance.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.AudioCategory.Name">
<summary>Specifies the friendly name of this category.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.op_Equality(Microsoft.Xna.Framework.Audio.AudioCategory,Microsoft.Xna.Framework.Audio.AudioCategory)">
<summary>Determines whether the specified AudioCategory instances are equal.</summary>
<param name="value1">Object to the left of the equality operator.</param>
<param name="value2">Object to the right of the equality operator.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.op_Inequality(Microsoft.Xna.Framework.Audio.AudioCategory,Microsoft.Xna.Framework.Audio.AudioCategory)">
<summary>Determines whether the specified AudioCategory instances are not equal.</summary>
<param name="value1">Object to the left of the inequality operator.</param>
<param name="value2">Object to the right of the inequality operator.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Pause">
<summary>Pauses all sounds associated with this category.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Resume">
<summary>Resumes all paused sounds associated with this category.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.SetVolume(System.Single)">
<summary>Sets the volume of all sounds associated with this category. Reference page contains links to related code samples.</summary>
<param name="volume">Volume amplitude multiplier. volume is normally between 0.0 (silence) and 1.0 (full volume), but can range from 0.0f to float.MaxValue. Volume levels map to decibels (dB) as shown in the following table. VolumeDescription 0.0f-96 dB (silence) 1.0f +0 dB (full volume as authored) 2.0f +6 dB (6 dB greater than authored)</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.Stop(Microsoft.Xna.Framework.Audio.AudioStopOptions)">
<summary>Stops all sounds associated with this category.</summary>
<param name="options">Enumerated value specifying how the sounds should be stopped.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioCategory.ToString">
<summary>Returns a String representation of this AudioCategory.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.AudioEngine">
<summary>Represents the audio engine. Applications use the methods of the audio engine to instantiate and manipulate core audio objects. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.#ctor(System.String)">
<summary>Initializes a new instance of this class, using a path to an XACT global settings file.</summary>
<param name="settingsFile">Path to a global settings file.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.#ctor(System.String,System.TimeSpan,System.String)">
<summary>Initializes a new instance of this class, using a settings file, a specific audio renderer, and a specific speaker configuration.</summary>
<param name="settingsFile">Path to a global settings file.</param>
<param name="lookAheadTime">Interactive audio and branch event look-ahead time, in milliseconds.</param>
<param name="rendererId">A string that specifies the audio renderer to use.</param>
</member>
<member name="F:Microsoft.Xna.Framework.Audio.AudioEngine.ContentVersion">
<summary>Specifies the current content version.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Dispose(System.Boolean)">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
<param name="disposing">[MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.AudioEngine.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Finalize">
<summary>Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.GetCategory(System.String)">
<summary>Gets an audio category. Reference page contains links to related code samples.</summary>
<param name="name">Friendly name of the category to get.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.GetGlobalVariable(System.String)">
<summary>Gets the value of a global variable. Reference page contains links to related conceptual articles.</summary>
<param name="name">Friendly name of the variable.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.AudioEngine.IsDisposed">
<summary>Gets a value that indicates whether the object is disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.AudioEngine.RendererDetails">
<summary>Gets a collection of audio renderers.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.SetGlobalVariable(System.String,System.Single)">
<summary>Sets the value of a global variable.</summary>
<param name="name">Value of the global variable.</param>
<param name="value">Friendly name of the global variable.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.AudioEngine.Update">
<summary>Performs periodic work required by the audio engine. Reference page contains links to related code samples.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.AudioStopOptions">
<summary>Controls how Cue objects should stop when Stop is called.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Audio.AudioStopOptions.AsAuthored">
<summary>Indicates the cue should stop normally, playing any release phase or transition specified in the content.</summary>
</member>
<member name="F:Microsoft.Xna.Framework.Audio.AudioStopOptions.Immediate">
<summary>Indicates the cue should stop immediately, ignoring any release phase or transition specified in the content.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.Cue">
<summary>Defines methods for managing the playback of sounds. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Apply3D(Microsoft.Xna.Framework.Audio.AudioListener,Microsoft.Xna.Framework.Audio.AudioEmitter)">
<summary>Calculates the 3D audio values between an AudioEmitter and an AudioListener object, and applies the resulting values to this Cue. Reference page contains code sample.</summary>
<param name="listener">The listener to calculate.</param>
<param name="emitter">The emitter to calculate.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.Cue.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.GetVariable(System.String)">
<summary>Gets a cue-instance variable value based on its friendly name.</summary>
<param name="name">Friendly name of the variable.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsCreated">
<summary>Returns whether the cue has been created.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsDisposed">
<summary>Gets a value indicating whether the object has been disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPaused">
<summary>Returns whether the cue is currently paused.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPlaying">
<summary>Returns whether the cue is playing.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPrepared">
<summary>Returns whether the cue is prepared to play.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsPreparing">
<summary>Returns whether the cue is preparing to play.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsStopped">
<summary>Returns whether the cue is currently stopped.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.IsStopping">
<summary>Returns whether the cue is stopping playback.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.Cue.Name">
<summary>Returns the friendly name of the cue.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Pause">
<summary>Pauses playback. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Play">
<summary>Requests playback of a prepared or preparing Cue. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Resume">
<summary>Resumes playback of a paused Cue. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.SetVariable(System.String,System.Single)">
<summary>Sets the value of a cue-instance variable based on its friendly name.</summary>
<param name="name">Friendly name of the variable to set.</param>
<param name="value">Value to assign to the variable.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.Cue.Stop(Microsoft.Xna.Framework.Audio.AudioStopOptions)">
<summary>Stops playback of a Cue. Reference page contains links to related code samples.</summary>
<param name="options">Enumerated value specifying how the sound should stop. If set to None, the sound will play any release phase or transition specified in the audio designer. If set to Immediate, the sound will stop immediately, ignoring any release phases or transitions.</param>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.RendererDetail">
<summary>Represents an audio renderer, which is a device that can render audio to a user.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.Equals(System.Object)">
<summary>Returns a value that indicates whether the current instance is equal to a specified object.</summary>
<param name="obj">Object to compare to this object.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.RendererDetail.FriendlyName">
<summary>Gets the human-readable name for the renderer.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.GetHashCode">
<summary>Gets the hash code for this instance.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.op_Equality(Microsoft.Xna.Framework.Audio.RendererDetail,Microsoft.Xna.Framework.Audio.RendererDetail)">
<summary>Compares two objects to determine whether they are the same.</summary>
<param name="left">Object to the left of the equality operator.</param>
<param name="right">Object to the right of the equality operator.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.op_Inequality(Microsoft.Xna.Framework.Audio.RendererDetail,Microsoft.Xna.Framework.Audio.RendererDetail)">
<summary>Compares two objects to determine whether they are different.</summary>
<param name="left">Object to the left of the inequality operator.</param>
<param name="right">Object to the right of the inequality operator.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.RendererDetail.RendererId">
<summary>Specifies the string that identifies the renderer.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.RendererDetail.ToString">
<summary>Retrieves a string representation of this object.</summary>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.SoundBank">
<summary>Represents a sound bank, which is a collection of cues. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.#ctor(Microsoft.Xna.Framework.Audio.AudioEngine,System.String)">
<summary>Initializes a new instance of this class using a sound bank from file.</summary>
<param name="audioEngine">Audio engine that will be associated with this sound bank.</param>
<param name="filename">Path to the sound bank file.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.Dispose(System.Boolean)">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
<param name="disposing">[MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.SoundBank.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.Finalize">
<summary>Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.GetCue(System.String)">
<summary>Gets a cue from the sound bank. Reference page contains links to related code samples.</summary>
<param name="name">Friendly name of the cue to get.</param>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.SoundBank.IsDisposed">
<summary>Gets a value that indicates whether the object is disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.SoundBank.IsInUse">
<summary>Returns whether the sound bank is currently in use.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.PlayCue(System.String)">
<summary>Plays a cue. Reference page contains links to related code samples.</summary>
<param name="name">Name of the cue to play.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.SoundBank.PlayCue(System.String,Microsoft.Xna.Framework.Audio.AudioListener,Microsoft.Xna.Framework.Audio.AudioEmitter)">
<summary>Plays a cue using 3D positional information specified in an AudioListener and AudioEmitter. Reference page contains links to related code samples.</summary>
<param name="name">Name of the cue to play.</param>
<param name="listener">AudioListener that specifies listener 3D audio information.</param>
<param name="emitter">AudioEmitter that specifies emitter 3D audio information.</param>
</member>
<member name="T:Microsoft.Xna.Framework.Audio.WaveBank">
<summary>Represents a wave bank, which is a collection of wave files. Reference page contains links to related code samples.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.#ctor(Microsoft.Xna.Framework.Audio.AudioEngine,System.String)">
<summary>Initializes a new, in-memory instance of this class using a specified AudioEngine and path to a wave bank file.</summary>
<param name="audioEngine">Instance of an AudioEngine to associate this wave bank with.</param>
<param name="nonStreamingWaveBankFilename">Path to the wave bank file to load.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.#ctor(Microsoft.Xna.Framework.Audio.AudioEngine,System.String,System.Int32,System.Int16)">
<summary>Initializes a new, streaming instance of this class, using a provided AudioEngine and streaming wave bank parameters.</summary>
<param name="audioEngine">Instance of an AudioEngine to associate this wave bank with.</param>
<param name="streamingWaveBankFilename">Path to the wave bank file to stream from.</param>
<param name="offset">Offset within the wave bank data file. This offset must be DVD sector aligned.</param>
<param name="packetsize">Stream packet size, in sectors, to use for each stream. The minimum value is 2.</param>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.Dispose">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.Dispose(System.Boolean)">
<summary>Immediately releases the unmanaged resources used by this object.</summary>
<param name="disposing">[MarshalAsAttribute(U1)] true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
</member>
<member name="E:Microsoft.Xna.Framework.Audio.WaveBank.Disposing">
<summary>Occurs when Dispose is called or when this object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime (CLR).</summary>
<param name="" />
</member>
<member name="M:Microsoft.Xna.Framework.Audio.WaveBank.Finalize">
<summary>Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.WaveBank.IsDisposed">
<summary>Gets a value that indicates whether the object is disposed.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.WaveBank.IsInUse">
<summary>Returns whether the wave bank is currently in use.</summary>
</member>
<member name="P:Microsoft.Xna.Framework.Audio.WaveBank.IsPrepared">
<summary>Returns whether the wave bank is prepared to play.</summary>
</member>
</members>
</doc>

View File

@ -0,0 +1,765 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>StardewModdingAPI</name>
</assembly>
<members>
<member name="M:StardewModdingAPI.Command.#ctor(System.String,System.String,System.String[])">
<summary>
Creates a Command from a Name, Description, and Arguments
</summary>
<param name="cname">Name</param>
<param name="cdesc">Description</param>
<param name="args">Arguments</param>
</member>
<member name="M:StardewModdingAPI.Command.CallCommand(System.String)">
<summary>
Calls the specified command. (It runs the command)
</summary>
<param name="input">The command to run</param>
</member>
<member name="M:StardewModdingAPI.Command.RegisterCommand(System.String,System.String,System.String[])">
<summary>
Registers a command to the list of commands properly
</summary>
<param name="command">Name of the command to register</param>
<param name="cdesc">Description</param>
<param name="args">Arguments (these are purely for viewing so that a user can see what an argument needs to be)</param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Command.FindCommand(System.String)">
<summary>
Looks up a command in the list of registered commands. Returns null if it doesn't exist (I think)
</summary>
<param name="name">Name of command to find</param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Command.Fire">
<summary>
Runs a command. Fires it. Calls it. Any of those.
</summary>
</member>
<member name="M:StardewModdingAPI.Config.LoadConfig``1">
<summary>
Loads the config from the json blob on disk, updating and re-writing to the disk if needed.
</summary>
<typeparam name="T"></typeparam>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Config.GenerateDefaultConfig``1">
<summary>
MUST be implemented in inheriting class!
</summary>
</member>
<member name="M:StardewModdingAPI.Config.UpdateConfig``1">
<summary>
Merges a default-value config with the user-config on disk.
</summary>
<typeparam name="T"></typeparam>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.ConfigExtensions.InitializeConfig``1(``0,System.String)">
<summary>
Initializes an instance of any class that inherits from Config.
This method performs the loading, saving, and merging of the config on the disk and in memory at a default state.
This method should not be used to re-load or to re-save a config.
NOTE: You MUST set your config EQUAL to the return of this method!
</summary>
<typeparam name="T"></typeparam>
<param name="baseConfig"></param>
<param name="configLocation"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.ConfigExtensions.WriteConfig``1(``0)">
<summary>
Writes a config to a json blob on the disk specified in the config's properties.
</summary>
</member>
<member name="M:StardewModdingAPI.ConfigExtensions.ReloadConfig``1(``0)">
<summary>
Re-reads the json blob on the disk and merges its values with a default config.
NOTE: You MUST set your config EQUAL to the return of this method!
</summary>
</member>
<member name="T:StardewModdingAPI.Constants">
<summary>
Static class containing readonly values.
</summary>
</member>
<member name="F:StardewModdingAPI.Constants.ModsLoaded">
<summary>
Not quite "constant", but it makes more sense for it to be here, at least for now
</summary>
</member>
<member name="P:StardewModdingAPI.Constants.DataPath">
<summary>
Stardew Valley's roaming app data location.
%AppData%//StardewValley
</summary>
</member>
<member name="P:StardewModdingAPI.Constants.ExecutionPath">
<summary>
Execution path to execute the code.
</summary>
</member>
<member name="P:StardewModdingAPI.Constants.ConsoleTitle">
<summary>
Title for the API console
</summary>
</member>
<member name="P:StardewModdingAPI.Constants.LogDir">
<summary>
Path for log files to be output to.
%LocalAppData%//StardewValley//ErrorLogs
</summary>
</member>
<member name="P:StardewModdingAPI.Constants.EnableDrawingIntoRenderTarget">
<summary>
Whether or not to enable the Render Target drawing code offered by ClxS
Do not mark as 'const' or else 'if' checks will complain that the expression is always true in ReSharper
</summary>
</member>
<member name="P:StardewModdingAPI.Constants.EnableCompletelyOverridingBaseCalls">
<summary>
Completely overrides the base game's draw call to the one is SGame
</summary>
</member>
<member name="T:StardewModdingAPI.Entities.SPlayer">
<summary>
Static class for intergrating with the player
</summary>
</member>
<member name="P:StardewModdingAPI.Entities.SPlayer.AllFarmers">
<summary>
Calls 'getAllFarmers' in Game1
</summary>
</member>
<member name="P:StardewModdingAPI.Entities.SPlayer.CurrentFarmer">
<summary>
Do not use.
</summary>
</member>
<member name="P:StardewModdingAPI.Entities.SPlayer.Player">
<summary>
Gets the current player from Game1
</summary>
</member>
<member name="P:StardewModdingAPI.Entities.SPlayer.CurrentFarmerLocation">
<summary>
Gets the player's current location from Game1
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.UpdateTick">
<summary>
Fires every update (1/60 of a second)
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.SecondUpdateTick">
<summary>
Fires every other update (1/30 of a second)
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.FourthUpdateTick">
<summary>
Fires every fourth update (1/15 of a second)
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.EighthUpdateTick">
<summary>
Fires every eighth update (roughly 1/8 of a second)
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.QuarterSecondTick">
<summary>
Fires every fifthteenth update (1/4 of a second)
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.HalfSecondTick">
<summary>
Fires every thirtieth update (1/2 of a second)
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GameEvents.OneSecondTick">
<summary>
Fires every sixtieth update (a second)
</summary>
</member>
<member name="T:StardewModdingAPI.Events.GraphicsEvents">
<summary>
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.Resize">
<summary>
Occurs when the form (game) is resized.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPreRenderEvent">
<summary>
Occurs before anything is drawn.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPreRenderGuiEvent">
<summary>
Occurs before the GUI is drawn.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPostRenderGuiEvent">
<summary>
Occurs after the GUI is drawn.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPreRenderHudEvent">
<summary>
Occurs before the HUD is drawn.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPostRenderHudEvent">
<summary>
Occurs after the HUD is drawn.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPostRenderEvent">
<summary>
Occurs after everything is drawn.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPreRenderGuiEventNoCheck">
<summary>
Occurs before the GUI is drawn. Does not check for conditional statements.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPostRenderGuiEventNoCheck">
<summary>
Occurs after the GUI is drawn. Does not check for conditional statements.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPreRenderHudEventNoCheck">
<summary>
Occurs before the HUD is drawn. Does not check for conditional statements.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.OnPostRenderHudEventNoCheck">
<summary>
Occurs after the HUD is drawn. Does not check for conditional statements.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.GraphicsEvents.DrawDebug">
<summary>
Draws when SGame.Debug is true. F3 toggles this.
Game1.spriteBatch.Begin() is pre-called.
Do not make end or begin calls to the spritebatch.
If you are only trying to add debug information, use SGame.DebugMessageQueue in your Update loop.
</summary>
</member>
<member name="E:StardewModdingAPI.Events.TimeEvents.OnNewDay">
<summary>
Occurs when Game1.newDay changes. True directly before saving, and False directly after.
</summary>
</member>
<member name="M:StardewModdingAPI.Inheritance.Menus.SBobberBar.#ctor(System.Int32,System.Single,System.Boolean,System.Int32)">
<summary>
DO NOT CONSTRUCT THIS CLASS
To retrieve an instance of SBobberBar, use SBobberBar.ConstructFromBaseClass()
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.Menus.SBobberBar.bobberPosition">
<summary>
The green rectangle bar that moves up and down
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.Menus.SBobberBar.distanceFromCatching">
<summary>
The green bar on the right. How close to catching the fish you are
Range: 0 - 1 | 1 = catch, 0 = fail
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.Menus.SBobberBar.treasure">
<summary>
Whether or not a treasure chest appears
</summary>
</member>
<member name="T:StardewModdingAPI.Inheritance.SGame">
<summary>
The 'SGame' class.
This summary, and many others, only exists because XML doc tags.
</summary>
</member>
<member name="F:StardewModdingAPI.Inheritance.SGame.LowestModItemID">
<summary>
Useless right now.
</summary>
</member>
<member name="F:StardewModdingAPI.Inheritance.SGame.PreviouslyPressedButtons">
<summary>
Gets a jagged array of all buttons pressed on the gamepad the prior frame.
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.ModItems">
<summary>
Useless at this time.
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.KStateNow">
<summary>
The current KeyboardState
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.KStatePrior">
<summary>
The prior KeyboardState
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.MStateNow">
<summary>
The current MouseState
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.MStatePrior">
<summary>
The prior MouseState
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.CurrentlyPressedKeys">
<summary>
All keys pressed on the current frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviouslyPressedKeys">
<summary>
All keys pressed on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.FramePressedKeys">
<summary>
All keys pressed on this frame except for the ones pressed on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.FrameReleasedKeys">
<summary>
All keys pressed on the prior frame except for the ones pressed on the current frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviouslyLoadedGame">
<summary>
Whether or not a save was tagged as 'Loaded' the prior frame.
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousGameLocations">
<summary>
The list of GameLocations on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousLocationObjects">
<summary>
The list of GameObjects on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousItems">
<summary>
The list of Items in the player's inventory on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousCombatLevel">
<summary>
The player's Combat level on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousFarmingLevel">
<summary>
The player's Farming level on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousFishingLevel">
<summary>
The player's Fishing level on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousForagingLevel">
<summary>
The player's Foraging level on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousMiningLevel">
<summary>
The player's Mining level on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousLuckLevel">
<summary>
The player's Luck level on the prior frame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousGameLocation">
<summary>
The player's previous game location
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousActiveMenu">
<summary>
The previous ActiveGameMenu in Game1
</summary>
</member>
<member name="F:StardewModdingAPI.Inheritance.SGame.WasMenuClosedInvoked">
<summary>
Indicates if the MenuClosed event was fired to prevent it from re-firing.
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousMineLevel">
<summary>
The previous mine level
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousTimeOfDay">
<summary>
The previous TimeOfDay (Int32 between 600 and 2400?)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousDayOfMonth">
<summary>
The previous DayOfMonth (Int32 between 1 and 28?)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousSeasonOfYear">
<summary>
The previous Season (String as follows: "winter", "spring", "summer", "fall")
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousYearOfGame">
<summary>
The previous Year
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousIsNewDay">
<summary>
The previous result of Game1.newDay
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.PreviousFarmer">
<summary>
The previous 'Farmer' (Player)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.CurrentUpdateTick">
<summary>
The current index of the update tick. Recycles every 60th tick to 0. (Int32 between 0 and 59)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.FirstUpdate">
<summary>
Whether or not this update frame is the very first of the entire game
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.Screen">
<summary>
The current RenderTarget in Game1 (Private field, uses reflection)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.BgColour">
<summary>
The current Colour in Game1 (Private field, uses reflection)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.Instance">
<summary>
Static accessor for an Instance of the class SGame
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.FramesPerSecond">
<summary>
The game's FPS. Re-determined every Draw update.
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.Debug">
<summary>
Whether or not we're in a pseudo 'debug' mode. Mostly for displaying information like FPS.
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.CurrentFarmer">
<summary>
The current player (equal to Farmer.Player)
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.GetStaticFields">
<summary>
Gets ALL static fields that belong to 'Game1'
</summary>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.WasButtonJustPressed(Microsoft.Xna.Framework.Input.Buttons,Microsoft.Xna.Framework.Input.ButtonState,Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Whether or not a button was just pressed on the controller
</summary>
<param name="button"></param>
<param name="buttonState"></param>
<param name="stateIndex"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.WasButtonJustReleased(Microsoft.Xna.Framework.Input.Buttons,Microsoft.Xna.Framework.Input.ButtonState,Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Whether or not a button was just released on the controller
</summary>
<param name="button"></param>
<param name="buttonState"></param>
<param name="stateIndex"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.WasButtonJustPressed(Microsoft.Xna.Framework.Input.Buttons,System.Single,Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Whether or not an analog button was just pressed on the controller
</summary>
<param name="button"></param>
<param name="value"></param>
<param name="stateIndex"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.WasButtonJustReleased(Microsoft.Xna.Framework.Input.Buttons,System.Single,Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Whether or not an analog button was just released on the controller
</summary>
<param name="button"></param>
<param name="value"></param>
<param name="stateIndex"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.GetButtonsDown(Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Gets an array of all Buttons pressed on a joystick
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.GetFramePressedButtons(Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Gets all buttons that were pressed on the current frame of a joystick
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.GetFrameReleasedButtons(Microsoft.Xna.Framework.PlayerIndex)">
<summary>
Gets all buttons that were released on the current frame of a joystick
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="F:StardewModdingAPI.Inheritance.SGame.DrawFarmBuildings">
<summary>
</summary>
</member>
<member name="F:StardewModdingAPI.Inheritance.SGame.DrawHUD">
<summary>
</summary>
</member>
<member name="F:StardewModdingAPI.Inheritance.SGame.DrawDialogueBox">
<summary>
</summary>
</member>
<member name="P:StardewModdingAPI.Inheritance.SGame.ZoomLevelIsOne">
<summary>
Whether or not the game's zoom level is 1.0f
</summary>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.Initialize">
<summary>
XNA Init Method
</summary>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.LoadContent">
<summary>
XNA LC Method
</summary>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.Update(Microsoft.Xna.Framework.GameTime)">
<summary>
XNA Update Method
</summary>
<param name="gameTime"></param>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.Draw(Microsoft.Xna.Framework.GameTime)">
<summary>
XNA Draw Method
</summary>
<param name="gameTime"></param>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.InvokeBasePrivateInstancedMethod(System.String,System.Object[])">
<summary>
Invokes a private, non-static method in Game1 via Reflection
</summary>
<param name="name">The name of the method</param>
<param name="parameters">Any parameters needed</param>
<returns>Whatever the method normally returns. Null if void.</returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.InvokeMethodInfo(System.Reflection.MethodInfo,System.Object[])">
<summary>
Invokes a given method info with the supplied parameters
</summary>
<param name="mi"></param>
<param name="parameters"></param>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Inheritance.SGame.QueueDebugMessage(System.String)">
<summary>
Queue's a message to be drawn in Debug mode (F3)
</summary>
<returns></returns>
</member>
<member name="M:StardewModdingAPI.Log.CurrentDomain_UnhandledException(System.Object,System.UnhandledExceptionEventArgs)">
<summary>
Catch unhandled exception from the application
</summary>
<remarks>Should be moved out of here if we do more than just log the exception.</remarks>
</member>
<member name="M:StardewModdingAPI.Log.Application_ThreadException(System.Object,System.Threading.ThreadExceptionEventArgs)">
<summary>
Catch thread exception from the application
</summary>
<remarks>Should be moved out of here if we do more than just log the exception.</remarks>
</member>
<member name="M:StardewModdingAPI.Log.SyncColour(System.Object,System.ConsoleColor)">
<summary>
NOTICE: Sync logging is discouraged. Please use Async instead.
</summary>
<param name="message">Message to log</param>
<param name="colour">Colour of message</param>
</member>
<member name="T:StardewModdingAPI.LogWriter">
<summary>
A Logging class implementing the Singleton pattern and an internal Queue to be flushed perdiodically
</summary>
</member>
<member name="M:StardewModdingAPI.LogWriter.#ctor">
<summary>
Private to prevent creation of other instances
</summary>
</member>
<member name="P:StardewModdingAPI.LogWriter.Instance">
<summary>
Exposes _instace and creates a new one if it is null
</summary>
</member>
<member name="M:StardewModdingAPI.LogWriter.WriteToLog(System.String)">
<summary>
Writes into the ConcurrentQueue the Message specified
</summary>
<param name="message">The message to write to the log</param>
</member>
<member name="M:StardewModdingAPI.LogWriter.WriteToLog(StardewModdingAPI.LogInfo)">
<summary>
Writes into the ConcurrentQueue the Entry specified
</summary>
<param name="logEntry">The logEntry to write to the log</param>
</member>
<member name="M:StardewModdingAPI.LogWriter.FlushLog">
<summary>
Flushes the ConcurrentQueue to the log file specified in Constants
</summary>
</member>
<member name="T:StardewModdingAPI.LogInfo">
<summary>
A struct to store the message and the Date and Time the log entry was created
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.Name">
<summary>
The name of your mod.
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.Authour">
<summary>
The name of the mod's authour.
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.Version">
<summary>
The version of the mod.
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.Description">
<summary>
A description of the mod.
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.UniqueID">
<summary>
The unique ID of the mod. It doesn't *need* to be anything.
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.PerSaveConfigs">
<summary>
Whether or not the mod uses per-save-config files.
</summary>
</member>
<member name="P:StardewModdingAPI.Manifest.EntryDll">
<summary>
The name of the DLL in the directory that has the Entry() method.
</summary>
</member>
<member name="P:StardewModdingAPI.Mod.Manifest">
<summary>
The mod's manifest
</summary>
</member>
<member name="P:StardewModdingAPI.Mod.PathOnDisk">
<summary>
Where the mod is located on the disk.
</summary>
</member>
<member name="P:StardewModdingAPI.Mod.BaseConfigPath">
<summary>
A basic path to store your mod's config at.
</summary>
</member>
<member name="P:StardewModdingAPI.Mod.PerSaveConfigFolder">
<summary>
A basic path to where per-save configs are stored
</summary>
</member>
<member name="P:StardewModdingAPI.Mod.PerSaveConfigPath">
<summary>
A basic path to store your mod's config at, dependent on the current save.
The Manifest must allow for per-save configs. This is to keep from having an
empty directory in every mod folder.
</summary>
</member>
<member name="M:StardewModdingAPI.Mod.Entry(System.Object[])">
<summary>
A basic method that is the entry-point of your mod. It will always be called once when the mod loads.
</summary>
</member>
<member name="M:StardewModdingAPI.Program.Main(System.String[])">
<summary>
Main method holding the API execution
</summary>
<param name="args"></param>
</member>
<member name="M:StardewModdingAPI.Program.ConfigureUI">
<summary>
Set up the console properties
</summary>
</member>
<member name="M:StardewModdingAPI.Program.ConfigurePaths">
<summary>
Setup the required paths and logging
</summary>
</member>
<member name="M:StardewModdingAPI.Program.ConfigureSDV">
<summary>
Load Stardev Valley and control features
</summary>
</member>
<member name="M:StardewModdingAPI.Program.GameRunInvoker">
<summary>
Wrap the 'RunGame' method for console output
</summary>
</member>
<member name="M:StardewModdingAPI.Program.VerifyPath(System.String)">
<summary>
Create the given directory path if it does not exist
</summary>
<param name="path">Desired directory path</param>
</member>
</members>
</doc>

View File

@ -0,0 +1,25 @@
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Fall28 Snow Day.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Fall28 Snow Day.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Stardew Valley.exe
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\StardewModdingAPI.exe
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Game.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Graphics.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\xTile.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Xact.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Steamworks.NET.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Newtonsoft.Json.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.GamerServices.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Input.Touch.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\StardewModdingAPI.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\StardewModdingAPI.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Game.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Graphics.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Xact.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Newtonsoft.Json.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.GamerServices.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\bin\Debug\Microsoft.Xna.Framework.Input.Touch.xml
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\obj\Debug\Fall28 Snow Day.csprojResolveAssemblyReference.cache
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\obj\Debug\Fall28 Snow Day.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\Fall28 Snow Day\Fall28 Snow Day\obj\Debug\Fall28 Snow Day.pdb

View File

@ -0,0 +1,14 @@
{
"Name": "Fall28 Snow Day",
"Authour": "Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 0,
"Build": ""
},
"Description": "Makes it snow on Fall 28 which makes a good explanation for all the snow.",
"UniqueID": "7ad4f6f7-c3de-4729-a40f-7a11d2b2a358",
"PerSaveConfigs": false,
"EntryDll": "Fall28 Snow Day.dll"
}

View File

@ -1,94 +1,94 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using System.IO;
using System.Net.Mime;
using StardewModdingAPI.Inheritance;
using StardewValley;
using StardewValley.Tools;
using StardewValley.Objects;
using System.Threading;
namespace ClassLibrary1
{
public class AutoSpeed : Mod
{
int speed_int = 5;
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.GameEvents.UpdateTick += Events_UpdateTick;
var configLocation = Path.Combine(PathOnDisk, "AutoSpeed_Data.txt");
if (!File.Exists(configLocation))
{
speed_int = 1;
}
DataLoader();
MyWritter();
Console.WriteLine("AutoSpeed Initialization Completed");
}
public void Events_UpdateTick(object sender, EventArgs e)
{
StardewValley.Game1.player.addedSpeed = speed_int;
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
var mylocation = Path.Combine(PathOnDisk, "AutoSpeed_data.txt");
if (!File.Exists(mylocation)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for AutoSpeed was not found, guess I'll create it...");
}
else
{
// Console.WriteLine("HEY THERE IM LOADING DATA");
//loads the BuildEndurance_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation);
speed_int = Convert.ToInt32(readtext[3]);
}
}
void MyWritter()
{
//saves the BuildEndurance_data at the end of a new day;
var mylocation = Path.Combine(PathOnDisk, "AutoSpeed_data.txt");
string[] mystring3 = new string[20];
if (!File.Exists(mylocation))
{
Console.WriteLine("The data file for AutoSpeed was not found, guess I'll create it when you sleep.");
mystring3[0] = "Player: AutoSpeed Config:";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Added Speed:";
mystring3[3] = speed_int.ToString();
File.WriteAllLines(mylocation, mystring3);
}
else
{
// Console.WriteLine("HEY IM SAVING DATA");
//write out the info to a text file upon loading
mystring3[0] = "Player: AutoSpeed Config:";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Added Speed:";
mystring3[3] = speed_int.ToString();
File.WriteAllLines(mylocation, mystring3);
}
}
} //end my function
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using System.IO;
using System.Net.Mime;
using StardewModdingAPI.Inheritance;
using StardewValley;
using StardewValley.Tools;
using StardewValley.Objects;
using System.Threading;
namespace ClassLibrary1
{
public class AutoSpeed : Mod
{
int speed_int = 5;
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.GameEvents.UpdateTick += Events_UpdateTick;
var configLocation = Path.Combine(PathOnDisk, "AutoSpeed_Data.txt");
if (!File.Exists(configLocation))
{
speed_int = 1;
}
DataLoader();
MyWritter();
Console.WriteLine("AutoSpeed Initialization Completed");
}
public void Events_UpdateTick(object sender, EventArgs e)
{
StardewValley.Game1.player.addedSpeed = speed_int;
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
var mylocation = Path.Combine(PathOnDisk, "AutoSpeed_data.txt");
if (!File.Exists(mylocation)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for AutoSpeed was not found, guess I'll create it...");
}
else
{
// Console.WriteLine("HEY THERE IM LOADING DATA");
//loads the BuildEndurance_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation);
speed_int = Convert.ToInt32(readtext[3]);
}
}
void MyWritter()
{
//saves the BuildEndurance_data at the end of a new day;
var mylocation = Path.Combine(PathOnDisk, "AutoSpeed_data.txt");
string[] mystring3 = new string[20];
if (!File.Exists(mylocation))
{
Console.WriteLine("The data file for AutoSpeed was not found, guess I'll create it when you sleep.");
mystring3[0] = "Player: AutoSpeed Config:";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Added Speed:";
mystring3[3] = speed_int.ToString();
File.WriteAllLines(mylocation, mystring3);
}
else
{
// Console.WriteLine("HEY IM SAVING DATA");
//write out the info to a text file upon loading
mystring3[0] = "Player: AutoSpeed Config:";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Added Speed:";
mystring3[3] = speed_int.ToString();
File.WriteAllLines(mylocation, mystring3);
}
}
} //end my function
}

View File

@ -1,14 +1,14 @@
{
"Name": "AutoSpeed",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "Updated AutoSpeed to SMAPI .39.1",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "AutoSpeed.dll"
{
"Name": "AutoSpeed",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "Updated AutoSpeed to SMAPI .39.1",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "AutoSpeed.dll"
}

View File

@ -1,20 +1,20 @@
Player: Build Endurance Data. Modification can cause errors. Edit at your own risk.
====================================================================================
Player Current Level:
0
Player Current XP:
0
Xp to next Level:
20
Initial Stam Bonus:
0
Additional Stam Bonus:
0
=======================================================================================
RESET ALL MOD EFFECTS? This will effective start you back at square 1. Also good if you want to remove this mod.
False
OLD STAMINA AMOUNT: This is the initial value of the Player's Stamina before this mod took over.
0
Nightly Stamina Value: This is the value of the player's stamina that was saved when the player slept.
0
Player: Build Endurance Data. Modification can cause errors. Edit at your own risk.
====================================================================================
Player Current Level:
0
Player Current XP:
0
Xp to next Level:
20
Initial Stam Bonus:
0
Additional Stam Bonus:
0
=======================================================================================
RESET ALL MOD EFFECTS? This will effective start you back at square 1. Also good if you want to remove this mod.
False
OLD STAMINA AMOUNT: This is the initial value of the Player's Stamina before this mod took over.
0
Nightly Stamina Value: This is the value of the player's stamina that was saved when the player slept.
0

View File

@ -1,14 +1,14 @@
{
"Name": "BuildEndurance",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 1,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "SMAPI port of BuildEndurance. Increase your health as you play. Updated to support per-character values.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "SMAPI_BuildEndurance.dll"
{
"Name": "BuildEndurance",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 1,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "SMAPI port of BuildEndurance. Increase your health as you play. Updated to support per-character values.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "SMAPI_BuildEndurance.dll"
}

View File

@ -1,472 +1,472 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using StardewModdingAPI;
using Microsoft.Xna.Framework;
namespace BuildHealth
{
public class BuildHealth : Mod
{
public double BuildHealth_data_xp_nextlvl=20;
public double BuildHealth_data_xp_current=0;
public int BuildHealth_data_current_lvl=0;
public int BuildHealth_data_health_bonus_acumulated=0;
public int BuildHealth_data_ini_health_bonus=0;
public bool BuildHealth_data_clear_mod_effects = false;
public int BuildHealth_data_old_health = 0;
public bool tool_cleaner = false;
public bool fed = false;
public int old_health;
public int new_health;
public Config ModConfig { get; set; }
public static bool upon_loading = false;
public bool collapse_check;
//Credit goes to Zoryn for pieces of this config generation that I kinda repurposed.
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += SleepCallback;
StardewModdingAPI.Events.GameEvents.UpdateTick += EatingCallBack; //sloppy again but it'll do.
StardewModdingAPI.Events.GameEvents.OneSecondTick += Tool_Cleanup;
StardewModdingAPI.Events.GameEvents.UpdateTick += ToolCallBack;
StardewModdingAPI.Events.PlayerEvents.LoadedGame += LoadingCallBack;
StardewModdingAPI.Events.GameEvents.UpdateTick += Collapse_Callback;
StardewModdingAPI.Events.GameEvents.UpdateTick += damage_check;
var configLocation = Path.Combine(PathOnDisk, "BuildHealthConfig.json");
if (!File.Exists(configLocation))
{
Log.Info("The config file for BuildHealth was not found, guess I'll create it...");
ModConfig = new Config();
ModConfig.BuildHealth_current_lvl = 0;
ModConfig.BuildHealth_max_lvl = 100;
ModConfig.BuildHealth_Health_increase_upon_lvl_up = 1;
ModConfig.BuildHealth_xp_current = 0;
ModConfig.BuildHealth_xp_nextlvl = 20;
ModConfig.BuildHealth_xp_curve = 1.15;
ModConfig.BuildHealth_xp_eating = 2;
ModConfig.BuildHealth_xp_sleeping = 10;
ModConfig.BuildHealth_xp_tooluse = 1;
ModConfig.BuildHealth_ini_Health_boost = 0;
ModConfig.BuildHealth_Health_accumulated = 0;
File.WriteAllBytes(configLocation, Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(ModConfig)));
}
else
{
ModConfig = JsonConvert.DeserializeObject<Config>(Encoding.UTF8.GetString(File.ReadAllBytes(configLocation)));
Log.Info("Found BuildHealth config file.");
}
// DataLoader();
// MyWritter();
Log.Info("BuildHealth Initialization Completed");
}
public void ToolCallBack(object sender, EventArgs e) //ultra quick response for checking if a tool is used.
{
if (tool_cleaner == true) return;
if (StardewValley.Game1.player.usingTool == true)
{
//Console.WriteLine("Tool is being used");
BuildHealth_data_xp_current += ModConfig.BuildHealth_xp_tooluse;
tool_cleaner = true;
}
else return;
}
public void Tool_Cleanup(object sender, EventArgs e) //nerfs how quickly xp is actually gained. I hope.
{
if (tool_cleaner == true) tool_cleaner = false;
else return;
}
public void EatingCallBack(object sender, EventArgs e)
{
if (StardewValley.Game1.isEating == true)
{
// Console.WriteLine("NOM NOM NOM");
fed = true;
//this code will run when the player eats an object. I.E. increases their eating skills.
}
//I'm going to assume they ate the food.
if ((StardewValley.Game1.isEating == false) && fed == true)
{
// Console.WriteLine("NOM NOM NOM");
BuildHealth_data_xp_current += ModConfig.BuildHealth_xp_eating;
fed = false;
}
return;
}
public void damage_check(object sender, EventArgs e)
{
var player = StardewValley.Game1.player;
if (old_health > player.health)
{
BuildHealth_data_xp_current += (old_health - player.health);
//Log.Info(old_health - player.health);
old_health = (player.health);
}
if (old_health < player.health)
{
old_health = player.health;
}
return;
}
public void SleepCallback(object sender, EventArgs e)
{
collapse_check = false;
if (upon_loading ==true){
Clear_Checker();
var player = StardewValley.Game1.player;
BuildHealth_data_xp_current += ModConfig.BuildHealth_xp_sleeping;
if (BuildHealth_data_old_health == 0)
{
BuildHealth_data_old_health = player.maxHealth; //grab the initial Health value
}
if (BuildHealth_data_clear_mod_effects == true)
{
Clear_DataLoader();
//This will run when the character goes to sleep. It will increase their sleeping skill.
player.maxHealth = BuildHealth_data_old_health;
BuildHealth_data_xp_nextlvl = ModConfig.BuildHealth_xp_nextlvl;
BuildHealth_data_xp_current = ModConfig.BuildHealth_xp_current;
BuildHealth_data_health_bonus_acumulated = 0;
BuildHealth_data_old_health = player.maxHealth;
BuildHealth_data_ini_health_bonus = 0;
BuildHealth_data_current_lvl = 0;
Console.WriteLine("BuildHealth Reset!");
}
if (BuildHealth_data_clear_mod_effects == false)
{
if (BuildHealth_data_current_lvl < ModConfig.BuildHealth_max_lvl)
{
while (BuildHealth_data_xp_current >= BuildHealth_data_xp_nextlvl)
{
BuildHealth_data_current_lvl += 1;
BuildHealth_data_xp_current = BuildHealth_data_xp_current - BuildHealth_data_xp_nextlvl;
BuildHealth_data_xp_nextlvl = (ModConfig.BuildHealth_xp_curve * BuildHealth_data_xp_nextlvl);
player.maxHealth += ModConfig.BuildHealth_Health_increase_upon_lvl_up;
BuildHealth_data_health_bonus_acumulated += ModConfig.BuildHealth_Health_increase_upon_lvl_up;
}
}
}
BuildHealth_data_clear_mod_effects = false;
MyWritter();
}
old_health = StardewValley.Game1.player.maxHealth;
}
public void LoadingCallBack(object sender, EventArgs e)
{
// Console.WriteLine("entering loading callback");
if (StardewModdingAPI.Inheritance.SGame.hasLoadedGame == true)
{
// Console.WriteLine("Penetrated loading callback");
DataLoader();
MyWritter();
upon_loading=true;
//runs when the player is loaded.
var player = StardewValley.Game1.player;
if (BuildHealth_data_old_health == 0)
{
BuildHealth_data_old_health = player.maxHealth; //grab the initial health value
}
player.maxHealth = BuildHealth_data_ini_health_bonus + BuildHealth_data_health_bonus_acumulated + BuildHealth_data_old_health; //incase the ini stam bonus is loaded in.
if (BuildHealth_data_clear_mod_effects == true)
{
player.maxHealth = BuildHealth_data_old_health;
Console.WriteLine("BuildHealth Reset!");
}
DataLoader();
MyWritter();
}
old_health = StardewValley.Game1.player.maxHealth;
}
public void Collapse_Callback(object sender, EventArgs e) //if the player stays up too late add some xp.
{
if (collapse_check == false)
{
if (StardewValley.Game1.farmerShouldPassOut == true)
{
BuildHealth_data_xp_current += ModConfig.BuildHealth_Pass_Out_XP;
collapse_check = true;
Log.Info("The player has collapsed!");
return;
}
}
}
//Mod config data.
public class Config
{
public double BuildHealth_xp_nextlvl { get; set; }
public double BuildHealth_xp_current { get; set; }
public double BuildHealth_xp_curve { get; set; }
public int BuildHealth_current_lvl { get; set; }
public int BuildHealth_max_lvl { get; set; }
public int BuildHealth_Health_increase_upon_lvl_up { get; set; }
public int BuildHealth_xp_tooluse { get; set; }
public int BuildHealth_xp_eating { get; set; }
public int BuildHealth_xp_sleeping { get; set; }
public int BuildHealth_ini_Health_boost { get; set; }
public int BuildHealth_Health_accumulated { get; set; }
public int BuildHealth_Pass_Out_XP { get; set; }
}
void Clear_DataLoader()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation+myname;
string mylocation3 = mylocation2+".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for BuildHealth was not found, guess I'll create it...");
BuildHealth_data_clear_mod_effects = false;
BuildHealth_data_old_health = 0;
BuildHealth_data_ini_health_bonus = 0;
}
else
{
//loads the BuildHealth_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation3);
BuildHealth_data_ini_health_bonus = Convert.ToInt32(readtext[9]);
BuildHealth_data_clear_mod_effects = Convert.ToBoolean(readtext[14]);
BuildHealth_data_old_health = Convert.ToInt32(readtext[16]);
}
}
void Clear_Checker()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation + myname;
string mylocation3 = mylocation2 + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for BuildHealth was not found, guess I'll create it...");
BuildHealth_data_clear_mod_effects = false;
BuildHealth_data_old_health = 0;
BuildHealth_data_ini_health_bonus = 0;
}
else
{
//loads the BuildHealth_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation3);
BuildHealth_data_clear_mod_effects = Convert.ToBoolean(readtext[14]);
}
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation+myname;
string mylocation3 = mylocation2+".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for BuildHealth was not found, guess I'll create it...");
BuildHealth_data_xp_nextlvl = ModConfig.BuildHealth_xp_nextlvl;
BuildHealth_data_xp_current = ModConfig.BuildHealth_xp_current;
BuildHealth_data_current_lvl = ModConfig.BuildHealth_current_lvl;
BuildHealth_data_ini_health_bonus = ModConfig.BuildHealth_ini_Health_boost;
BuildHealth_data_health_bonus_acumulated = ModConfig.BuildHealth_Health_accumulated;
BuildHealth_data_clear_mod_effects = false;
BuildHealth_data_old_health = 0;
}
else
{
// Console.WriteLine("HEY THERE IM LOADING DATA");
//loads the BuildHealth_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation3);
BuildHealth_data_current_lvl = Convert.ToInt32(readtext[3]);
BuildHealth_data_xp_nextlvl = Convert.ToDouble(readtext[7]); //these array locations refer to the lines in BuildHealth_data.json
BuildHealth_data_xp_current = Convert.ToDouble(readtext[5]);
BuildHealth_data_ini_health_bonus = Convert.ToInt32(readtext[9]);
BuildHealth_data_health_bonus_acumulated = Convert.ToInt32(readtext[11]);
BuildHealth_data_clear_mod_effects = Convert.ToBoolean(readtext[14]);
BuildHealth_data_old_health = Convert.ToInt32(readtext[16]);
}
}
void MyWritter()
{
//saves the BuildHealth_data at the end of a new day;
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation+myname;
string mylocation3 = mylocation2+".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Console.WriteLine("The data file for BuildHealth was not found, guess I'll create it when you sleep.");
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Player: Build Health Data. Modification can cause errors. Edit at your own risk.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Current Level:";
mystring3[3] = BuildHealth_data_current_lvl.ToString();
mystring3[4] = "Player Current XP:";
mystring3[5] = BuildHealth_data_xp_current.ToString();
mystring3[6] = "Xp to next Level:";
mystring3[7] = BuildHealth_data_xp_nextlvl.ToString();
mystring3[8] = "Initial Health Bonus:";
mystring3[9] = BuildHealth_data_ini_health_bonus.ToString();
mystring3[10] = "Additional Health Bonus:";
mystring3[11] = BuildHealth_data_health_bonus_acumulated.ToString();
mystring3[12] = "=======================================================================================";
mystring3[13] = "RESET ALL MOD EFFECTS? This will effective start you back at square 1. Also good if you want to remove this mod.";
mystring3[14] = BuildHealth_data_clear_mod_effects.ToString();
mystring3[15] = "OLD Health AMOUNT: This is the initial value of the Player's Health before this mod took over.";
mystring3[16] = BuildHealth_data_old_health.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
// Console.WriteLine("HEY IM SAVING DATA");
//write out the info to a text file at the end of a day.
mystring3[0] = "Player: Build Health Data. Modification can cause errors. Edit at your own risk.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Current Level:";
mystring3[3] = BuildHealth_data_current_lvl.ToString();
mystring3[4] = "Player Current XP:";
mystring3[5] = BuildHealth_data_xp_current.ToString();
mystring3[6] = "Xp to next Level:";
mystring3[7] = BuildHealth_data_xp_nextlvl.ToString();
mystring3[8] = "Initial Health Bonus:";
mystring3[9] = BuildHealth_data_ini_health_bonus.ToString();
mystring3[10] = "Additional Health Bonus:";
mystring3[11] = BuildHealth_data_health_bonus_acumulated.ToString();
mystring3[12] = "=======================================================================================";
mystring3[13] = "RESET ALL MOD EFFECTS? This will effective start you back at square 1. Also good if you want to remove this mod.";
mystring3[14] = BuildHealth_data_clear_mod_effects.ToString();
mystring3[15] = "OLD Health AMOUNT: This is the initial value of the Player's Health before this mod took over.";
mystring3[16] = BuildHealth_data_old_health.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
} //end my function
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using StardewModdingAPI;
using Microsoft.Xna.Framework;
namespace BuildHealth
{
public class BuildHealth : Mod
{
public double BuildHealth_data_xp_nextlvl=20;
public double BuildHealth_data_xp_current=0;
public int BuildHealth_data_current_lvl=0;
public int BuildHealth_data_health_bonus_acumulated=0;
public int BuildHealth_data_ini_health_bonus=0;
public bool BuildHealth_data_clear_mod_effects = false;
public int BuildHealth_data_old_health = 0;
public bool tool_cleaner = false;
public bool fed = false;
public int old_health;
public int new_health;
public Config ModConfig { get; set; }
public static bool upon_loading = false;
public bool collapse_check;
//Credit goes to Zoryn for pieces of this config generation that I kinda repurposed.
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += SleepCallback;
StardewModdingAPI.Events.GameEvents.UpdateTick += EatingCallBack; //sloppy again but it'll do.
StardewModdingAPI.Events.GameEvents.OneSecondTick += Tool_Cleanup;
StardewModdingAPI.Events.GameEvents.UpdateTick += ToolCallBack;
StardewModdingAPI.Events.PlayerEvents.LoadedGame += LoadingCallBack;
StardewModdingAPI.Events.GameEvents.UpdateTick += Collapse_Callback;
StardewModdingAPI.Events.GameEvents.UpdateTick += damage_check;
var configLocation = Path.Combine(PathOnDisk, "BuildHealthConfig.json");
if (!File.Exists(configLocation))
{
Log.Info("The config file for BuildHealth was not found, guess I'll create it...");
ModConfig = new Config();
ModConfig.BuildHealth_current_lvl = 0;
ModConfig.BuildHealth_max_lvl = 100;
ModConfig.BuildHealth_Health_increase_upon_lvl_up = 1;
ModConfig.BuildHealth_xp_current = 0;
ModConfig.BuildHealth_xp_nextlvl = 20;
ModConfig.BuildHealth_xp_curve = 1.15;
ModConfig.BuildHealth_xp_eating = 2;
ModConfig.BuildHealth_xp_sleeping = 10;
ModConfig.BuildHealth_xp_tooluse = 1;
ModConfig.BuildHealth_ini_Health_boost = 0;
ModConfig.BuildHealth_Health_accumulated = 0;
File.WriteAllBytes(configLocation, Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(ModConfig)));
}
else
{
ModConfig = JsonConvert.DeserializeObject<Config>(Encoding.UTF8.GetString(File.ReadAllBytes(configLocation)));
Log.Info("Found BuildHealth config file.");
}
// DataLoader();
// MyWritter();
Log.Info("BuildHealth Initialization Completed");
}
public void ToolCallBack(object sender, EventArgs e) //ultra quick response for checking if a tool is used.
{
if (tool_cleaner == true) return;
if (StardewValley.Game1.player.usingTool == true)
{
//Console.WriteLine("Tool is being used");
BuildHealth_data_xp_current += ModConfig.BuildHealth_xp_tooluse;
tool_cleaner = true;
}
else return;
}
public void Tool_Cleanup(object sender, EventArgs e) //nerfs how quickly xp is actually gained. I hope.
{
if (tool_cleaner == true) tool_cleaner = false;
else return;
}
public void EatingCallBack(object sender, EventArgs e)
{
if (StardewValley.Game1.isEating == true)
{
// Console.WriteLine("NOM NOM NOM");
fed = true;
//this code will run when the player eats an object. I.E. increases their eating skills.
}
//I'm going to assume they ate the food.
if ((StardewValley.Game1.isEating == false) && fed == true)
{
// Console.WriteLine("NOM NOM NOM");
BuildHealth_data_xp_current += ModConfig.BuildHealth_xp_eating;
fed = false;
}
return;
}
public void damage_check(object sender, EventArgs e)
{
var player = StardewValley.Game1.player;
if (old_health > player.health)
{
BuildHealth_data_xp_current += (old_health - player.health);
//Log.Info(old_health - player.health);
old_health = (player.health);
}
if (old_health < player.health)
{
old_health = player.health;
}
return;
}
public void SleepCallback(object sender, EventArgs e)
{
collapse_check = false;
if (upon_loading ==true){
Clear_Checker();
var player = StardewValley.Game1.player;
BuildHealth_data_xp_current += ModConfig.BuildHealth_xp_sleeping;
if (BuildHealth_data_old_health == 0)
{
BuildHealth_data_old_health = player.maxHealth; //grab the initial Health value
}
if (BuildHealth_data_clear_mod_effects == true)
{
Clear_DataLoader();
//This will run when the character goes to sleep. It will increase their sleeping skill.
player.maxHealth = BuildHealth_data_old_health;
BuildHealth_data_xp_nextlvl = ModConfig.BuildHealth_xp_nextlvl;
BuildHealth_data_xp_current = ModConfig.BuildHealth_xp_current;
BuildHealth_data_health_bonus_acumulated = 0;
BuildHealth_data_old_health = player.maxHealth;
BuildHealth_data_ini_health_bonus = 0;
BuildHealth_data_current_lvl = 0;
Console.WriteLine("BuildHealth Reset!");
}
if (BuildHealth_data_clear_mod_effects == false)
{
if (BuildHealth_data_current_lvl < ModConfig.BuildHealth_max_lvl)
{
while (BuildHealth_data_xp_current >= BuildHealth_data_xp_nextlvl)
{
BuildHealth_data_current_lvl += 1;
BuildHealth_data_xp_current = BuildHealth_data_xp_current - BuildHealth_data_xp_nextlvl;
BuildHealth_data_xp_nextlvl = (ModConfig.BuildHealth_xp_curve * BuildHealth_data_xp_nextlvl);
player.maxHealth += ModConfig.BuildHealth_Health_increase_upon_lvl_up;
BuildHealth_data_health_bonus_acumulated += ModConfig.BuildHealth_Health_increase_upon_lvl_up;
}
}
}
BuildHealth_data_clear_mod_effects = false;
MyWritter();
}
old_health = StardewValley.Game1.player.maxHealth;
}
public void LoadingCallBack(object sender, EventArgs e)
{
// Console.WriteLine("entering loading callback");
if (StardewModdingAPI.Inheritance.SGame.hasLoadedGame == true)
{
// Console.WriteLine("Penetrated loading callback");
DataLoader();
MyWritter();
upon_loading=true;
//runs when the player is loaded.
var player = StardewValley.Game1.player;
if (BuildHealth_data_old_health == 0)
{
BuildHealth_data_old_health = player.maxHealth; //grab the initial health value
}
player.maxHealth = BuildHealth_data_ini_health_bonus + BuildHealth_data_health_bonus_acumulated + BuildHealth_data_old_health; //incase the ini stam bonus is loaded in.
if (BuildHealth_data_clear_mod_effects == true)
{
player.maxHealth = BuildHealth_data_old_health;
Console.WriteLine("BuildHealth Reset!");
}
DataLoader();
MyWritter();
}
old_health = StardewValley.Game1.player.maxHealth;
}
public void Collapse_Callback(object sender, EventArgs e) //if the player stays up too late add some xp.
{
if (collapse_check == false)
{
if (StardewValley.Game1.farmerShouldPassOut == true)
{
BuildHealth_data_xp_current += ModConfig.BuildHealth_Pass_Out_XP;
collapse_check = true;
Log.Info("The player has collapsed!");
return;
}
}
}
//Mod config data.
public class Config
{
public double BuildHealth_xp_nextlvl { get; set; }
public double BuildHealth_xp_current { get; set; }
public double BuildHealth_xp_curve { get; set; }
public int BuildHealth_current_lvl { get; set; }
public int BuildHealth_max_lvl { get; set; }
public int BuildHealth_Health_increase_upon_lvl_up { get; set; }
public int BuildHealth_xp_tooluse { get; set; }
public int BuildHealth_xp_eating { get; set; }
public int BuildHealth_xp_sleeping { get; set; }
public int BuildHealth_ini_Health_boost { get; set; }
public int BuildHealth_Health_accumulated { get; set; }
public int BuildHealth_Pass_Out_XP { get; set; }
}
void Clear_DataLoader()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation+myname;
string mylocation3 = mylocation2+".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for BuildHealth was not found, guess I'll create it...");
BuildHealth_data_clear_mod_effects = false;
BuildHealth_data_old_health = 0;
BuildHealth_data_ini_health_bonus = 0;
}
else
{
//loads the BuildHealth_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation3);
BuildHealth_data_ini_health_bonus = Convert.ToInt32(readtext[9]);
BuildHealth_data_clear_mod_effects = Convert.ToBoolean(readtext[14]);
BuildHealth_data_old_health = Convert.ToInt32(readtext[16]);
}
}
void Clear_Checker()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation + myname;
string mylocation3 = mylocation2 + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for BuildHealth was not found, guess I'll create it...");
BuildHealth_data_clear_mod_effects = false;
BuildHealth_data_old_health = 0;
BuildHealth_data_ini_health_bonus = 0;
}
else
{
//loads the BuildHealth_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation3);
BuildHealth_data_clear_mod_effects = Convert.ToBoolean(readtext[14]);
}
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation+myname;
string mylocation3 = mylocation2+".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Console.WriteLine("The config file for BuildHealth was not found, guess I'll create it...");
BuildHealth_data_xp_nextlvl = ModConfig.BuildHealth_xp_nextlvl;
BuildHealth_data_xp_current = ModConfig.BuildHealth_xp_current;
BuildHealth_data_current_lvl = ModConfig.BuildHealth_current_lvl;
BuildHealth_data_ini_health_bonus = ModConfig.BuildHealth_ini_Health_boost;
BuildHealth_data_health_bonus_acumulated = ModConfig.BuildHealth_Health_accumulated;
BuildHealth_data_clear_mod_effects = false;
BuildHealth_data_old_health = 0;
}
else
{
// Console.WriteLine("HEY THERE IM LOADING DATA");
//loads the BuildHealth_data upon loading the mod
string[] readtext = File.ReadAllLines(mylocation3);
BuildHealth_data_current_lvl = Convert.ToInt32(readtext[3]);
BuildHealth_data_xp_nextlvl = Convert.ToDouble(readtext[7]); //these array locations refer to the lines in BuildHealth_data.json
BuildHealth_data_xp_current = Convert.ToDouble(readtext[5]);
BuildHealth_data_ini_health_bonus = Convert.ToInt32(readtext[9]);
BuildHealth_data_health_bonus_acumulated = Convert.ToInt32(readtext[11]);
BuildHealth_data_clear_mod_effects = Convert.ToBoolean(readtext[14]);
BuildHealth_data_old_health = Convert.ToInt32(readtext[16]);
}
}
void MyWritter()
{
//saves the BuildHealth_data at the end of a new day;
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "BuildHealth_data_");
string mylocation2 = mylocation+myname;
string mylocation3 = mylocation2+".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Console.WriteLine("The data file for BuildHealth was not found, guess I'll create it when you sleep.");
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Player: Build Health Data. Modification can cause errors. Edit at your own risk.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Current Level:";
mystring3[3] = BuildHealth_data_current_lvl.ToString();
mystring3[4] = "Player Current XP:";
mystring3[5] = BuildHealth_data_xp_current.ToString();
mystring3[6] = "Xp to next Level:";
mystring3[7] = BuildHealth_data_xp_nextlvl.ToString();
mystring3[8] = "Initial Health Bonus:";
mystring3[9] = BuildHealth_data_ini_health_bonus.ToString();
mystring3[10] = "Additional Health Bonus:";
mystring3[11] = BuildHealth_data_health_bonus_acumulated.ToString();
mystring3[12] = "=======================================================================================";
mystring3[13] = "RESET ALL MOD EFFECTS? This will effective start you back at square 1. Also good if you want to remove this mod.";
mystring3[14] = BuildHealth_data_clear_mod_effects.ToString();
mystring3[15] = "OLD Health AMOUNT: This is the initial value of the Player's Health before this mod took over.";
mystring3[16] = BuildHealth_data_old_health.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
// Console.WriteLine("HEY IM SAVING DATA");
//write out the info to a text file at the end of a day.
mystring3[0] = "Player: Build Health Data. Modification can cause errors. Edit at your own risk.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Player Current Level:";
mystring3[3] = BuildHealth_data_current_lvl.ToString();
mystring3[4] = "Player Current XP:";
mystring3[5] = BuildHealth_data_xp_current.ToString();
mystring3[6] = "Xp to next Level:";
mystring3[7] = BuildHealth_data_xp_nextlvl.ToString();
mystring3[8] = "Initial Health Bonus:";
mystring3[9] = BuildHealth_data_ini_health_bonus.ToString();
mystring3[10] = "Additional Health Bonus:";
mystring3[11] = BuildHealth_data_health_bonus_acumulated.ToString();
mystring3[12] = "=======================================================================================";
mystring3[13] = "RESET ALL MOD EFFECTS? This will effective start you back at square 1. Also good if you want to remove this mod.";
mystring3[14] = BuildHealth_data_clear_mod_effects.ToString();
mystring3[15] = "OLD Health AMOUNT: This is the initial value of the Player's Health before this mod took over.";
mystring3[16] = BuildHealth_data_old_health.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
} //end my function
}

View File

@ -1,14 +1,14 @@
{
"Name": "BuildHealth",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 1,
"MinorVersion": 0,
"PatchVersion": 0,
"Build": ""
},
"Description": "SMAPI port of BuildHealth. Increase your health as you play.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "SMAPI_BuildHealth.dll"
{
"Name": "BuildHealth",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 1,
"MinorVersion": 0,
"PatchVersion": 0,
"Build": ""
},
"Description": "SMAPI port of BuildHealth. Increase your health as you play.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "SMAPI_BuildHealth.dll"
}

View File

@ -1,117 +1,117 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewValley;
using StardewModdingAPI.Events;
using Microsoft.Xna.Framework;
using System.IO;
namespace CustomShopMod
{
class myclass : Mod
{
public override void Entry(params object[] objects)
{
Command.RegisterCommand("shop_mod", "Allows purchasing from custom shops. | shopmod <value> <shop_list_num> <quantity>", new[] { "(String)<value> (Int32)<shop_list_num> (Int32)<quantity>" }).CommandFired += player_addItem;
}
public void player_addItem(object sender, EventArgsCommand e)
{
if (e.Command.CalledArgs.Length > 0)
{
if (e.Command.CalledArgs.Length <= 3)
{
int quantity = Convert.ToInt32(e.Command.CalledArgs[2]);
int list_num = Convert.ToInt32(e.Command.CalledArgs[1]);
string newstring = e.Command.CalledArgs[0];
DataLoader(newstring, list_num, quantity);
}
else Log.Error("Invalid number of parameters! The paramaters are as follows: shop_mod (shop_name.txt) (Shop_List_Number) (quantity)");
}
else Log.Error("Invalid Parameters. Try Shop_Name.txt Shop_List_Id Quantity");
}
public void DataLoader(string funnystring, int list_num, int quantity)
{
int object_id = 0;
int count = 0;
int price = 0;
//loads the data to the variables upon loading the game.
//string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, funnystring);
string mylocation3 = mylocation + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Log.Error("Invalid shop.Please make sure that " + mylocation3 + " exists!");
}
else
{
string[] separators = { "/", " " };
var lineCount = File.ReadLines(mylocation3).Count();
if (lineCount > 12 + ((list_num - 1) * 11))
{ //my logic seems reversed here?
string[] readtext = File.ReadAllLines(mylocation3);
string obj_name = readtext[6 + ((list_num - 1) * 11)];
string string_obj_id = readtext[8 + ((list_num - 1) * 11)];
string string_count_id = readtext[10 + ((list_num - 1) * 11)];
string string_price_id = readtext[12 + ((list_num - 1) * 11)];
string[] string_obj_id_arr = string_obj_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
string[] string_count_id_arr = string_count_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
// string[] string_price_id_arr = string_price_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
object_id = Convert.ToInt32(string_obj_id);
count = Convert.ToInt32(string_count_id);
price = Convert.ToInt32(string_price_id);
int array_size = string_obj_id_arr.Length;
int array_size2 = string_count_id_arr.Length;
Log.Info(array_size2);
Log.Info(array_size);
int i = 0;
// string[] object_id_array = object_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
//Log.Info(quantity);
//Log.Info(price);
if (array_size == array_size2)
{
while (i < array_size && i < array_size2)
{
object_id = Convert.ToInt32(string_obj_id_arr[i]);
count = Convert.ToInt32(string_count_id_arr[i]);
price = Convert.ToInt32(string_price_id);
i++;
if (quantity * count <= 999)
{
if (StardewModdingAPI.Entities.SPlayer.Player.money >= quantity * price)
{
StardewModdingAPI.Entities.SPlayer.Player.money -= quantity * price;
var o = new StardewValley.Object(object_id, count * quantity);
Game1.player.addItemByMenuIfNecessary(o);
Log.Success("Successfully purchased " + obj_name + " from " + funnystring);
}
else Log.Error("Not enough Money!");
}
else Log.Error("Warning. Attempting to obtain more than 999 of an item. This loss was prevented.");
}
}
else Log.Error("Item Object Id's and Object count values are of different lengths. Please make sure that they are the same length! i.e each has the same amount of elements.");
}
else Log.Error("You tried to call something not in the text file. Please stick to the original format!");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewValley;
using StardewModdingAPI.Events;
using Microsoft.Xna.Framework;
using System.IO;
namespace CustomShopMod
{
class myclass : Mod
{
public override void Entry(params object[] objects)
{
Command.RegisterCommand("shop_mod", "Allows purchasing from custom shops. | shopmod <value> <shop_list_num> <quantity>", new[] { "(String)<value> (Int32)<shop_list_num> (Int32)<quantity>" }).CommandFired += player_addItem;
}
public void player_addItem(object sender, EventArgsCommand e)
{
if (e.Command.CalledArgs.Length > 0)
{
if (e.Command.CalledArgs.Length <= 3)
{
int quantity = Convert.ToInt32(e.Command.CalledArgs[2]);
int list_num = Convert.ToInt32(e.Command.CalledArgs[1]);
string newstring = e.Command.CalledArgs[0];
DataLoader(newstring, list_num, quantity);
}
else Log.Error("Invalid number of parameters! The paramaters are as follows: shop_mod (shop_name.txt) (Shop_List_Number) (quantity)");
}
else Log.Error("Invalid Parameters. Try Shop_Name.txt Shop_List_Id Quantity");
}
public void DataLoader(string funnystring, int list_num, int quantity)
{
int object_id = 0;
int count = 0;
int price = 0;
//loads the data to the variables upon loading the game.
//string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, funnystring);
string mylocation3 = mylocation + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Log.Error("Invalid shop.Please make sure that " + mylocation3 + " exists!");
}
else
{
string[] separators = { "/", " " };
var lineCount = File.ReadLines(mylocation3).Count();
if (lineCount > 12 + ((list_num - 1) * 11))
{ //my logic seems reversed here?
string[] readtext = File.ReadAllLines(mylocation3);
string obj_name = readtext[6 + ((list_num - 1) * 11)];
string string_obj_id = readtext[8 + ((list_num - 1) * 11)];
string string_count_id = readtext[10 + ((list_num - 1) * 11)];
string string_price_id = readtext[12 + ((list_num - 1) * 11)];
string[] string_obj_id_arr = string_obj_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
string[] string_count_id_arr = string_count_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
// string[] string_price_id_arr = string_price_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
object_id = Convert.ToInt32(string_obj_id);
count = Convert.ToInt32(string_count_id);
price = Convert.ToInt32(string_price_id);
int array_size = string_obj_id_arr.Length;
int array_size2 = string_count_id_arr.Length;
Log.Info(array_size2);
Log.Info(array_size);
int i = 0;
// string[] object_id_array = object_id.Split(separators, StringSplitOptions.RemoveEmptyEntries);
//Log.Info(quantity);
//Log.Info(price);
if (array_size == array_size2)
{
while (i < array_size && i < array_size2)
{
object_id = Convert.ToInt32(string_obj_id_arr[i]);
count = Convert.ToInt32(string_count_id_arr[i]);
price = Convert.ToInt32(string_price_id);
i++;
if (quantity * count <= 999)
{
if (StardewModdingAPI.Entities.SPlayer.Player.money >= quantity * price)
{
StardewModdingAPI.Entities.SPlayer.Player.money -= quantity * price;
var o = new StardewValley.Object(object_id, count * quantity);
Game1.player.addItemByMenuIfNecessary(o);
Log.Success("Successfully purchased " + obj_name + " from " + funnystring);
}
else Log.Error("Not enough Money!");
}
else Log.Error("Warning. Attempting to obtain more than 999 of an item. This loss was prevented.");
}
}
else Log.Error("Item Object Id's and Object count values are of different lengths. Please make sure that they are the same length! i.e each has the same amount of elements.");
}
else Log.Error("You tried to call something not in the text file. Please stick to the original format!");
}
}
}
}

View File

@ -1,35 +1,35 @@
Welcome to ShopMod! This is Josh's_Shop! //command example shop_mod Josh's_Shop (Shop_List_ID/Name) Quantity
These are the items for sale:
=============================================================================================================================
Shop_List_ID:
1
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
10
price: The base cost of each purchase.
50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
2
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
20
price: The base cost of each purchase.
50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
3
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
50
price: The base cost of each purchase.
50
Welcome to ShopMod! This is Josh's_Shop! //command example shop_mod Josh's_Shop (Shop_List_ID/Name) Quantity
These are the items for sale:
=============================================================================================================================
Shop_List_ID:
1
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
10
price: The base cost of each purchase.
50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
2
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
20
price: The base cost of each purchase.
50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
3
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
50
price: The base cost of each purchase.
50

View File

@ -1,14 +1,14 @@
{
"Name": "CustomShopMod",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "A shoddy attempt at adding in custom shops. Not a good long-term solution.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "CustomShopMod.dll"
{
"Name": "CustomShopMod",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "A shoddy attempt at adding in custom shops. Not a good long-term solution.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "CustomShopMod.dll"
}

View File

@ -1,35 +1,35 @@
Welcome to ShopMod! This is potato_seed_shop! //command example shop_mod potato_seed_shop (Shop_List_ID) Quantity
These are the items for sale:
=============================================================================================================================
Shop_List_ID:
1
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
10
price: The base cost of each purchase.
50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
2
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Some Potato Seeds
Item_ID: This is the Object_Id reference to Objects.Yaml.
475
count: The number of things being bought at once. Good for bulk buying quantities.
10
price: The base cost of each purchase.
200
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
3
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Error Items
Item_ID: This is the Object_Id reference to Objects.Yaml.
375
count: The number of things being bought at once. Good for bulk buying quantities.
1
price: The base cost of each purchase.
75
Welcome to ShopMod! This is potato_seed_shop! //command example shop_mod potato_seed_shop (Shop_List_ID) Quantity
These are the items for sale:
=============================================================================================================================
Shop_List_ID:
1
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Stack_of_Wood
Item_ID: This is the Object_Id reference to Objects.Yaml.
388
count: The number of things being bought at once. Good for bulk buying quantities.
10
price: The base cost of each purchase.
50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
2
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Some Potato Seeds
Item_ID: This is the Object_Id reference to Objects.Yaml.
475
count: The number of things being bought at once. Good for bulk buying quantities.
10
price: The base cost of each purchase.
200
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shop_List_ID:
3
Stock Name: This is the user made name of whatever is being bought. Can also be a search field.
Error Items
Item_ID: This is the Object_Id reference to Objects.Yaml.
375
count: The number of things being bought at once. Good for bulk buying quantities.
1
price: The base cost of each purchase.
75

View File

@ -1,20 +1,20 @@
Config: Custom_Shop_Redux. Feel free to mess with these settings.
====================================================================================
Key binding for saving anywhere. Press this key to save anywhere!
U
Config: Custom_Shop_Redux. Feel free to mess with these settings.
====================================================================================
Key binding for saving anywhere. Press this key to save anywhere!
U

View File

@ -1,14 +1,14 @@
This is the custom shop mod!
Basically making a custom shop is as simple as following the formatting in the pre-existsing custom_shops in a new text file.
If you ever wish to call the mod without the menu in your own mod, simply call shop_file_call("myfilename.txt") in your Stardew Valley Mod.
(Make sure you add a reference to this mod.)
The full call would look something like.
Custom_Shop_Mod_Redux.Class1.shop_file_call("file.txt");
Where file.txt is the name of the shop info you wish to open.
This is the custom shop mod!
Basically making a custom shop is as simple as following the formatting in the pre-existsing custom_shops in a new text file.
If you ever wish to call the mod without the menu in your own mod, simply call shop_file_call("myfilename.txt") in your Stardew Valley Mod.
(Make sure you add a reference to this mod.)
The full call would look something like.
Custom_Shop_Mod_Redux.Class1.shop_file_call("file.txt");
Where file.txt is the name of the shop info you wish to open.
Make sure the formatting is correct otherwise you will get errors!

View File

@ -1,14 +1,14 @@
{
"Name": "CustomShopMod-Redux_GUI",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "A nice way to make custom shops.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "Custom_Shop_Mod_Redux_GUI.dll"
{
"Name": "CustomShopMod-Redux_GUI",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "A nice way to make custom shops.",
"UniqueID": "4be88c18-b6f3-49b0-ba96-f94b1a5be890",
"PerSaveConfigs": false,
"EntryDll": "Custom_Shop_Mod_Redux_GUI.dll"
}

View File

@ -1,118 +1,118 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewValley;
using Custom_Shop_Mod_Redux;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using StardewValley.Menus;
namespace Custom_NPC_With_Custom_Shop_Redux
{
public class Class1 : Mod
{
bool last_chat; //make sure that the dialogue will appear only on the last dialogue of the npc for that day.
bool once; //make sure that my shop is only called once
bool activate_shop; //speaks for itself.
NPC myNPC; //my merchant npc
string path; //path of .dll file of mod on disk
string filename; //name of shop file
bool game_loaded; //make sure player is loaded otherwise things blow up.
bool first; ////an awfully named variable that prevents my npc from being updated a billion times.
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.GameEvents.UpdateTick += GameEvents_UpdateTick;
}
public void GameEvents_UpdateTick(object sender, EventArgs e) //run all the time for accuracy.
{
//the order of these if statments is critical.
if (game_loaded == false) return;
if (last_chat==true && Game1.currentSpeaker == null) //if i spoke to my npc, but we are through talking today.
{
Log.Info("HELLO? IS ANYONE HOME?");
npc_shop();
last_chat = false;
}
if (Game1.currentSpeaker == null) //keep the bools in check always if not speaking to an NPC.
{
once = false;
first = true;
activate_shop = false;
return;
}
if (Game1.currentSpeaker.name == myNPC.name) // my npc that I am looking for. Checked in The loading function.
{
//DO a bunch of checking. Seriously I recommend that this stays the same.
if (first == false) return;
Dialogue ehh = Game1.currentSpeaker.CurrentDialogue.Peek();
if (Game1.currentSpeaker.CurrentDialogue.Peek() == null) //if I am on the last dialogue tell me so
{
last_chat = true;
}
if (ehh.getCurrentDialogue() == "") last_chat = true; //if I am on the last dialogue tell me so
last_chat = ehh.isOnFinalDialogue(); //if I am on the last dialogue tell me so
first = false; //an awfully named variable that prevents my npc from being updated a billion times.
}
}
//actually call my shop.
public void npc_shop()
{
if (activate_shop == false)
{
activate_shop = true; //if my shop isn't set propperly but you call this function, go ahead and set the shop anyways. You probably know what you are doing.
}
if (activate_shop == true && !StardewValley.Game1.onScreenMenus.Contains(Custom_Shop_Mod_Redux.Class1.mymenu)) //if my shop should be active and isn't on the screen, create it.
{
if (once == true) return;
Custom_Shop_Mod_Redux.Class1.external_shop_file_call(path, filename,"Hey there aren't you going to buy something?", myNPC); //externally call my custom shop with added npc dialogue and npc portrait
// Custom_Shop_Mod_Redux.Class1.external_shop_file_call(path, filename); This is the older, much simpler default shop interface.
once = true;
}
}
public void PlayerEvents_LoadedGame(object sender, EventArgs e)
{
last_chat = false;
first = true;
game_loaded = true;
activate_shop = false;
once = false;
path = PathOnDisk; //points to directory where .dll is stored
filename = "My_Streaming_Shop.txt"; //name of shop file
GameLocation NPClocation;
foreach (StardewValley.GameLocation asdf in Game1.locations)
{
NPClocation = (GameLocation)asdf;
foreach (StardewValley.NPC obj in NPClocation.characters)
{
if (obj.name == "Abigail") //setup abigail to be my merchant npc. This can be any npc in the game.
{
Log.Info(obj.name);
myNPC = obj;
}
}
}
} //all these curleys in a row...
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewValley;
using Custom_Shop_Mod_Redux;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using StardewValley.Menus;
namespace Custom_NPC_With_Custom_Shop_Redux
{
public class Class1 : Mod
{
bool last_chat; //make sure that the dialogue will appear only on the last dialogue of the npc for that day.
bool once; //make sure that my shop is only called once
bool activate_shop; //speaks for itself.
NPC myNPC; //my merchant npc
string path; //path of .dll file of mod on disk
string filename; //name of shop file
bool game_loaded; //make sure player is loaded otherwise things blow up.
bool first; ////an awfully named variable that prevents my npc from being updated a billion times.
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.GameEvents.UpdateTick += GameEvents_UpdateTick;
}
public void GameEvents_UpdateTick(object sender, EventArgs e) //run all the time for accuracy.
{
//the order of these if statments is critical.
if (game_loaded == false) return;
if (last_chat==true && Game1.currentSpeaker == null) //if i spoke to my npc, but we are through talking today.
{
Log.Info("HELLO? IS ANYONE HOME?");
npc_shop();
last_chat = false;
}
if (Game1.currentSpeaker == null) //keep the bools in check always if not speaking to an NPC.
{
once = false;
first = true;
activate_shop = false;
return;
}
if (Game1.currentSpeaker.name == myNPC.name) // my npc that I am looking for. Checked in The loading function.
{
//DO a bunch of checking. Seriously I recommend that this stays the same.
if (first == false) return;
Dialogue ehh = Game1.currentSpeaker.CurrentDialogue.Peek();
if (Game1.currentSpeaker.CurrentDialogue.Peek() == null) //if I am on the last dialogue tell me so
{
last_chat = true;
}
if (ehh.getCurrentDialogue() == "") last_chat = true; //if I am on the last dialogue tell me so
last_chat = ehh.isOnFinalDialogue(); //if I am on the last dialogue tell me so
first = false; //an awfully named variable that prevents my npc from being updated a billion times.
}
}
//actually call my shop.
public void npc_shop()
{
if (activate_shop == false)
{
activate_shop = true; //if my shop isn't set propperly but you call this function, go ahead and set the shop anyways. You probably know what you are doing.
}
if (activate_shop == true && !StardewValley.Game1.onScreenMenus.Contains(Custom_Shop_Mod_Redux.Class1.mymenu)) //if my shop should be active and isn't on the screen, create it.
{
if (once == true) return;
Custom_Shop_Mod_Redux.Class1.external_shop_file_call(path, filename,"Hey there aren't you going to buy something?", myNPC); //externally call my custom shop with added npc dialogue and npc portrait
// Custom_Shop_Mod_Redux.Class1.external_shop_file_call(path, filename); This is the older, much simpler default shop interface.
once = true;
}
}
public void PlayerEvents_LoadedGame(object sender, EventArgs e)
{
last_chat = false;
first = true;
game_loaded = true;
activate_shop = false;
once = false;
path = PathOnDisk; //points to directory where .dll is stored
filename = "My_Streaming_Shop.txt"; //name of shop file
GameLocation NPClocation;
foreach (StardewValley.GameLocation asdf in Game1.locations)
{
NPClocation = (GameLocation)asdf;
foreach (StardewValley.NPC obj in NPClocation.characters)
{
if (obj.name == "Abigail") //setup abigail to be my merchant npc. This can be any npc in the game.
{
Log.Info(obj.name);
myNPC = obj;
}
}
}
} //all these curleys in a row...
}
}

View File

@ -1,14 +1,14 @@
{
"Name": "Custom_NPC_With_Custom_Shop_Redux",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 0,
"Build": ""
},
"Description": "Add more shops to the game via NPCs.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Custom_NPC_With_Custom_Shop_Redux.dll"
{
"Name": "Custom_NPC_With_Custom_Shop_Redux",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 0,
"Build": ""
},
"Description": "Add more shops to the game via NPCs.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Custom_NPC_With_Custom_Shop_Redux.dll"
}

View File

@ -1,160 +1,160 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using System.IO;
using StardewValley;
namespace MoreRain
{
public class MoreRain : Mod
{
int rainint = 0;
int thunderint = 0;
bool gameloaded;
bool suppress_log;
public override void Entry(params object[] objects)
{
// set_up();
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += TimeEvents_DayOfMonthChanged;
DataLoader();
MyWritter();
}
public void TimeEvents_DayOfMonthChanged(object sender, StardewModdingAPI.Events.EventArgsIntChanged e)
{
if (gameloaded == false) return;
New_day_Update();
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
gameloaded = true;
New_day_Update();
}
void New_day_Update() //updates all info whenever I call this.
{
if (Game1.weatherForTomorrow == Game1.weather_festival )
{
if(suppress_log==false)Log.Info("There is a festival tomorrow, therefore it will not rain.");
return;
}
if(Game1.weatherForTomorrow== Game1.weather_wedding)
{
if(suppress_log==false)Log.Info("There is a wedding tomorrow and rain on your wedding day will not happen.");
return;
}
Random random = new Random();
int randomNumber = random.Next(0, 100); //sets ran variable to some num between 0 and 100
Random thunder_random = new Random();
int thunder_randomNumber = random.Next(0, 100);
if (StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_sunny || StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_rain || StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_lightning || StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_debris)
{ //if my weather isn't something special. This is to prevent something from going wierd.
if (randomNumber <= rainint) //if the random variable is less than or equal to the chance for rain.
{
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_rain; //sets rainy weather tomorrow
if(suppress_log==false)Log.Info("It will rain tomorrow.");
}
else {
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_sunny;//sets sunny weather tomorrow
if(suppress_log==false)Log.Info("It will not rain tomorrow.");
}
if (StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_rain)
{
if (randomNumber <= thunderint) //if the random variable is less than or equal to the chance for rain.
{
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_lightning; //sets rainy weather tomorrow
if(suppress_log==false)Log.Info("It will be stormy tomorrow.");
}
else
{
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_rain;//sets sunny weather tomorrow
if(suppress_log==false)Log.Info("There will be no lightning tomorrow.");
}
}
}
else
{
// if(suppress_log==false)Log.Info("The weather for tomorrow is not rainy, stormy, or sunny. Must be something special.");
}
if(suppress_log==false)Log.Info("More Rain has updated.");
}
void MyWritter()
{
//saves the BuildEndurance_data at the end of a new day;
string mylocation = Path.Combine(PathOnDisk, "More_Rain_Config");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Log.Info("The data file for More Rain wasn't found. Time to create it!");
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Player: More Rain Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Rain chance: The chance out of 100 that it will rain tomorrow.";
mystring3[3] = rainint.ToString();
mystring3[4] = "Storm chance: The chance out of 100 that it will be stormy tomorrow.";
mystring3[5] = thunderint.ToString();
mystring3[6] = "Supress Log: If true, the mod won't output any messages to the console.";
mystring3[7] = suppress_log.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Player: More Rain Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Rain chance: The chance out of 100 that it will rain tomorrow.";
mystring3[3] = rainint.ToString();
mystring3[4] = "Storm chance: The chance out of 100 that it will be stormy tomorrow.";
mystring3[5] = thunderint.ToString();
mystring3[6] = "Supress Log: If true, the mod won't output any messages to the console.";
mystring3[7] = suppress_log.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
string mylocation = Path.Combine(PathOnDisk, "More_Rain_Config");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
rainint = 15;
thunderint = 5;
suppress_log = true;
}
else
{
string[] readtext = File.ReadAllLines(mylocation3);
rainint = Convert.ToInt32(readtext[3]);
thunderint = Convert.ToInt32(readtext[5]); //these array locations refer to the lines in BuildEndurance_data.json
suppress_log = Convert.ToBoolean(readtext[7]);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using System.IO;
using StardewValley;
namespace MoreRain
{
public class MoreRain : Mod
{
int rainint = 0;
int thunderint = 0;
bool gameloaded;
bool suppress_log;
public override void Entry(params object[] objects)
{
// set_up();
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += TimeEvents_DayOfMonthChanged;
DataLoader();
MyWritter();
}
public void TimeEvents_DayOfMonthChanged(object sender, StardewModdingAPI.Events.EventArgsIntChanged e)
{
if (gameloaded == false) return;
New_day_Update();
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
gameloaded = true;
New_day_Update();
}
void New_day_Update() //updates all info whenever I call this.
{
if (Game1.weatherForTomorrow == Game1.weather_festival )
{
if(suppress_log==false)Log.Info("There is a festival tomorrow, therefore it will not rain.");
return;
}
if(Game1.weatherForTomorrow== Game1.weather_wedding)
{
if(suppress_log==false)Log.Info("There is a wedding tomorrow and rain on your wedding day will not happen.");
return;
}
Random random = new Random();
int randomNumber = random.Next(0, 100); //sets ran variable to some num between 0 and 100
Random thunder_random = new Random();
int thunder_randomNumber = random.Next(0, 100);
if (StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_sunny || StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_rain || StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_lightning || StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_debris)
{ //if my weather isn't something special. This is to prevent something from going wierd.
if (randomNumber <= rainint) //if the random variable is less than or equal to the chance for rain.
{
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_rain; //sets rainy weather tomorrow
if(suppress_log==false)Log.Info("It will rain tomorrow.");
}
else {
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_sunny;//sets sunny weather tomorrow
if(suppress_log==false)Log.Info("It will not rain tomorrow.");
}
if (StardewValley.Game1.weatherForTomorrow == StardewValley.Game1.weather_rain)
{
if (randomNumber <= thunderint) //if the random variable is less than or equal to the chance for rain.
{
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_lightning; //sets rainy weather tomorrow
if(suppress_log==false)Log.Info("It will be stormy tomorrow.");
}
else
{
StardewValley.Game1.weatherForTomorrow = StardewValley.Game1.weather_rain;//sets sunny weather tomorrow
if(suppress_log==false)Log.Info("There will be no lightning tomorrow.");
}
}
}
else
{
// if(suppress_log==false)Log.Info("The weather for tomorrow is not rainy, stormy, or sunny. Must be something special.");
}
if(suppress_log==false)Log.Info("More Rain has updated.");
}
void MyWritter()
{
//saves the BuildEndurance_data at the end of a new day;
string mylocation = Path.Combine(PathOnDisk, "More_Rain_Config");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Log.Info("The data file for More Rain wasn't found. Time to create it!");
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Player: More Rain Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Rain chance: The chance out of 100 that it will rain tomorrow.";
mystring3[3] = rainint.ToString();
mystring3[4] = "Storm chance: The chance out of 100 that it will be stormy tomorrow.";
mystring3[5] = thunderint.ToString();
mystring3[6] = "Supress Log: If true, the mod won't output any messages to the console.";
mystring3[7] = suppress_log.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Player: More Rain Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Rain chance: The chance out of 100 that it will rain tomorrow.";
mystring3[3] = rainint.ToString();
mystring3[4] = "Storm chance: The chance out of 100 that it will be stormy tomorrow.";
mystring3[5] = thunderint.ToString();
mystring3[6] = "Supress Log: If true, the mod won't output any messages to the console.";
mystring3[7] = suppress_log.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
string mylocation = Path.Combine(PathOnDisk, "More_Rain_Config");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
rainint = 15;
thunderint = 5;
suppress_log = true;
}
else
{
string[] readtext = File.ReadAllLines(mylocation3);
rainint = Convert.ToInt32(readtext[3]);
thunderint = Convert.ToInt32(readtext[5]); //these array locations refer to the lines in BuildEndurance_data.json
suppress_log = Convert.ToBoolean(readtext[7]);
}
}
}
}

View File

@ -1,20 +1,20 @@
Player: More Rain Config. Feel free to edit.
====================================================================================
Rain chance: The chance out of 100 that it will rain tomorrow.
15
Storm chance: The chance out of 100 that it will be stormy tomorrow.
5
Supress Log: If true, the mod won't output any messages to the console.
True
Player: More Rain Config. Feel free to edit.
====================================================================================
Rain chance: The chance out of 100 that it will rain tomorrow.
15
Storm chance: The chance out of 100 that it will be stormy tomorrow.
5
Supress Log: If true, the mod won't output any messages to the console.
True

View File

@ -1,14 +1,14 @@
{
"Name": "More_Rain",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 3,
"Build": ""
},
"Description": "Change how much it rains in the game.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Stardew_More_Rain.dll"
{
"Name": "More_Rain",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 3,
"Build": ""
},
"Description": "Change how much it rains in the game.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Stardew_More_Rain.dll"
}

View File

@ -1,144 +1,144 @@
using System;
using StardewValley;
using StardewModdingAPI;
using System.IO;
/*
TO DO:
*/
namespace Stardew_Save_Anywhere_Mod
{
public class Class1 : Mod
{
string key_binding="R";
bool game_loaded = false;
public override void Entry(params object[] objects)
{
//set up all of my events here
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.ControlEvents.KeyPressed += ControlEvents_KeyPressed;
}
public void ControlEvents_KeyPressed(object sender, StardewModdingAPI.Events.EventArgsKeyPressed e)
{
if (Game1.player == null) return;
if (Game1.player.currentLocation == null) return;
if (game_loaded == false) return;
if (e.KeyPressed.ToString() == key_binding) //if the key is pressed, load my cusom save function
{
if (StardewValley.Game1.player.currentLocation.name == "ArchaeologyHouse")
{
my_save();
}
else
{
Log.Info("You can't rearrange the museum here!");
}
}
//DataLoader_Settings(); //update the key if players changed it while playing.
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
game_loaded = true;
DataLoader_Settings();
MyWritter_Settings();
}
void DataLoader_Settings()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Museum_Rearrange_Config");
string mylocation2 = mylocation;
string mylocation3 = mylocation2 + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
// Console.WriteLine("Can't load custom save info since the file doesn't exist.");
key_binding = "R";
// Log.Info("KEY TIME");
}
else
{
// Console.WriteLine("HEY THERE IM LOADING DATA");
string[] readtext = File.ReadAllLines(mylocation3);
key_binding = Convert.ToString(readtext[3]);
// Log.Info(key_binding);
// Log.Info(Convert.ToString(readtext[3]));
}
}
void MyWritter_Settings()
{
//write all of my info to a text file.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Museum_Rearrange_Config");
string mylocation2 = mylocation;
string mylocation3 = mylocation2 + ".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Console.WriteLine("The custom character save info doesn't exist. It will be created when the custom saving method is run. Which is now.");
mystring3[0] = "Config: Museum_Rearranger. Feel free to mess with these settings.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Key binding for saving anywhere. Press this key to save anywhere!";
mystring3[3] = key_binding.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Config: Save_Anywhere Info. Feel free to mess with these settings.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Key binding for saving anywhere. Press this key to save anywhere!";
mystring3[3] = key_binding.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
void my_save()
{
// Game1.activeClickableMenu = new StardewValley.Menus.SaveGameMenu(); //This command is what allows the player to save anywhere as it calls the saving function.
Game1.activeClickableMenu = new StardewValley.Menus.MuseumMenu();
}
}
}
using System;
using StardewValley;
using StardewModdingAPI;
using System.IO;
/*
TO DO:
*/
namespace Stardew_Save_Anywhere_Mod
{
public class Class1 : Mod
{
string key_binding="R";
bool game_loaded = false;
public override void Entry(params object[] objects)
{
//set up all of my events here
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.ControlEvents.KeyPressed += ControlEvents_KeyPressed;
}
public void ControlEvents_KeyPressed(object sender, StardewModdingAPI.Events.EventArgsKeyPressed e)
{
if (Game1.player == null) return;
if (Game1.player.currentLocation == null) return;
if (game_loaded == false) return;
if (e.KeyPressed.ToString() == key_binding) //if the key is pressed, load my cusom save function
{
if (StardewValley.Game1.player.currentLocation.name == "ArchaeologyHouse")
{
my_save();
}
else
{
Log.Info("You can't rearrange the museum here!");
}
}
//DataLoader_Settings(); //update the key if players changed it while playing.
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
game_loaded = true;
DataLoader_Settings();
MyWritter_Settings();
}
void DataLoader_Settings()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Museum_Rearrange_Config");
string mylocation2 = mylocation;
string mylocation3 = mylocation2 + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
// Console.WriteLine("Can't load custom save info since the file doesn't exist.");
key_binding = "R";
// Log.Info("KEY TIME");
}
else
{
// Console.WriteLine("HEY THERE IM LOADING DATA");
string[] readtext = File.ReadAllLines(mylocation3);
key_binding = Convert.ToString(readtext[3]);
// Log.Info(key_binding);
// Log.Info(Convert.ToString(readtext[3]));
}
}
void MyWritter_Settings()
{
//write all of my info to a text file.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Museum_Rearrange_Config");
string mylocation2 = mylocation;
string mylocation3 = mylocation2 + ".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Console.WriteLine("The custom character save info doesn't exist. It will be created when the custom saving method is run. Which is now.");
mystring3[0] = "Config: Museum_Rearranger. Feel free to mess with these settings.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Key binding for saving anywhere. Press this key to save anywhere!";
mystring3[3] = key_binding.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
//write out the info to a text file at the end of a day. This will run if it doesnt exist.
mystring3[0] = "Config: Save_Anywhere Info. Feel free to mess with these settings.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Key binding for saving anywhere. Press this key to save anywhere!";
mystring3[3] = key_binding.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
void my_save()
{
// Game1.activeClickableMenu = new StardewValley.Menus.SaveGameMenu(); //This command is what allows the player to save anywhere as it calls the saving function.
Game1.activeClickableMenu = new StardewValley.Menus.MuseumMenu();
}
}
}
//end class

View File

@ -1,20 +1,20 @@
Config: Save_Anywhere Info. Feel free to mess with these settings.
====================================================================================
Key binding for saving anywhere. Press this key to save anywhere!
R
Config: Save_Anywhere Info. Feel free to mess with these settings.
====================================================================================
Key binding for saving anywhere. Press this key to save anywhere!
R

View File

@ -1,14 +1,14 @@
{
"Name": "Museum_Rearrange",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "Rearrange the museum at the click of a key.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Museum_Rearrange.dll"
{
"Name": "Museum_Rearrange",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "Rearrange the museum at the click of a key.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Museum_Rearrange.dll"
}

View File

@ -1,355 +1,355 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewValley;
using StardewModdingAPI;
using System.IO;
/*TODO:
*/
/*
Issues:
-Mail can't be wiped without destroying all mail.
-Lighting transition does not work if it is raining.
-set the weather to clear if you are stayig up late.
-transition still doesnt work. However atleast it is dark now.
-Known glitched
*/
namespace Stardew_NightOwl
{
public class Class1 : Mod
{
int player_x;
int player_y;
string prior_map;
bool reset_check;
bool was_raining;
bool time_reset;
int prior_money;
int post_money;
float pre_stam;
int pre_health;
bool lighting_transition; //if true transition happens. If false, game starts out bright at 2AM. Good to remove that awkward change from dark to bright.
bool warp;
bool stay_up;
bool wipe_mail;
bool protect_money;
bool persistant_health;
bool persistant_stamina;
bool game_loaded;
bool once;
bool up_late;
bool first_check;
bool warped_check;
bool super_map_warping_check;
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.TimeEvents.TimeOfDayChanged += TimeEvents_TimeOfDayChanged;
// StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += TimeEvents_DayOfMonthChanged;
StardewModdingAPI.Events.TimeEvents.OnNewDay += TimeEvents_DayOfMonthChanged;
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.GameEvents.FourthUpdateTick += GameEvents_FourthUpdateTick;
}
public void GameEvents_FourthUpdateTick(object sender, EventArgs e)
{
if (game_loaded == false) return;
if (Game1.timeOfDay == 600)
{
if (once==true)
{
// Log.AsyncM("NEW MONEY" + Game1.player.money);
// Game1.player.money = Game1.player.money + post_money;
once = false;
}
}
if (warped_check == false)
{
if (warp == true)
{
Log.Info("Warping!!!");
if (prior_map == null)
{
warped_check = true;
super_map_warping_check = true;
return;
}
Game1.warpFarmer(prior_map, player_x, player_y, false);
warped_check = true;
super_map_warping_check = true;
prior_map = null;
}
}
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
DataLoader();
MyWritter();
game_loaded = true;
once = false;
up_late = false;
first_check = false;
warped_check = true;
super_map_warping_check = true;
}
public void TimeEvents_DayOfMonthChanged(object sender, StardewModdingAPI.Events.EventArgsNewDay e)
{
if (game_loaded == false) return;
if (first_check == false)
{
first_check = true;
Log.Info("first");
return;
}
else
{
first_check = false;
Log.Info("Second");
}
if(Game1.farmerShouldPassOut== true) Game1.farmerShouldPassOut = false; //make the farmer collapse.
reset_check = false;
//Game1.farmerShouldPassOut = false; //make the farmer collapse.
DataLoader();
MyWritter();
//List<string> newmail = new List<string>();
Queue<string> newmail = new Queue<string>();
up_late = false;
if (time_reset == true)
{
was_raining = false;
if (persistant_stamina==true) Game1.player.stamina = pre_stam; //reset health and stam upon collapsing
if (persistant_health == true) Game1.player.health = pre_health;
//post_money = Game1.player.money;
if (protect_money == true) {
Game1.player.money += post_money;
once = true;
} //add the money back from colapsing.
time_reset = false; //reset my bool.
if(warp==true)Game1.warpFarmer(prior_map, player_x, player_y, false);
// very_old_money = (safety_cash - Game1.player.money);
//Game1.player.money += very_old_money;
}
if (wipe_mail == true)
{
foreach (var i in Game1.mailbox) //delete those annoying charge messages. If only I could do this with mail IRL.
{
Log.Info(i);
if (i.Contains("passedOut"))
{
Log.Info("Found bad mail");
}
else {
newmail.Enqueue(i);
}
}
Game1.mailbox.Clear();
foreach (string mail in newmail)
{
Game1.mailbox.Enqueue(mail);
}
}
warped_check = false;
//prior_map==null; //prevents multiple warping when sleeping
}
public void TimeEvents_TimeOfDayChanged(object sender, StardewModdingAPI.Events.EventArgsIntChanged e)
{
if (game_loaded == false) return;
float color_mod;
//transition the lighting for more "realistic" lighting from 2am to 11am. There is an awkward screen shuffle that happens because of this update.
if (lighting_transition == true)
{
if (Game1.timeOfDay > 200 && Game1.timeOfDay < 1100)
{
color_mod = (1100 - Game1.timeOfDay) / 1000f; //.7f
Game1.outdoorLight = Game1.ambientLight * color_mod;
}
}
if (stay_up == true)
{
if (Game1.timeOfDay == 2550)
{
if (StardewValley.Game1.isRaining == true)
{
was_raining = true;
StardewValley.Game1.isRaining = false; //regardless make sure I change the weather. Otherwise lighting gets screwy.
}
StardewValley.Game1.updateWeatherIcon();
Game1.timeOfDay = 150; //change it from 1:50 am late, to 1:50 am early
}
}
if (Game1.timeOfDay == 550) //if the game time is 5:50 AM
{
up_late = true;
}
if (Game1.timeOfDay == 600) //when time is 6:00 AM after staying up
{
if (up_late == false)
{
return;
}
if (super_map_warping_check == true)
{
if (Game1.currentMinigame != null) Game1.currentMinigame = null;
//if (time_reset == false) return;
time_reset = true;
player_x = Game1.player.getTileX();
player_y = Game1.player.getTileY();
prior_map = Game1.player.currentLocation.name;
Log.Info(prior_map);
Log.Info(player_x);
Log.Info(player_y);
super_map_warping_check = false;
Game1.farmerShouldPassOut = true; //make the farmer collapse.
pre_stam = Game1.player.stamina;
pre_health = Game1.player.health;
prior_money = Game1.player.money;
if (Game1.player.money <= 10000)
{
post_money = prior_money / 10;
}
else
{
post_money = 1000;
}
}
}
}
void MyWritter()
{
//saves the BuildEndurance_data at the end of a new day;
string myname = Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Night_Owl_Config_");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Log.Info("The data file for Night Owl wasn't found. Time to create it!");
mystring3[0] = "Player: Night Owl Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Stay up to 6 AM?: Do you wan't to stay up till 6 AM the next morning?";
mystring3[3] = stay_up.ToString();
mystring3[4] = "Custom Lighting Transition?: Do you want to have a lighting transition from 2AM to 5:50 AM? Setting this to false will keep the world dark until the player passes out or goes to bed.";
mystring3[5] = lighting_transition.ToString();
mystring3[6] = "Warp to collapse position?: True: Stay in the same place. False: Warp back home.";
mystring3[7] = warp.ToString();
mystring3[8] = "Keep Money?: True: Don't be charged for passing out.";
mystring3[9] = protect_money.ToString();
mystring3[10] = "Keep stamina when staying up? When the farmer passes out at 6, should their stamina be their stamina before collapsing?";
mystring3[11] = persistant_stamina.ToString();
mystring3[12] = "Keep health when staying up? When the farmer passes out at 6, should their health be their health before collapsing?";
mystring3[13] = persistant_health.ToString();
mystring3[14] = "Clean out charges mail?: Get rid of the annoying We charged X gold for your health fees, etc.";
mystring3[15] = wipe_mail.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
// Console.WriteLine("HEY IM SAVING DATA");
//write out the info to a text file at the end of a day.
mystring3[0] = "Player: Night Owl Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Stay up to 6 AM?: Do you wan't to stay up till 6 AM the next morning?";
mystring3[3] = stay_up.ToString();
mystring3[4] = "Custom Lighting Transition?: Do you want to have a lighting transition from 2AM to 5:50 AM? Setting this to false will keep the world dark until the player passes out or goes to bed.";
mystring3[5] = lighting_transition.ToString();
mystring3[6] = "Warp to collapse position?: True: Stay in the same place. False: Warp back home.";
mystring3[7] = warp.ToString();
mystring3[8] = "Keep Money?: True: Don't be charged for passing out.";
mystring3[9] = protect_money.ToString();
mystring3[10] = "Keep stamina when staying up? When the farmer passes out at 6, should their stamina be their stamina before collapsing?";
mystring3[11] = persistant_stamina.ToString();
mystring3[12] = "Keep health when staying up? When the farmer passes out at 6, should their health be their health before collapsing?";
mystring3[13] = persistant_health.ToString();
mystring3[14] = "Clean out charges mail?: Get rid of the annoying We charged X gold for your health fees, etc.";
mystring3[15] = wipe_mail.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Night_Owl_Config_");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Log.Info("Loading Night_Owl_Config");
lighting_transition = true;
warp = true;
stay_up = true;
persistant_health = true;
persistant_stamina = true;
wipe_mail = true;
protect_money = true;
}
else
{
string[] readtext = File.ReadAllLines(mylocation3);
stay_up = Convert.ToBoolean(readtext[3]);//will the player stay up?
lighting_transition = Convert.ToBoolean(readtext[5]); //does the lighting transition occur?
warp = Convert.ToBoolean(readtext[7]); //does the player warp back to the spot they passed out at?
protect_money = Convert.ToBoolean(readtext[9]); //Is their money safe from stealing?
persistant_stamina = Convert.ToBoolean(readtext[11]); //Does the player have the same stam when collapsing?
persistant_health = Convert.ToBoolean(readtext[13]); //Ditto but with health.
if (readtext[15] == "") wipe_mail = true;
else wipe_mail = Convert.ToBoolean(readtext[15]); //will I clean out their mailbox?
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewValley;
using StardewModdingAPI;
using System.IO;
/*TODO:
*/
/*
Issues:
-Mail can't be wiped without destroying all mail.
-Lighting transition does not work if it is raining.
-set the weather to clear if you are stayig up late.
-transition still doesnt work. However atleast it is dark now.
-Known glitched
*/
namespace Stardew_NightOwl
{
public class Class1 : Mod
{
int player_x;
int player_y;
string prior_map;
bool reset_check;
bool was_raining;
bool time_reset;
int prior_money;
int post_money;
float pre_stam;
int pre_health;
bool lighting_transition; //if true transition happens. If false, game starts out bright at 2AM. Good to remove that awkward change from dark to bright.
bool warp;
bool stay_up;
bool wipe_mail;
bool protect_money;
bool persistant_health;
bool persistant_stamina;
bool game_loaded;
bool once;
bool up_late;
bool first_check;
bool warped_check;
bool super_map_warping_check;
public override void Entry(params object[] objects)
{
StardewModdingAPI.Events.TimeEvents.TimeOfDayChanged += TimeEvents_TimeOfDayChanged;
// StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += TimeEvents_DayOfMonthChanged;
StardewModdingAPI.Events.TimeEvents.OnNewDay += TimeEvents_DayOfMonthChanged;
StardewModdingAPI.Events.PlayerEvents.LoadedGame += PlayerEvents_LoadedGame;
StardewModdingAPI.Events.GameEvents.FourthUpdateTick += GameEvents_FourthUpdateTick;
}
public void GameEvents_FourthUpdateTick(object sender, EventArgs e)
{
if (game_loaded == false) return;
if (Game1.timeOfDay == 600)
{
if (once==true)
{
// Log.AsyncM("NEW MONEY" + Game1.player.money);
// Game1.player.money = Game1.player.money + post_money;
once = false;
}
}
if (warped_check == false)
{
if (warp == true)
{
Log.Info("Warping!!!");
if (prior_map == null)
{
warped_check = true;
super_map_warping_check = true;
return;
}
Game1.warpFarmer(prior_map, player_x, player_y, false);
warped_check = true;
super_map_warping_check = true;
prior_map = null;
}
}
}
public void PlayerEvents_LoadedGame(object sender, StardewModdingAPI.Events.EventArgsLoadedGameChanged e)
{
DataLoader();
MyWritter();
game_loaded = true;
once = false;
up_late = false;
first_check = false;
warped_check = true;
super_map_warping_check = true;
}
public void TimeEvents_DayOfMonthChanged(object sender, StardewModdingAPI.Events.EventArgsNewDay e)
{
if (game_loaded == false) return;
if (first_check == false)
{
first_check = true;
Log.Info("first");
return;
}
else
{
first_check = false;
Log.Info("Second");
}
if(Game1.farmerShouldPassOut== true) Game1.farmerShouldPassOut = false; //make the farmer collapse.
reset_check = false;
//Game1.farmerShouldPassOut = false; //make the farmer collapse.
DataLoader();
MyWritter();
//List<string> newmail = new List<string>();
Queue<string> newmail = new Queue<string>();
up_late = false;
if (time_reset == true)
{
was_raining = false;
if (persistant_stamina==true) Game1.player.stamina = pre_stam; //reset health and stam upon collapsing
if (persistant_health == true) Game1.player.health = pre_health;
//post_money = Game1.player.money;
if (protect_money == true) {
Game1.player.money += post_money;
once = true;
} //add the money back from colapsing.
time_reset = false; //reset my bool.
if(warp==true)Game1.warpFarmer(prior_map, player_x, player_y, false);
// very_old_money = (safety_cash - Game1.player.money);
//Game1.player.money += very_old_money;
}
if (wipe_mail == true)
{
foreach (var i in Game1.mailbox) //delete those annoying charge messages. If only I could do this with mail IRL.
{
Log.Info(i);
if (i.Contains("passedOut"))
{
Log.Info("Found bad mail");
}
else {
newmail.Enqueue(i);
}
}
Game1.mailbox.Clear();
foreach (string mail in newmail)
{
Game1.mailbox.Enqueue(mail);
}
}
warped_check = false;
//prior_map==null; //prevents multiple warping when sleeping
}
public void TimeEvents_TimeOfDayChanged(object sender, StardewModdingAPI.Events.EventArgsIntChanged e)
{
if (game_loaded == false) return;
float color_mod;
//transition the lighting for more "realistic" lighting from 2am to 11am. There is an awkward screen shuffle that happens because of this update.
if (lighting_transition == true)
{
if (Game1.timeOfDay > 200 && Game1.timeOfDay < 1100)
{
color_mod = (1100 - Game1.timeOfDay) / 1000f; //.7f
Game1.outdoorLight = Game1.ambientLight * color_mod;
}
}
if (stay_up == true)
{
if (Game1.timeOfDay == 2550)
{
if (StardewValley.Game1.isRaining == true)
{
was_raining = true;
StardewValley.Game1.isRaining = false; //regardless make sure I change the weather. Otherwise lighting gets screwy.
}
StardewValley.Game1.updateWeatherIcon();
Game1.timeOfDay = 150; //change it from 1:50 am late, to 1:50 am early
}
}
if (Game1.timeOfDay == 550) //if the game time is 5:50 AM
{
up_late = true;
}
if (Game1.timeOfDay == 600) //when time is 6:00 AM after staying up
{
if (up_late == false)
{
return;
}
if (super_map_warping_check == true)
{
if (Game1.currentMinigame != null) Game1.currentMinigame = null;
//if (time_reset == false) return;
time_reset = true;
player_x = Game1.player.getTileX();
player_y = Game1.player.getTileY();
prior_map = Game1.player.currentLocation.name;
Log.Info(prior_map);
Log.Info(player_x);
Log.Info(player_y);
super_map_warping_check = false;
Game1.farmerShouldPassOut = true; //make the farmer collapse.
pre_stam = Game1.player.stamina;
pre_health = Game1.player.health;
prior_money = Game1.player.money;
if (Game1.player.money <= 10000)
{
post_money = prior_money / 10;
}
else
{
post_money = 1000;
}
}
}
}
void MyWritter()
{
//saves the BuildEndurance_data at the end of a new day;
string myname = Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Night_Owl_Config_");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
string[] mystring3 = new string[20];
if (!File.Exists(mylocation3))
{
Log.Info("The data file for Night Owl wasn't found. Time to create it!");
mystring3[0] = "Player: Night Owl Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Stay up to 6 AM?: Do you wan't to stay up till 6 AM the next morning?";
mystring3[3] = stay_up.ToString();
mystring3[4] = "Custom Lighting Transition?: Do you want to have a lighting transition from 2AM to 5:50 AM? Setting this to false will keep the world dark until the player passes out or goes to bed.";
mystring3[5] = lighting_transition.ToString();
mystring3[6] = "Warp to collapse position?: True: Stay in the same place. False: Warp back home.";
mystring3[7] = warp.ToString();
mystring3[8] = "Keep Money?: True: Don't be charged for passing out.";
mystring3[9] = protect_money.ToString();
mystring3[10] = "Keep stamina when staying up? When the farmer passes out at 6, should their stamina be their stamina before collapsing?";
mystring3[11] = persistant_stamina.ToString();
mystring3[12] = "Keep health when staying up? When the farmer passes out at 6, should their health be their health before collapsing?";
mystring3[13] = persistant_health.ToString();
mystring3[14] = "Clean out charges mail?: Get rid of the annoying We charged X gold for your health fees, etc.";
mystring3[15] = wipe_mail.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
else
{
// Console.WriteLine("HEY IM SAVING DATA");
//write out the info to a text file at the end of a day.
mystring3[0] = "Player: Night Owl Config. Feel free to edit.";
mystring3[1] = "====================================================================================";
mystring3[2] = "Stay up to 6 AM?: Do you wan't to stay up till 6 AM the next morning?";
mystring3[3] = stay_up.ToString();
mystring3[4] = "Custom Lighting Transition?: Do you want to have a lighting transition from 2AM to 5:50 AM? Setting this to false will keep the world dark until the player passes out or goes to bed.";
mystring3[5] = lighting_transition.ToString();
mystring3[6] = "Warp to collapse position?: True: Stay in the same place. False: Warp back home.";
mystring3[7] = warp.ToString();
mystring3[8] = "Keep Money?: True: Don't be charged for passing out.";
mystring3[9] = protect_money.ToString();
mystring3[10] = "Keep stamina when staying up? When the farmer passes out at 6, should their stamina be their stamina before collapsing?";
mystring3[11] = persistant_stamina.ToString();
mystring3[12] = "Keep health when staying up? When the farmer passes out at 6, should their health be their health before collapsing?";
mystring3[13] = persistant_health.ToString();
mystring3[14] = "Clean out charges mail?: Get rid of the annoying We charged X gold for your health fees, etc.";
mystring3[15] = wipe_mail.ToString();
File.WriteAllLines(mylocation3, mystring3);
}
}
void DataLoader()
{
//loads the data to the variables upon loading the game.
string myname = StardewValley.Game1.player.name;
string mylocation = Path.Combine(PathOnDisk, "Night_Owl_Config_");
//string mylocation2 = mylocation + myname;
string mylocation3 = mylocation + ".txt";
if (!File.Exists(mylocation3)) //if not data.json exists, initialize the data variables to the ModConfig data. I.E. starting out.
{
Log.Info("Loading Night_Owl_Config");
lighting_transition = true;
warp = true;
stay_up = true;
persistant_health = true;
persistant_stamina = true;
wipe_mail = true;
protect_money = true;
}
else
{
string[] readtext = File.ReadAllLines(mylocation3);
stay_up = Convert.ToBoolean(readtext[3]);//will the player stay up?
lighting_transition = Convert.ToBoolean(readtext[5]); //does the lighting transition occur?
warp = Convert.ToBoolean(readtext[7]); //does the player warp back to the spot they passed out at?
protect_money = Convert.ToBoolean(readtext[9]); //Is their money safe from stealing?
persistant_stamina = Convert.ToBoolean(readtext[11]); //Does the player have the same stam when collapsing?
persistant_health = Convert.ToBoolean(readtext[13]); //Ditto but with health.
if (readtext[15] == "") wipe_mail = true;
else wipe_mail = Convert.ToBoolean(readtext[15]); //will I clean out their mailbox?
}
}
}
}

View File

@ -1,20 +1,20 @@
Player: Night Owl Config. Feel free to edit.
====================================================================================
Stay up to 6 AM?: Do you wan't to stay up till 6 AM the next morning?
True
Custom Lighting Transition?: Do you want to have a lighting transition from 2AM to 5:50 AM? Setting this to false will keep the world dark until the player passes out or goes to bed.
True
Warp to collapse position?: True: Stay in the same place. False: Warp back home.
True
Keep Money?: True: Don't be charged for passing out.
True
Keep stamina when staying up? When the farmer passes out at 6, should their stamina be their stamina before collapsing?
True
Keep health when staying up? When the farmer passes out at 6, should their health be their health before collapsing?
True
Clean out charges mail?: Get rid of the annoying We charged X gold for your health fees, etc.
True
Player: Night Owl Config. Feel free to edit.
====================================================================================
Stay up to 6 AM?: Do you wan't to stay up till 6 AM the next morning?
True
Custom Lighting Transition?: Do you want to have a lighting transition from 2AM to 5:50 AM? Setting this to false will keep the world dark until the player passes out or goes to bed.
True
Warp to collapse position?: True: Stay in the same place. False: Warp back home.
True
Keep Money?: True: Don't be charged for passing out.
True
Keep stamina when staying up? When the farmer passes out at 6, should their stamina be their stamina before collapsing?
True
Keep health when staying up? When the farmer passes out at 6, should their health be their health before collapsing?
True
Clean out charges mail?: Get rid of the annoying We charged X gold for your health fees, etc.
True

View File

@ -1,14 +1,14 @@
Stardew Valley Night Owl 1.0.3
Updated at 1:37 PM on 7/4/16
-Fixed a glitch where the game would crash when trying to save.
Stardew Valley Night Owl is a mod that allows players to stay up a full 24 hours instead of being restricted to 2AM.
Some of the features include
-A transitional lighting effect that lasts from 2AM to 6 AM
-Gold doesn't have to be subtracted from you when you collapse.
-Persistent health and stamina when you stay up 24 hours
-Remaining in the same place as where you collapsed!
-Plenty of features can be found in the Night Owl Config to be edited as you please.
Stardew Valley Night Owl 1.0.3
Updated at 1:37 PM on 7/4/16
-Fixed a glitch where the game would crash when trying to save.
Stardew Valley Night Owl is a mod that allows players to stay up a full 24 hours instead of being restricted to 2AM.
Some of the features include
-A transitional lighting effect that lasts from 2AM to 6 AM
-Gold doesn't have to be subtracted from you when you collapse.
-Persistent health and stamina when you stay up 24 hours
-Remaining in the same place as where you collapsed!
-Plenty of features can be found in the Night Owl Config to be edited as you please.

View File

@ -1,14 +1,14 @@
{
"Name": "NightOwl",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "Stay out till 6 AM.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Stardew_NightOwl.dll"
{
"Name": "NightOwl",
"Authour": "Alpha_Omegasis",
"Version": {
"MajorVersion": 0,
"MinorVersion": 0,
"PatchVersion": 1,
"Build": ""
},
"Description": "Stay out till 6 AM.",
"UniqueID": "4108e859-333c-4fec-a1a7-d2e18c1019fe",
"PerSaveConfigs": false,
"EntryDll": "Stardew_NightOwl.dll"
}

View File

@ -1,36 +1,36 @@
Good afternoon everyone, and today I'd like to announce my biggest project yet, the Save_Anywhere mod!
Now before you get super excited let me go over the basics of what this mod does.
Normally when you want to save you have to go to bed and go to the next day, which is typically ok. However, sometimes you want to save where you are and come back later to resume playing. What this mod does (at the time of writing) can be summarized like this.
1.Save the player's save file like going to bed would.
-Things such as tiles watered, stamina, health, etc are preserved. Note that not everything that is
normally saved is preserved.
2. Warp the player upon loading the game to the position they were when they saved. *1
3. Calculate shipping for the player upon saving (because items shipped aren't saved to a save file)
4.Recalculate NPC's path finding to be as as possible. *2.
5. Simulate game time up until when the character loaded. *3
6. Generated "save_anywhere saves" are deleted upon going to bed to prevent the character from being warped unnecessarily. One is always generated/updated when you save.
Now the asterisks are for the following.
*1. There is an issue where if you happen to resize/move/alter the game's window while the game is starting up/loading, then the player will not properly warp back to their original location. If this happens, reload the game and don't alter the game window/screen.
*2. I discovered when you save the game and reload it, that NPCs get randomly warped around the world which caused a massive problem. When the mod loads it will calculate the NPC's original positions and put them back into their staring positions so it might take just a few seconds before the game loads all the way.
*3. I chose to rapidly simulate in game time so that NPCs would be able to properly path find back to their save-game positions. For every 2 real life seconds, 10 in game minutes will pass and NPCs will move considerably faster to make sure that they move back to their save-game positions. This will last until the game-time is updated to the time when the game was saved.
Now in order to save the mod, you just need to press a key while playing the game. "k" is the default key, but you can change this in the config file.
That pretty much sums it up to this point. I'm going to take a nap since this took me roughly 15+ hours to figure out.
If anyone finds any issues while using this mod please post your message down below and I'll see if I can figure it out.
Thanks and have fun. =)
-Alpha_Omegasis
Min Requirements:
SMAPI 0.40
Good afternoon everyone, and today I'd like to announce my biggest project yet, the Save_Anywhere mod!
Now before you get super excited let me go over the basics of what this mod does.
Normally when you want to save you have to go to bed and go to the next day, which is typically ok. However, sometimes you want to save where you are and come back later to resume playing. What this mod does (at the time of writing) can be summarized like this.
1.Save the player's save file like going to bed would.
-Things such as tiles watered, stamina, health, etc are preserved. Note that not everything that is
normally saved is preserved.
2. Warp the player upon loading the game to the position they were when they saved. *1
3. Calculate shipping for the player upon saving (because items shipped aren't saved to a save file)
4.Recalculate NPC's path finding to be as as possible. *2.
5. Simulate game time up until when the character loaded. *3
6. Generated "save_anywhere saves" are deleted upon going to bed to prevent the character from being warped unnecessarily. One is always generated/updated when you save.
Now the asterisks are for the following.
*1. There is an issue where if you happen to resize/move/alter the game's window while the game is starting up/loading, then the player will not properly warp back to their original location. If this happens, reload the game and don't alter the game window/screen.
*2. I discovered when you save the game and reload it, that NPCs get randomly warped around the world which caused a massive problem. When the mod loads it will calculate the NPC's original positions and put them back into their staring positions so it might take just a few seconds before the game loads all the way.
*3. I chose to rapidly simulate in game time so that NPCs would be able to properly path find back to their save-game positions. For every 2 real life seconds, 10 in game minutes will pass and NPCs will move considerably faster to make sure that they move back to their save-game positions. This will last until the game-time is updated to the time when the game was saved.
Now in order to save the mod, you just need to press a key while playing the game. "k" is the default key, but you can change this in the config file.
That pretty much sums it up to this point. I'm going to take a nap since this took me roughly 15+ hours to figure out.
If anyone finds any issues while using this mod please post your message down below and I'll see if I can figure it out.
Thanks and have fun. =)
-Alpha_Omegasis
Min Requirements:
SMAPI 0.40
Stardew Valley 1.07

View File

@ -1,20 +1,20 @@
Config: Save_Anywhere Info. Feel free to mess with these settings.
====================================================================================
Key binding for saving anywhere. Press this key to save anywhere!
K
Timer interval for NPCs. Default 3500 which simulates game time at 4x speed.
3500
Simulate game time? Game time will be sped up until restored before saving
True
Warp player when loading?
True
Config: Save_Anywhere Info. Feel free to mess with these settings.
====================================================================================
Key binding for saving anywhere. Press this key to save anywhere!
K
Timer interval for NPCs. Default 3500 which simulates game time at 4x speed.
3500
Simulate game time? Game time will be sped up until restored before saving
True
Warp player when loading?
True

View File

@ -1,22 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 14 for Windows Desktop
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stardew_Save_Anywhere_Mod", "Stardew_Save_Anywhere_Mod\Stardew_Save_Anywhere_Mod.csproj", "{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 14 for Windows Desktop
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stardew_Save_Anywhere_Mod", "Stardew_Save_Anywhere_Mod\Stardew_Save_Anywhere_Mod.csproj", "{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,36 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Stardew_Save_Anywhere_Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Stardew_Save_Anywhere_Mod")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("25a4279c-a6be-4594-be8a-eaea3b4bc8ba")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Stardew_Save_Anywhere_Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Stardew_Save_Anywhere_Mod")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("25a4279c-a6be-4594-be8a-eaea3b4bc8ba")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,69 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Stardew_Save_Anywhere_Mod</RootNamespace>
<AssemblyName>Stardew_Save_Anywhere_Mod</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Microsoft.Xna.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Microsoft.Xna.Framework.Game.dll</HintPath>
</Reference>
<Reference Include="Stardew Valley">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe</HintPath>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="xTile, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{25A4279C-A6BE-4594-BE8A-EAEA3B4BC8BA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Stardew_Save_Anywhere_Mod</RootNamespace>
<AssemblyName>Stardew_Save_Anywhere_Mod</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Microsoft.Xna.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Microsoft.Xna.Framework.Game.dll</HintPath>
</Reference>
<Reference Include="Stardew Valley">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe</HintPath>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="xTile, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Some files were not shown because too many files have changed in this diff Show More