Creation and Management of Factions

From Morrowind Modding Wiki
Jump to: navigation, search

Creation and management of factions. A treatise for inquisitive minds.

Author: LofZ.

This guide was translated from Russian.

Creating a New Faction

Making a new faction in Morrowind is easy. Along the main menu go to Character, then Faction.... The Faction window should appear. Press the New button and type a new ID and then the name of your new faction. The ID can only be viewed from within the CS, and it is used to refer to a particular faction within scripts and the like. The faction's name is what is seen by the player in-game. It is not entirely clear why two fields were necessary at the same time, as the information written in “ID” and “Name” boxes is simply duplicated in vanilla Morrowind. Still, when you perform any operations with this faction in scripts etc., use ID, but not a name. Example: ModPCFacRep, 5, “Imperial legion” (this increases player character’s reputation by 5 among the members of Imperial Legion).

Please note, if you have already started to create a faction, but then changed your mind and closed the window, your new faction ID and Name would still remain. In order to delete the faction, use the Delete button, which is beside New.

Let’s continue and fill in the other fields in the window.

Check “Hidden from PC” if you don’t want a player to see the faction in the game.

Choose Favored Attributes, Primary Skill and Favored Skills, i.e. characteristics that are most valued within the faction. I advise you against using here whatever floats your boat first and selecting skills at random, but instead think over concept of the faction thoroughly. In a fantasy world there are usually three directions to go: warriors, mages and rogues. Still, there is enough room for your creativity.

By the way, you can already add NPCs to the new faction. It is done through a character’s settings (double click on NPC, choose faction&rank in the opened window). Now, when pressing “background” topic, they will introduce themselves and mention that they are a member of this faction – that is, if you haven’t written a custom phrase or attached the “nolore” script to them.

So, we already have enough material to start working with the plugin. We can stop here, of course, but if we want to create a fully-fledged faction there is still work to do. Now what features does a fully-fledged faction have? First of all, it is a hierarchy of ranks, of course!

Let’s create a few ranks then. For this, open the Faction window again (Character -> Faction...) and locate rows of empty boxes to the right of favored skills list. Select a box in the "Rank Name" column and click once on it to type a new rank name. When you're done, you’ll see that you are now able to set scores of attributes, favored skills and faction reputation which are required for promotion to this rank. This is all for the player's benefit, of course; an NPC can be given any rank, disregarding their abilities.
It is better to fill in all ranks first, and then edit their requirements. So that career growth would go on smoothly. If you feel that you have added too many ranks, select a box with undesired rank, click on it once and then delete its name with backspace to remove it.

At the very bottom of the faction window is the “Reactions” section. This is where you can set how other factions view your faction. Click of the right mouse button calls a context menu, where you choose “new”. A new faction name will appear on the top of the list, usually “Census and Excise”. Select it, then choose the desired faction ID from the drop-down menu to the right and set disposition below.

As you can see, you're limited to the numbers: -3, -2, -1, 0, 1, 2, and 3. Let’s call them disposition coefficients. So -3 means the most negative attitude, while 3 is the most positive of all possible variants.
If you input other numbers, CS will accept them, but next time you’ll attempt to open plugin or start a game, it will throw an error about “incorrect parameter sizes” and will refuse to process these values.

The Reactions section is also only for the player's benefit. So you can include to the faction reactions list the ID of the new organization itself, which will govern disposition of faction members to the future Nerevarine, if they are in the same organization. You don’t have to list all existing Morrowind organizations.
In the end, your result should look approximately like this:

Example.jpg

This concludes editing of properties of the new faction. All that remains now is to place representatives of this faction in the game world, as well as faction-specific buildings, books and other items.

Enlisting and career growth. Working with dialogue.

In this interesting chapter I will show you how you can arrange joining of our Nerevarine in a faction and their future career growth. This is mostly done through the dialogues, of course. You can give the promotion abilities to the certain characters/highest ranking officials in a faction through the dialogue conditions, using ID. Alternatively, you can go Telvanni way, and give power to promote to all characters of the certain rank, setting in dialogue conditions faction and rank of the speaker. Promoting through a script will not be discussed here.

Thus, we create a dialogue with a new topic – the offer to join an faction. The dialogue may be expanded: a recruiter may tell about rules and duties, demand that certain conditions should be met for enlisting, listen to PC’s refusal and so on. In case PC agrees, you should write in the dialogue results PCJoinFaction “faction ID”, which means joining in the faction.

Now, if PC openly kills some of their fellow members, or if PC is caught while attempting to steal the item, which you while editing its properties in “extra data” set as belonging to this faction or its member, then this wonderful window will appear: “You have been expelled”.

For the sake of immersion, it is advisable to create several topics where characters would be able to tell something interesting about their organization.

Here are several special functions which you can use in dialogues and scripts. Most of them work only if PC and NPC are members of stated organizations:

PCJoinFaction “faction ID” – enlists PC in the organization;
%PCRank – tells PC rank in the dialogue;
%NextPCRank – indicates next PC rank after the current one;
%Rank – tells NPC rank;
GetPCRank, “faction ID” – calculates PC rank in scripts, in order (for example, GetPCRank, “Blades” == 0 will indicate first Blades rank – Novice).
Value -1 indicates that PC is not a member;
PCRaiseRank – promotes PC;
PCLowerRank – demotes PC;
RaiseRank – promotes NPC;
LowerRank – demotes NPC;
PCExpell “faction ID” – expels PC (by the way, “expelled” status doesn’t remove PC from organization, as you will see from the following command);
PCClearExpelled “faction ID” – reinstates PC in the faction;
ModPCFacRep, 5, “faction ID” – increases reputation (in this case by 5 points) of PC among all faction members. You can use negative values;
SetPCFacRep, 100, “faction ID” – sets PC’s reputation in a faction;
ModFactionReaction, “1st faction ID”, “2nd faction ID”, 5 – modifies disposition of faction 1 towards faction 2 by 5 points.
This is only noticeable for the player, of course;
SetFactionReaction, “1st faction ID”, “2nd faction ID”, 5 – sets disposition of one faction towards another;
Get/Mod/SetReputation – determines/modifies/sets value of PC’s reputation;
Get/Mod/SetDisposition – same as above, but for disposition of NPC towards PC.

Dialogue conditions:

Faction – if the speaker is affiliated to a certain faction;
Rank – if the speaker has rank no less then specified by a condition;
PCfaction – if PC belongs to a certain faction;
PCRank – if PC has a certain rank;
Function -> Same Faction – set this to 1 if you want an NPC use a phrase only when PC belongs to the same faction as them;
Function -> Faction Rank Difference – used in the dialogues to calculate the difference between ranks of the speaker and PC. More about it later;
Function -> Rank Requirement – condition for having a certain rank, see below.

In order to advance PC in the ranks it is necessary to create new phrases in “Promotion” topic, or create another topic with similar name. It goes without saying that the speaker and PC should be members of the same faction – otherwise you will get strange results.

Generally speaking, promotion depends on two factors, or, to be exact, on how these two factors correspond with requirements needed to attain a certain rank. These factors are PC’s reputation in a faction (modify it with ModPCFacRep X “organization ID”, where X is your custom value) and scores of PC’s skills, relevant for this organization.

It isn’t necessary to create a new phrase for every rank, as career growth was automated by Bethesda developers. The game checks whether conditions for promotion have been fulfilled with “rank requirement” function, which can have values 0, 1, 2, 3. Use the following table as a guideline and arrange your phrases in the same order.

# Desired outcome Phrase example Condition in speaker’s dialogue What needs to be inserted in results
1 Expel PC. You have broken laws of thieves’ honor. Pay compensation or you will never get the title of %PCNextRank Function -> PC Expelled == 1 Nothing
2 Reinstate PC in a faction. They say you were expelled. I will handle this for you. Function -> PC Expelled == 1 PCClearExpelled “organization ID”
3 Reply when PC asks for promotion, but their reputation is too low and the skills are not developed enough. Perform your orders with honor and hone your skills. You are not ready yet. Function -> Rank Requirement == 0 Nothing
4 Reply when PC asks for promotion. Their skills are good enough, but reputation is not. Your technique is brilliant, but some question your loyalty. You should perform more duties for Morag Tong. Function -> Rank Requirement == 1 Nothing
5 Reply when PC asks for promotion. They have enough reputation but their skills are not sufficiently developed. You still don’t have the qualities I need, %PCName. Maybe later. Function -> Rank Requirement == 2 Nothing
6 Reply when PC asks for promotion. Their skills and reputation are sufficient. Very good, %PCName. You are now %PCName %NextPCRank. Function -> Rank Requirement == 3 PCRaiseRank
7 Demote PC. How could you summon atronachs and dance with them on library tables? Trebonious is mad at you! Something should be noted in PCFaction and PCRank, and you also need a cause for demoting, reflected in dialogue conditions. PCLowerRank
8 Expel PC. Get lost! Function -> PC Expelled == 0 PCExpell “organization ID”

