Editing Node-Webkit Resources

  • Hi Everyone, I exported my game as node-webkit. Then I got 4 folders, linux32/64,osx, and win32. When I opened the osx folder -->game.app-->contents-->resources-->app.nw, I could find the resources of my game. The problem is that I cannot find for the win32 and linux32/64 though I believe they are in nw.pak file. I have tried to extract this file but failed.

    Can anyone help me please? Is it possible to extract the resources from nodewebkit for win32? Can we then change them by putting new resources to the corresponding folders?

    Thanks <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Why would you want to change assets after export rather than before?

    I mean doesn't it make more sense to keep that stuff as far away from prying eyes as possible?

  • newt, I want the user to be able to edit the sprites and text of the game as they like it. So I have a friend, a teacher, and he wants to use game in teaching. By making the assets editable, I dont need to edit and export the game myself everytime he wants to change the dialogue for example. That's the case. Thanks

  • There are actions to load from an external source.

    In fact nodewebkit has special actions for using local sources.

  • But is it editable after we export as nodewebkit? I mean will the local sources be visible in the folder? or should I use the actions in the game and export it as nodewebkit then I add the editable sources to the exported folder? Thanks

  • There are several ways to go about it, but yes.

    Here is an example :https://dl.dropboxusercontent.com/u/666516/nwfi.capx

  • Wow, thanks I found this very useful for me. May I ask you again if I face a new problem? Thanks

  • Sure, but the forum is always the best bet.

  • newt, I used the same method you use in the capx you gave to call for txt file, but nothing showed up. Is the method different? thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yeah, you'll have to import it differently, as well as parse it, and write it to a text object.

  • Here's what I have tried so far.

    On Left Button Click on Sprite

    --Text->set text to NodeWebkit.UserFolder & "myfile.txt"

    the result that I get is not the content of the txt file, but the title:

    \Users\NOTHASEO\myfile.txt

    What should I do, newt? Thanks

  • I've updated the old capx with an example.

  • Thanks newt <img src="smileys/smiley1.gif" border="0" align="middle" /> But now I have a new problem. When I wanted to read from specific folder I added "Folder Name" before the text, It didnt work. Could you help me?

  • Well you can't really know where something is on another users system, but you can use the appPath expression that comes with the nodewebkit plug.

    I think you can just concatenate with and (&) and a slash with the filename.

    &"\yourfilename.txt"

  • Wow, it works Many thanks for you, you just saved me <img src="smileys/smiley32.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)