Copiing BGA Studio project fails

Game development with Board Game Arena Studio
Post Reply
User avatar
Woodruff
Posts: 141
Joined: 08 March 2014, 00:53

Copiing BGA Studio project fails

Post by Woodruff » 10 November 2019, 13:42

Hi everybody,

I am trying to copy my project of Toc (already published in BGA) in order to do bug hunting without wrecking my base code.
I named this project TocDebugg and at this moment it has the same code as Toc (I did not change anything).

But when I try to launch a TocDebug game, it fails on loading the game: "An important BGA module couldnt be found, and your game cannot be loaded [...]"
While the original Toc still loads well.

I also tried to reload all reloadable files (stats, img, options...) but that does not solve the problem.

What do I miss do you think?

Thanks a lot!

Woodruff

User avatar
RicardoRix
Posts: 630
Joined: 29 April 2012, 23:43

Re: Copiing BGA Studio project fails

Post by RicardoRix » 10 November 2019, 14:52

you could zip your current folder to make a backup, make changes and if it fails then re-employ the zip.

User avatar
A-dam
Posts: 71
Joined: 28 September 2013, 18:15

Re: Copiing BGA Studio project fails

Post by A-dam » 10 November 2019, 15:46

Check if every reference to original name toc is changed in new project correctly.

For example in js file:

Code: Select all

return declare("bgagame.toc", ebg.core.gamegui, ...
->

Code: Select all

return declare("bgagame.tocdebug", ebg.core.gamegui, ...
this must be done in all concerned files, reference is almost in all php files and the name must be correctly changed

User avatar
DrKarotte
Posts: 197
Joined: 22 September 2015, 23:42

Re: Copiing BGA Studio project fails

Post by DrKarotte » 10 November 2019, 15:53

What about the lines where the project name is set, e.g. in the JS constructor, or ajax calls, can these stay the same as in the original game?

See A-Dam's more detailed reply.

User avatar
Woodruff
Posts: 141
Joined: 08 March 2014, 00:53

Re: Copiing BGA Studio project fails

Post by Woodruff » 10 November 2019, 16:52

Hi,
Thanlks for your answers. I've check everything, everything has been replace correctly except my references to stockitem, which have been replaced by stocdebuggkitem :o :o :o

I corrected that but unfortunately the problem is still there...
Any more ideas?

User avatar
RicardoRix
Posts: 630
Joined: 29 April 2012, 23:43

Re: Copiing BGA Studio project fails

Post by RicardoRix » 10 November 2019, 17:04

the module error can crop up due the JS define and declare statements.
do you need to click any of those load buttons in the control panel...

But IMO you're missing the obvious solution.

User avatar
Woodruff
Posts: 141
Joined: 08 March 2014, 00:53

Re: Copiing BGA Studio project fails

Post by Woodruff » 10 November 2019, 17:31

I already clicked them all.
But your're right, I'll backup my current project and work from it.
Still, I pinpointed that this is a bug that prevents to use that button for other uses, such as developing an expansion.

User avatar
Een
Posts: 2296
Joined: 16 June 2010, 19:52

Re: Copiing BGA Studio project fails

Post by Een » 11 November 2019, 13:32

Thanlks for your answers. I've check everything, everything has been replace correctly except my references to stockitem, which have been replaced by stocdebuggkitem :o :o
Ah, yes, copying a project relies on replacing the project name by another one in class names and such automatically. If the name of the game is not specific enough, the replacement can do a little too much...
I am trying to copy my project of Toc (already published in BGA) in order to do bug hunting without wrecking my base code.
I named this project TocDebugg and at this moment it has the same code as Toc (I did not change anything).
You can use the version control system for that, just take a note of the current version when clicking show log history, and you can go back to this version of the codebase anytime after your bug hunting. It's better than creating copies in most cases.

Post Reply

Return to “Developers”