Unofficialcrusaderpatch: QUESTION: Designing skins and using the Stronghold Image Toolbox

Created on 6 Jan 2019  路  52Comments  路  Source: Sh0wdown/UnofficialCrusaderPatch

This is more of a general question which is not dircetly related to the patch.

I've looked into the Stronghold Image Toolbox which lets you extract the skins and animation files for SC1 buildings and NPCs. As far as I unterstand, skins for building are literally just .bmp's, while animations work like a .GIF. Replacing the skins for buildings seems fairly easy, animation seems quite buggy.

Now my question: I have no idea how the Toolbox really works, and if it's possible to edit the Images or just to extract and replace them.

I could imagine doing some skin work for a new building like a mosque for example, but I'm not sure which format I would have to use (bmp I guess?), which size, background colour etc.

I would make a general sketch and then I could paint it in a real painting program (not paint).

moschee

So this would be an example of a mosque, which I have done in paint so I know it looks rather crappy :P

I can imagine doing a far better version in Krita (paint program). So the 'painting' (creating a skin) is not the problem here, just implementing.

If someone could help me out with that part, then I could do a few skins:)

help wanted

Most helpful comment

@Wolfram92 i started to create my own Image Toolbox, it works properly well now and i can import the church and sea tiles correct, with the next update i realease bigger functionalty and Error handling :)

exported

exportedImages1

You can also change Heights ;)
exported

All 52 comments

Image Toolbox only lets you extract and replace images from/of the game files in order to do it you have to use the edit button in the top after selecting the tile(some tiles can also be selected together and exported as a group and imported as well)
Alt Text

I did a few changes myself with the program to update the stronghold Europe mod to add some fancy roofs to the towers but encountered issues while trying to fix some pink pixels in the moat and the darkness of the cracks on broken buildings where the game started displaying horizontal artifacts for some reason =/ (don't have a screenshot of it but essentially it was horizontal lines with random color noise inside them with the tiles themselves and tiles other tiles like small waterfalls that are located in the same file as the moat tiles.

Ok, so in this example (picture below) I open the animation file for the fletcher which is composed of still frames which together form the complete animation. I selected the first image and now I could replace itwith an image of my own, right? But what kind of file do I need and how should it look like?

toolbox1

In the second case I opened the image of the church, which is just a skin, without an animation. So I guess I just have to replace the image here, right? Can you elaborate on how you designed the roofs?

toolbox2

The file format you need to import as far as I know is always .bmp .

for the roofs i made use of the roof feature for those two towers in crusader essentially changeing these files
image

to these

image

the roof texture in this case is a smlightly modified version of a workshop and the healer building.

as for how the file should look loike you will see after you export the image which can be done by clicking the save button in the edit window. you than edit the file to your liking and than import it with the inject button. as i mentioned before there are some issues with graphic glitches that i dont know how to fix so if you find a way to bypass those I will have very open ears ;)

Aaaah, now I got it, thank you very much :) I thought 'saving' meant replacing the image, but this means that one has to save the image so that it will become availabe for editing, right?

I will play around a bit (I think I start with buildings and the aforementioned mosque) and if I happen to find a solution to those graphic glitches I will share it here;)

this is the kind of glitch i am talking about btw
image
image

From what i can tell at least the game is trying to load a bugged out frame at the end of the file that contains the fixed moat textures i tried a couple of different bmp settings but to no success yet might even be a problem with the image replacer tool itself?

From what i can tell at least the game is trying to load a bugged out frame at the end of the file that contains the fixed moat textures i tried a couple of different bmp settings but to no success yet might even be a problem with the image replacer tool itself?

According to the developer of Toolbox this is a known error which occurs for animations. He hasn't figured it out and unfortunately he stopped working on Toolbox alltogether.

http://stronghold.heavengames.com/downloads/showfile.php?fileid=4474

This is why I don't wanna touch animations right now, since it requires editing many images and it might look like crap in the end.

damn... =/ maybe showd0wn will eventually find the time to look into that as well not that it would be a high priority through ofc who knows at this point but at least static things work out so can at least edit those

Have you tried simply adding more frames to this animation? Maybe Stronghold wants to render more frames than there actually are.
image

I couldn't find a way to add more frames with the program and my knowledge in editing the files directly is also insufficient =/

Thing is, this is exactly the amount of frames the game uses normally (I am not removing existing frames)
its just really seems like after injecting a file it just skips a file for some reason. Almost like it commented a section of the code by accident.

Hm, so today I inserted an incomplete prototype of a big mosque, analogous to a cathedral, into my SCH folder and placed one in the map editor just to get a sense of perspective.

And then this glitch happened:

screen_capture_001

Have you encoutered this before? The background-color of my .bmp is the exact same of the original, but this raster like dots are being displayed here.

Now the image is obviously incomplete but the background is supposed to be transparent, Switching the color palette didn't help.

I have never tried replacing ingame textures with that tool so far, but I have noticed when changing the player "avatar" crests file (same magenta background color), it won't work properly depending on what encoding scheme you choose when saving the .bmp file.

Well, that might explains it. I saved it with paint this (was faster) and maybe the encoding was wrong. I just try it again and see what happens.

Interestingly it's just the upper part making problems, the floor is transparent as it's supposed to be.

Almost fixed it.

I think just the process of extracting files and then resaving them, changes something so that the graphical glitch above occurs But changing the backgroundcolor to the same color in the Toolbox will make the background transparent.

screen_capture_001

In this case I used red but it is still glitchy. I managed to insert just a slightly modified cathedral into the .gm file without any problems by changing the backgroundcolor.

WOW !

Thanks:)

I will try to make skins for a big mosque (cathedral), normal mosque (church) and the chapel, I would replace with a minaret, since there is no other equivalent as far as I know and it would fit size wise. I looked at some pictures of mosque and will use them as an inspiration.

I think it will take me a couple of weeks for one skin (never did that beforce actually) since the biggest challenges are:

-perspective drawing
-drawing in general because the resolution is so damn small that it's hard to draw details
-and drawing in a way that it still fits SC1 style.

When I am finished with all three I will open a new issue for them to get some feedback and if I am succesfull I will also look into animations perhaps, since a mosque for example would also need something like an Iman instead of a priest.

can always paint in higher resolution and than downscale it to fit later if you want to have an easier time detailing (always a good idea to reuse elements that already exist to save time and helps keeping it in line with the aesthetics btw ;) )

can always paint in higher resolution and than downscale it to fit later if you want to have an easier time detailing (always a good idea to reuse elements that already exist to save time and helps keeping it in line with the aesthetics btw ;) )

I'm just afraid that painting in a higher resolution and then downsizing would probably be bad for the details?

Yes, I definitely try to reuse us much as possible but some things I have to paint myself, like the little roof which turned out to be quite good I think:P My goal is to get a mosque which is somewhat decent looking and then I'll try to give it some finetuning by getting it as close to the SC1 style as possible.

when downsizing detail sure will get lost but at the same time, it also compresses detail in a way your brain probably wouldn't so it can go either way combining different resizing methods I am sure you will find the perfect way to get what you want.

Really looking forward to seeing this mosque in the game (and being able to place it when playing as an Arabian lord) once it is finished . :D

After the mosques, the next thing should be changing the ale production for Arabian lords into something else.

Hops farms could be changed into spice farms (the spices being used to flavour food), the breweries changed into cooking kitchens and the inns changed into restaurants which serve better food than the usual granary supplies.

Hops farms could be changed into spice farms (the spices being used to flavour food), the breweries changed into cooking kitchens and the inns changed into restaurants which serve better food than the usual granary supplies.

Do you have a certain spice in mind? It has to be something similar in height to hops, because otherwise I would have to Change the complete Animation which I can't do.

Another Problem would the breweries, which would need to be repurposed too.

I will look into it after doing the mosques and statues, but I think it will be quite complicated. Editing animations with Toolbox can be bugged, so it might not be possible at all.

Hops farms could be changed into spice farms (the spices being used to flavour food), the breweries changed into cooking kitchens and the inns changed into restaurants which serve better food than the usual granary supplies.

Do you have a certain spice in mind? It has to be something similar in height to hops, because otherwise I would have to Change the complete Animation which I can't do.

Another Problem would the breweries, which would need to be repurposed too.

I will look into it after doing the mosques and statues, but I think it will be quite complicated. Editing animations with Toolbox can be bugged, so it might not be possible at all.

You could do something like a Shisha Bar

If only animation files did not cause these visual glitches =/

would it be possible to make dry moats btw?
Idea is that when you paint a moat on higher terrain (which currently isnt possible) your units would instead of wet one dig up a dry moat that behaves the same way as normal moat just beeing dry?

I can easily get the terrain tiles ready for that.
Here is a little test tile I did in 10 min
image

I'm not sure if a shisha bar fits timewise :D I read though that Arabs used to drink 'fermented fruit juice', so maybe I could replace hops with grapes

I would argue it's not that important to differentiate between ale or fermented juice at least as long as we don't know a better way to replace/import new graphics files without them causing issues

I would argue it's not that important to differentiate between ale or fermented juice at least as long as we don't know a better way to replace/import new graphics files without them causing issues

Changing the hop farm to grapes would be quite easy I think, the issue might be with the farmer if I replace his little basket full of hops with a basket full of wine.

I will try the Imam first because that should be the easiest thing to change and then I'll see if any glitches will occur.

Changing the hop farm to grapes would be quite easy I think, the issue might be with the farmer if I replace his little basket full of hops with a basket full of wine.

And of course, get rid of the drunks too if the player using the inn is an Arabian lord.

And of course, get rid of the drunks too if the player using the inn is an Arabian lord.

For the Arabs they should just be removed completely, since their animation can't be used for anything else :P

Well, if Arabian lords can have +8 popularity bonus without annyoing drunkards rolling around, then that is a decisive gameplay advantage for human players! :D

I'm not sure if a shisha bar fits timewise :D I read though that Arabs used to drink 'fermented fruit juice', so maybe I could replace hops with grapes

Hmm... one could consider opium, possibly... although poppy fields would probably fit better with wheat farms than hops farms... meh.

That dry moat idea sounds good Monsterfisch! It should be quite deep and steep looking to fit in with the fact it is not passable by units without filling it in!

Although if you want to be realistic, I think maybe assassins should be able to cross a dry moat. They would however have to deploy their rope to go down it and back up at the other side which would slow them down a lot and give the enemy archers more time to fire at them.

making it look deep shouldn't be a problem not sure how much the game mechanic could be altered through I personally would just make it work like the normal moat you know so assassins are not so overpowered when the castle isn't located on the low level where it can have moat.

I will try the Imam first because that should be the easiest thing to change and then I'll see if any glitches will occur.

If you and others on here can make the imam work with animations then that maybe raises the possibility of introducing new military units in the future which would be brilliant, which would really freshen up the game and also can be used for certain AIs to make them more unique. :D

Here's some ideas:

  • Camel raiders (Arabian unit): These would look brilliant, they wouldn't be as fast as horse archers of course but a bit better armoured and could be a decent raiding and counterattacking unit. They would be a little bit cheaper to hire than a horse archer. In terms of AIs, Saladin and Wazir could support their horse archer raiders with some of these.

The existing Stronghold Crusader camel model could be modified for the creation of this new unit.

  • Desert axeman: Again these would look amazing, the woodcutter could be partially retextured to create this unit. They would be faster than an Arabian swordsmen but not as well armoured, but cheaper to hire. A new decently strong Arabian melee unit would be great, at the minute there is only Arabian swordsmen and assassins.

A Crusader axemen would also be great but this would be harder to create and would require a new option at the blacksmith to create axes.

  • A crusader light cavalry option would be good. Spears, leather armour and a stables could allow the creation of these, they would be decent raiders and counter attackers, using their spears as melee weapons, or (I know it would very hard to implement though) being able to throw them at enemies. Similar armour and speed to the horse archer. They would be cheaper than knights, the stable horse limit would ensure though that not too many could be created.

  • More castle defences: rolling logs or rock baskets on walls would be excellent. Rock baskets would be easier to create I think, the mangonel stone animations could be used for these when they are triggered.

If you and others on here can make the imam work with animations then that maybe raises the possibility of introducing new military units in the future which would be brilliant, which would really freshen up the game and also can be used for certain AIs to make them more unique. :D

Well, that might be possible for some time in the future but at the moment I'll try working on existing buildings and animations first, doing a whole new unit like a camel raider could be possible if one takes a slightly modified horse archer and puts him on the camel, but that unit would be super slow because the camels are always just walking.

More castle defences: rolling logs or rock baskets on walls would be excellent. Rock baskets would be easier to create I think, the mangonel stone animations could be used for these when they are triggered.

That is probably easier because there is already a similar animation for the pitch throwing engineers and their pot could be replaced with a basket of rocks.

For the other suggestions there is the problem that there are no existing animations for them at all (like rolling logs), so this would be not just editing an existing animation but require doing a completely new one, which is very difficult.

I guess my big mosque will be finished the coming week and then I will try a test run.

One challenge is also to make it somehow possible that mosques and churches can be built at the same since at the moment it's only possible to replace the churches with mosques. I can't do that because I have no idea about modding :P

Well, that might be possible for some time in the future but at the moment I'll try working on existing buildings and animations first, doing a whole new unit like a camel raider could be possible if one takes a slightly modified horse archer and puts him on the camel, but that unit would be super slow because the camels are always just walking.

Would it be possible to speed up the walking animations for the camel for the camel raider so they are running? :D Camels running would be considerably slower than a horse running of course.

I would recommend not getting your hopes up right now considering we only have one person here who is actually able to do the coding and adding new units to the game requires alot of work appart from the visuals

OK I won't get my hopes up, but I am hoping it will be possible one day. Creating a new military unit is the next best thing to creating a new AI lord and it seems more feasible.

I have a landscape idea though:

What about having bridges across rivers on maps instead of just fords?

Bridges would look great, and also it would give the possibility of having battles developing at bridges in a game, which would be good fun.

I too like the idea of bridges or at least arches of sorts (detailing related and gameplay) in the past I have tried to use gatehouses to simulate bridges but that is a mediocre solution at best thanks to horses being unable to walk over walls without tricking the ai the only issue I can see with this would be units crossing over one another with the pathfinding that could be an issue here. so as before hopes are great but possibly misplaced in terms of seeing it any time soon. consider how gatehouses work in the game i am sure based on how they worked in later titles of the game even firefly didn't figure out a way to do the pathfinding in the crusader engine to make it work =/

If you are talking about bridges as a "map feature" to be created in the map editor (and not during a running game), then I think that should be quite possible with (lowered) walls that could possibly be mixed with regualar ground to make it traversable for mounted units as well.
Possibly even in combination with the good old "2000 rocks trick" that persists the looks of a tile (and makes them impassable) in order to get the railings of the bridge to be indestructible...

So, I finished my big mosque as you can see in the pic below, but the problem is, that the Image Toolbox crops my image, although it has the exact same measurements as the original one. It even shows it right before injecting but then it gets messed up.

moschee-entwurf4 3

Here is a picture from Toolbox

toolbox1

And this is what it looks like ingame. I think the glitches (the red parts) can be fixed, but the main problem is the messed up image. Any idea what's the issue is here, @Monsterfisch ?

mosque-ingame

I mean it seems to work in-game apart from the red pixels or am I missing something?

I mean it seems to work in-game apart from the red pixels or am I missing something?

The right side is incomplete with the pillars cut off. I found a solution in decreasing the complete mosque in size, so now everything fits inside the image :) Now I still have the problem with the red pixels, which I'm trying to work out. I assume this happens if some parts of the image are not completely (and I mean absolut completely) red because the background color in the image has to be exactly the same like the background color in the toolbox.

to get rid of the pixels simply paint the area a bit more generous the overlap will not be noticeable later I had a similar issue in the past with the small tower and covering the pixels that were not in the original one fixed it

Man, that didn't let me sleep, but I finally got it working.

So, for everybody who maybe also wants to edit some of the buildings, here's to important things to know:

  • The backgroundcolor of your image, has to be the exact same background color from your color palette in the Image Toolbox

  • At the outer lines of the building should be no color overlap at all, or otherwise there will be some ugly pixels in the picture.

  • And, very important, the 'floor', the square where your building is built upon, has to be the exact same size as the original. This seems to be somehow hardwired into the gm. files. If the floor won't match the exact scaling of the original, then the lower part of the image will always glitch out and the background color will be visible.

I solved this by having the floor filling out the complete lower part of the image, unfortunately, now it's not a real square anymore. But for the moment I can live with that.

mosque-ingame

Cz艂owieku, to nie pozwoli艂o mi spa膰, ale w ko艅cu uda艂o mi si臋.

Tak wi臋c, dla ka偶dego, kto mo偶e chce edytowa膰 niekt贸re budynki, wa偶ne jest, aby wiedzie膰:

  • Kolor t艂a obrazu musi by膰 dok艂adnie tym samym kolorem t艂a z palety kolor贸w w Przyborniku obrazu
  • Na zewn臋trznych liniach budynku nie powinno w og贸le nak艂ada膰 si臋 kolor贸w, w przeciwnym razie na obrazie pojawi膮 si臋 brzydkie piksele.
  • I, co bardzo wa偶ne, "pod艂oga", kwadrat, na kt贸rym zbudowany jest tw贸j budynek, musi by膰 dok艂adnie takiej samej wielko艣ci jak orygina艂. Wydaje si臋, 偶e jest to w jaki艣 spos贸b pod艂膮czone do gm. pliki. Je艣li posadzka nie b臋dzie pasowa膰 do dok艂adnego skalowania orygina艂u, w贸wczas dolna cz臋艣膰 obrazu b臋dzie zawsze wyskakiwa膰, a kolor t艂a b臋dzie widoczny.

Rozwi膮za艂em to poprzez wype艂nienie pod艂ogi kompletn膮 doln膮 cz臋艣ci膮 obrazu, niestety, teraz to ju偶 nie jest prawdziwy kwadrat. Ale na razie mog臋 z tym 偶y膰.

meczet-gra

I could ask for a download of this texture :) ? (sorry for my english )

Format pliku, kt贸ry musisz zaimportowa膰, o ile wiem, to zawsze .bmp.

dla dach贸w skorzysta艂em z funkcji dachu dla tych dw贸ch wie偶 w krzy偶owcu, zasadniczo zmieniaj膮c te pliki
obraz

do tych

obraz

tekstura dachu w tym przypadku jest nieznacznie zmodyfikowan膮 wersj膮 warsztatu i budynku uzdrawiaj膮cego.

je艣li chodzi o to, jak powinien wygl膮da膰 plik, zobaczymy po wyeksportowaniu obrazu, kt贸ry mo偶na zrobi膰, klikaj膮c przycisk zapisu w oknie edycji. mo偶esz edytowa膰 plik do swoich potrzeb i importowa膰 go za pomoc膮 przycisku wstrzykiwania. jak wspomnia艂em wcze艣niej, s膮 pewne problemy z graficznymi usterkami, kt贸rych nie wiem jak naprawi膰, wi臋c je艣li znajdziesz spos贸b na omini臋cie tych, b臋d臋 mia艂 bardzo otwarte uszy;)

I could ask for a download of this textures ?
(my english is bad)

Man, that didn't let me sleep, but I finally got it working.

So, for everybody who maybe also wants to edit some of the buildings, here's to important things to know:

  • The backgroundcolor of your image, has to be the exact same background color from your color palette in the Image Toolbox
  • At the outer lines of the building should be no color overlap at all, or otherwise there will be some ugly pixels in the picture.
  • And, very important, the 'floor', the square where your building is built upon, has to be the exact same size as the original. This seems to be somehow hardwired into the gm. files. If the floor won't match the exact scaling of the original, then the lower part of the image will always glitch out and the background color will be visible.

I solved this by having the floor filling out the complete lower part of the image, unfortunately, now it's not a real square anymore. But for the moment I can live with that.

mosque-ingame

That's lovely, you should place it in a complete castle in a sandbox game and upload a screenshot to let us see what it looks like in a castle! :D

dajcie mi te textury do downloadingu pls

I will place it in castle to give you an idea what it looks like. Later on I will also post a download link so that you can try it out for yourself:)

I will also add windows to the mosque and adapt the color a little bit to the other stronghold buildings, because at the moment it doesn't fit well in with the rest in my opinion.

An idea eventually:

New skins for all the AI lords, so for example the Rat lord looks like and is dressed like the Rat. Saladin and Richard would stay the same as they are.

@Wolfram92 i started to create my own Image Toolbox, it works properly well now and i can import the church and sea tiles correct, with the next update i realease bigger functionalty and Error handling :)

exported

exportedImages1

You can also change Heights ;)
exported

Wow very nice:) I have been very inactive in recent times because of work, but next week I'll have quite a lot of spare time.

I also had problems with the background glitching through in the Toolbox, so I yours can fix that hopefully:)

@Wolfram92 I created some Important infors in the Programm you can read(click on the info button).
You can donwload the Programm here: https://github.com/Gaaammmler/Gm1KonverterCrossPlatform/releases

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Udoachim picture Udoachim  路  3Comments

Heroesflorian picture Heroesflorian  路  3Comments

Truetobi91 picture Truetobi91  路  3Comments

Ninjaa17 picture Ninjaa17  路  3Comments

DarkThief-Darek picture DarkThief-Darek  路  3Comments