• 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.

Ilkhold

Lt. General
17 Badges
Oct 6, 2003
1.440
4
Visit site
  • Europa Universalis III Complete
  • Mount & Blade: Warband
  • Pride of Nations
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Rome Gold
  • Crusader Kings II
  • Europa Universalis III Complete
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Darkest Hour
I was thinking about enhancing the possibilities a normal text editor offers for writing events.
I have come up with a basic editor, that has these main features:
* Syntax Highlightning
* Event Linkup
* standard event mask
* automatic unique ID generating in event mask
* Toolwindows to add a simple event trigger or command to a line

A sample view from the text field:
sample.jpg


Some more information is given in the readme.

And here is where to get the Event Editor: (Version 0.2.3 Build 15)
http://hoi.graphy.org/EventEditor.zip

Please remember that my progress speed is directly dependent upon feedback frequency ;)
 
Last edited:
Ilkhold - very nice! An excellent start to an event editor!

I tried "Ctrl" but couldn't get it to do anything.

Features that would be helpful:
* Event ID checking to assure that the event number has not been used anywhere else.
* Support for automatically generating some trigger conditions or action commands.
* Clicking on a trigger action of another event and automatically being taken to that other event (open the file in a separate window and cursor positioned at the event).

Stray ideas:
* Color code an entire event by the nation it applies for?
* Color syntax highlighting

- Mithel
 
Mithel said:
I tried "Ctrl" but couldn't get it to do anything.
You have to hold it down to get the effect. It won't affect most events, but things like "event = 2000" in a trigger.
Actually you can use this to search for an event. Just type "event = [ID]" press Ctrl and click on the link (if you get it ;) ).

Features that would be helpful:
* Event ID checking to assure that the event number has not been used anywhere else.
Yes, actually I am pretty positive that this already works, if you put the used event numbers into the .ini file with the right identifier. I have to use a seperate list and can't search through all existing event files for each new event, because that takes to long.
I'll do a function to update a list maintained in an ini file.

* Support for automatically generating some trigger conditions or action commands.
Definetely planned.

* Clicking on a trigger action of another event and automatically being taken to that other event (open the file in a separate window and cursor positioned at the event).
Working, if you hold down control key. Just it opens in the same window not a new one. I know this is not best solution, but easiest. My current idea is to include something like a "back" button. But open in another window has it's advantages.

* Color code an entire event by the nation it applies for?
No. Put all events for one country in the same file, then you won't need any colours. If event chains are spread over several files, then you can use the linking to get to next event without much effort.
I don't think that the colouring for countries would be visible.

* Color syntax highlighting
Yes. I have thought about that. That will make the programme more complicated, but that's worth it.
Apart from colouring I can use underlining, bold and italic font style. Can't use different fonts or font sizes.
 
Ilkhold, I'm sure there are many people that are very happy you are developing this tool. My ideas (like country color coding) were just to stimulate some thought and discussion. My own intention is to keep events for each country in separate files and hence I agree the country coloring wouldn't be very valuable.

I don't know why I couldn't get Ctrl to work but nothing I did seemed to do anything.

So used event numbers need to be manually put into the ini file? Hmmm... yuck, we definitely need the feature to scan the files and add them in automatically.

What software (language) are you using to develop this?

- Mithel
 
Mithel said:
Ilkhold, I'm sure there are many people that are very happy you are developing this tool. My ideas (like country color coding) were just to stimulate some thought and discussion. My own intention is to keep events for each country in separate files and hence I agree the country coloring wouldn't be very valuable.
I appreciate your input, even if I won't use the ideas. Sorry if I sounded a bit rough, I just wanted to state, that I won't implement that feature, and give a reason for that.

I don't know why I couldn't get Ctrl to work but nothing I did seemed to do anything.
Have you tried on an empty editor to write
Code:
event = 2000
and then hold down Ctrl-Key? That should paint the number blue and underlined. As soon as you let the Ctrl-Key go it will revert back to normal.
If that doesn't work then I would be interested in what OS you use.

So used event numbers need to be manually put into the ini file? Hmmm... yuck, we definitely need the feature to scan the files and add them in automatically.
Of course :rolleyes:
But that is not top priority, because my experience with CORE is, that event IDs have to be picked manually.

What software (language) are you using to develop this?

I use Delphi 5, german version.
 
Ilkhold, no problem at all, you didn't sound "rough". As a software developer I know that I won't use all ideas suggested but I know that sometimes someone will mention something that I may have completely overlooked. I knew some of the ideas weren't very valuable but I think you've got a great tool we can use and if we start kicking around ideas who knows what nice features we will dream up.

When I get home and have a chance I'll try "Ctrl" again.

Hmmm... I've heard nice things about Delphi. I think I'll give it a try. I'm frustrated at the deployment issues of Java and it'd be nice to be able to make native executables for small tools like this where the user doesn't need to have a Java Runtime Environment properly configured.

- Mithel
 
I just noticed that my current test version doesn't react on Delete key. Strange :wacko:

I updated the download anyway. I fixed mousewheel scrolling and added colouring of comments. Those will now show in light grey.
Now I'm sick of that stupid thing ignoring the Del key (unless pressed with Ctrl). :(
 
Last edited:
Ilkhold, aha! Now I see how the Control key works. Very nice!

One major problem I had though: while holding the control key scroll the window - the text dissappears! Very disturbing! If you've done a lot of edits it would be very scary to save a file which you can't read!

