The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2014-02-06 21:09:54

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

[MOD] Grayscale Robbery Mod

Do you think Castle Doctrine's robberies just aren't atmospheric enough?  Well, this mod should change that!* It turns robberies into (almost) completely grayscale, with little splashes of color to highlight the whole atmosphere.

Download here

Instructions
1. Download the files and extract houseObjects
2. Go to your Castle Doctrine folder (instructions for steam here
3. Open gameElements
4. Rename houseObjects to houseObjectsOld (so you can go back to technicolor robberies later wink )
5. Copy the downloaded houseObjects folder inside gameElements
6. Enjoy!

There's a file called Extras in the folder, that tells you how to change certain tiles (say, yellow cat eyes or not, or if you want a real challenge, turn the color off for lit electric floors).

I've tested it quite a bit, but there could be some glitches that I haven't seen yet.  If you see a green square instead of a shot chihuahua, for example, let me know. 
Also, I think I've differentiated similar tiles enough to be able to tell which is which without color - if there are any that you're having a lot of trouble telling the difference between, let me know as well.

12356539254_8333d8af2f.jpg

*Changing your lousy perception of atmosphere not guaranteed.

Last edited by iceman (2014-02-14 17:26:05)


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#2 2014-02-06 21:14:07

setz
Member
From: NM
Registered: 2013-04-03
Posts: 121
Website

Re: [MOD] Grayscale Robbery Mod

wow! this is rad!

Offline

#3 2014-02-07 01:19:38

eppfel
Member
From: Germany
Registered: 2014-02-01
Posts: 325
Website

Re: [MOD] Grayscale Robbery Mod

Wow, looks nice, Sin City Style. Maybe change the club to a sword and its perfect  ^^

Offline

#4 2014-02-07 05:34:56

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

Awesome, this is a really nice work! I love the dark mood it gives. And it reminds me of my old pitbull's glowing eyes suggestion smile

Last edited by arakira (2014-02-07 05:36:32)

Offline

#5 2014-02-07 06:15:10

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: [MOD] Grayscale Robbery Mod

Looks really good.

eppfel wrote:

Wow, looks nice, Sin City Style. Maybe change the club to a sword and its perfect  ^^

This.

Offline

#6 2014-02-07 10:08:46

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

The only thing that I was afraid of was mixing up the pressure toggle switch with the unpowered indicator lights (in grayscale, they all look almost the same), so I restored the original lights.

Offline

#7 2014-02-07 12:09:35

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: [MOD] Grayscale Robbery Mod

arakira wrote:

Awesome, this is a really nice work! I love the dark mood it gives. And it reminds me of my old pitbull's glowing eyes suggestion smile

Nothing like turning a corner to see 30 gleaming red dots staring at you =P

arakira wrote:

The only thing that I was afraid of was mixing up the pressure toggle switch with the unpowered indicator lights (in grayscale, they all look almost the same), so I restored the original lights.

I didn't have any trouble, but I could easily see someone mixing up the two, especially if they're not right beside each other for reference.  If more people are having trouble, I'll try changing something to let them have a difference other than shade.


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#8 2014-02-07 12:12:57

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: [MOD] Grayscale Robbery Mod

Nice mod. The highlights of colour stand out a lot against the grayscale background.

One question, how did you change the welcome mat texture? I can't even find it in the source files, although I'm probably missing something.

Offline

#9 2014-02-07 12:25:10

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: [MOD] Grayscale Robbery Mod

colorfusion wrote:

Nice mod. The highlights of colour stand out a lot against the grayscale background.

One question, how did you change the welcome mat texture? I can't even find it in the source files, although I'm probably missing something.

It's in the folder called "Start"


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#10 2014-02-07 12:31:33

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: [MOD] Grayscale Robbery Mod

iceman wrote:
colorfusion wrote:

Nice mod. The highlights of colour stand out a lot against the grayscale background.

One question, how did you change the welcome mat texture? I can't even find it in the source files, although I'm probably missing something.

It's in the folder called "Start"

Ah, thanks! I thought I was probably overlooking something.

Offline

#11 2014-02-07 18:22:21

Banakai
Member
Registered: 2014-02-06
Posts: 33

Re: [MOD] Grayscale Robbery Mod

I swear to god I can rob alot better with this mod.

Offline

#12 2014-02-08 01:50:11

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

I see a strange behaviour... After I have been robbed, some house objects appear with the grayscale mod when I am in building mode! It looks like these are the items that were triggered/pets that have been seen/walls that have been destroyed during the robbery.
They were so impressed by Mr Price's power that they definitely lost their colors...

Offline

#13 2014-02-08 06:10:06

jere
Member
Registered: 2013-05-31
Posts: 540

Re: [MOD] Grayscale Robbery Mod

If I understand, ice is saying that this is mainly for robberies. There's different versions of each sprite and he probably didn't include all of them as that's a pain (I'm guessing here).