Various useful things

Offences against rules, or “we will forgive you, but only this once”

To avoid the situation when PC only needs to speak to somebody to reinstate themselves and so be able to break the rules infinitely, you can introduce conditions which will allow PC to be forgiven just once. This way if they transgress again, there is no coming back.

Create a new variable of the short type with the name like ExpFaction. When PC is reinstated, write this in dialogue results:

PCClearExpelled “organization ID”
Set ExpFaction to 1

Then write another sad phrase in case of another expulsion with conditions:

Function -> PC Expelled == 1
Global -> ExpFaction == 1

With contents like: “Sorry, dear, you have already broken the rules earlier and was expelled. We will not forgive you anymore.”

Service denied

You can create situations when some trainers or traders refuse to deal with PC until they reach a certain rank. To do this, open “dialogues” and under Persuasion -> Service refusal tab create a phrase for NPC in which they tell about this refusal. You need to set rank for an NPC (should be high enough, since “my services are reserved only for the highest ranking members”) and dialogue conditions:

Function – Same Faction == 1
Function – Faction Rank Difference < -3 (i.e. the difference in ranks between NPC and PC is 3 or more. You can use different number).

Supply chest

A handy item. It is created via editing some standard chest. In order for supplies to reappear once a month, check “Organic container” and “Respawns” boxes. Be sure to tick “extra data” flag and set the owner, which will be a faction. Your new organization and all standard Morrowind factions can be found in this list under letter “F”. Here you can also set a rank required for using the chest.

Salary

A monthly salary could be a nice bonus for young Nerevarine. It can be scripted so that the higher their standing is in an organization, the bigger it will be. This feature was realized in “Salarie Imperiale” (Imperial salary) plugin by BOUCLETTE. Payments are conducted on 1st day of every month. The gold appears in the inventory instantly, and the higher rank in Imperial legion a PC has, the more salary they get.

Such situation can be created using only one global script. It calculates the rank and the month. When the next month comes, the gold is added to PC inventory once, according to their rank. Look:

Begin SalaireLegionImperiale
short currentMonth
if (currentMonth != Month)
    set currentMonth to Month
    if (getPCRank "Imperial Legion" == 0)
        Player->AddItem Gold_001 100
    endIf
    if (getPCRank "Imperial Legion" == 1)
        Player->AddItem Gold_001 230
    endIf
    if (getPCRank "Imperial Legion" == 2)
        Player->AddItem Gold_001 410
    endIf
    if (getPCRank "Imperial Legion" == 3)
        Player->AddItem Gold_001 670
    endIf
    if (getPCRank "Imperial Legion" == 4)
        Player->AddItem Gold_001 990
    endIf
    if (getPCRank "Imperial Legion" == 5)
        Player->AddItem Gold_001 1340
    endIf
    if (getPCRank "Imperial Legion" == 6)
        Player->AddItem Gold_001 1710
    endIf
    if (getPCRank "Imperial Legion" == 7)
        Player->AddItem Gold_001 2150
    endIf
    if ( getPCRank "Imperial Legion" == 8)
        Player->AddItem Gold_001 2540
    endIf
    if ( getPCRank "Imperial Legion" == 9)
        Player->AddItem Gold_001 3100
    endIf
endIf
End SalaireLegionImperiale

Finally, here’s some good advice:

Career growth can only be exciting if interesting quests are present.

As PC advances in the ranks, don’t forget to increase faction disposition towards a PC or his reputation in “result” field of the dialogue. Otherwise they wouldn’t be able to get promotions.

It would be strange if promotion to the highest ranks could be performed by characters of any rank! Don’t allow NPCs with “Novice” rank to promote PC to “Master”: create a phrase for a novice somewhere above with condition PCFaction, PCRank “name of the rank, above which they cannot promote”, with these contents: “I can’t promote you to %PCNextRank, because I am only %Rank”. It is a good idea to make promotion to the highest rank a part of a special quest, with enough challenge to the PC, so that receiving this title would be a decent reward for their efforts.

By the way, expulsion in MW shouldn’t be always considered as a shameful banishment. This function can open a lot of perspectives.

I wish you good luck and all the best in your creative endeavors!