Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   Nw2png2.0 (https://forums.graalonline.com/forums/showthread.php?t=134265086)

DustyPorViva 11-24-2011 08:52 PM

Quote:

Originally Posted by cbk1994 (Post 1675194)
You should put this on GitHub so it's easier to keep track of changes and contribute to. I wouldn't mind trying to fix the memory stuff if you do that.

Sorry, missed this post.
https://github.com/dustyshouri/NW2PNG2.0

Quote:

Originally Posted by ffcmike (Post 1675287)
No errors were returned for me this time which is good for generating a basic map, however no characters/ganis were rendered.

I tested it with a GS2 showcharacter() in the following script:
PHP Code:

function onCreated() {
  
// Initialize the attributes
  
showcharacter();
  
this.headimg     "head19.png";
  
this.colors[0]   = "orange";
  
this.colors[1]   = "gray";
  
this.colors[2]   = "gray";
  
this.colors[3]   = "brown";
  
this.colors[4]   = "black";
  
this.shieldimg   "shield1.gif";
  
this.shieldpower 1;
  
this.dir 3;
  
setcharani("walk",null);

  
this.startx this.x;
  
this.starty this.y;

  
this.this.starty 5;
  
this.this.startx 16;

  
this.shadow.-= 1;


And it worked fine. Could you email me the gmap and levels, or at least one of the levels that's having problems? [email protected]

ffcmike 11-24-2011 09:10 PM

Actually it was my mistake, the gani files were not within the cache, there being no "gani file not found" error.

Edit: Now the weird thing is, I've updated filenamecache, but the program is just getting stuck on generating, there being no command prompt in the background.

DustyPorViva 11-24-2011 10:18 PM

Quote:

Originally Posted by ffcmike (Post 1675299)
Actually it was my mistake, the gani files were not within the cache, there being no "gani file not found" error.

Edit: Now the weird thing is, I've updated filenamecache, but the program is just getting stuck on generating, there being no command prompt in the background.

It's hard for me to say exactly what it's hanging up on without seeing the error. Maybe the next version should output all print traces to a log file.

DustyPorViva 11-25-2011 12:37 AM

1 Attachment(s)
Quote:

Originally Posted by ffcmike (Post 1675299)
Actually it was my mistake, the gani files were not within the cache, there being no "gani file not found" error.

Edit: Now the weird thing is, I've updated filenamecache, but the program is just getting stuck on generating, there being no command prompt in the background.

Here, newest version writes all stack traces to a log file. That way you can paste the logs so I can review them.

ffcmike 11-25-2011 11:51 AM

Quote:

Originally Posted by DustyPorViva (Post 1675310)
Here, newest version writes all stack traces to a log file. That way you can paste the logs so I can review them.

An error.txt file is generated, however no text is contained within it.
I've made sure an older version is still working.

DustyPorViva 11-25-2011 03:13 PM

1 Attachment(s)
Quote:

Originally Posted by ffcmike (Post 1675337)
An error.txt file is generated, however no text is contained within it.
I've made sure an older version is still working.

You can try this one, apparently I didn't catch all errors.

ffcmike 11-25-2011 06:43 PM

Quote:

Originally Posted by DustyPorViva (Post 1675347)
You can try this one, apparently I didn't catch all errors.

Quote:

java.lang.NumberFormatException: For input string: "="
at java.lang.NumberFormatException.forInputString(Unk nown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at src.born2kill.nw2png.NW2PNGHelper.renderLevel(NW2P NGHelper.java:333)
at src.born2kill.nw2png.NW2PNGHelper.renderGmap(NW2PN GHelper.java:706)
at src.born2kill.nw2png.NW2PNGHelper.run(NW2PNGHelper .java:148)
at java.lang.Thread.run(Unknown Source)

java.lang.NumberFormatException: For input string: "g"
at java.lang.NumberFormatException.forInputString(Unk nown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at src.born2kill.nw2png.NW2PNGHelper.renderLevel(NW2P NGHelper.java:333)
at src.born2kill.nw2png.NW2PNGHelper.renderGmap(NW2PN GHelper.java:706)
at src.born2kill.nw2png.NW2PNGHelper.run(NW2PNGHelper .java:148)
at java.lang.Thread.run(Unknown Source)

java.lang.NumberFormatException: For input string: "="
at java.lang.NumberFormatException.forInputString(Unk nown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at src.born2kill.nw2png.NW2PNGHelper.renderLevel(NW2P NGHelper.java:333)
at src.born2kill.nw2png.NW2PNGHelper.renderGmap(NW2PN GHelper.java:706)
at src.born2kill.nw2png.NW2PNGHelper.run(NW2PNGHelper .java:148)
at java.lang.Thread.run(Unknown Source)

I don't know what this means exactly, but I have re-browsed to each necessary file/location to ensure the destinations exist.

Emera 11-25-2011 06:48 PM

Good work dusty!

Quote:

ensure to ensure
lol?

DustyPorViva 11-25-2011 08:45 PM

1 Attachment(s)
Quote:

Originally Posted by ffcmike (Post 1675360)
I don't know what this means exactly, but I have re-browsed to each necessary file/location to ensure the destinations exist.

Okay, sorry but I realized it's pretty useless without knowing the levels the errors are occuring in, so I've tried to keep track of the activities somewhat for better debugging. Then at least you could try to trace it down to a specific NPC or at least level. Then you could maybe send me the level.

ffcmike 11-25-2011 09:02 PM

Quote:

Originally Posted by DustyPorViva (Post 1675373)
Okay, sorry but I realized it's pretty useless without knowing the levels the errors are occuring in, so I've tried to keep track of the activities somewhat for better debugging. Then at least you could try to trace it down to a specific NPC or at least level. Then you could maybe send me the level.

Figured it out.

The problem happened to be occurring with the very first top left level of the map, even if I had "Render NPCs" unticked.
So I gradually removed all of the more complex NPCs to try and single out the culprit, the problem still happened, and continued until I had removed every NPC, then it managed to move onto the next level.
However adding a simple image only NPC worked, whereas adding an NPC of this.join("object_bush"); caused the problem again.

I hadn't actually got around to testing class images, I tried again after removing "bush=bush.png" from the text file and it's still happening.

DustyPorViva 11-25-2011 09:07 PM

Quote:

Originally Posted by ffcmike (Post 1675374)
Figured it out.

The problem happened to be occurring with the very first top left level of the map, even if I had "Render NPCs" unticked.
So I gradually removed all of the more complex NPCs to try and single out the culprit, the problem still happened, and continued until I had removed every NPC, then it managed to move onto the next level.
However adding a simple image only NPC worked, whereas adding an NPC of this.join("object_bush"); caused the problem again.

I hadn't actually got around to testing class images, I tried again after removing "bush=bush.png" from the text file and it's still happening.

Your current version is in the middle of content updates, so some stuff doesn't work, like the 'Render NPCs' option. Could you tell me the log with the new debug version so I can find out what exactly is chocking the parser, and maybe send me the level it's having problems on?

ffcmike 11-25-2011 09:16 PM

The same thing happens if I create a blank level in the editor, add an NPC with the script this.join("object_bush");, save it as new1.nw and attempt to render that.
Error log just contained "Parsing level: new1.nw", unless I'm missing something.

DustyPorViva 11-25-2011 09:40 PM

1 Attachment(s)
Quote:

Originally Posted by ffcmike (Post 1675376)
The same thing happens if I create a blank level in the editor, add an NPC with the script this.join("object_bush");, save it as new1.nw and attempt to render that.
Error log just contained "Parsing level: new1.nw", unless I'm missing something.

Oh okay, I know the problem. Problem is it's expecting "this.blah = 1" and thus looking for "=" and causing a parsing error when it can't find it(in this case calling a function). It should only attempt to parse variables if actually assigning a value to one now.

Here's an updated version until the "complete" update, the render NPCs option still does nothing, but join classes are now rendered and we can see if it's fixing your issues.

ffcmike 11-26-2011 01:04 AM

Same problem is still occurring.

DustyPorViva 11-26-2011 01:32 AM

1 Attachment(s)
Quote:

Originally Posted by ffcmike (Post 1675401)
Same problem is still occurring.

Here, I think I fixed it. I wasn't accounting when searching for a join image reference was returning null.


All times are GMT +2. The time now is 04:10 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.