• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

RuyDiaz

Corporal
49 Badges
Jan 19, 2007
43
0
  • Stellaris - Path to Destruction bundle
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Monks and Mystics
  • Victoria 2: A House Divided
  • Europa Universalis IV: Mandate of Heaven
  • Knights of Honor
  • Crusader Kings Complete
  • BATTLETECH
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Sign Up
  • Europa Universalis IV
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Cities in Motion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Sengoku
  • Victoria 2
I'm trying to change the picture that comes up on some of my events and having difficulty.

First let me say that I'm running CK 1.05 (not Deus Vult).

Now for my problem. I kind of don't like it that the event_intrigue.bmp is used for events like "A pretty wench catches your eye." I would prefer to have all the sexy sorts of events use some other picture. But I want the other intrigue events to use event_intrigue.bmp. Basically I want to split the event_intrigue category of events into two groups depending on whether or not the event is a sexy-ish sort of thing.

So I created a new appropriately sized bitmap that I called event_sexy.bmp and added it to my gfx/interface/events folder. Then I went into the event scripts in db/events and changed the lines of the appropriate scripts from picture = "event_intrigue" to picture = "event_sexy" (If you're interested, I'm using Sarmatia1871's medieval event pictures for my events and a crop of the image from MS. Douce 195, F. 118 for my event_sexy.bmp).

I can't tell if it's working but I think it isn't. When I try to test it with a lustful ruler, everything goes fine for a while until eventually I hear an event fanfare followed by the program crashing. Not all events immediately preced a crash, and because the crash occurs after the fanfare but before the event is displayed, I can't be certain that it's one of the events I've modified that coincides with the crash. But the new picture has never come up with any of the events that doesn't coincide with crashing.

Can anyone tell from my description whether I've done something wrong, or left an important step out?
 
It seems like your event image is corrupted. Make sure it has the exact proportions and bit depth as the other images.
This is easily tested by just making a copy of an existing (valid) event image and naming it event_sexy.bmp.
 
It seems like your event image is corrupted. Make sure it has the exact proportions and bit depth as the other images.
This is easily tested by just making a copy of an existing (valid) event image and naming it event_sexy.bmp.
Ooh! Thank you for suggesting bit depth!

About an hour after posting this I started to wonder if there was something wrong with the image and thought of ways to test it, but my wife wanted me to watch some movies with her instead of playing ga— oh, I mean doing serious experimental research in computing science. ;)

After reading your response, jordarkelf, I'm thinking it's probably the bit depth. As I look over the files, I see I made a 32-bit image when I ought to have made a 24-bit image. If that turns out to be the case, then I'm sorry I put this in the event scripting forum. :(

Let me run the tests I've thought of, as well as the one you recommend; if those tests suggest it's the image's fault and not my scripting, then I'll change the image and test it over again. Then I'll come back and report my findings. :)

Off to find that pretty wench!
 
Well, I tested it and the problem was with the image, not the scripting.

First I tried jordarkelf's suggestion and returned the original event_crime picture to the gfx/interface/events folder as event_sexy.bmp. Then, when a pretty wench caught my eye, she looked like a rotten-toothed eye-patched scoundrel. Far better than a program crash, if you ask me.

Then I replaced the event_education picture with the image I tried to use as event_sexy (the 32-bit one), and the program crashed right after an event fanfare fairly early on. Since education events were far more common with the Count of Hereford (my test character) than the new category of sexy events, I assume that the crash was triggered by the 32-bit picture now associated with education events.

Then I changed the bit depth of my event_sexy.bmp from 32-bit to 24-bit, returned the normal (Sarmatian) event_education image and used the new 24-bit version of my event_sexy image as event_sexy.bmp. And when I tested it, as soon as my son got a maidservant pregnant, I was seeing a medieval illumination depicting something close to the flagrant delict, just as I had originally intended. What a delightful reward for successful modding!

Thank you for the help. As it turned out, this was not a problem with event scripting at all, but rather graphics modifications. Nevertheless, it is gratifying to know that the events scripts can be changed so easily to accommodate new graphics like this.