3.0.0 - Plugin Restructure


IMPORTANT: If updating plugin from 2.2.1 or earlier, backup your game project. There are breaking changes in this update.

Upgrade Guide

  1. Backup your game project
  2. Disable Grid Building plugin in the project settings menu to remove any class_name references temporarily.
  3. Remove addons/grid_builder addons folder
  4. Replace folder with the new version at addons/grid_building (This gives a fresh start to the directory. Some older classes are moved or removed. This helps avoid file conflicts)
  5. If you have scripts or scenes referencing the old plugin files, you likely will have missing file paths. In this update, I updated directory and file names to all be snake_case in line with Godot best coding practices. Hopefully, this should be the only time I have to make such changes.
  6. If you were using (or want to use) the basic grid builder inventory (ItemContainer) for SpendMaterialsRule or SpendMaterialsRuleGeneric, you will want to download grid_building_inventory as well. Install this as a seperate plugin at addons/grid_building_inventory. Don't forget to enable your plugins in project settings. Otherwise, you can use SpendMaterialsRuleGeneric optionally with using virtual_item_container (res://addons/grid_building/building_system/virtual/virtual_item_container.gd) to build your compatible inventory system. (You can also build your own custom spend rule from scratch if needed too just by extending BuildingRule)
  7. SpendMaterialsRuleGeneric properties changed a lot for usability reasons. If you were using it, you will need up update each placeable. This should be worth it though, because the new implementation is much better for finding your inventory classes and setting up item spend stacks using generic resources.

Fixing File Path Errors

If you get file not found errors like these, especially with the old grid_building paths that contain capitalized paths like /BuildingSystem/. Then you'll need to update the file references. I found Visual Studio Codes find and replace feature very helpful for this by taking the bad paths and replacing it with the new updated paths across the project. This is in the search tab (2nd on the left from the top). These happen with this update because I changed all of the file paths to have snake_case in line with Godot best practices.


Patch Notes v3.0.0

  • All added scripts are removed by default on preview instances in build mode. This is to stop undesired code execution on scenes that technically shouldn't be part of the game world yet during preview. There may be individual scripts you still want to execute such as an animation controller so any scripts you want enabled in for object previews can be set by preview_active_script_paths NodePath on the placeable resource files (to set easily, have your placed object scene open in the scene viewer, and then select the placeable resource in your project to set the nodepath
  • SpendMaterialsRuleGeneric Usability Improvements - resource_stacks_to_spend is now an array of ResourceStack instead of a generic resource array. Search settings combined into their own resource (makes it easier to save settings to project and reuse across other rules). These changes are breaking, so you will have to make updates to any existing SpendMaterialsRuleGeneric when upgrading.
  • Directory overhaul - these are breaking changes but needed to bring the plugin in line with Godot file naming best practices. If upgrading from 2.4.3 or earlier, you likely will need to resolve pathing issues. BACKUP YOUR PROJECT BEFORE UPDATING!
  • Seperate Grid Building Inventory out into it's own seperate plugin instead of being in base package. This was done because inventory isn't really a key feature in the Grid Building system and most people will want to implement their own inventory. To be compatible with the SpendMaterialsRuleGeneric, your inventory node (located somewhere on your user node set in the BuildingSystem) just needs to implement several methods. For convenience, you can reference or extend virtual_item_container (res://addons/grid_building/building_system/virtual/virtual_item_container.gd) to help in building a compatible inventory. Alternatively, download the provided grid_building_inventory plugin to have all the old inventory functions (ItemContainer, BaseItem, etc) from the older versions of the plugin.
  • Fixed bug with positioning when the tilemap position is not centered on 0,0.
  • Removed deprecated methods from Building System for major release cleanup

v3.0.1

  • Hotfix for tile collision indicator generation on tilemaps not centered at 0,0. They should generate properly now.

Files

grid_building-3.0.0.zip 58 kB
Sep 14, 2023
grid_building_inventory-1.0.0.zip 10 kB
Sep 14, 2023

Get Grid Building Plugin for Godot 4

Buy Now$40.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.