Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include spreadsheet interface for quick/simple data handling #3249

Closed
peterhoglund opened this issue Sep 3, 2021 · 1 comment
Closed

Include spreadsheet interface for quick/simple data handling #3249

peterhoglund opened this issue Sep 3, 2021 · 1 comment

Comments

@peterhoglund
Copy link

Describe the project you are working on

A simple RPG with lots of items

Describe the problem or limitation you are having in your project

Using Excel or Google Sheets spreadsheets is a common way to store data while developing. Tables are an intuitive way to visualize and structure data. They provide a good overview of many items and it is easy and fast to edit several items at a time.

Today you can use 3rd party software and then import the data as a CSV, JSON, or other formats. However, this requires the user to know about parsing or other ways to extract the data. Also, especially with Google Sheets, there is a lot of back and forth and exporting and reimporting to the project every time the user wants to change something in the spreadsheet. It would be very helpful, especially for beginners but also for more advanced developers, to have this tool built into the engine.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Integrate a spreadsheet view to the engine where a user easily can add and edit data for the game. Godot can even have its own data format with a spreadsheet as its interface.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Version A - Simple
The most simple way to do this would be to have a simple spreadsheet view that is a file the user can load from script
image
image

This version can be referenced in script by loading the data sheet:
var weapon_stats = load("res://WeaponStats.ds")
print(weapon_stats[0]["Name"]) # prints "Great Sword"

Version B - Advanced
A more refined version would be to have a more integrated feature, where the user creates a new "DataSheet" and can then add Sections (similar to other spreadsheets tabs). This would allow for a good structure where a user can have a DataSheet called "Weapons" and then sections for, for example, "Swords", "Bows", "Staff" or "Info" and "Stats" etc. The user can name rows and columns to be able to easier reference them in code later. Each column can also have a defined data type if the cells are editable through code.
image

This version would have the data integrated into the project and could be called in script like this:
print(Weapons.Information["Master Sword"]["Description"]) # prints "This is the most..."

If this enhancement will not be used often, can it be worked around with a few lines of script?

There are several ways to do this without this feature, but all of them are either a multi-step process, require advanced coding skills, or lacks a good overview.

Is there a reason why this should be core and not an add-on in the asset library?

Not really, but something like this included in the engine would make it even more streamlined and approachable for beginners.

@Calinou
Copy link
Member

Calinou commented Sep 3, 2021

Duplicate of #13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants