Author Topic: OpenXCom Modding Tools  (Read 18303 times)

Offline Falko

  • Colonel
  • ****
  • Posts: 804
    • View Profile
OpenXCom Modding Tools
« on: September 27, 2014, 01:16:51 pm »
go here: https://falkooxc2.pythonanywhere.com/

for some time I worked on a website that combines my existing modding tools.
my main goals are:
- make the use more easier to understand/use
- make it easier to add stuff to the tools
- making the source available in a way that anyone can run the tools locally.

i now reached a point where the globe/language/sprite tools are in a workable condition
the documentation is not existent i have prepared help buttons but decided to publish regardless instead of waiting with the publication until the motivation to write "help" finds me
the upload functionality is using a browser interface that is not available for IE9 and older
that restriction  leads to the fact that the sprite/language tools are unusable with IE<=9

short explanation for the tools:

world editor: to change all parameters in regard to placement of things on the globe
Spoiler:
old version is here https://openxcom.org/forum/index.php?topic=2835.0
new functionality:
you can enable a snap mode so drawing textures that fit together works better
you can undo the last drawn border/texture point by pressing [delete]
you can cancel the drawing of border/texture by pressing [esc]
you can finish the drawing of border/texture by pressing [return] (double click also ends the drawing - but the [return] finish does not disable the new-mode)
under optionals you have now new things to do:
- "fill the planet" filles the planet with textures with resolution/"color" of your choosing
- "check terrorzone" adds the mission3 zones to cities so terrorships fly to new cities
- "small display" allows the setting of (base) layers while using small displays

combine sprites: makes many small singlesprites into one big spritesheet (better for linux/ easier filehandling)
Spoiler:
old version still here https://openxcom.org/forum/index.php?topic=2349.0
new version works with drag & drop, shows the image, and gives the option to set a usefull download name
chrome user can drag/drop complete folders - other browser have to drop files
be aware that i group files according to filename without numbers so dropping ARMOR1_001..100 and ARMOR2_001..100 leads to ONE spritesheet (ARMOR______)
besides UI optimization no new functionality

palette converter: has many option to fix and recolor images
Spoiler:
old version still here https://openxcom.org/forum/index.php?topic=2349.0
new version works with drag & drop, shows the image, and gives the option to set a usefull download name
you can select your operation
"fix" tries to go and fix palettes if your palette was optimized or you have a RGB image (PNG/BMP) instead of an indexed file - as long as the colors match the palette the tool fixes the image - unfortunately pckview gives "wrong" colors
the "set-" operation is trivial it bruteforce sets the new palette type
color15to14 fixes a oxc bug with color 15
there are some tftddepth0ToUFO-... operations that can change the tftd palette into ufo battlescape there are 3 versions with varying results - try it out
you can also make color changes as an example i have added switch_green_blue but you can make your own by clicking on "add new transform" play with it until i find time to explain how it works :) give it a name and save changes -> the new transformation is now available as a new function
if you want to save your colorchange go to the options and copy your part its yaml and should be at the end of the document

xcomconverter: convert vanillaxcom files to png, convert png back to PCK (for new terrains), splitup a spritesheet
Spoiler:
new tool
if you drop xcomdata file (pck, dat,spk,scr,bdy) files the tools selects a mostly working function for you
you need to upload a tab and a pck file to get a working PCK->png transformation
png upload assumes an spritesheet with sprites of width 32x40 and gives the option to make a PCK out of an spritesheet or split the files the resulting file is an zip
if you make a PCK there can be a wanring.txt with explanations in the zipfile if your png could not be transformed 1:1 into a pck
with the options its easy to later add new formats for im/exports

hwp builder: makes creating 4tile - tanks easy
Spoiler:
old version still here https://openxcom.org/forum/index.php?topic=2349.0
no new functionality
but the UI is hopefully more understandable

language editor: makes editing languages in rulesets easier
Spoiler:
old version here https://openxcom.org/forum/index.php?topic=2862.0
no new functionality

modtester: .. will be included here "when its done" getting the other stuff done is a first milestone and is enough to publish this

more: .. there will be more

.. after some time

PS:
thanks to Arthanor and clownagent for testing, supsuper/warboy for answering many many questions
« Last Edit: September 27, 2014, 01:18:46 pm by Falko »

Offline Falko

  • Colonel
  • ****
  • Posts: 804
    • View Profile
Re: OpenXCom Modding Tools
« Reply #1 on: September 27, 2014, 01:17:07 pm »
reserved

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
Re: OpenXCom Modding Tools
« Reply #2 on: September 27, 2014, 08:09:49 pm »
Hats off to you, Falko! These tools are AWESOME!!

I've needed to do recolors for a long time and had no idea how to approach the project. Now, it's as simple as uploading, picking the color I want to change and what to change it to. The PCK converter and PNG splitters are great too, for easy access to all the original stuff, and, of course, my favorite: the sprite merger.

Did I understand right and I can now use Paint or something, make a RGB PNG (with the right colors), and only have to run it through the palette converter? If yes, you're my hero!

Really, this a an impressive contribution to the community. Now, everyone can do pretty much anything modding wise.

When are you making the "Dream up something and it will become true" tool? That's almost the only thing missing ;)

Offline Falko

  • Colonel
  • ****
  • Posts: 804
    • View Profile
