loup99/WtWSMS

Imperial Regalia

Closed this issue · 17 comments

We have placeholder icons and artifact files. What we need is an event/decision chain.

Reposting what was said previously on this matter in #243:

This is my Imperial Regalia idea
plan (Imperial Regalia Question event would fire a day after Fall of Rome)

Sounds good as a start! For reference, this is what was suggested on the forums:

Odoacer sent two embassies to Constantinople once he established his rule over Italy. The first was basically telling Emperor Zeno that one Emperor was enough, and the second sent back the imperial regalia of the Western Court. So I was thinking in order to simulate this in game, y'all could make an event where Emperor Zeno chooses to accept this (King Odoacer becomes a tributary or something, Emperor of the East receives some items that normally belong to the WRE) or Zeno could not accept it and put Nepos on the Throne of the West. Also apparently the Senate was comfortable with having a rex because he let the Senate do more? but idk how y'all would simulate that.

I don't believe the emperor was in Constantinople was actually in a position to do anything about Odoacer so tributary status probably wouldn't be a good idea. However perhaps the ERE emperor could receive the imperial regalia as artifacts that give him a nice boost as sole remaining Roman emperor, while the ERE emperor can officially grant Odoacer a Roman title which gives him legitimacy and some form of trait or bonus.

We do have already have a decision for the sole remaining Roman emperor, but adding imperial regalia as artifacts could be an interesting additional mechanic.

I think the ERE emperor could recognise Odoacer in exchange if the option of sending the regalia to him is picked, giving him additional prestige and a boost (like we did for the ERE/WRE restoration).

Do you want me to do the event chain?

You will probably do it better than I.

So I did some work on this during the beginning of this afternoon, and it has at least a skeleton which I haven't tested yet. However I thought this might be a good occasion to seek some help for the localisation which I haven't started with. Here is the list of the entries, with my comments from the code:

imperial_legacy.42.desc;;;;;;;;;;;;x # Handling the Western Imperial Regalia after the Fall of Rome
imperial_legacy.42.a;;;;;;;;;;;;x # Keep them
imperial_legacy.42.b;;;;;;;;;;;;x # Send them to the ERE emperor
imperial_legacy.42.c;;;;;;;;;;;;x # Send them to the remaining WRE emperor
imperial_legacy.42.d;;;;;;;;;;;;x # Send them to Soissons
imperial_legacy.43.name;;;;;;;;;;;;x 
imperial_legacy.43.desc;;;;;;;;;;;;x # Receiving the Western Imperial Regalia based upon the choice of the conqueror of Rome
imperial_legacy.43.a;;;;;;;;;;;;x # Recognise conqueror
imperial_legacy.43.b;;;;;;;;;;;;x # Thank vaguely without making any firm commitments
imperial_legacy.43.c;;;;;;;;;;;; # Refuse the Western Imperial Regalia sent by the conqueror
imperial_legacy.44.name;;;;;;;;;;;;x
imperial_legacy.44.desc;;;;;;;;;;;;x # Conqueror having sent the Western Imperial Regalia gets recognition in return
imperial_legacy.44.a;;;;;;;;;;;;x 
imperial_legacy.45.name;;;;;;;;;;;;x
imperial_legacy.45.desc;;;;;;;;;;;;x # Conqueror having sent the Western Imperial Regalia gets it refused
imperial_legacy.45.a;;;;;;;;;;;;x

If anyone feels inspired to fill in a few, don't hesitate.

Based on my graphic. imperial_legacy.42.b might be too long

imperial_legacy.42.name;Imperial Regalia Question;;;;;;;;;;;x
imperial_legacy.42.desc;;;;;;;;;;;;x # Handling the Western Imperial Regalia after the Fall of Rome
imperial_legacy.42.a;They look nice, I think I will keep them;;;;;;;;;;;x # Keep them
imperial_legacy.42.b;Send them to the eastern emperor, maybe he will recognise our rule;;;;;;;;;;;x # Send them to the ERE emperor
imperial_legacy.42.c;;;;;;;;;;;;x # Send them to the remaining WRE emperor
imperial_legacy.42.d;Send them to Soissons;;;;;;;;;;;x # Send them to Soissons
imperial_legacy.43.name;Western Roman Regalia;;;;;;;;;;;x 
imperial_legacy.43.desc;;;;;;;;;;;;x # Receiving the Western Imperial Regalia based upon the choice of the conqueror of Rome
imperial_legacy.43.a;;;;;;;;;;;;x # Recognise conqueror
imperial_legacy.43.b;;;;;;;;;;;;x # Thank vaguely without making any firm commitments
imperial_legacy.43.c;It doesn't change anything. He is just a barbarian usurper;;;;;;;;;;; # Refuse the Western Imperial Regalia sent by the conqueror
imperial_legacy.44.name;;;;;;;;;;;;x
imperial_legacy.44.desc;;;;;;;;;;;;x # Conqueror having sent the Western Imperial Regalia gets recognition in return
imperial_legacy.44.a;;;;;;;;;;;;x 
imperial_legacy.45.name;;;;;;;;;;;;x
imperial_legacy.45.desc;;;;;;;;;;;;x # Conqueror having sent the Western Imperial Regalia gets it refused
imperial_legacy.45.a;Ingrateful bastards!;;;;;;;;;;;x

There is an unexpected delay in the form of a code issue with one of the events, but this is still ongoing!

I have commited the skeleton events with localisation, but as the transfer didn't work (even though the scopes seemed correct when testing the event through console) I had to disable them given that they additionally spawned blank events and were not possible to resolve through Validator or logs. Maybe you have an idea? As I haven't worked on artifacts before, and it is the issue, maybe you could also take a look?

I will try but I don't promise anything.

I didn't manage to get rid of the blank event popups but I found these errors in error.log:

[persistent.cpp:40]: Error: "Unexpected token: days, near line: 1523" in file: "events/WtWSMS_imperial_legacy_events.txt"
[id.cpp:83]: Failed to create id 6000043 61. Already exists in game.
[id.cpp:83]: Failed to create id 6000042 61. Already exists in game.
[persistent.cpp:40]: Error: "Unexpected token: days, near line: 671" in file: "events/WtWSMS_story_events.txt"
[id.cpp:83]: Failed to create id 4700026 61. Already exists in game.
[persistent.cpp:40]: Error: "Unexpected token: days, near line: 728" in file: "events/WtWSMS_story_events.txt"

I think the errors are caused by fragments like this (wrong syntax?):

ROOT = {
character_event = { id = imperial_legacy.42 days = 2 } # Delay to ensure that e_wre has been granted beforehand
}

I will try again tomorrow.

Yes, it reports that, but I don't see the problem with that fragment. We use it elsewhere, and when the artifacts are disabled it works (I tested it). I believe the issue lies elsewhere.

This seems to be more indicative though:

[id.cpp:83]: Failed to create id 6000043 61. Already exists in game.
[id.cpp:83]: Failed to create id 6000042 61. Already exists in game.
[id.cpp:83]: Failed to create id 4700026 61. Already exists in game.

Since the blank popups appear even with

ROOT = {
character_event = { id = imperial_legacy.42 days = 2 } # Delay to ensure that e_wre has been granted beforehand
}

disabled, my suspect is

 		western_regalia = {
			artifact_owner = {
				western_regalia = { 
					transfer_artifact = {
						from = THIS 
						to = ROOT	
					}
				}
			}
		}

EDIT: The error exists in both event files.

Yes, I had already localised it to that. As I said, everything related to artifacts doesn't work. If we disable all artifacts as it has been done in the main mod it works without issues.

I still don't know how to fix it, but I will try to use add_artifact as a temporary workaround.

Wouldn't that create yet another copy?

I mean we could prevent Augustulus from getting the artifact at start and only spawn it by giving it to one of the Roman states. But of course fixing the existing mechanic would be better.

He should definitely have the artifact at start.

I've solved the issue in story_events file

any_character = {
            limit = { has_artifact = western_regalia }
            any_artifact = {
                    transfer_artifact = {
                        from = PREV
                        to = ROOT
                    }
                }
        }
        ROOT = {
            character_event = { id = imperial_legacy.42 days = 2 } # Delay to ensure that e_wre has been granted beforehand
        }

I'm now trying to fix the imperial_legacy_events file. Here's what I noticed:
2017-07-14
One of the sending options works (by "works" I mean appears but doesn't do anything), but the other ones are hidden and after the option is chosen, two blank popups appear:
2017-07-14 1
I don't know why, the three options are very similar.

Do you want me to upload my current progress?