├── .clang-format
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ └── pages.yml
├── .gitignore
├── .gitlab-ci.yml
├── Config
└── FilterPlugin.ini
├── Content
└── Editor
│ ├── arrow_right_32x.png
│ └── arrow_right_left_32x.png
├── Docs
├── .gitignore
├── FactionsExtension
│ └── assets
│ │ ├── logo.dark.png
│ │ └── logo.png
├── README.md
├── SUMMARY.md
├── _layouts
│ ├── layout.html
│ └── website
│ │ ├── layout.html
│ │ └── page.html
├── assets
│ ├── favicon.ico
│ ├── logo.dark.png
│ └── logo.png
├── book.json
├── documentation
│ ├── img
│ │ ├── cpp_addInterface.png
│ │ ├── cpp_set&get.png
│ │ ├── relations.png
│ │ ├── rename-faction.gif
│ │ ├── settings-factions.png
│ │ └── settings.png
│ ├── implementation.md
│ └── usage.md
├── downloads
│ ├── book.epub
│ ├── book.mobi
│ ├── book.pdf
│ └── implementation.md
├── gulpfile.js
├── installation.md
├── lib
│ ├── Install.bat
│ ├── LaunchLocal.bat
│ ├── Publish.bat
│ └── RefreshSummary.bat
├── package.json
└── styles
│ └── style.less
├── FactionsExtension.uplugin
├── LICENSE
├── README.md
├── Resources
└── Icon128.png
└── Source
├── Editor
├── FactionsEditor.Build.cs
├── Private
│ ├── Customizations
│ │ ├── FactionCustomization.cpp
│ │ ├── FactionPin.cpp
│ │ ├── FactionPin.h
│ │ ├── FactionPinFactory.cpp
│ │ ├── FactionPinFactory.h
│ │ ├── FactionRelationCustomization.cpp
│ │ ├── FactionTableCustomization.cpp
│ │ ├── RelationTableCustomization.cpp
│ │ ├── SFaction.cpp
│ │ └── Widgets
│ │ │ ├── SFactionColor.cpp
│ │ │ └── SFactionColor.h
│ ├── FactionsEditor.cpp
│ └── FactionsEditorStyle.cpp
└── Public
│ ├── Customizations
│ ├── FactionCustomization.h
│ ├── FactionRelationCustomization.h
│ ├── FactionTableCustomization.h
│ ├── RelationTableCustomization.h
│ └── SFaction.h
│ ├── FactionsEditor.h
│ └── FactionsEditorStyle.h
├── Factions
├── Factions.Build.cs
├── Private
│ ├── EnvironmentQuery
│ │ └── EnvQueryTest_Faction.cpp
│ ├── FactionAgentInterface.cpp
│ ├── FactionTable.cpp
│ ├── FactionsModule.cpp
│ └── FactionsSubsystem.cpp
└── Public
│ ├── EnvironmentQuery
│ └── EnvQueryTest_Faction.h
│ ├── Faction.h
│ ├── FactionAgentInterface.h
│ ├── FactionDescriptor.h
│ ├── FactionRelation.h
│ ├── FactionTable.h
│ ├── FactionsModule.h
│ ├── FactionsSubsystem.h
│ └── RelationTable.h
└── Test
├── FactionsTest.Build.cs
├── Private
├── Attitudes.spec.cpp
├── FactionsExtensionTest.cpp
├── Registration.spec.cpp
├── TeamId.spec.cpp
└── TestHelpers.cpp
└── Public
├── FactionsExtensionTest.h
└── TestHelpers.h
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | AccessModifierOffset: -4
4 | AlignAfterOpenBracket: DontAlign
5 | AlignConsecutiveAssignments: false
6 | AlignConsecutiveDeclarations: false
7 | AlignEscapedNewlines: Left
8 | AlignOperands: true
9 | AlignTrailingComments: true
10 | AllowAllParametersOfDeclarationOnNextLine: true
11 | AllowShortBlocksOnASingleLine: true
12 | AllowShortCaseLabelsOnASingleLine: false
13 | AllowShortFunctionsOnASingleLine: Empty
14 | AllowShortIfStatementsOnASingleLine: Never
15 | AllowShortLambdasOnASingleLine: None
16 | AllowShortLoopsOnASingleLine: false
17 | AlwaysBreakAfterReturnType: None
18 | AlwaysBreakBeforeMultilineStrings: true
19 | AlwaysBreakTemplateDeclarations: Yes
20 | BinPackArguments: true
21 | BinPackParameters: true
22 | BreakBeforeBinaryOperators: None
23 | BreakBeforeInheritanceComma: false
24 | BreakInheritanceList: BeforeColon
25 | BreakBeforeTernaryOperators: true
26 | BreakConstructorInitializersBeforeComma: false
27 | BreakConstructorInitializers: BeforeComma
28 | BreakAfterJavaFieldAnnotations: false
29 | BreakStringLiterals: true
30 | BreakBeforeBraces: Custom
31 | BraceWrapping:
32 | AfterCaseLabel: false
33 | AfterClass: true
34 | AfterEnum: true
35 | AfterFunction: true
36 | AfterNamespace: true
37 | AfterStruct: true
38 | AfterUnion: true
39 | AfterExternBlock: true
40 | AfterControlStatement: Always
41 | BeforeElse: true
42 | BeforeCatch: true
43 | # BeforeLambdaBody: false - Waiting for Clang12
44 | SplitEmptyFunction: false
45 | SplitEmptyRecord: false
46 | SplitEmptyNamespace: false
47 | ColumnLimit: 110
48 | CommentPragmas: '^ IWYU pragma:'
49 | CompactNamespaces: false
50 | AllowAllConstructorInitializersOnNextLine: false
51 | ConstructorInitializerAllOnOneLineOrOnePerLine: true
52 | ConstructorInitializerIndentWidth: 4
53 | ContinuationIndentWidth: 4
54 | Cpp11BracedListStyle: true
55 | DerivePointerAlignment: false
56 | DisableFormat: false
57 | FixNamespaceComments: true
58 | ForEachMacros:
59 | - for
60 | IncludeBlocks: Regroup
61 | IncludeCategories:
62 | - Regex: '.*\.generated\.h'
63 | Priority: 100
64 | - Regex: '.*(PCH).*'
65 | Priority: -1
66 | - Regex: '".*"'
67 | Priority: 2
68 | - Regex: '^<.*\.(h)>'
69 | Priority: 3
70 | - Regex: '^<.*>'
71 | Priority: 4
72 | IncludeIsMainRegex: '([-_](test|unittest))?$'
73 | IndentCaseLabels: true
74 | IndentPPDirectives: AfterHash
75 | IndentWidth: 4
76 | IndentWrappedFunctionNames: false
77 | JavaScriptQuotes: Leave
78 | JavaScriptWrapImports: true
79 | KeepEmptyLinesAtTheStartOfBlocks: false
80 | MacroBlockBegin: ''
81 | MacroBlockEnd: ''
82 | MaxEmptyLinesToKeep: 2
83 | NamespaceIndentation: All
84 | ObjCBinPackProtocolList: Never
85 | ObjCBlockIndentWidth: 2
86 | ObjCSpaceAfterProperty: false
87 | ObjCSpaceBeforeProtocolList: true
88 | PenaltyBreakAssignment: 2
89 | PenaltyBreakBeforeFirstCallParameter: 1
90 | PenaltyBreakComment: 300
91 | PenaltyBreakFirstLessLess: 120
92 | PenaltyBreakString: 1000
93 | PenaltyBreakTemplateDeclaration: 10
94 | PenaltyExcessCharacter: 1000000
95 | PenaltyReturnTypeOnItsOwnLine: 200
96 | PointerAlignment: Left
97 | RawStringFormats:
98 | - Language: Cpp
99 | Delimiters:
100 | - cc
101 | - CC
102 | - cpp
103 | - Cpp
104 | - CPP
105 | - 'c++'
106 | - 'C++'
107 | CanonicalDelimiter: ''
108 | BasedOnStyle: google
109 | - Language: TextProto
110 | Delimiters:
111 | - pb
112 | - PB
113 | - proto
114 | - PROTO
115 | EnclosingFunctions:
116 | - EqualsProto
117 | - EquivToProto
118 | - PARSE_PARTIAL_TEXT_PROTO
119 | - PARSE_TEST_PROTO
120 | - PARSE_TEXT_PROTO
121 | - ParseTextOrDie
122 | - ParseTextProtoOrDie
123 | CanonicalDelimiter: ''
124 | ReflowComments: true
125 | SortIncludes: true
126 | SortUsingDeclarations: true
127 | SpaceAfterCStyleCast: true
128 | SpaceAfterTemplateKeyword: true
129 | SpaceBeforeAssignmentOperators: true
130 | SpaceBeforeCpp11BracedList: false
131 | SpaceBeforeCtorInitializerColon: true
132 | SpaceBeforeInheritanceColon: true
133 | SpaceBeforeParens: ControlStatements
134 | SpaceBeforeRangeBasedForLoopColon: true
135 | SpaceInEmptyParentheses: false
136 | SpacesBeforeTrailingComments: 4
137 | SpacesInAngles: false
138 | SpacesInContainerLiterals: true
139 | SpacesInCStyleCastParentheses: false
140 | SpacesInParentheses: false
141 | SpacesInSquareBrackets: false
142 | Standard: Auto
143 | TabWidth: 4
144 | UseTab: Always
145 | ...
146 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve Factions Extension
4 | title: ''
5 | labels: Bug, To Be Reproduced
6 | assignees: muit
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Logs**
21 | It's helps us a lot to have a log. If you can, drop the last one here.
22 | *Logs can be found under "MyProject/Saved/Logs/MyProject.log"*
23 |
24 | **[Optional] Screenshots if any**
25 | If applicable, add screenshots or videos to help explain your problem.
26 |
27 | **Environment (please complete the following information):**
28 | - Engine Version: [e.g. 4.21.1]
29 | - Plugin Version: [e.g. 1.2]
30 | - OS: [e.g. Windows]
31 |
32 | **[Optional] Additional context**
33 | Add any other context about the problem here.
34 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea or feature for Factions Extension
4 | title: ''
5 | labels: Feature
6 | assignees: muit
7 |
8 | ---
9 |
10 | **Describe the feature requested**
11 | When, how, what is the request about
12 |
13 | **How does it help the user (you)?**
14 | Ex. It reduces the amount of work I have to do
15 |
16 | **Is it related to a problem?**
17 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
18 |
19 | **[Optional] Propose an approach to the feature (the less we think the better!)**
20 | How would it work? Ex. I would suggest using instanced objects
21 |
22 | **Any other possible approach?**
23 |
24 | **[Optional] Additional context**
25 | Add any other context or screenshots about the feature request
26 |
--------------------------------------------------------------------------------
/.github/workflows/pages.yml:
--------------------------------------------------------------------------------
1 | name: 'Deploy docs to Pages'
2 | on:
3 | # Runs on pushes targeting the default branch
4 | push:
5 | branches:
6 | - main
7 |
8 | # Allows you to run this workflow manually from the Actions tab
9 | workflow_dispatch:
10 |
11 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12 | permissions:
13 | contents: read
14 | pages: write
15 | id-token: write
16 |
17 | # Allow one concurrent deployment
18 | concurrency:
19 | group: "pages"
20 | cancel-in-progress: true
21 |
22 | # Default to bash
23 | defaults:
24 | run:
25 | shell: bash
26 |
27 | jobs:
28 | build:
29 | runs-on: ubuntu-latest
30 | steps:
31 | - uses: actions/checkout@v3
32 | - uses: actions/setup-node@v3
33 | with:
34 | node-version: '10'
35 | - name: Setup Pages
36 | id: pages
37 | uses: actions/configure-pages@v1
38 |
39 | - name: Install dependencies
40 | run: |
41 | cd Docs
42 | npm install
43 |
44 | - name: Build
45 | run: |
46 | cd Docs
47 | npm run build
48 |
49 | - name: Upload artifact
50 | uses: actions/upload-pages-artifact@v1
51 | with:
52 | path: ./Docs/_book
53 |
54 | deploy:
55 | environment:
56 | name: github-pages
57 | url: ${{ steps.deployment.outputs.page_url }}
58 | runs-on: ubuntu-latest
59 | needs: build
60 | steps:
61 | - name: Deploy to GitHub Pages
62 | id: deployment
63 | uses: actions/deploy-pages@v1
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Binaries
2 | Intermediate
3 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | stages:
2 | - build
3 | - test
4 | - package
5 |
6 | variables:
7 | plugin: FactionsExtension
8 | engine_version: 26
9 |
10 | cache:
11 | paths:
12 | - Build/
13 |
14 | before_script:
15 | # Download Piperift's CICD scripts
16 | - git clone https://github.com/PipeRift/CICDScripts Lib
17 |
18 | build:
19 | stage: build
20 | script:
21 | - cd Lib
22 | - cmd.exe /c BuildPlugin.bat
23 |
24 | test:
25 | stage: test
26 | script:
27 | - cd Lib
28 | - py test_plugin.py
29 | artifacts:
30 | paths:
31 | - Test/Report.xml
32 | reports:
33 | junit: Test/Report.xml
34 |
35 | upload:
36 | stage: package
37 | script:
38 | - cd Lib
39 | - cmd.exe /c CompressPlugin.bat
40 | - py upload.py
41 |
--------------------------------------------------------------------------------
/Config/FilterPlugin.ini:
--------------------------------------------------------------------------------
1 | [FilterPlugin]
2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
4 | ;
5 | ; Examples:
6 | ; /README.txt
7 | ; /Extras/...
8 | ; /Binaries/ThirdParty/*.dll
9 |
--------------------------------------------------------------------------------
/Content/Editor/arrow_right_32x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PipeRift/FactionsExtension/4105d44b1ef6dfa0a0e79238046c0b3cb112b756/Content/Editor/arrow_right_32x.png
--------------------------------------------------------------------------------
/Content/Editor/arrow_right_left_32x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PipeRift/FactionsExtension/4105d44b1ef6dfa0a0e79238046c0b3cb112b756/Content/Editor/arrow_right_left_32x.png
--------------------------------------------------------------------------------
/Docs/.gitignore:
--------------------------------------------------------------------------------
1 | /_book/
2 | /node_modules/
3 | /public/
4 | /book.pdf
5 | /book.mobi
6 | /book.epub
7 | /package-lock.json
--------------------------------------------------------------------------------
/Docs/FactionsExtension/assets/logo.dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PipeRift/FactionsExtension/4105d44b1ef6dfa0a0e79238046c0b3cb112b756/Docs/FactionsExtension/assets/logo.dark.png
--------------------------------------------------------------------------------
/Docs/FactionsExtension/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PipeRift/FactionsExtension/4105d44b1ef6dfa0a0e79238046c0b3cb112b756/Docs/FactionsExtension/assets/logo.png
--------------------------------------------------------------------------------
/Docs/README.md:
--------------------------------------------------------------------------------
1 | # Factions Extension Documentation
2 |
3 | Add factions and relations in your game using C++ or Blueprints
4 |
5 | This plugin is for Unreal Engine 4 and has support for versions **4.20**, **4.19** and **4.18**.
6 | You can download this **[Test project](https://mega.nz/#!JMowlKCA!wZv-L6oNSJCwDw1CUbTFyjPOXvd6viB-QLgK-u36xtY)** to see and test the API
7 |
8 |
9 | ## Introduction
10 |
11 | ### What are "Factions"
12 | When we say Faction we refer to a **group of entities or actors** that share something in common.
13 |
14 | Almost every single type of game uses factions in different ways. For example, in Shooter games there will be enemies and friends, in RTS games every player will be a faction by itself, and in Open-World games you will have factions fighting each other while you run around.
15 |
16 | This plugin fulfills the needs of this feature in UE4 with a very flexible tool that will make the implementation, editing and design of your own factions a 5 minutes thing.
17 |
18 | ### "What" can have a faction?
19 | *Everything!*... well not everything, but pretty much. **All actors of any type can have a faction.**
20 |
--------------------------------------------------------------------------------
/Docs/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # Factions Extension Documentation
2 |
3 | - Documentation
4 | * [Implementation](documentation/implementation.md)
5 | * [Usage](documentation/usage.md)
6 | * [Installation](installation.md)
7 |
--------------------------------------------------------------------------------
/Docs/_layouts/layout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |