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 (just under 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)
  • 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.

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:

Not Using Helper

Using Helper

Download

Download NowName your own price

Click download now to get access to the following files:

ThatDaleDudes Class Library V2.1.zip 4 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.