Golden Krone Hotel - a vampire roguelike

Offline

#14 2014-02-08 06:29:01

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

jere wrote:

If I understand, ice is saying that this is mainly for robberies. There's different versions of each sprite and he probably didn't include all of them as that's a pain (I'm guessing here).

The strange thing is that the mod was strangely blending in: for example after being robbed, I had gray dogs and brown dogs at the same time onscreen (all healthy) ! As well for some trapdoors.

Last edited by arakira (2014-02-08 06:33:08)

Offline

#15 2014-02-08 06:33:55

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: [MOD] Grayscale Robbery Mod

Many objects have a "0" state during buildmode, and a "1" state during robberies, this allows for things like pits to be blocking during building but deadly during robbery.

Even if there isn't actually a 1 state, such as with wooden walls, you seem to be able to add it and the game automatically recognises it. This is what ice used to have things grayscale in robbery mode.

The problem is that broken tiles only have one state for both robbery and building, and there's no way you can get the game to recognise another one without modifying the actual code, meaning he had to have broken objects grayscale everywhere.

Edit: Started writing this before arakira's second post

Last edited by colorfusion (2014-02-08 07:23:37)

Offline

#16 2014-02-08 07:21:52

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

Thank you colorfusion, I understand now how these folders are organized. But I still don't understand why some non-broken pets and non-broken trapdoors (the robber didn't even see these trapdoors) would appear grayscale in build mode, next to coloured ones at the same time.
Now that I'm thinking about it, it reminds me of a strange behaviour: I noticed that sometimes after being robbed, some trapdoors appear closed (non-blocking state) in build mode, and I can walk on them, just next to other trapdoors that at the same time appear open (blocking). Even after doing a new self test, they may still appear with both states at the same time in build mode... Have you ever noticed that? Seems weird to me.
[EDIT] To summarize, It behaves as if sometimes, objects were being locked into robbery mode after a robbery.

Last edited by arakira (2014-02-08 09:00:19)

Offline

#17 2014-02-08 10:58:24

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

Well, this time I'm pretty sure I just witnessed a bug, or maybe a way to exploit the game in some way. I was in building mode in an empty house, but away from the game, writing on the forum. Unfortunately I timed-out, landed on the house list, two guys came in a row, one took my vault, the other clubbed my wife and took her money. I use Iceman's mod so when I came back, my wife was then in grey, lying on the floor. I clicked on the suicide button, then fresh start, and... surprise! A new life with 2000$, but with a dead greyed out wife! She was really dead, no pulse, not moving during the self test. I suicided again, then it went back to normal. There must be something that, at times, locks items into a different state after robbing.

Last edited by arakira (2014-02-08 10:59:17)

Offline

#18 2014-02-08 11:57:19

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: [MOD] Grayscale Robbery Mod

Yeah, I knew I should've mentioned that in my original post.

Whenever you return home after you've been successfully robbed, the game saves the state of most of the house, to let you know immediately your house has been robbed.  Like colorfusion said, the game has a 0 folder for home building, and 1-20ish for robbing.  When you come back to a broken house, though, it pulls the information for changed objects from the robbery folders.  That's why you're coming back to some gray objects but not others.

Some of the objects are permanantly changed - destroyed walls, killed dogs, etc.  Others are just temporary, and will go back to the "Build" version when you enter and exit a self test.  For the trapdoors specifically, any powered ones at the end of the robbery need to be powered while editing, or else they could have a dog floating in midair (if a dog was on a trapdoor when the robbery ended, and then the trapdoor was unpowered during robbery, it would just look weird =P).  Because of that, trapdoors act permanently damaged (i.e. they won't go unpowered in build mode if they were powered at the end of a robbery, even after a self-test), but can be replaced for free.

I *think* that any object that changed states during a robbery is temporarily stuck (destroyed ones are permanent, obviously).  So if a trapdoor was ever powered during a robbery, it will appear gray, regardless of whether it was powered or not by the end.  Any dogs that saw the robber will be gray, any that didn't will be colored, etc.

That should explain how some objects were gray, while others weren't.  I tried to get partly around it by making *everything* stay gray by adding a noAutoRevert property to everything, but that didn't work (EDIT: Apparently I misread the purpose of that property).  It wouldn't have fixed the problem entirely, though- you would come home to a completely grayscale house (which I think would've been awesome =P), but after you went through a self test only permanently damaged objects would be gray.  I don't think there's any way around that, without editing the code itself.  In some cases, such as coming home to two colorful children beside a colorless corpse, it seems pretty neat.  Others, like a bunch of random gray walls, not so much.  I guess you just have to think of it as a distinct reminder of what needs to be fixed =P

As for the dead wife in the new life - I have NO idea what happened there.  I don't think there's any way that my mod could've caused that.  If you haven't launched the game since then, could you open the "log" file in the CastleDoctrine folder and let me know if there's any errors there?

Last edited by iceman (2014-02-08 12:11:19)


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#19 2014-02-09 11:00:15

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

iceman wrote:

Yeah, I knew I should've mentioned that in my original post.

Thanks a lot Iceman, that explains everything concerning the visual weirdnesses.
Why did you leave the alive family members colourful? For aesthetic purposes?
I have another question: how did you generate the new propertiesSignature (for example in the houseObjects/wife/1 folder)? I imagine every state of every objects needs a specific key to encrypt the signature, and the server tests that signature to detect if you are trying to cheat with properties. Either you work on programming the game, or you submitted the new folder to Jason so that he delivered you the associated signature? Thanks!

iceman wrote:

As for the dead wife in the new life - I have NO idea what happened there.  I don't think there's any way that my mod could've caused that.  If you haven't launched the game since then, could you open the "log" file in the CastleDoctrine folder and let me know if there's any errors there?

This probably has nothing to do with the mod, unless that new wife/1 folder you created screwed up something... (the difference now is that the game detects and reads into that folder). I found nothing suspicious in the log file, but I probably relaunched the game before checking it. Anyway I located the bug in the recordedGame file, and I'll e-mail it to Jason.

Offline

#20 2014-02-09 11:26:47

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: [MOD] Grayscale Robbery Mod

arakira wrote:
iceman wrote:

Yeah, I knew I should've mentioned that in my original post.

Thanks a lot Iceman, that explains everything concerning the visual weirdnesses.
Why did you leave the alive family members colourful? For aesthetic purposes?
I have another question: how did you generate the new propertiesSignature (for example in the houseObjects/wife/1 folder)? I imagine every state of every objects needs a specific key to encrypt the signature, and the server tests that signature to detect if you are trying to cheat with properties. Either you work on programming the game, or you submitted the new folder to Jason so that he delivered you the associated signature? Thanks!

The game is open source, in houseObjects.cpp it describes how to generate new signatures.

Offline

#21 2014-02-09 11:44:06

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: [MOD] Grayscale Robbery Mod

arakira wrote:
iceman wrote:

Yeah, I knew I should've mentioned that in my original post.

Thanks a lot Iceman, that explains everything concerning the visual weirdnesses.
Why did you leave the alive family members colourful? For aesthetic purposes?
I have another question: how did you generate the new propertiesSignature (for example in the houseObjects/wife/1 folder)? I imagine every state of every objects needs a specific key to encrypt the signature, and the server tests that signature to detect if you are trying to cheat with properties. Either you work on programming the game, or you submitted the new folder to Jason so that he delivered you the associated signature? Thanks!

It was an aesthetic choice - I like the idea of the family being the only real color and life in the house, and I LOVED how killing a family member drained the house of life. It just adds a nice symbolic meaning to it.

You're correct about the properties - I had to generate new propertySignatures for the new folders.  Jason was kind enough to point me in the right direction, though wink


arakira wrote:
iceman wrote:

As for the dead wife in the new life - I have NO idea what happened there.  I don't think there's any way that my mod could've caused that.  If you haven't launched the game since then, could you open the "log" file in the CastleDoctrine folder and let me know if there's any errors there?

This probably has nothing to do with the mod, unless that new wife/1 folder you created screwed up something... (the difference now is that the game detects and reads into that folder). I found nothing suspicious in the log file, but I probably relaunched the game before checking it. Anyway I located the bug in the recordedGame file, and I'll e-mail it to Jason.

I had a (pretty funny) problem when I started working on the mod, when I accidentally compressed the image for the power supply.  When the game tried to load that image, it gave an error (which showed up in the log), but the games still worked fine.  When I opened the tile chooser, though, it wasn't the power supply - it was a weird inverted image of a voltage triggered switch.  I finally realized that that was the blueprint image (it's still in the game files), and since it had been loaded into the game just before, it just got copied into the power supply image =P I was thinking that the wife issue *might* have been a similar issue (even though it wouldn't have prevented her from moving).

Last edited by iceman (2014-02-09 11:45:06)


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#22 2014-02-10 16:35:54

arakira
Member
Registered: 2013-12-01
Posts: 176

Re: [MOD] Grayscale Robbery Mod

I tried to modify some sprites of the houseObjects... I tried to change a few pixels, or copy/paste a small area of the image (I do not resize, and I export as TGA). Sometimes it works well, but quite often it messes up the whole sprite: in-game, I have no transparency anymore and get a big blue square around he sprite, or the image of the object is replaced by a blueprint sprite. Any guideline for someone who wants to play a bit with these sprites? Thanks again!

Offline

#23 2014-02-10 17:47:21

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: [MOD] Grayscale Robbery Mod

What are you using to edit them?  I used gimp, and by default it compresses the images.  That's what was causing the blueprint images to appear when I was working on the mod.  As for the blue squares, I believe that the TGA files use the color of one of the corners as the "invisible" color.  If that corner gets changed, even slightly, then the background won't be invisible anymore - hence, giant blue squares.  One good way that I found to test that is to use the bucket tool (with the "color variance" (in Gimp's case, "Threshold") set to 0).  Fill in the background with something like black, and the slightly different shades become VERY obvious.  Fill those in with black as well, and then color everything back to blue (or whatever you want the background color to be).


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#24 2014-02-10 19:27:39

jere
Member
Registered: 2013-05-31
Posts: 540

Re: [MOD] Grayscale Robbery Mod

It was an aesthetic choice - I like the idea of the family being the only real color and life in the house, and I LOVED how killing a family member drained the house of life.

Agreed. Kudos on that one.


Golden Krone Hotel - a vampire roguelike

Offline

#25 2014-02-10 20:24:29

Storm
Member
Registered: 2014-02-09
Posts: 101

Re: [MOD] Grayscale Robbery Mod

cool mod, thanks

Offline

Board footer

Powered by FluxBB 1.5.8