Hello,
Is there a way to create a scripted event which will show up at a specific date and contain a message like it was in Medieval 2?
Cheers
Hello,
Is there a way to create a scripted event which will show up at a specific date and contain a message like it was in Medieval 2?
Cheers
I up this? Is there a way with the assembly kit? When I try to open the events table it says "18:23:04> Unable to load data for the table [events_view_group_junct] because the data file could not be found".
There was this in patch 11's changelog:
"Fixed the "show_message_event()" campaign script function. The function takes an event key from the "message_events" table, an integer X co-ordinate and an integer Y co-ordinate as parameters. Custom events can be added by modders, but must have an event key beginning with "custom_event_", followed by a number (e.g. "custom_event_678")."
While they claim it was fixed, it doesn't work. Been meaning to ask them about it for a while now..
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)
Just did a quick test, can't get it working for some reason, any ideas Causless? I'm thinking a syntax issue with my call or my X/Y coords aren't allowed?
show_message_event("custom_event_555", 20, 20)
![]()
For x and y coords, I just did 0, 0, and it didn't move the camera at all. You should be able to grab the coords from a character like your faction leader and have it work, though. No syntax issues I can see.
Also, you should probably have the actual text in text/db/*_message_event_strings and text/db/*_message_event_text. Although they might work with a blank text and title, I never tried - I put something like "test" in there. You can find the vanilla files in local_en_rome2, so just copy them out to get the table shape and format and remove the vanilla events... at least, that's how I did it, but my understanding of any modding tools is limited
In text/db/*_message_event_text, the tag is like this: "message_event_strings_title_custom_event_*rom_Barbarian", where * is the custom event number. Of course, you'd repeat this 4 times for each culture. Then the localised string there is the title.
In text/db/*_message_event_strings, the tag should be along the lines of "message_event_text_text_*", where the * is the "key" text from db/message_event_strings_tables. For example, for your test message up there, the tag would be "message_event_text_text_placeholder". Remember to write the "text" twice! The localised string is the actual text inside the info box.
I'm not sure why CA did it that lopsided way, but it appears that they did... Ah well. Hope I helped - I had many headaches trying to figure out how it all worked, too!
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)
So guys, if I want to add an event with PFM where I've to "script" it?
Yes, it must include scripting, which may be a pain for any non-programmers. I'd suggest that you just try to find someone with lua scripting experience to join your team and help you, or you could search online for any lua tutorials - it's a relatively easy scripting language to begin learning.
However, I'm planning on releasing a set of tools I've created for R2TR so the actual scripting logic is already included, so you could add these historical messages mainly through database editing. I'll give you a message when it's released, if you want.
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)
1 - I'm actually a programmer, not a very expert one (I'm an university student), but if I study some tutorials I think I can learn to use that language. I just don't undertand where the scripts/functions are called in the game. Moreover, the event table is empty and not editable.
2 - That's great! I would rly like to notice when you release them![]()
Well still can't get this bloody event working.. haha..
Fancy uploading a stripped out version of your files Causeless? Just so I can see what one working event is setup like. I've no idea what I'm doing wrong sadly.
Lua is an easy language to learn, but Rome 2 is a tricky beast to tame
Yeah, let me ask the rest of the R2TR team, first. I'll just release all the files I've made so far as a collective "R2TR tools". I don't think I'll be able to write a full explanation or tutorials on how to use it all just yet, but you should be able to analyze it to see how it works. I've tried to keep a clean and consistent code structure, anyways!
Last edited by Causeless; July 18, 2014 at 12:05 PM.
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)
By files I just meant a mod pack with a working event so I can see where Iv gone wrong, i.e the few db tables. No need to upload your mods tools if its problematic or whatever.
There's no problem in it - I've written out the post and I am just getting input from the rest of the team before I post itWe were wanting to release the tools in the spirit of helping other mods anyways.
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)
Here's the post: http://www.twcenter.net/forums/showt...2#post13965982
Please download the non-steam-workshop version, it's a bit newer. With it, a historical event message should occur on the first and the second turn.
modificateurs sans frontières
Developer for Ancient Empires
(scripter, developed tools for music modding, tools to import custom battle maps into campaign)
Lead developer of Attila Citizenship Population Mod
(joint 1st place for Gameplay Mods in 2016 Modding Awards)
Assisted with RMV2 Converter
(2nd place for Warscape Engine Resources in 2016 Modding Awards)