Gr770 / CK3-Community-Title-Project

6 stars 5 forks source link

Council file method #56

Closed Gr770 closed 3 years ago

Gr770 commented 3 years ago

Discussion for use of localizing council positions

  1. Original branch: Edits the original files 00_council_positions and council_l_language.yml Mostly likely better optimized, will need testing on somebody's computer that doesnt have a SSD. Has less new files

  2. Alt Branch Edits the original file council_l_language.yml only Better compatibility as it will have our own files. Probably easier to make sub-mods for other big mods like swmh.

Charanraja123 commented 3 years ago

Edit : Retracted Wrong Statements

Charanraja123 commented 3 years ago

Quoted this forum post Combining multiple mods together has always been a bit tricky but I wanted to try and make some gains with compatibility so that it doesn’t require as many manual patches.

To aid in this a bit I’ve made it so database entries can be overridden by key even if that new entry is in a different file. This means if you want to override what the lunatic trait does then instead of needing to copy the entire traits file just to change one entry you can just make your own file just containing your new definition of what the lunatic trait does, such as giving it a boost in learning, prowess, and attraction opinion like I have done below!

This also applies to files from other mods, as long as yours is loaded first, so you can overwrite traits and other database elements from other mods

Edit: I now have no Idea what this means. But i'll just leave it here

Charanraja123 commented 3 years ago

Edit: Retracted wrong Statements

Gr770 commented 3 years ago

@Charanraja123 I have already tested it. I could not change the positions without changing the original file.

Either it's some weird priority issue where the original file is overwriting the new file, or you would still have to change that file.

image

Gr770 commented 3 years ago

This is from copying and pasting that original and replacing it with the new localization

image

Charanraja123 commented 3 years ago

OMG. I'm really sorry. I made some stupid mistakes which I wont embarrass myself telling it here. I am ashamed, We can continue on with the discussion. Sorry again. You were right

Charanraja123 commented 3 years ago

Discussion for use of localizing council positions

1. Original branch:
   Edits the original files 00_council_positions and council_l_language.yml
   Mostly likely better optimized, will need testing on somebody's computer that doesnt have a SSD. Has less new files

2. Alt Branch
   Edits the original file council_l_language.yml only
   Better compatibility as it will have our own files. Probably easier to make sub-mods for other big mods like swmh.

Regarding performance, I don't expect that much of a difference, especially since I think these localizations are only called in when viewing the council tab, unlike title flavorisations which are applied everywhere (AFAIK). In both of these cases, it should not matter much compared to other parts of our mod.

Gr770 commented 3 years ago

I dont think its bad either. I actually perfer the alt way.

Charanraja123 commented 3 years ago

I mean, I obviously prefer alt-way too , especially for the compatibility part. I don't know whether anyone else will have an opinion on the coding structure\method based on compatibility or performance metrics. Should we leave this open for discussion or start adding in titles for the alt method?

Viridianus commented 3 years ago

I don't think we should judge performance much. Compatibility is more important and more testable for non-specialists, and there's a simple rule for it: the less files you edit, the better. Why would we need to edit the 00_ file anyway?

Charanraja123 commented 3 years ago

For his method, He called in the base game function directly, so he needed to do that. But as you say, less edited files is the better (not always though). As i said before, the most performance heavy component in our mod, till now, is the title flavorisations, I don't think these compare to those. CK3 is efficient and designed good enough (As of now) for these to not matter. But then again I use an SSD, maybe it might affect people who use HDDs.

Viridianus commented 3 years ago

Yeah, and I don't even want to estimate how much heavier the EtB-based submod will be... So let's imagine everyone's using a supercomputer :D I vote for alt-method.

Gr770 commented 3 years ago

The only issue lies in the Spouse and Court Chaplin

Charanraja123 commented 3 years ago

Okay. First I'll address some changes I made and tested (Locally, Not uploaded in Branch) 1) Changed custom calling from GetPlayer.Custom to ROOT.Char.Custom, So now the Councillor is the root scope instead of the player. I changed this because having Player as the root scope brought out some problems in Leige's council view. 2) Following that changed has_culture to liege.culture, since the root has changed now. 3) This also should solve the is_male problem as the root is the Councillor and it checks for their gender.

Charanraja123 commented 3 years ago

The only issue lies in the Spouse and Court Chaplin

I'll explain the base game mechanics here

Court chaplain

Obligatory rant, The way the vanilla game handles this is so bad, but I'll explain it to the best of my ability.

Charanraja123 commented 3 years ago

Now I'll explain how we can modify these using our own Custom Loc.

Court Chaplain

-First step would be to changed the actual_bishop_title localisation of GetActualBishopTitle into something of our own like CPTBishopTitle (or something like that). You might ask, why not just go into GetActualBishopTitle and edit things. The problem is compatibility, there is a lot of other stuff in _00_divinity_customloc.txt that we will need to overwrite to edit this particular function. Therefore, we are better off creating our own.

Note; Since landed titles are an integral part of this, I think we can put off Court Chaplain until we finish theocratic titles.


Spouse

Okay, so this one is funny, because I think this is the easiest ever. We just need to replace every spouse localisation with ROOT.Char.GetTitleAsName. This works because we already have defined spouse flavorisations. Why am i sure it should work? Because this is the same method used by Paradox themselves for landed bishops in the GetActualBishopTitle. Why didn't Paradox use this? I have no fucking Idea. If it doesn;t work, again we just replace localization with the same custom function. Should not be a problem at all.

TLDR : Custom localization can be used to change all these titles, and is more compatible than the other method even for these.

Viridianus commented 3 years ago

I fully accept the premise on spouses (though note that landed spouses are not your councillors, that's what may have stopped Pdx). As for court chaplain: exactly what would the default (non-temporal, non-Ismaili, non-Ashari) court chaplain be?

Charanraja123 commented 3 years ago

My understanding is that Every spouse regardless of their landed status obtain a title based on rulers except for Mayors, right?

For the court chaplain, from a historical point of view I do not know, Maybe they were not any. But if any exists or are created by the players, it is possible to Flavourise them is what I'm saying. For now even Ismaili duchies or lower do just go to the default title (Court Chaplain), which may not have been the case I presume.

Viridianus commented 3 years ago

Oh, you mean the default title is literally "Court Chaplain" for English?

Also, I'm kinda confused about what branch is to be edited if I want to add/change some council localizations. Is Council-Positions-Redo obsolete now?

Charanraja123 commented 3 years ago

Yeah its literally "court chaplain".

The code is not settled in yet, So I would say just hold on to your changes for a week, at max. I'll try to clean everything up by then. Most likely that branch is deprecated, but @Gr770 should confirm that

Gr770 commented 3 years ago

3/5 rule in favor of alt method and we have a clear path to complete the localization without 00_council_positions.txt.

When I get home I'll back a tag for the old method called 'backup/depreciated just in case we want it again.

Charanraja123 commented 3 years ago

Don't we have six contributors? xD

Gr770 commented 3 years ago

The czech guy was never an official contributor. He submitted a request to fix the czech culture name.

Charanraja123 commented 3 years ago

I've finished chancellors, Please test it and let me know if it works as intended.

Charanraja123 commented 3 years ago

Can we close this? Since we finished the discussion?

Viridianus commented 3 years ago

I thought we'd leave this just in case until the merge is performed, and the merge will close this automatically. But, so that it's not a deadweight, I'll ask here about Council-Positions-Redo again. Maybe @Gr770 should hide that branch?

Charanraja123 commented 3 years ago

He said he'll deprecate it or something. I'm sure he'll do it today or tomorrow. Maybe he's waiting for me to finish up and then test stuff.