Another problem: I openned one of my files and the entire file displays as faint grey "comment". This seems to happen after loading a second file.

Another feature I'd like to see:
* Perhaps using Alt like you do Ctrl (or maybe have Ctrl do it too) so that we can click on an event ID and have it prompt us with a list of events that trigger the current event.

Critically missing feature:
* Search & Replace - I don't seem to see any feature to search for a string of text or to search and replace a string of text.

I like that comments are in faint grey, but I would prefer them in a color like faint green (slightly more readable).

- Mithel
 
Mithel said:
Ilkhold, aha! Now I see how the Control key works. Very nice!

One major problem I had though: while holding the control key scroll the window - the text dissappears! Very disturbing! If you've done a lot of edits it would be very scary to save a file which you can't read!
Right, text becoming invisible is a problem. My basic solution would be to disable scrolling when Control Key is pressed. That way the text won't be repainted. Another option would be to change the links completely.
The current way to do links is to place a Label component right over the text. I will try a few things to get around the problems.
One idea would be to require the user to mark the ID with the mouse and then press some key combination or open a context menu (right mouse click). However, that would mean that highlightning links (blue and underlined) would have to be handled different. Either they had to be marked all the time, which requires more parsing to be done all the time or not at all.

Another problem: I openned one of my files and the entire file displays as faint grey "comment". This seems to happen after loading a second file.
I haven't seen that behavior, only all text being bold. Guess that loading needs some more checks :(

Another feature I'd like to see:
* Perhaps using Alt like you do Ctrl (or maybe have Ctrl do it too) so that we can click on an event ID and have it prompt us with a list of events that trigger the current event.
Hovering over it might work.
You get a lot of cool editor ideas when using Delphi's IDE :cool:
I wish they included the source code of that. Saved me lot of work.

Critically missing feature:
* Search & Replace - I don't seem to see any feature to search for a string of text or to search and replace a string of text.
You're right, that is really missing. I'll put that on the todo-list.

I like that comments are in faint grey, but I would prefer them in a color like faint green (slightly more readable).
I guess that is a matter of taste, I will try to make it user definable.

But as I reconsidered today, I'll fix existing features first. So the next thing will be the generating of event IDs you mentioned earlier.
 
elbasto said:
nice tool, I hope that this, being the complete igorant that I am, will allow me to mod.... MMMMBBBUAHAHAHAHAHAHA.....

Further testing will take place this weekend

I am sorry to say, but it does only enhance modding, it doesn't enable it. Maybe some time in the future ;)
However I am sure it will make the work easier for an unexperienced modder, and these features will surely improve in the feature depending on the feedback I get.

The necessary modding knowledge can be obtained at this very good site:
http://editing.hearts-of-iron.com/?page=index
 
I have now included a function to generate a unique ID. This is done in the 'New event' mask. You have to specifiy an event range there. Preset ranges are loaded from the .ini file.
The function will scan through all files in the specified event folder and put the first unused ID from your range into the ID Textbox.

Since scanning the files works faster than I estimated no sperate ID list is needed.
 
Ilkhold, if it helps at all my priorities would be:

1) Fix the Control+Scroll blanking of the text. Disabling scrolling while Control is pressed seems like a fine solution.

2) Add a "Search" ability

3) Add a "Search & Replace" ability

4) Add the ability to find all events that trigger/call a specific event.

5) Store the previous file location information in the INI file so that on next usage the user doesn't have to hunt down the copy of the files they wish to mod.

6) Play with color highlighting options whenever you are bored (very low priority in my opinion).

- Mithel
 
Those priorities look fine.
I'll start with adressing Control blanking and wrong highlightning on loading. Fixing faults before adding new features seems best to me.
It could take a bit longer to fix this, so don't get too impatient ;)
 
Now, this was far easier than I expected.
* fixed a bug, where the edit window wasn't properly cleared when loading a file, which resulted in wrong highlightning of the complete file.
* added blocking of scrolling and cursor movement while Links are visible
* made event directory current directory on startup

I am not too happy with blocking all those standard control key actions, however as a quick fix it is Ok. I will decide upon another solution another time.
Notice, that scrolling isn't blocked by pressing control but by presence of Links. One way round all this might be to disable links if the user requests curosr movement or scrolling. Then he'd had to press Control again.

Sometimes there is still a problem with loading, occasionally no file appeared on my tests. I haven't been able to properly reproduce that yet, but at least no more all grey or all bold files.

Storing position of previous edited files is still a good feature for later, but setting the event dir for default is easy and good enough for now.
 
Downloaded it, and now has a wishlist:

1) Can you make sure that the effects of the two choices are also eligable in the "new event" thing?
2) Please do the same with prequisitees
3) Attach some sort of a manual
 
Zuckergußgebäck said:
Downloaded it, and now has a wishlist:

1) Can you make sure that the effects of the two choices are also eligable in the "new event" thing?
2) Please do the same with prequisitees
3) Attach some sort of a manual

I am not sure if I understand what you mean with your first two points.

I will do a manual soon, probably as a seperate download.
 
Ilkhold, well I managed to get it to load and display the entire file in all grey so that bug still isn't completely fixed.

The scrolling works nicely now.

I agree, bug fixes are more important than new features. I'd rather have a reliable program that lacks features than a feature rich program that is buggy.

That's real nice and slick at how it generates a new ID. {smile}

- Mithel