I think having a building for that wouldn't look very good, since the building would still show up at the city interface,
That's why my mod alters CityView.lua to not display any buildings whose class has the <NoLimit> flag turned on AND whose cost is negative. That way, all of my hidden buildings are taken care of without messing up the UI for anything else. (For reference, I also have a +1 Food building, a +1 Production building, a +1 Research building, a +1 Gold building, a +1 Culture building, a -1 Happiness building, a -10 Happiness building, and a few others not worth getting into here. So I depend heavily on hidden bonuses.)
so what I did is make an "invisible" policy (doesn't appear on the policy interface or civilopedia, pretty much like the finishers), and then tried to use:
BAD IDEA. Bad, bad, bad, bad, BAD idea.
Look, the only reason my mod uses a Policy to handle this is that
it's designed to do that. Adding a hidden policy causes a TON of problems:
1> The cost equation for adding new policies cares about the number of policies you have. It's currently impossible to make a no-cost policy. So if you give the player a custom policy behind the scenes, then it'll increase the cost of all of his future Policy choices.
In the vanilla game, the equation is something like 25 + (5*N)^1.80. To account for one hidden "extra" policy, I changed it in my mod to something like 16 + (4*N)^2.01, giving approximately the same general progression when N effectively becomes (N+1). (Seriously, try it in a spreadsheet. It's remarkably close.) But this means that in my mods, every player always has one and ONLY one hidden policy; while I have six hidden policies (well, seven, but one can never be used), they trade off with only one ever being active at any one time, because allowing a player to have two of them would break the cost equation again.
2> Each policy needs to be inside a branch. If you add your custom policy to, say, the Tradition branch, then two things happen:
2a> A player can no longer complete that branch (to get the Finisher, or to count it towards a cultural win) unless he has that policy. That means that it's not something you can turn off at a later point.
2b> The AI will see that branch as already "open", and will prefer to gain its next Policy from that branch regardless of Flavor ratings. (The AI is limited to only having two open branches at once, so this'd count as one of the two.)
3> ...but if you try to put it in a NEW branch, like I did, then you run into an entirely different set of issues:
3a> You need to create a policy in that branch so that it can never be considered completed (which'd count towards a Culture win). The AI will attempt to take any extra policy (since it's in an "open" branch), which means you need to add an override to force the AI to NOT take that policy. GameEvents don't work completely for this, so in my mod I've created an override to where if an AI is clearly stuck (not selecting any valid policies even though it's got more than enough Culture), I force them to pick a new one.
Alternatively, you can choose to NOT add anything beyond the one policy, in which case everyone starts with one completed branch. You'd have to then increase the number of branches needed for a culture win from 5 to 6, AND modify the SocialPolicyPopup and VictoryProgress UIs to reflect this.
3b> The UI is hard-coded to use 10 policy boxes of specific names, which means you'd need to alter SocialPolicyPopup.lua in four different places to get it to not show your custom branch. Or, modify both that lua and its xml companion to add an eleventh box, which adds a whole slew of new problems.
3c> And again, the AI will count this new branch as one of its two "open" ones, which is why I've tried to use certain overrides to force the AI to accept having three open branches.
Bottom line: it's fine to have a "carrier" mechanism. Every player gets a certain Policy, every unit gets a certain Promotion, and so on. It actually makes things pretty handy for modders who want to make certain changes to the base ruleset. But you can't just do it blindly; these things always need a significant amount of work to keep from breaking the existing game. The only kind of thing that doesn't add those issues is a Project. But as you may have noticed, Projects have very few actual effects, so you're very limited in what you can do with them.
It's great that you used something from my mod to try and fix your problem, but there's a reason my mod isn't compatible with most others: to make certain things work, I had to modify a whole lot of other things, enough that I pretty much overlap with everyone else's work.
And now it shows that these happiness bonuses are coming from both social policies and from projects.
Correct. The game's UI double-dips on that, as of the last patch, adding happiness bonuses in two different places, and they still haven't fixed it in vanilla. Yet another UI bug I've fixed in my own mod.