Where is the variable 'federation_leader_diplo_weight_from_members_mult' being defined? I guess it is defined there, as it is defined as equal to 0.1, but I mean where do I locate the function that steals the diplomatic weight?
I guess what I should ask is how I call a subjects diplomatic weight. If anyone can help me that'd be awesome.
Stellaris' language isn't really a
programming language per se. It's a weird mix of functions and well, basically data tables/assignment. Almost everything in the entire game is a modifier attaching itself to something.
When you see something inside modifier = { }, the things in it are
already defined effects that you are 1) assigning a magnitude to and 2) assigning to a scope. For an easy example, a civic like Efficient bureaucracy will assign a modifier - a multiplier on admin cap - of magnitude +10% to the owner of that civic.
However, keep in mind that Stellaris files are not exactly optimized, so sometimes you encounter choppy stuff like what you quoted. President_diplo_weight_steal_1 is kind of like a function. What does this do? It adds a modifier to the federation entity, which has the effect of
federation_leader_diplo_weight_from_members_mult. This effect, in some deeper level of code (very likely not exposed to us) is almost certainly conditionally checking to see which empire is the president and who are the other members.
Technically, they could have done something like setting the scope of the modifier to the actual president, instead of the federation as a whole, and applying a similar effect.
Unfortunately, because this system is very new, the modding ability for federations is pretty weak.
What you want to do is find out how to scope to countries that are your vassals, (that's an empire level scope) and grab the diplo weight of that empire. Presumably, this is pretty routinely done by the game. You may want to check Galactic community files for that.
But it's also possible the ability to access that isn't exposed to us yet. IDK, I haven't really poked around it.
Question is, if I can somehow visualize the current variable number on screen to see if it works?
Can you give yourself an empire modifier with a magnitude equal to the variable? Something obscure like dark matter income or something? You can always check that in game while you do other stuff.