Re: OpenXCom Modding Tools
« Reply #3 on: September 28, 2014, 01:47:34 am »
"When are you making the "Dream up something and it will become true" tool?"
i am sorry the "do what i mean"-tool is still not finished by anyone :)

" I can now use Paint .... make a RGB PNG (with the right colors), and only have to run it through the palette converter?" yes it should work
i tried to make it work for pckview exports but there was no sane use for it so example: '36,0,0'=pck was refenrenced twice in colors that were different in "real" palette colors geo and graph palettes had a lot more inconclusive color assignments so i could not create an "fixer" for that :(

Offline clownagent

  • Captain
  • ***
  • Posts: 347
    • View Profile
Re: OpenXCom Modding Tools
« Reply #4 on: October 08, 2014, 08:46:18 pm »
Two small suggestions for the world editor:

1. The shape of the polygons can be changed by drag and drop of the orange circles at the edges. Please make them a little bit larger. It is sometimes hard to hit them with my old eyes  ;)

2. When polygons are overlapping it is not possible to change the shape of the lower polygon. When you try to hit an orange circle, you always activate the upper polygon. It would be better if one can change also the shape of the lower lying polygons.

Offline clownagent

  • Captain
  • ***
  • Posts: 347
    • View Profile
Re: OpenXCom Modding Tools
« Reply #5 on: October 18, 2014, 05:06:08 pm »
Other suggestions for the world editor:

1. Show a text field in which the current coordinate position under the mouse cursor is shown in globe coordinates.

2. Add an "undo" button or shortcut (ctrl+z?)

3. Bug?: It seems to be impossible to draw a polygon over the vertical zero line (where the coordinate flip from 360° to 0°). When you try this, the polygon is drawn the other way around the whole globe, resulting in an extremely 'wide' polygon.

Offline VSx86

  • Squaddie
  • *
  • Posts: 39
    • View Profile
    • [FYI] PRISM-Break (useful Free/Libre software)
Re: OpenXCom Modding Tools
« Reply #6 on: October 25, 2014, 11:56:26 pm »
Hi, Falko!  ;)

I'm not tested your OXC modding tools yet, but i think they will be more handy
and therefore popular when it also be available as standalone (offline) programs.

Offline jackstraw2323

  • Captain
  • ***
  • Posts: 197
    • View Profile
Re: OpenXCom Modding Tools
« Reply #7 on: October 28, 2014, 03:42:03 am »
When using https://falkooxc2.pythonanywhere.com/hwpbuild My sprites seem to be out of order for the Secotopod. Compared to the sprites of https://openxcom.org/forum/index.php?topic=1627.0 seems like either I'm missing some code in my .rul to give it the correct order, or the file just isn't assembling in the right order.

Offline Falko

  • Colonel
  • ****
  • Posts: 804
    • View Profile
Re: OpenXCom Modding Tools
« Reply #8 on: October 28, 2014, 03:48:57 am »
no idea why it does not work like it should anymore
i made a working sectopod spritesheet a month ago with this tool
it seems to be a codechange as source for this strange behaviour

Offline Arthanor

  • Commander
  • *****
  • Posts: 2560
  • XCom Armoury Quartermaster
    • View Profile
Re: OpenXCom Modding Tools
« Reply #9 on: October 28, 2014, 04:06:23 pm »
Hi Falko,

In light of the discussion going on here: https://openxcom.org/forum/index.php?topic=1627.msg34933#msg34933

Would it be possible for the palette fixer to assign something like the bright green used to color 0, in order for images produced with it to be useable on Macs? As far as I understand, it changes nothing for the other OS, but makes a big difference for Mac users.

I completely depend on your tools to make graphics (and I really like them), but that also means they are incompatible for Macs :/

Thanks in advance!

Offline Falko

  • Colonel
  • ****
  • Posts: 804
    • View Profile
Re: OpenXCom Modding Tools
« Reply #10 on: October 28, 2014, 04:26:47 pm »
as i encountered that problem some weeks ago in the forum and played around with a fixing script but i dont have a mac and cant test my fixes

Offline oftcrash

  • Squaddie
  • *
  • Posts: 21
    • View Profile
Re: OpenXCom Modding Tools
« Reply #11 on: October 28, 2014, 05:42:25 pm »
I can give something a try if you'd like. I can't get on IRC until sometime after 9pm US Eastern time, but I can try something out sooner if you want to PM me (I can give you my email if that's easier). I used your scripts to convert the default game sprites to a png sheet, then brought it into photoshop and replaced the background color with the green. I also did the same with the dart rifle mod and got it working. I've created half a dozen other weapons and, my own art skill limitations aside, have them working in-game using the same process.


Offline oftcrash

  • Squaddie
  • *
  • Posts: 21
    • View Profile
Re: OpenXCom Modding Tools
« Reply #13 on: October 28, 2014, 07:40:20 pm »
Here's the battlescape palette. I fired it up in the game and it worked properly.

I also attached a sniper rifle I'm working on (works in game) you can use as a reference for the palette.

My exact timing for getting online is an estimate. It all depends on whether the kids go to sleep on time :)

Offline oftcrash

  • Squaddie
  • *
  • Posts: 21
    • View Profile
Re: OpenXCom Modding Tools
« Reply #14 on: October 29, 2014, 03:43:01 am »
1 pixel with palette in lovely neon green.