Help this BAKIN PLUGIN reach its goal

Raised
$256.00
Goal
$300.00
85%
of goal
16
contributors
$16.00
average contribution
$16.00
top contribution

A downloadable BAKIN PLUGIN

Buy Now
On Sale!
36% Off
$25.00 $16.00 USD or more

Day-Night Plugin 

こちらをクリックして  日本語のドキュメンテーション

Changelog

(JAN/03/2024) Release version!
(JAN/09/2024) 
- Fixed a bug in the GUI that sometimes caused variables to be blank in the English version.
- Corrected the description of "GetCurrentHour" function. 
- Added a button to create the variables.
- Preparing code for the next big update!
(FEB/20/2024) Fixed some GUI issues with the new Bakin update (1.7.0.6)

Description

Day-Night plugin allows you to use a day and night system in Bakin with the following features:

  • Day and night with customizable real-time lighting. (Dawn, Day, Dusk, Night).
  • Automatic Fog and Vignette transitions, auto-exposure  coming soon!
  • Automatic time system (Days, Hours, etc.).
  • Set and get: Minute, Hour, Day.
  • GUI included, where you can customize the start and end of the day transitions, add presets that can be assigned just by calling a function in Bakin and an Interior's system to keep the render settings in  your interior maps.
  • This plugin also includes another plugin called 'MainRender' which can be used separately in case the day and night system is not needed.
  • There are many more functions this plugin is huge :3 
  • English and Japanese supported.


How to install


* Download and unzip the file, drag and drop "DayNightSystem" folder to the Bakin folder steamapps\common\BAKIN\plugins.

Note: To unzip, it is recommended to use WinRAR or another program. Using Windows to unzip it may damage the DLLs.

* Go to "Functions" -> "Expanded Features" and click on "Day-Night System".

* Use install button to automatically install the script into your project!

USE SCRIPT BUTTON WHEN YOU NEED TO UPDATE THE SCRIPT FILE IN YOUR PROJECT TO A NEWER VERSION!

* Use Automation: "Common event" button to create a sample common event in your project 


or attach the script to a common event "MainDayNight.cs", now you can use C# functions to setup the day night system, like this:


How to use



Save Button: Save your current configuration and your render presets and interiors.

Install Button: Install the script files into your project. If you updated the plugin, use this button to update the script in your project as well.

Help Button: It redirects you to this itch.io page.

Disable plugin: Deactivate the plugin completely.

Settings:

  • Start hour: The time at which the transitions for the day phase (Dawn) will begin.
  • End hour: The time at which the transitions for the day phase (Night) will end.


  • Total time: Bakin variable ranging from 0 to 1440 representing the elapsed minutes in a day.
  • Absolute time: Bakin variable that stores the total elapsed time in the day and night system, some C# functions use this read-only variable.
  • Day variable: Bakin variable that stores the current day, can be used to change or display the current day, there are also C# functions that assist with this task.


  • Use fog: If you disable this option, fog will not be used, even if it's defined in any preset.
  • Use vignette: If you disable this option, vignette will not be used, even if it's defined in any preset.
  • Use shadow angle: If you disable this option, shadow angles will not be used, even if they're defined in any preset.

Render presets:

You can create new presets to assign them immediately with a simple C# function call in the events panel, This can be ideal for creating stations or quickly assigning new parameters to your map.

Use the tabs "Dawn, Day, Dusk, and Night" to assign your preferred settings for each phase of the day.

Remember to save the data when finished!

You can add "MainDayNight.cs" to any event, as the system is connected to a single master instance.

And that's how easy it is to assign a preset. Assign a string variable with the exact name of your preset, and then use that variable as a parameter in the "SetCurrentPreset" function!


Interiors:

Add maps to this list so that the plugin does not modify the lighting configuration for those maps, ideal for interiors of houses, dungeons, or places where sunlight should not be visible.


C# Calls:

You can attach "MainDayNight.cs" to any event, as the system is connected to a single master instance.

List of main functions

* UpdateDayCycle: Update the lighting of the current map according to the phase of the day. This function should be called in "repeat in parallel" in the main common event; it is only necessary to be called in a single event.

* SetCurrentPreset: As explained above, this event receives the name of one of your presets from the list and assigns it immediately to the system.

* AddTime: Makes time advance; it should be used similarly to "UpdateDayCycle," and its parameter is the minutes that will elapse for each second. For example, if you use 10, then every second will represent 10 minutes in the system.

