A downloadable Class Library

Download NowName your own price

Introduction

How to Use

1. Download and extract the files from itch.

2. Copy the "ThatDaleDudesLibrary.NET.dll" and paste it into Bakin's "lib" folder in it's install directory (usually SteamLibrary\steamapps\common\BAKIN\lib).

3. In addition to pasting the file in the above location, also place the file in the same directory as any script you're creating that will use the class library.

4. In the script that you'd like to use the class library in, add the following near the top of the file (below the "using" statements and above the namespace declaration)

// @@link ThatDaleDudesLibrary.NET.dll

5. Above this, add the following using statement

using ThatDaleDudesLibrary;

6. Inside your script class, create a new class property of type HelperClass

namespace Bakin
{
    public class YourScriptNameHere : BakinObject
    {
        private readonly HelperClass _helper = new HelperClass();
        ...The rest of your code
    }
}

7. You can now use the methods within the class library from _helper and should have something that looks like this in your script:

using System;
using ThatDaleDudesLibrary
...Other using statements
 
// @@link ThatDaleDudesLibrary.NET.dll
 
namespace Bakin
{
    public class YourScriptNameHere : BakinObject
    {
        private readonly HelperClass _helper = new HelperClass();
        
        ...The rest of your code
    }
}

Description

This class library is intended to make your life easier when creating plugins and scripts for Bakin by providing you with some easy-to-use helper functions you can take advantage of.

The functions available are what I've found myself most often using and are comprised of:

  • PushLog - A simple function that just adds a log to the debug console (F5) during a test play
  • Input checker - The following return a true/false whenever the corresponding button is pressed or not pressed:
    • CancelButtonPressed
    • ActionButtonPressed
    • RightButtonPressed
    • LeftButtonPressed
    • UpButtonPressed
    • DownButtonPressed
  • PlaySound - Simply pass in the catalog object (which all scripts have access to) along with the name of the sound you want to play and your script will play it (assuming the sound exists in your project's resources)
  • GetTag - Gets the specified tag from an item's Management Notes + Tags field
  • GetTags - Like above but can get multiple of the same tag if exists
  • GetTagContents - Gets the contents of any tag (assuming the contents are stored within parenthesis)
  • GetTagContents (Overload) - Gets the contents of a specified tag from a given item
  • GetItemsWithTag - Out of a list of given items, return the ones with a specified tag
  • ItemHasTag - Returns a boolean based on whether a given item has a specified tag
  • GetChunkData - Gets the chunk data for the type you specify. Simply pass in the catalog object and the Guid id of the chunk you're looking for. Note: The type you specify when calling this function must inherit from the IChunk interface.
  • GetChunkList - Like above but instead of returning a single chunk object, it returns an IList of the specified type. Note: The type you specify when calling this function must inherit from the IChunk interface.
  • CreateVariableDefinition - Creates a variable within the Bakin editor to use if it doesn't exist already.
  • HasGameBeenSaved - Intended to be used every frame, this will return true once the game has been saved.

Here's a quick comparison of some code to show what getting some chunk data would look like if you didn't use the helper vs. using the helper:

Note: For context, the code below retrieves a "chunk" (which stores data for a quest system's settings in this case). Once retrieved, we also retrieve custom quest types for the quest system's settings as each custom quest type is it's own chunk.

Not Using Helper

Using Helper

StatusReleased
CategoryOther
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorDale Green
Tagsbakin, class-library, dll, helper, helper-class, plugin, plugins, rpgdeveloperbakin

Download

Download NowName your own price

Click download now to get access to the following files:

ThatDaleDudes Class Library V3 4.4 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.