May 2, 2015, 04:46 AM | ||
Quote:
EDIT: Wait, there are more colors ;( (in one color, they've got noise)
__________________
~XxMoNsTeR |
May 2, 2015, 10:24 AM | |
There's a .pal file included in the pyJ2A.zip that you downloaded. Use that.
|
May 3, 2015, 11:53 PM | |
Ah ok, thanks!
__________________
~XxMoNsTeR Last edited by XxMoNsTeRXM; May 13, 2015 at 06:51 AM. |
May 13, 2015, 06:51 AM | |
Same error.
__________________
~XxMoNsTeR Last edited by XxMoNsTeRXM; Feb 26, 2017 at 01:32 AM. |
May 24, 2015, 08:10 AM | |
It is included in the zip.
Also, the python files worked like a charm for me, but after importing a png file, the colors got messed up. I have no idea why, because I have loaded the included palette in Paint Shop Pro. Any help would be appreciated.
__________________
All your base are belong to us. Last edited by szmol96; May 24, 2015 at 08:14 AM. Reason: misspelling |
May 24, 2015, 11:17 AM | |
Without seeing some combination of the png, the .j2a, or the code, it's difficult for me to say anything.
|
May 25, 2015, 03:53 AM | |
Sorry, I was browsing from my phone when I wrote that reply. Anyway, here's the image.
You can see the original sprite on the left and the one that shows up in JazzSD on the right. EDIT: Also, here's some additional information. After re-opening the image in Paint Shop Pro, it has the following palette.
__________________
All your base are belong to us. Last edited by szmol96; May 25, 2015 at 04:21 AM. |
May 25, 2015, 08:11 AM | |
Well, graphicsgale doesn't do that unless you tell it to remove unused colours. The free version will do fine.
I'm guessing you can stop PSP from removing unused colours, but I don't use that program so I'm useless on that.
__________________
|
May 25, 2015, 08:58 AM | |
In the Save dialog, click "Options" and then uncheck "Optimized palette." The flow/wording may be a bit different depending on your PSP version but it's probably similar.
|
Jul 24, 2015, 10:45 AM | |
What am I doing wrong when I get this error from JSD: "Run-time error '11': Division by zero"?
My animation contains only one frame which is 128x16 pixels large, has the palette loaded and an fps.10 file next to it and it is named 0,-125,-8,0,0,0,0.png. I hope to have included enough info.
__________________
All your base are belong to us. |
Jul 24, 2015, 07:31 PM | |
JSD is not a reliable measure of whether your file was saved correctly. Only JJ2 can tell you that.
|
Aug 3, 2015, 05:38 AM | |
szmol96's picture triggered the following Python error, resulting in producing an invalid j2a file:
Code:
Traceback (most recent call last): File "j2a-import.py", line 164, in <module> main() File "j2a-import.py", line 108, in main data3 += chr(len(pixelstodraw) + 0x80) ValueError: chr() arg not in range(256) The error can be walked around by appending columns of index 0 pixels on each side of the picture (presumably one side would suffice but I didn't want to check which one it has to be).
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |
Sep 24, 2015, 06:02 AM | |
When extracting it I only get half of the images, but I want to do some edits and I need all of the images from plus.j2a
__________________
~XxMoNsTeR |
Sep 27, 2015, 03:53 PM | |
Does this work? I haven't touched this stuff in a while.
|
Sep 28, 2015, 04:23 AM | ||
Quote:
__________________
~XxMoNsTeR Last edited by XxMoNsTeRXM; Feb 26, 2017 at 01:32 AM. |
Oct 5, 2015, 04:02 PM | |
I'm getting this error.
Code:
$ python j2a-extract.py Please type the filename of the .j2a file you wish to extract: Anims.j2a Traceback (most recent call last): File "j2a-extract.py", line 40, in |
Oct 5, 2015, 11:59 PM | |
I don't know Python, but as far as I can tell, the meaning of that line is implementation-defined, dependent on type size. It should work in almost all popular data models with the main exception of LP64. Are you on 64-bit Linux? Anyway, try modifying line 54 of j2a.py by changing "L" to "I".
|
Oct 6, 2015, 06:48 AM | |
Yeah, I'm on 64-bit Linux. Changing "L" to "l" just switched it from unsigned to signed long, so that didn't work. But you were right about what was going wrong. My solution was to change it to "<L" which locks it to 4-bytes little endian.
|
Oct 8, 2015, 05:44 AM | |
Oh. l hate sans serif fonts sometimes.
|
Feb 26, 2017, 03:28 AM | |
I have a problem while trying to draw a sprite from a custom j2a file, a 800x600 png image. I am converting the image from a different palette to the JJ2's Palette. After I convert it and I save it in the specified format (0,-1,-1,0,0,0,0.png), j2a-import.py manages to import it in a .j2a file, but when I try to load from it, it gives me an Access Violation saying that the j2a is corrupt. The error is probably from how it is converted to the jj2 palette. I used GIMP to convert it to the jj2 palette.
__________________
~XxMoNsTeR |
Feb 26, 2017, 08:54 AM | |
I think the .py would have complained if the image weren't properly paletted. It may be an obscure issue with the image size... could you PM the image to me, maybe?
|
Feb 26, 2017, 09:02 AM | |
The unconverted image or the converted image?
__________________
~XxMoNsTeR |
Feb 26, 2017, 10:56 AM |
Violet CLM |
This message has been deleted by Violet CLM.
Reason: deleting in order to bump thread
|
Feb 26, 2017, 12:48 PM | |
Code:
void onLevelLoad() { jjAnimSets[ANIM::CUSTOM[0]].load(0, "Camel.j2a"); } void onDrawLayer8(jjPLAYER@, jjCANVAS@ screen) { screen.drawSprite(1,1, ANIM::CUSTOM[0], 0, 0); } |
Feb 27, 2017, 03:42 AM | |
I am using Linux btw, could that be the problem? I used Python 2.7. Does the python script use a Windows-based function?
Edit: It doesn't look that there's any file path problem.
__________________
~XxMoNsTeR Last edited by XxMoNsTeRXM; Feb 27, 2017 at 04:50 AM. |
Feb 27, 2017, 06:56 AM | |
There's a windows-vs.-linux discussion a bit farther up this page... that was about the extract script, not the import, but you might have similar success looking for instances of
struct.pack in the script and trying to force the size/endianness/whatever to work on your system.
|
Feb 27, 2017, 07:19 AM | |
That didn't help. It might have helped, now I don't get crashed. But the image doesn't show now. I think I have to change to I some specific struct.pack s How am I suppose to find out which of them to change? Nvm... I figured it out!
__________________
~XxMoNsTeR Last edited by XxMoNsTeRXM; Feb 27, 2017 at 08:08 AM. |
Nov 30, 2017, 11:56 AM | |
Could you try using py2exe so one won't have to have Python to use the tool (py2exe AFAIK embeds Python interpreter and all used libraries in the exe)? Because Python changes much even in the minor versions or it can simply not work on someone's system, as it's case with me. I mean, the interpreter and IDLE runs for me, it's just that it's unable to find even the basic libs. And yes, I have my %PATH% set correctly. I guess Python's compatibility with Win8, at least for the 2.x branch is pretty dodgy.
Never had any issues with scripts that were ran through py2exe so if you'd do that, it should work.
__________________
Code:
.──. │O_O │ ││_╱ │ ╱╱ │╲ (|▔╲ │ ) ╱'╲_▔ _╱`╲ ╲___) (___╱ TUX LOVES YOU. |
Dec 2, 2017, 09:02 PM | |
I just spent an hour or so fiddling with py2exe and cxfreeze, and neither of them produced working executables, and so I've lost interest.
|
«
Previous Thread
|
Next Thread
»
Thread Tools | |
|
|
All times are GMT -8. The time now is 12:16 AM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.