Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Feature request: Project based script files

Registered User
2021-12-21 20:23:02

The problem with scriptfiles being stored in Documents/CopperCube/extensions, and not in the project folder is versioning. What if a user wants to use git for versioning?
When the script files are not stored in the git/project folder/repository, the project becomes invalid due to missing scripts. And copying them from the extensions folder into the project folder before committing changes, is really suboptimal and error prone.

So in addition to extensions scripts, it would be nice if the user could define a default script path for loading scripts only used within the project.
They could be prefixed with project_action_foo or project_behavior_foo to prevent naming collision with extensions scripts if this is a thing.

These scripts should be loaded without the need to restart the editor everytime a new script file has been created (as it is the case with extension scripts).
Rereading the user defined scipts folder could be done when pressing the play button in the editor to run/test the game, or by a new button next to the play button that reads in the user defined scipts folder. If no folder has been set, the popup to set the script folder path could show up.

2021-12-23 09:47:10

Not 100% sure what you mean about GIT versioning?

I'm pretty sure that any called external scripts are also stored internally in the ccb file. Even if you If you completely delete all your external scripts from the extensions folder, they will still run when you load the ccb - the external scripts get saved out with the ccb and exe files.

I think if you update a scripts in the extensions folder, it will also update on first run of the ccb (and on manual update) but they will only be overwritten when you actually save the ccb file. This way, you can test a new version and if the changes are not suitable, you can revert to the previous version simply by not saving the project file.

So, if you want to recover an older (lost) script (even years in the future) or extract a script from someone else's project, just delete/rename the existing external scripts and then run the older ccb file. It will then recreate the older script by placing all the called scripts back in the extension folder.

Also pretty sure that you can call/run scripts from any folder you like (not just the default windows documents folder) and also run scripts internally from coppercube (completely independent from your local folder structure). The default folder is a local hub for extensions and plugins used to create the ccb file. Once the ccb is created/saved, it is not then dependent on the local extensions folder (unless you want to update the extensions).

I think the main reason for most apps defaulting to the "documents folder" forextensions/plugins is for 2 main reasons:

1- it's a universal folder which is present on all machines.
2- it provides elevated access rights for read/right permissions.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "In?ernational" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Copyright© 2020 Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact