From 524dc9e002d86e81c1e38827a2303cc83b71eba7 Mon Sep 17 00:00:00 2001 From: Zoryn Aaron Date: Sun, 28 Feb 2016 22:16:32 -0500 Subject: [PATCH] expose some private fields for modding --- BobberBar Private Fields.txt | 40 +++ Game1 Static Fields.txt | 329 ++++++++++++++++++ Release/StardewModdingAPI.exe | Bin 38912 -> 40960 bytes StardewModdingAPI/Extensions.cs | 4 +- .../Inheritance/Menus/SBobberBar.cs | 33 ++ .../Inheritance/Minigames/SMinigameBase.cs | 38 ++ StardewModdingAPI/{ => Inheritance}/SGame.cs | 11 +- StardewModdingAPI/Program.cs | 18 + StardewModdingAPI/StardewModdingAPI.csproj | 5 +- 9 files changed, 474 insertions(+), 4 deletions(-) create mode 100644 BobberBar Private Fields.txt create mode 100644 Game1 Static Fields.txt create mode 100644 StardewModdingAPI/Inheritance/Menus/SBobberBar.cs create mode 100644 StardewModdingAPI/Inheritance/Minigames/SMinigameBase.cs rename StardewModdingAPI/{ => Inheritance}/SGame.cs (86%) diff --git a/BobberBar Private Fields.txt b/BobberBar Private Fields.txt new file mode 100644 index 00000000..2784f0e7 --- /dev/null +++ b/BobberBar Private Fields.txt @@ -0,0 +1,40 @@ +Single difficulty +Int32 motionType +Int32 whichFish +Single bobberPosition +Single bobberSpeed +Single bobberAcceleration +Single bobberTargetPosition +Single scale +Single everythingShakeTimer +Single floaterSinkerAcceleration +Single treasurePosition +Single treasureCatchLevel +Single treasureAppearTimer +Single treasureScale +Boolean bobberInBar +Boolean buttonPressed +Boolean flipBubble +Boolean fadeIn +Boolean fadeOut +Boolean treasure +Boolean treasureCaught +Boolean perfect +Boolean bossFish +Int32 bobberBarHeight +Int32 fishSize +Int32 fishQuality +Int32 minFishSize +Int32 maxFishSize +Int32 fishSizeReductionTimer +Int32 whichBobber +Microsoft.Xna.Framework.Vector2 barShake +Microsoft.Xna.Framework.Vector2 fishShake +Microsoft.Xna.Framework.Vector2 everythingShake +Microsoft.Xna.Framework.Vector2 treasureShake +Single reelRotation +StardewValley.BellsAndWhistles.SparklingText sparkleText +Single bobberBarPos +Single bobberBarSpeed +Single bobberBarAcceleration +Single distanceFromCatching \ No newline at end of file diff --git a/Game1 Static Fields.txt b/Game1 Static Fields.txt new file mode 100644 index 00000000..4580f95f --- /dev/null +++ b/Game1 Static Fields.txt @@ -0,0 +1,329 @@ +Int32 pixelZoom +Int32 tileSize +System.String version +Microsoft.Xna.Framework.GraphicsDeviceManager graphics +Microsoft.Xna.Framework.Content.ContentManager content +Microsoft.Xna.Framework.Content.ContentManager temporaryContent +Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch +Microsoft.Xna.Framework.Input.GamePadState oldPadState +Single thumbStickSensitivity +Single runThreshold +Microsoft.Xna.Framework.Input.KeyboardState oldKBState +Microsoft.Xna.Framework.Input.MouseState oldMouseState +System.Collections.Generic.List`1[StardewValley.GameLocation] locations +StardewValley.GameLocation currentLocation +StardewValley.GameLocation locationAfterWarp +xTile.Display.IDisplayDevice mapDisplayDevice +StardewValley.Farmer player +StardewValley.Farmer serverHost +xTile.Dimensions.Rectangle viewport +Microsoft.Xna.Framework.Graphics.Texture2D objectSpriteSheet +Microsoft.Xna.Framework.Graphics.Texture2D toolSpriteSheet +Microsoft.Xna.Framework.Graphics.Texture2D cropSpriteSheet +Microsoft.Xna.Framework.Graphics.Texture2D mailboxTexture +Microsoft.Xna.Framework.Graphics.Texture2D emoteSpriteSheet +Microsoft.Xna.Framework.Graphics.Texture2D debrisSpriteSheet +Microsoft.Xna.Framework.Graphics.Texture2D toolIconBox +Microsoft.Xna.Framework.Graphics.Texture2D rainTexture +Microsoft.Xna.Framework.Graphics.Texture2D bigCraftableSpriteSheet +Microsoft.Xna.Framework.Graphics.Texture2D swordSwipe +Microsoft.Xna.Framework.Graphics.Texture2D swordSwipeDark +Microsoft.Xna.Framework.Graphics.Texture2D buffsIcons +Microsoft.Xna.Framework.Graphics.Texture2D daybg +Microsoft.Xna.Framework.Graphics.Texture2D nightbg +Microsoft.Xna.Framework.Graphics.Texture2D logoScreenTexture +Microsoft.Xna.Framework.Graphics.Texture2D tvStationTexture +Microsoft.Xna.Framework.Graphics.Texture2D cloud +Microsoft.Xna.Framework.Graphics.Texture2D menuTexture +Microsoft.Xna.Framework.Graphics.Texture2D lantern +Microsoft.Xna.Framework.Graphics.Texture2D windowLight +Microsoft.Xna.Framework.Graphics.Texture2D sconceLight +Microsoft.Xna.Framework.Graphics.Texture2D cauldronLight +Microsoft.Xna.Framework.Graphics.Texture2D shadowTexture +Microsoft.Xna.Framework.Graphics.Texture2D mouseCursors +Microsoft.Xna.Framework.Graphics.Texture2D indoorWindowLight +Microsoft.Xna.Framework.Graphics.Texture2D animations +Microsoft.Xna.Framework.Graphics.Texture2D titleScreenBG +Microsoft.Xna.Framework.Graphics.Texture2D logo +Microsoft.Xna.Framework.Graphics.RenderTarget2D lightmap +Microsoft.Xna.Framework.Graphics.Texture2D fadeToBlackRect +Microsoft.Xna.Framework.Graphics.Texture2D staminaRect +Microsoft.Xna.Framework.Graphics.Texture2D currentCoopTexture +Microsoft.Xna.Framework.Graphics.Texture2D currentBarnTexture +Microsoft.Xna.Framework.Graphics.Texture2D currentHouseTexture +Microsoft.Xna.Framework.Graphics.Texture2D greenhouseTexture +Microsoft.Xna.Framework.Graphics.Texture2D littleEffect +Microsoft.Xna.Framework.Graphics.SpriteFont dialogueFont +Microsoft.Xna.Framework.Graphics.SpriteFont smallFont +Microsoft.Xna.Framework.Graphics.SpriteFont borderFont +Microsoft.Xna.Framework.Graphics.SpriteFont tinyFont +Microsoft.Xna.Framework.Graphics.SpriteFont tinyFontBorder +Microsoft.Xna.Framework.Graphics.SpriteFont smoothFont +Single fadeToBlackAlpha +Single pickToolInterval +Single screenGlowAlpha +Single flashAlpha +Single starCropShimmerPause +Single noteBlockTimer +Single globalFadeSpeed +Boolean fadeToBlack +Boolean fadeIn +Boolean dialogueUp +Boolean dialogueTyping +Boolean pickingTool +Boolean isQuestion +Boolean nonWarpFade +Boolean particleRaining +Boolean newDay +Boolean inMine +Boolean isEating +Boolean menuUp +Boolean eventUp +Boolean viewportFreeze +Boolean eventOver +Boolean nameSelectUp +Boolean screenGlow +Boolean screenGlowHold +Boolean screenGlowUp +Boolean progressBar +Boolean isRaining +Boolean isSnowing +Boolean killScreen +Boolean coopDwellerBorn +Boolean messagePause +Boolean isDebrisWeather +Boolean boardingBus +Boolean listeningForKeyControlDefinitions +Boolean weddingToday +Boolean exitToTitle +Boolean debugMode +Boolean isLightning +Boolean displayHUD +Boolean displayFarmer +Boolean showKeyHelp +Boolean inputMode +Boolean shippingTax +Boolean dialogueButtonShrinking +Boolean jukeboxPlaying +Boolean drawLighting +Boolean bloomDay +Boolean quit +Boolean isChatting +Boolean globalFade +Boolean drawGrid +Boolean freezeControls +Boolean saveOnNewDay +Boolean panMode +Boolean showingEndOfNightStuff +Boolean wasRainingYesterday +Boolean hasLoadedGame +Boolean isActionAtCurrentCursorTile +Boolean isInspectionAtCurrentCursorTile +Boolean paused +Boolean lastCursorMotionWasMouse +System.String currentSeason +System.String debugOutput +System.String nextMusicTrack +System.String selectedItemsType +System.String nameSelectType +System.String messageAfterPause +System.String fertilizer +System.String samBandName +System.String elliottBookName +System.String slotResult +System.String keyHelpString +System.String debugInput +System.String loadingMessage +System.String errorMessage +System.Collections.Generic.Queue`1[System.String] currentObjectDialogue +System.Collections.Generic.Queue`1[System.String] mailbox +System.Collections.Generic.List`1[System.String] questionChoices +Int32 xLocationAfterWarp +Int32 yLocationAfterWarp +Int32 gameTimeInterval +Int32 currentQuestionChoice +Int32 currentDialogueCharacterIndex +Int32 dialogueTypingInterval +Int32 dayOfMonth +Int32 year +Int32 timeOfDay +Int32 numberOfSelectedItems +Int32 priceOfSelectedItem +Int32 currentWallpaper +Int32 farmerWallpaper +Int32 wallpaperPrice +Int32 currentFloor +Int32 FarmerFloor +Int32 floorPrice +Int32 dialogueWidth +Int32 countdownToWedding +Int32 menuChoice +Int32 tvStation +Int32 currentBillboard +Int32 facingDirectionAfterWarp +Int32 tmpTimeOfDay +Int32 percentageToWinStardewHero +Int32 mouseClickPolling +Int32 weatherIcon +Int32 hitShakeTimer +Int32 staminaShakeTimer +Int32 pauseThenDoFunctionTimer +Int32 weatherForTomorrow +Int32 currentSongIndex +Int32 cursorTileHintCheckTimer +Int32 timerUntilMouseFade +Int32 minecartHighScore +System.Collections.Generic.List`1[System.Int32] dealerCalicoJackTotal +Microsoft.Xna.Framework.Color morningColor +Microsoft.Xna.Framework.Color eveningColor +Microsoft.Xna.Framework.Color unselectedOptionColor +Microsoft.Xna.Framework.Color screenGlowColor +StardewValley.NPC currentSpeaker +System.Random random +System.Random recentMultiplayerRandom +System.Collections.Generic.Dictionary`2[System.Int32,System.String] objectInformation +System.Collections.Generic.Dictionary`2[System.Int32,System.String] bigCraftablesInformation +System.Collections.Generic.List`1[StardewValley.Object] shippingBin +StardewValley.Locations.MineShaft mine +System.Collections.Generic.List`1[StardewValley.HUDMessage] hudMessages +System.Collections.Generic.Dictionary`2[System.String,System.Boolean] eventConditions +System.Collections.Generic.Dictionary`2[System.String,System.String] NPCGiftTastes +Single musicPlayerVolume +Single pauseAccumulator +Single pauseTime +Single upPolling +Single downPolling +Single rightPolling +Single leftPolling +Single debrisSoundInterval +Single toolHold +Single windGust +Single dialogueButtonScale +Single creditsTimer +Single globalOutdoorLighting +Microsoft.Xna.Framework.Audio.Cue currentSong +Microsoft.Xna.Framework.Audio.AudioCategory musicCategory +Microsoft.Xna.Framework.Audio.AudioCategory soundCategory +Microsoft.Xna.Framework.PlayerIndex playerOneIndex +Microsoft.Xna.Framework.Audio.AudioEngine audioEngine +Microsoft.Xna.Framework.Audio.WaveBank waveBank +Microsoft.Xna.Framework.Audio.SoundBank soundBank +Microsoft.Xna.Framework.Vector2 shiny +Microsoft.Xna.Framework.Vector2 previousViewportPosition +Microsoft.Xna.Framework.Vector2 currentCursorTile +Microsoft.Xna.Framework.Vector2 lastCursorTile +StardewValley.RainDrop[] rainDrops +Double chanceToRainTomorrow +Microsoft.Xna.Framework.Audio.Cue fuseSound +Microsoft.Xna.Framework.Audio.Cue chargeUpSound +Microsoft.Xna.Framework.Audio.Cue wind +Double dailyLuck +System.Collections.Generic.List`1[StardewValley.WeatherDebris] debrisWeather +System.Collections.Generic.List`1[StardewValley.TemporaryAnimatedSprite] screenOverlayTempSprites +Byte gameMode +Byte multiplayerMode +System.Collections.Generic.IEnumerator`1[System.Int32] currentLoader +UInt64 uniqueIDForThisGame +StardewValley.LoadGameScreen loadGameScreen +StardewValley.Stats stats +Int32[] cropsOfTheWeek +StardewValley.Quests.Quest questOfTheDay +StardewValley.MoneyMadeScreen moneyMadeScreen +System.Collections.Generic.HashSet`1[StardewValley.LightSource] currentLightSources +Microsoft.Xna.Framework.Color ambientLight +Microsoft.Xna.Framework.Color outdoorLight +Microsoft.Xna.Framework.Color textColor +Microsoft.Xna.Framework.Color textShadowColor +StardewValley.Menus.IClickableMenu activeClickableMenu +StardewValley.Minigames.IMinigame currentMinigame +System.Collections.Generic.List`1[StardewValley.Menus.IClickableMenu] onScreenMenus +StardewValley.BloomComponent bloom +System.Collections.Generic.Dictionary`2[System.Int32,System.String] achievements +StardewValley.Object dishOfTheDay +StardewValley.Menus.BuffsDisplay buffsDisplay +StardewValley.Menus.DayTimeMoneyBox dayTimeMoneyBox +System.Collections.Generic.Dictionary`2[System.Int64,StardewValley.Farmer] otherFarmers +StardewValley.Network.Server server +StardewValley.Network.Client client +StardewValley.KeyboardDispatcher keyboardDispatcher +StardewValley.Background background +StardewValley.Events.FarmEvent farmEvent +afterFadeFunction afterFade +afterFadeFunction afterDialogues +afterFadeFunction afterViewport +afterFadeFunction viewportReachedTarget +afterFadeFunction afterPause +Microsoft.Xna.Framework.GameTime currentGameTime +System.Collections.Generic.List`1[StardewValley.DelayedAction] delayedActions +System.Collections.Generic.Stack`1[StardewValley.Menus.IClickableMenu] endOfNightMenus +StardewValley.Options options +StardewValley.Game1 game1 +Microsoft.Xna.Framework.Point lastMousePositionBeforeFade +Microsoft.Xna.Framework.Point viewportCenter +Microsoft.Xna.Framework.Vector2 viewportTarget +Single viewportSpeed +Int32 viewportHold +Boolean toggleFullScreen +Boolean isFullscreen +Boolean setToWindowedMode +Boolean setToFullscreen +System.String whereIsTodaysFest +Boolean farmerShouldPassOut +Microsoft.Xna.Framework.Vector2 currentViewportTarget +Microsoft.Xna.Framework.Vector2 viewportPositionLerp +Single screenGlowRate +Single screenGlowMax +Boolean haltAfterCheck +Int32 mouseCursor +Single mouseCursorTransparency +StardewValley.NPC objectDialoguePortraitPerson +Int32 defaultResolutionX +Int32 defaultResolutionY +Int32 smallestTileSize +Int32 up +Int32 right +Int32 down +Int32 left +Int32 spriteIndexForOveralls +Int32 colorToleranceForOveralls +Int32 spriteIndexForOverallsBorder +Int32 colorToloranceForOverallsBorder +Int32 dialogueBoxTileHeight +Int32 realMilliSecondsPerGameTenMinutes +Int32 rainDensity +Int32 millisecondsPerDialogueLetterType +Single pickToolDelay +Int32 defaultMinFishingBiteTime +Int32 defaultMaxFishingBiteTime +Int32 defaultMinFishingNibbleTime +Int32 defaultMaxFishingNibbleTime +Int32 minWallpaperPrice +Int32 maxWallpaperPrice +Int32 rainLoopLength +Int32 weather_sunny +Int32 weather_rain +Int32 weather_debris +Int32 weather_lightning +Int32 weather_festival +Int32 weather_snow +Int32 weather_wedding +Byte singlePlayer +Byte multiplayerClient +Byte multiplayerServer +Byte logoScreenGameMode +Byte titleScreenGameMode +Byte loadScreenGameMode +Byte newGameMode +Byte playingGameMode +Byte characterSelectMode +Byte loadingMode +Byte saveMode +Byte saveCompleteMode +Byte selectGameScreen +Byte creditsMode +Byte errorLogMode +Single keyPollingThreshold +Single toolHoldPerPowerupLevel +Single startingMusicVolume +Single thumbstickToMouseModifier +System.String NO_LETTER_MAIL \ No newline at end of file diff --git a/Release/StardewModdingAPI.exe b/Release/StardewModdingAPI.exe index 53745c83fb35ce2954f847142703e5cc598fe1b3..2268d77dddebba0826d8cc3f054189feff702b54 100644 GIT binary patch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g z%VI6)L%%y~WzdI7)LCmcZ5}4-?6sSt%j(coOkt!a818HYfs2|GfJTVop0QM^43~$?GrXQ~Ww;!b*nix7zPjiCyOCI2i!k};;pf+Rn~3Jj zZJvAXmH)b@|7Xv)Jo@Pq+xBmGB2(}3Z^3N)7Jh*3`5f7Am)un-5AL_e-?h#TZhd>i zBSep>Uq0Q>3s3Pc*FBVmA0qlt1#>^$Pj&U*_EyY~AMMq)e{w=s_`nBZ&v5Vm0S*0< A@Bjb+ diff --git a/StardewModdingAPI/Extensions.cs b/StardewModdingAPI/Extensions.cs index 0078ebe9..b960f027 100644 --- a/StardewModdingAPI/Extensions.cs +++ b/StardewModdingAPI/Extensions.cs @@ -22,9 +22,9 @@ namespace StardewModdingAPI return new Color(Random.Next(0, 255), Random.Next(0, 255), Random.Next(0, 255)); } - public static string ToSingular(this IEnumerable enumerable) + public static string ToSingular(this IEnumerable enumerable, string split = ", ") { - string result = string.Join(", ", enumerable); + string result = string.Join(split, enumerable); return result; } diff --git a/StardewModdingAPI/Inheritance/Menus/SBobberBar.cs b/StardewModdingAPI/Inheritance/Menus/SBobberBar.cs new file mode 100644 index 00000000..9e5f6865 --- /dev/null +++ b/StardewModdingAPI/Inheritance/Menus/SBobberBar.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using StardewValley.Menus; + +namespace StardewModdingAPI.Inheritance.Menus +{ + public class SBobberBar : BobberBar + { + public static FieldInfo[] PrivateFields { get { return GetPrivateFields(); } } + + /// + /// DO NOT CONSTRUCT THIS CLASS + /// This class ONLY provides functionality to access the base BobberBar class fields. + /// + /// + /// + /// + /// + public SBobberBar(int whichFish, float fishSize, bool treasure, int bobber) : base(whichFish, fishSize, treasure, bobber) + { + + } + + public static FieldInfo[] GetPrivateFields() + { + return typeof (BobberBar).GetFields(BindingFlags.Instance | BindingFlags.NonPublic); + } + } +} diff --git a/StardewModdingAPI/Inheritance/Minigames/SMinigameBase.cs b/StardewModdingAPI/Inheritance/Minigames/SMinigameBase.cs new file mode 100644 index 00000000..5ce29d8d --- /dev/null +++ b/StardewModdingAPI/Inheritance/Minigames/SMinigameBase.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; + +namespace StardewModdingAPI.Inheritance.Minigames +{ + abstract class SMinigameBase : StardewValley.Minigames.IMinigame + { + public abstract bool tick(GameTime time); + + public abstract void receiveLeftClick(int x, int y, bool playSound = true); + + public abstract void leftClickHeld(int x, int y); + + public abstract void receiveRightClick(int x, int y, bool playSound = true); + + public abstract void releaseLeftClick(int x, int y); + + public abstract void releaseRightClick(int x, int y); + + public abstract void receiveKeyPress(Keys k); + + public abstract void receiveKeyRelease(Keys k); + + public abstract void draw(SpriteBatch b); + + public abstract void changeScreenSize(); + + public abstract void unload(); + + public abstract void receiveEventPoke(int data); + } +} diff --git a/StardewModdingAPI/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs similarity index 86% rename from StardewModdingAPI/SGame.cs rename to StardewModdingAPI/Inheritance/SGame.cs index 6af7689a..61a0f390 100644 --- a/StardewModdingAPI/SGame.cs +++ b/StardewModdingAPI/Inheritance/SGame.cs @@ -1,17 +1,26 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Input; using StardewValley; +using StardewValley.Minigames; -namespace StardewModdingAPI +namespace StardewModdingAPI.Inheritance { public class SGame : Game1 { + public static FieldInfo[] StaticFields { get { return Thing(); } } + + public static FieldInfo[] Thing() + { + return typeof(Game1).GetFields(); + } + public KeyboardState KStateNow { get; private set; } public KeyboardState KStatePrior { get; private set; } diff --git a/StardewModdingAPI/Program.cs b/StardewModdingAPI/Program.cs index 52ea76e8..846050ed 100644 --- a/StardewModdingAPI/Program.cs +++ b/StardewModdingAPI/Program.cs @@ -11,6 +11,7 @@ using System.Windows.Forms; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; +using StardewModdingAPI.Inheritance; using StardewValley; using StardewValley.Menus; using StardewValley.Minigames; @@ -44,6 +45,8 @@ namespace StardewModdingAPI { Console.Title = "Stardew Modding API Console"; + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); + if (File.Exists(ModPath)) File.Delete(ModPath); if (!Directory.Exists(ModPath)) @@ -62,6 +65,8 @@ namespace StardewModdingAPI LogInfo("Starting SDV..."); gameThread.Start(); + SGame.Thing(); + while (!ready) { @@ -184,7 +189,20 @@ namespace StardewModdingAPI StardewForm.Invoke(a); } + public static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) + { + string dllName = args.Name.Contains(',') ? args.Name.Substring(0, args.Name.IndexOf(',')) : args.Name.Replace(".dll", ""); + dllName = dllName.Replace(".", "_"); + + if (dllName.EndsWith("_resources")) return null; + + System.Resources.ResourceManager rm = new System.Resources.ResourceManager(typeof(Program).Namespace + ".Properties.Resources", System.Reflection.Assembly.GetExecutingAssembly()); + + byte[] bytes = (byte[])rm.GetObject(dllName); + + return System.Reflection.Assembly.Load(bytes); + } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/StardewModdingAPI/StardewModdingAPI.csproj b/StardewModdingAPI/StardewModdingAPI.csproj index 39e659bf..a6815f26 100644 --- a/StardewModdingAPI/StardewModdingAPI.csproj +++ b/StardewModdingAPI/StardewModdingAPI.csproj @@ -54,6 +54,7 @@ False ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe + False @@ -68,11 +69,13 @@ + + - +