* SetCurrentHour: Assign the current hour of the day from 0 to 23.

* SetCurrentMinute: Assign the minute of the current hour from 0 to 59.

* SetDay: Assign the current day.

* GetCurrentHour: Get the current hour of the day, use 0 parameter to use 24H format or use 1 to get 12H format.

* GetCurrentMinute: Get the minute of the current hour.

* GetAMPM: Get "AM or PM" string depending of the time of the day.

* GetCurrentTimeString: Obtains a full time format using an "int" parameter that returns the time and minutes in the format: 0 = 12H || 1 = 24H

Example: 4:32PM or 16:32.

* IsTimeExpired: Return 1 if the current absolute time is greater or equal to the absolute time parameter otherwise it will return 0.

You can use this to trigger events when a certain time is completed. For example, you can assign the "absoluteTime" variable to a new "target time" variable and add 120 minutes to it. Now, use this function to check if the target time has elapsed.


- Since you cannot transition between skyboxes, you can use "MainRender.cs" and the Skybox change function to assign a new one. There are more functions in "MainRender.cs" that will be explained in due time.

Notes

* I'm open to suggestions for future updates!

* If you find any bug, do not hesitate to let me know!

* This plugin is paid, you can use it in every project you make in Bakin, but you can't share the plugin or scripts with anyone. (No credits needed)

* Any questions I am always active on official Bakin Discord.

Purchase

Buy Now
On Sale!
36% Off
$25.00 $16.00 USD or more

In order to download this BAKIN PLUGIN you must purchase it at or above the minimum price of $16 USD. You will get access to the following files:

DayNightSystem.zip 1 MB

Development log

Comments

Log in with itch.io to leave a comment.

(+1)

我是一名来自中国独立创作者的玩家,经常做一些rpg bakin教学视频,我们也有很多独立创作者和工作室需要你的插件,我们有几个问题,第一个是中文语言,没有中文,我们不好学,第二个平台只能支付美金,我们只能支付微信和支付宝或者国内银行卡支付,这样我们很难购买你的软件,虽然我们也可以找一些伙伴替我们购买,但也会有一个中文汉化操作的问题,还有是中文教学文档的问题,希望作者能出一个中文教学文档,这是我们急需的,后面的问题作者有能力就解决,也可以!

(+1)

你好!我可以尝试将我的产品翻译成中文。如果这段文字在中文中有意义,我可以使用人工智能来帮助我翻译成你的语言!请告诉我这段文字是否通顺。 关于付款,我还不确定,我会调查是否可以使用你上面提到的支付方式。

非常通顺,如果不能使用上述的付款方式,希望有什么折中办法

(+1)

is there a way to make npcs do different things at different times of day?

Of course, you can! You can use the time system to set conditions for your NPCs. However, this requires you to create the events. Here's a suggestion: create an event sheet for each daily behavior that activates if the time is greater than, for example, '8', and less than '12'. Then, execute whatever you need to do within that timeframe for each behavior
(Keep in mind this needs to be build by yourself because every developer needs are different!)

(+1)

How can I resolve changing the skybox or background color?
(1 edit)

As the skybox cannot be transitioned, it is not part of the MainDayNight.cs script. However, there is a C# function in MainRender.cs that can be called in the events panel to change the skybox. As for the background color, I think I'll be able to add a transition in a future update.

SetSkyBox
it uses a string with the exact skybox name in your resources, example = "sb_obj_sky_Night"

Thank you

(+1)

Hello. In a few days I will be launching a new content pack on Steam, would you be interested in providing me with an access key for this plugin? I would work on marketing this project using and recommending your plugin to users. The final version of the project will not contain the plugin files, each user will have to purchase them separately.

Visit my page to see my work. I am also the creator of the official Ultra Buildings and Mountain Village DLCs.

Sure!, can we talk on Discord?

@Jagonz

(+1)

Have you ever thought about implementing an effect simulating cloud shadows? I think it would be perfect with this plugin.

(1 edit) (+1)

This is an interesting idea, I think this could be done by placing real clouds objects in the sky somehow I'm going to see what can I do.

(+1)

Very good, the smooth color transition is all I need in my projects, the default BAKIN option makes a rough cut that sometimes even gets stuck. Was performance affected by this plugin in your tests?

Hello and thank you! I tested the plugin a lot and I never found a significant impact on performance :D!