Giter Club home page Giter Club logo

Comments (4)

Ranoller avatar Ranoller commented on June 7, 2024

More test done:
Creature only works in export if the json file is placed in the same directory of the executable, but should work with the json file packed with all the assets in zip pck or exe.

Edit: It seems that godot doesn´t recognize the file like an "external resource". I think that the "asset_filename" section is not enought to godot to find the file. If you see the packedscene contents there is a [ext_resource path="res:etccc...... type="Script" or "Texture" id=x] that allow godot to load the files step by step.... I feel like the json file should be loaded this way, but i´m not a godot dev, not sure at all.

Edit2: Definitely the problem is that the file location is not remapped in export. I made an export packing entire project to exe file, and error is the same. Puting the json near the executable fix the issue. But this is not optimal solution, of course, json files needs to be inside the export package.

I think that problem is here:

94 CreatureGodot::load_json(const String& filename_in)
95 {
96 auto global_path = Globals::get_singleton()->globalize_path(filename_in);

There is other user with this problem:
https://godotengine.org/qa/18047/how-to-get-an-internal-resource-path-in-exported-binary

But nobody seems to response them.

I deserve good look to you because I would like to become your customer soon like you seems the unique animation-app-developer interested in godot (and with a very smooth integration looking the "dino" example), but my game will need export template working. king regards.

Edit3: In my "no c++ developer condition" i´m not feel confident to find a correct workaround for that, but reading godot docs, it says that if a module inherits node, it appears in editor. But it says too, that you can inherit "Resource", and properly, the json file is a "resource" (res:// is the filesystem path for resources) http://docs.godotengine.org/en/stable/learning/features/misc/data_paths.html.
This last comentary it's just in case can give to you any idea, because i can´t realy help with this problem.

from creature_godot.

kestrelm avatar kestrelm commented on June 7, 2024

Hello,
Firstly, I want to say thank you so much for looking into this. I too am not sure how to address this issue as the docs for Godot are quite sparse regarding this area.
If you have any insights on how the line of code should be changed, please do let me know. Also, you know the eventual plan is to move the plugin into GDNative but so far, Godot 3.x isn't stable enough yet for full development time.

Cheers

from creature_godot.

Ranoller avatar Ranoller commented on June 7, 2024

Thanks for your response. I compiled godot changing the globalize_path to localize_path (random thing because i´don´t know c++, godot internal API or real programming) and plugin don´t work in editor. I feel that i can do a nice puppet, do music, and script, but this is up to my scope (and give me headache like the fire of the hell). I can´t help, sorry. I´m not wait for godot3.0 (wait for godot is always bad idea :) :) :) :) ) and i think that probably this "thing" will be present in Godot 3.0 too. (Will be rewrited globals API?, we don´t know). If you can find a workaround please tell me and if you put an issue in godot for that I give you up-hands and support (I don´t think that juan and others developers will be interested in looking this kind of things now, but nothing is lost for try). Store json files out of the project is still an option however.

from creature_godot.

kestrelm avatar kestrelm commented on June 7, 2024

Hello,

Yes indeed, I need to look around at the Godot API more but so far, I am lost in their code/docs too :( It is a bit unfortunate, hopefully I can figure something out eventually...

from creature_godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.