Conquest of Elysium 4

Conquest of Elysium 4

Marlin 23 Feb, 2016 @ 2:01pm
Guide on modding fundamentals
I now posted a guide on modding fundamentals: the files a CoE4 mod is made of, and how to create and edit them.

There is no extensive list of modding commands in the guide (there will be a modding guide for that). Only the two most basic commands, the ones that should be in every mod, are covered, along with explanations on how special characters in a mod are to be used.

The bulk of the guide deals with two things: ❶ how to create TGA files for mod banners (primarily, although sprites are also TGA files), and ❷ how to use non-ASCII characters in descriptions and names. Although the complete guide is perhaps a bit lengthy, the idea isn’t that everybody would need to read the whole thing from start to finish – instead just pick the parts that might be of interest to you.
< >
Showing 1-6 of 6 comments
Franknfurter 27 Feb, 2016 @ 3:13pm 
Hey. I just wanted to add that flattening the image reduces filesize by ~20% when I tested it. I decided against it because it makes the images a little harder to re-use if someone wants to modify them later.

But my reason for commenting is to ask, perhaps you could add the correct colours to use in that section (black and the correct colour for shadows... I kept having garish pink shadows for a time then gave up on shadows). I know it's mentioned earlier, but it couldn't hurt to add it as a step during the flatten image process.

Thanks for taking the time to write it. It's quite in-depth and I'm afraid I've only scan-read it but appreciate the depth. (Concerning fonts I'd love to be able to change in-game text to Caslon Antique for a Warhammer 40k feel... though that suffers from a lack of Apostrophes.... so the C'Tan aren't happy.)
Last edited by Franknfurter; 27 Feb, 2016 @ 3:15pm
Marlin 28 Feb, 2016 @ 8:05pm 
Thank you very much for the feedback.

I really didn’t mean for anybody to feel bad about using an alpha channel for actual transparency. My remarks about not needlessly wasting space was meant to refer to images (for banners) which are opaque anyway, and where an alpha channel in the image file is truly pointless. (Not that this may matter that much for a single small image, of course.)

If the transparency ranges over a continuum rather than taking only a few discreet values, there is no substitute for an alpha channel. But I have myself used alpha even for sprites that could have instead been done with the simple transparency used by the game, just for the convenience of instantly seeing what you get.

Then again, apart from saving some space, editing an image without alpha could also be easier than editing one with – provided that you get the colors right, of course.
Originally posted by Franknfurter:
But my reason for commenting is to ask, perhaps you could add the correct colours to use in that section (black and the correct colour for shadows... I kept having garish pink shadows for a time then gave up on shadows). I know it's mentioned earlier, but it couldn't hurt to add it as a step during the flatten image process.
The color used in an alpha-less image for a shadow in the game (half-transparent black) is RGB 255,0,255 – i.e. the red and blue levels should be maxed, while the green is at zero. But I agree. Some further explanations in this area probably wouldn’t hurt. Another thing to watch out with, when you want pixel precise areas of a single exact color, is that several tools have antialiasing and feathering properties that can mess with that – unless turned off. I should probably add another GIMP chapter.

Originally posted by Franknfurter:
Concerning fonts I'd love to be able to change in-game text to Caslon Antique for a Warhammer 40k feel... though that suffers from a lack of Apostrophes.... so the C'Tan aren't happy.)
While options to change fonts and styles within a single text (/box) would probably involve a lot of work, I would imagine an option to define a font wholesale for a certain class and/or box type to be somewhat easier to implement – either via a path to some font file provided with the mod, or via some way to select between fonts provided with the game. Whether it’s worth it... that’s up to Illwinter, of course.

(By the way, your new mods look very cool too, but, unfortunately, I haven’t found much time to check them out yet – except at least to see that they are Linux friendly. 😀 )
Franknfurter 2 Mar, 2016 @ 5:27pm 
Thanks for the reply. I'll start by saying I took a lack of error-comments as a good sign, don't worry about not playing, I appreciate the technical help you've given.

(I'm still glad you told me of the potential Linux pitfalls while I was at the start, rather than after I'd done 300+ sprites and needed to go back and fix all the names... that would not have been too fun.)

Concerning GIMP... I've grown to like it. It's not as easy to learn or as friendly as some programs like Corel Draw but it's fast and efficient if you know what you need to do. It doesn't hold your hand or make it easy to do things so I'm sure others will benefit from your guide in future. (it's also more inclusive to discuss things in terms of freely available software)

I've got a bit of muscle memory with making the sprites now, so it's a trouble-free 2-5mins for a vehicle, 10-20mins for people with fiddly bits... better than how long it took to get a sprite working at the start... *shudders* (Though I have increasing respect for the amount of time it must have taken to made Illwinter's 2700+ hand-made pixel-art sprites)

My steps in GIMP if you are interested in converting images into the game:
Free select around the desired image,
ctrl-c, (copy)
ctrl-shift-v, (paste as new image, sets background as transparent*)
trim away the white/unwanted bits with fuzzy select then delete, (holding fuzzy select and moving right and left to be more or less fuzzy is a nice but easily missed feature that I've found helpful)
fuzzy select a blank spot,
ctrl-i, (invert)
ctrl-c, (copy)
ctrl-shift-s (save clean full size version)
ctrl-n, tab, 128 or 192, shift-tab, 128 or 192, enter, (new, game-sized sprite)
resize to fit, set unit facing to the left
export as .tga

*In the Preferences --> Default Image I've set mine to 64x64px and transparent background default.

Despite getting more comfortable with it I've still had my own issues. As I said I couldn't get my shadows working, I think perhaps it was something to do with the alpha channels/feathering/antialiasing/compression... though I noticed that the bloodhenge druid mod uses magenta f800f8 vs ff00ff... but whatever my error(s) In short I gave up on shadows entirely after the frustration of wasting a decent amount of time on sprites that displayed as bright magenta in-game and needed replacing.

I may go back and add shadows later. When I do I'd like to make use of things like flatten image but I'd want to swap out *all* the sprites in one go rather than have shadows be pot luck. (It also makes unit previews look a little... distractingly pink... I think I'll leave it for a future 'muzzle flash' update when I want to play in GIMP to add more dynamic sprites, doubling the number of sprites will make a 20% size reduction feel more significant too).

Sorry for rambling. But lastly, yes I'd like exactly that concerning fonts. It would be nice to have race-themed fonts. I'd quite enjoy picking a suitable font for each race. It would be great if you could just add fonts along with the sprites and link it in the same manner. Perhaps a racefont command in class modding. Or in GUI modding... something else I haven't touched yet.

(Anyway, sorry for rambling. Thanks again for doing the guide and for helping me with the Linux errors.)
Marlin 3 Mar, 2016 @ 7:17pm 
:steamhappy: Very happy to hear that you found GIMP and my tips helpful. And thank you very much for your input, and for reminding me that I should probably add something about Linux case sensitivity in file names to the guide also.

I have to admit I didn’t really think as far as to provide any instructions for editing of sprites with transparency and shadows, instead being focused on mostly 100% opaque banners. (Though banners too can be transparent, of course, and I see you have made use of that.) I definitely need to add another GIMP chapter.
Originally posted by Franknfurter:
holding fuzzy select and moving right and left to be more or less fuzzy is a nice but easily missed feature
Yup, missed by me, for instance. Thanks for teaching me a little about GIMP. 😄 As I said in the guide, I don't really see myself as an expert, but then again, of course, there are in any case lots of features to be learned in GIMP. Yeah, this too is a tip that should be mentioned somewhere.

Regarding your failed attempts with magenta for shadows, I hope you didn’t try this with an alpha channel still in the image. Because I am pretty sure that won’t work. If you do create shadows this way, the alpha channel needs to go. (You can still keep it in an xcf editing project file, of course, if things don’t turn out well.) You should set black for background color before flattening the image (the tiny icons to the lower left and upper right of the color indicators are helpful for that).
Originally posted by Franknfurter:
As I said I couldn't get my shadows working, I think perhaps it was something to do with the alpha channels/feathering/antialiasing/compression... though I noticed that the bloodhenge druid mod uses magenta f800f8 vs ff00ff...
Hexadecimal F8 (= 248 in decimal notation) for the red and blue levels works too. I believe the game probably (for images without alpha) just ignores the last three bits, so F8 (= 1111 1000 in binary) is treated the same as FF (= 1111 1111 in binary). This comes from Illwinter software apparently at one time originating on the Atari Falcon[en.wikipedia.org], which had a display mode with 16 bits of high color[en.wikipedia.org] per pixel – 5 bits each for red and blue, while green (in the middle of the visible spectrum) got 6 bits.

But, again, just maxing out red and blue, with green at zero, should work for shadow – if there is no alpha in the image.

Originally posted by Franknfurter:
I have increasing respect for the amount of time it must have taken to made Illwinter's 2700+ hand-made pixel-art sprites
Kristoffer deserves respect indeed.

Originally posted by Franknfurter:
But lastly, yes I'd like exactly that concerning fonts. It would be nice to have race-themed fonts. I'd quite enjoy picking a suitable font for each race. It would be great if you could just add fonts along with the sprites and link it in the same manner. Perhaps a racefont command in class modding. Or in GUI modding... something else I haven't touched yet.
It definitely could be fun if fonts could be somehow selected – and not just limited to class modding. It seems to me that selectable fonts might possibly even find a use in user designed maps.
Last edited by Marlin; 3 Mar, 2016 @ 7:33pm
Franknfurter 11 Mar, 2016 @ 6:50pm 
Thanks again for the tips and I'll add that my attempts were indeed with an alpha channel, before I leared about flatten image (from your guide). I'll remember what you said about that and the colours to use for future reference.

I'm more comfortable with Corel Draw used years ago in school where the important part was the print quality and ease of use rather than file format/size/performance. I still find Corel useful for making the unit previews and banners, mostly for the fountain fills, lots of layers and easily moved objects as well as tracing objects into vectors that can be changed more cleanly. But I think freely available software is generally better to work with if possible and I've enjoyed learning to use something new.

Despite the learning curve I have found GIMP uses much less resources and seems more stable on certain machines, especially when working with lots of small images. But I don't have a lot of experience with the different programs available.

On fonts, I'm sure you have more and better ideas for their use and potential than I, since it is your forte. I'm curious as to how you'd use them in maps...

Perhaps for a Lord of the Rings map Elven locations written in Tengwar or Elven Common Speak font [www.fontspace.com], other parts of Middle Earth written in Party Business font [www.fontspace.com] with Dwarvern locations in Angerthas font [www.fontspace.com] and also in a standard english font for the translation.

Or for more generic maps, have some fairies from WWFairyFantasy font [www.fontspace.com] added to the terrain name for fairy rings or Tribal Dragons Tattoo Designs font [www.fontspace.com] for named dragons to add a little flair. The clipart fonts could be used for some skull and crossbones, treasure chests, knives, scrolls etc.

For me I'd like:
Tau font [www.fontspace.com] and the four warhammer 40k fonts here. [orcedinburgh.co.uk] though the Casablanca Antique is just Corel's version of Caslon Antique, and Caslon Antique is free for personal and commercial use.
I know there are more fonts out there but I'm struggling to find them... although it's purely academic at the moment as fonts can't be modded. Still the Ork heads, Chapter Symbols and Race symbols would be of some use if I could ever add them. But simply setting a race to use that font wouldn't be sufficient as most have no normal characters... instead I'd like to change font with a command like ^^ adds new lines
e.g.
descr "text... $ork font$ text $end ork font$ ...text"
or
descr "text... $ork font$ text $normal font$ ...text"
I have a feeling it's getting into font feature-creep though.

(Technically... though not practically one could make a new font with each of the above fonts and anything else needed as special characters, then replace the in-game font with it... though Transliteration would be an issue if you wanted to actually use different characters and fonts in multiple places for different races. It would also make the descriptions and names completely unreadable without comments to explain them in the mod files.)
Marlin 19 Mar, 2016 @ 6:50am 
Again thanks for your feedback (also in another thread). It makes me very happy to hear that someone found my guide helpful.

I have now updated it, trying to take that feedback into account, mainly with some more tips on how to work with GIMP.

Originally posted by Franknfurter:
I think freely available software is generally better to work with if possible
My feelings exactly. By the way, for vector graphics, there is Inkscape[inkscape.org], but I wouldn’t pretend to know enough about that one to write a guide on it (and it’s outside the scope of CoE modding anyway).

Originally posted by Franknfurter:
On fonts, I'm sure you have more and better ideas for their use and potential than I, since it is your forte. I'm curious as to how you'd use them in maps...
Well, first of all, as you have no doubt already seen, the CoE4 map editor allows naming of squares (pressing the N key in the editor), and these names will be shown directly on the map, also when you play on it. (They are implemented with squarename commands in the map file, which can also be edited in a text editor, of course.)

I do wish there were more options for how that text is displayed though. It can (in half-transparent background mode) be given different sizes, but even the smallest one is larger than I would typically want it to be. (Perhaps some option to shrink text as needed to make it fit within a single square.)

Plus, of course, it could be nice to be able to sometimes simply select a more exciting font (whether or not it supports Tengwar, Cirth and/or special symbols). The Elven Common Speak font and Party Business font you point to are nice examples.

(I also, by the way, really, really wish these map names were substituted for the uninformative terrain type names displayed on the recruitment screen.)

Originally posted by Franknfurter:
Still the Ork heads, Chapter Symbols and Race symbols would be of some use if I could ever add them. But simply setting a race to use that font wouldn't be sufficient as most have no normal characters... instead I'd like to change font with a command like ^^ adds new lines
Again, I believe functionality to switch font mid-text would involve more work to implement. It obviously simplifies things a lot if each font has at the very least the ASCII characters, and has special characters mapped to sensible code points. Ideally, everything is somewhere in the Unicode standard, and there will be no clashes and no confusion – though that probably won’t happen anytime soon with the symbols you mention, of course. A few runes invented by Tolkien did enter the standard in 2014, but...

________________________________________

I also must correct myself:
Originally posted by Marlin:
I believe the game probably (for images without alpha) just ignores the last three bits
Now made some actual testing and it turns out that no color bits are ever ignored. Instead the game seems to check for the exact nuances of RGB 255,0,255 or 248,0,248, nothing else. No other shade of bright magenta will work (or at least none that I tested).

The reason why two different shades of magenta can be used for the same thing is still basically what I said above, I believe. When converting from 16-bit high color to 24-bit true color, the added bits can either just be zeroed – or the high bits can be used as fillers. The 16-bit bright magenta (RGB 32,0,32, meaning red and blue being maxed out) becomes 24-bit true color RGB 248,0,248 in the first case, RGB 255,0,255 in the second. (16-bit high color is still what is used in the trs files holding all the sprites that come with the game.)

With all this said, just maxing out red and blue, with green at zero, is still the easiest way to get a color that works for shadow.
Last edited by Marlin; 19 Mar, 2016 @ 8:00am
< >
Showing 1-6 of 6 comments
Per page: 1530 50