Skip to content

Commit a0d6e91

Browse files
committed
Updated Factions Documentation
1 parent a2f0e23 commit a0d6e91

11 files changed

+63
-12
lines changed

Docs/SUMMARY.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Factions Extension Documentation
22

3-
* [Implementation](implementation.md)
3+
- Documentation
4+
* [Implementation](documentation/implementation.md)
5+
* [Usage](documentation/usage.md)
46
* [Installation](installation.md)
5-
* [Usage](usage.md)

Docs/documentation/img/relations.png

17 KB
Loading
20.3 KB
Loading
19.3 KB
Loading

Docs/documentation/img/settings.png

55.6 KB
Loading

Docs/documentation/implementation.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Implementation
2+
3+
## Blueprints
4+
5+
*Check the **[Test Project](https://mega.nz/#!JMowlKCA!wZv-L6oNSJCwDw1CUbTFyjPOXvd6viB-QLgK-u36xtY)** for an in-engine example*
6+
7+
### Adding the interface
8+
9+
For an actor to have a faction, we need to add a FactionAgentInterface.
10+
This will allow the system to set and get the current interface.
11+
12+
<img align="right" width="300" height="100%" src="https://i.imgur.com/adet7y6.png"> <img align="right" width="200" height="100%" src="https://i.imgur.com/IJS8qG6.png">
13+
14+
To add an interface we have to go into **Class Settings**
15+
16+
From here we click on **Add**, inside Interfaces and search for FactionAgentInterface
17+
18+
### Getting and Settings the Faction
19+
20+
Factions require your actor to define how to get and set a faction. That can be done overriding **GetFaction** and **SetFaction**.
21+
22+
A common implementation would be to have a **class variable** (of type *"Faction"*), and then return it at GetFaction and set it at SetFaction:
23+
24+
![](https://i.imgur.com/imuFDXn.png)
25+
26+
![](https://i.imgur.com/Cf7QZju.png)
27+
28+
### Factions in Controllers
29+
30+
Sometimes you may want a controller to share a faction with its controlled pawn or character.
31+
32+
This process is exactly the same as before, except that instead of getting and setting a variable, we will get and set the faction from our pawn.
33+
34+
## C++

Docs/documentation/usage.md

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
# Usage
22

3-
Factions can be edited from *Project Settings*, inside *Game* category, *Factions* tab.
3+
All settings can be edited from **Project Settings -> Game -> Factions** tab.
44

5-
<img width="600" height="100%" src="https://i.imgur.com/5hKfoHF.png">
5+
![Settings](img\settings.png)
66

77

88

9-
### Editing Factions
9+
## Factions
1010

11-
Factions are defined as an array to be edited and every faction will have its own properties like color or default attitudes.
11+
Factions settings are defined by right and left areas.
1212

13-
<img width="400" height="100%" src="https://i.imgur.com/YRl4Kmk.png">
13+
**At the left** you have a list of all factions, with a little search box in case you have more than you can deal with.
1414

15-
This information is available on runtime though
15+
**At the right** you will find all the properties of a selected faction (which was selected by just clicking on it on the list).
16+
17+
![Factions Settings](img\settings-factions.png)
18+
19+
20+
21+
You can also rename factions by double clicking on them.
22+
23+
![Rename Faction](img\rename-faction.gif)
24+
25+
26+
27+
All Faction information can be read on runtime too:
1628

1729
<img width="200" height="100%" src="https://i.imgur.com/4SOhCGb.png">
1830

1931

2032

21-
### Editing Relations
33+
## Relations
2234

2335
Relations define how will two factions interact to each other.
24-
<img width="400" height="100%" src="https://i.imgur.com/ihngM3D.png">
2536

26-
By default there are three possible attitudes: **Hostile**, **Neutral** and **Friendly**
37+
In this example, Brotherhood and Triggermen are enemies:
38+
39+
![Relations](img\relations.png)
40+
41+
By default there are three possible attitudes: **Hostile**, **Neutral** and **Friendly**
42+

Docs/downloads/book.epub

63.6 KB
Binary file not shown.

Docs/downloads/book.mobi

79.5 KB
Binary file not shown.

Docs/downloads/book.pdf

116 KB
Binary file not shown.

FactionsExtension.uplugin

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"Category": "Piperift",
99
"CreatedBy": "Piperift",
1010
"CreatedByURL": "http://piperift.com/",
11-
"DocsURL": "",
11+
"DocsURL": "https://piperift.com/FactionsExtension/",
1212
"SupportURL": "info@piperift.com",
1313
"EngineVersion": "4.19.0",
1414
"EnabledByDefault": true,

0 commit comments

Comments
 (0)