Closed Punklife closed 3 weeks ago
Let me explain why I ask this question. I'm trying to limit the number of social policies that the player and AI can access.
It's just a flag you can set. So you can do something like,
count = 0 loop over all adopted policies if policy.IsFinisher == 1: count = count + 1
which tells you how many policy trees the player has completed
If IsOpener is true, the policy is the initial policy for a tree, which is adopted by unlocking a branch.
If IsFinisher is true, the policy is the free policy given for completing all policies in a tree, including the opener.
It's used by Lua for UI purposes and by the DLL to treat the policy correctly.
IsOpener isn't used (and really has no use). I'm planning to delete that.
IsFinisher means the policy isn't counted towards the total policy count. It's like a dummy policy that's given when you own all policies in a policy branch.
@Hokath @RecursiveVision @azum4roll Got it. Thanks for the answers. But then I could use it to create one of these pseudo policies to blocks the others when a certain number of policies is reached, right? My idea is that players are prevented from being able to adopt policies indefinitely until they run out. In long games this makes everyone practically the same, which in my opinion creates a great disadvantage for the AI.
1. Mod Version (X.Y.Z). Current Version: 4.15.2
2. DirectX Version
3. List of Other Mods
4. Describe the Issue
How does it work? "-- Define Opener/Closer Policies - useful for counting elements ALTER TABLE Policies ADD COLUMN 'IsOpener' BOOLEAN DEFAULT 0; ALTER TABLE Policies ADD COLUMN 'IsFinisher' BOOLEAN DEFAULT 0;" ______________________________________________________________________________________ _5. Save Game From 1 Turn Before (ALWAYS ATTACH THIS IF POSSIBLE)_6. Logs (ALWAYS ATTACH THESE IF POSSIBLE)
7. CvMiniDump.dmp File (ATTACH IF REPORTING A GAME CRASH)
8. Steps to reproduce the Issue (Optional)
9. Screenshots of the Issue (Optional)