Author Topic: OpenXCom Modding Tools  (Read 104967 times)

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: OpenXCom Modding Tools
« Reply #30 on: November 18, 2014, 05:48:16 pm »
ok this image has multiple issues

the source likely comes from PCKView?
that tool never worked for me so here some second hand knowledge
pckview generates bmp files (not indexed?) with wrong colors
see https://openxcom.org/forum/index.php?topic=1321.msg32646#msg32646
there is no easy way to "fix" the palette because the export makes stuff like this:
it converts pixel with color index 30(56,0,0) and pixel with color index 111(48,0,0) into the same color the same color (48,0,0)
to make a a pck or working png out of these images  the tool would have to magically know if it should convert the color (48,0,0) back to index 30 or 111
in the ufo battlescape palette are only a handful of these nonresolvable colors other palletes have it worse
"fix palette" would fix a RGB image into a working indexed png if the color are correct but they are not
next problem is size pckview genereates these lines between images the PNG2... tools do not expect that sort of image size you could change the behaviour in the options to 33/41
Code: [Select]
- name: PNGtoPCK
  out: ZIP
  mode: PNG2PCK
  in: PNG
  width: 33
  height: 41
but that would generate wrong pck files
ok how can you solve this..
i guess pckview has an option to transform its own format back to PCK i would use that and then use the xcomconverter to convert the pck back to a png


Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: OpenXCom Modding Tools
« Reply #31 on: November 18, 2014, 07:05:41 pm »
Thank you

The png is the main tileset of an UFO2000 terror terrain described only by .LUA files

It is "The Burbs - release downsuburbs-beta15" that I found here:
https://www.xcomufo.com/forums/index.php?showtopic=242027963&page=2

downsuburbs-beta15 contains 91 maps  in LUA format ...

Main Tilesets is build on this png, and a file .Lua for the .MCD

There are an other mini tileset named "destroyed" too.

The thread shows some screenshots of this terrain.

Here https://www.xcomufo.com/forums/index.php?showtopic=242029220 was wrote that single tile has to be 32x40


« Last Edit: November 18, 2014, 07:36:02 pm by davide »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: OpenXCom Modding Tools
« Reply #32 on: November 18, 2014, 07:28:46 pm »
ah i see
i took a second look at the file you posted first
and there seems to be a big difference between ufo2000 and openxcom
openxcom allows only 256 fixed colors (with a change in colors depending on game mode)
the image you posted has 22477 different colors
you cant magically put that into openxcom

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: OpenXCom Modding Tools
« Reply #33 on: November 18, 2014, 07:41:57 pm »
Yes but with some magic tools that convert it ... ;D

It could be a strong challenge ... for a ToolMaker  !!!

hehehe

It is a  joke

Convert file format and pallette too it is a nightmare


Offline TaxxiDriver

  • Captain
  • ***
  • Posts: 97
    • View Profile
Re: OpenXCom Modding Tools
« Reply #34 on: November 23, 2014, 04:16:56 am »
This is... just beautiful. I really didn't know what it does, so I tried it with one of my faulty script and all the errors got thrown in da thin air within a few seconds. That's one hell of a time saver ;D

I also think it can be a very useful tool for learning how to add new sprites and modify them. I'll try that later by myself.

P.S. My favorite is when the word 'help' comes out when you click 'help' ;).

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: OpenXCom Modding Tools
« Reply #35 on: November 23, 2014, 12:33:52 pm »
thx
i did not have the time to make the help texts its just a placeholder atm :(

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: OpenXCom Modding Tools
« Reply #36 on: December 01, 2014, 10:15:56 pm »
Falko, two small issues...

1) how to upload world.dat file ?
2) i found that tool to optimize mission zone 3 does not remove zones added manually even when they are outside cities... this should no happen i think

PS: could you improve output file using proper [ ] tables ?

Code: [Select]
   
areas:
      - [335, 40, -35, -15]
      - [335, 55, -15, 0]

Code: [Select]
    areas:
      - - 180
        - 195
        - -70
        - -55
      - - 180
        - 230
        - -55
        - -30

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: OpenXCom Modding Tools
« Reply #37 on: December 01, 2014, 10:41:08 pm »
1) how to upload world.dat file ?
i do not have a converter for world.dat files online
i asked here if somebody was interested but got no feedback
2) i found that tool to optimize mission zone 3 does not remove zones added manually even when they are outside cities... this should no happen i think
oxc now has a included "fix" all cities get their missionzone 3 entry
one time that was not the case and led to cites that eg. never were targeted by terrormission
the vanilla missionzone3 contains (iirc) 3 missionzones outside cities (hawaii) so i cant just delete them
the "fixer" does the same what oxc now does by itself so its not really needed anymore
PS: could you improve output file using proper [ ] tables ?
upload the result here
https://falkooxc2.pythonanywhere.com/rulformat
that should reformat your rulset (including the "globe:" stuff)

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: OpenXCom Modding Tools
« Reply #38 on: December 01, 2014, 11:01:14 pm »
@Falko

Great, thanks, all is ok :)

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: OpenXCom Modding Tools
« Reply #39 on: December 01, 2014, 11:30:57 pm »
one more thing, maybe just small one....

is there option to snap all regions to grid ? like 0.25 DEG or something like this ?

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: OpenXCom Modding Tools
« Reply #40 on: January 07, 2015, 11:27:48 pm »
@Falko

Is there option to load world.dat file instead of ruleset ?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: OpenXCom Modding Tools
« Reply #41 on: January 08, 2015, 12:19:46 am »
there is no im/export of world.dat files i will take a look at making a im/export between rul and world.dat format

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: OpenXCom Modding Tools
« Reply #42 on: January 13, 2015, 04:25:57 pm »
Hey Falko

I'm using the XCOMConverter to convert some unit mods that still use the old files (SPK/PCK) to PNG. The PCK are converted without a problem but  I can't convert any of the .SPK inventory images. Any idea of what settings I should use?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: OpenXCom Modding Tools
« Reply #43 on: January 13, 2015, 07:56:38 pm »
these files should work
i uploaded the vanilla geograph folder just now and the website choose SCRtoPNG as function by default (as it should)
all vanilla-images are saved without information what palette is used for them so one has to select this manually (or fix/reset them later with the palette-fixer)
should a manual selection of this option not help perhaps you can upload a zip with your files here so i can take a look at them

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: OpenXCom Modding Tools
« Reply #44 on: January 13, 2015, 08:13:30 pm »
these files should work
i uploaded the vanilla geograph folder just now and the website choose SCRtoPNG as function by default (as it should)
all vanilla-images are saved without information what palette is used for them so one has to select this manually (or fix/reset them later with the palette-fixer)
should a manual selection of this option not help perhaps you can upload a zip with your files here so i can take a look at them

Just tried it and I keep getting an Error when I convert. The files are attached below.