Author Topic: [Tutorial]Creating a faction.  (Read 22240 times)

0 Members and 1 Guest are viewing this topic.

Nord Champion

  • Sergeant Knight
  • *
  • Defenders of Faith
    • View Profile
    • DoF
  • Faction: Swadian
  • MP nick: DoF_Constable_William
  • M&BWBWF&SNW
[Tutorial]Creating a faction.
« on: August 05, 2010, 07:42:10 AM »
Ok, so, there is no straight answer to creating a faction so I will put a tutorial.

Thanks to: Egbert, CryptoCactus, and Ziller for helping me!

First you need to create the faction.
Go to module factions.
(click to show/hide)

Go to your module_scripts now.
(click to show/hide)

You need a king and a knight!
Go to your module_troops.
(click to show/hide)


Yeah you got a faction...now you need troops!
Go to your module_troops.
(click to show/hide)


Now give your kingdom reinforcements:
Go to module_party_templates.
(click to show/hide)

Now we need to set the culture.
Got to module_scripts.
(click to show/hide)

Now you need to activate them!
Go to module_scripts.
(click to show/hide)

Now I think you need a town.
Go to module_parties. NOTE: IF YOU DO NOT CREATE VILLAGES AS WELL, YOUR CITY WILL TAKE THE NEAREST 3 VILLAGES FOR ITSELF!
(click to show/hide)

Now go to module_scenes.
(click to show/hide)

Now after that, you need to do some browsing! Go to C:\Program Files (x86)\Mount&Blade Warband\Modules\YourMod\SceneObj. So basically go to your mod directory and click on SceneObj.
Ok when there you need to...
(click to show/hide)

Now you need to give that city to your kingdom lord..

Go to module_scripts
(click to show/hide)
« Last Edit: August 05, 2010, 10:29:20 PM by Nord Champion »


Nord Champion

  • Sergeant Knight
  • *
  • Defenders of Faith
    • View Profile
    • DoF
  • Faction: Swadian
  • MP nick: DoF_Constable_William
  • M&BWBWF&SNW
Re: Createing a faction.
« Reply #1 on: August 05, 2010, 07:43:20 AM »
Reserved.


Atamawood

  • Veteran
  • *
    • View Profile
  • Faction: Swadian
  • NW
Re: Creating a faction.
« Reply #2 on: August 05, 2010, 09:42:55 AM »
This is excellent, I've always wanted to do this but as your stated never has there really been a strait answer. Thank you so much!

Nord Champion

  • Sergeant Knight
  • *
  • Defenders of Faith
    • View Profile
    • DoF
  • Faction: Swadian
  • MP nick: DoF_Constable_William
  • M&BWBWF&SNW
Re: Creating a faction.
« Reply #3 on: August 05, 2010, 04:33:28 PM »
This is excellent, I've always wanted to do this but as your stated never has there really been a strait answer. Thank you so much!

No problem, I'm glad that I'm helping someone.

Also I'm finished! And need help....look at the top question...


Egbert

  • Master Knight
  • *
    • View Profile
  • Faction: Swadian
  • MP nick: Egbert
  • M&BWB
Re: [Tutorial]Creating a faction.
« Reply #4 on: August 05, 2010, 05:01:05 PM »
Towns get starting troops from "script_cf_reinforce_party" which gives them troops from "slot_faction_reinforcements_a" and "slot_faction_reinforcements_b" which are set at script_initialize_faction_troop_types.

CryptoCactus

  • Knight at Arms
  • *
    • View Profile
  • Faction: Bandit
  • MP nick: CryptoCactus_Takeda
  • M&BWB
Re: [Tutorial]Creating a faction.
« Reply #5 on: August 05, 2010, 05:10:16 PM »
"slot_faction_reinforcements_b" which are set at script_initialize_faction_troop_types.

Yes! This is what I couldn't think of when you asked me yesterday, Nord Champion. I forgot you have to set the reinforcement slots. Hopefully that'll solve your problem.
A cactus of all trades.

Nord Champion

  • Sergeant Knight
  • *
  • Defenders of Faith
    • View Profile
    • DoF
  • Faction: Swadian
  • MP nick: DoF_Constable_William
  • M&BWBWF&SNW
Re: [Tutorial]Creating a faction.
« Reply #6 on: August 05, 2010, 10:20:18 PM »
Thanks guys!


JethroKirby

  • Knight at Arms
  • *
  • He who defends everything defends nothing.
    • View Profile
  • Faction: Swadian
  • MP nick: Wappaw_JethroKirby
  • WB
Re: [Tutorial]Creating a faction.
« Reply #7 on: August 05, 2010, 11:49:16 PM »
Thanks for the tutorial. I'm currently working on splitting the current factions into 3 or 4 different ones (one for each town). That's 22 factions all together. It works, no script errors, compiles fine, etc, but there are weird anomalies on the notes screen. Some lords/ladies have negative numbers for ages and family members from other factions. I'm thinking it might be because I split up the existing lords among the different factions instead of adding more. Could that be the case?

All religions must be tolerated... for every man must get to heaven in his own way.
- Frederick II

Somebody

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Bandit
  • WBWF&S
Re: [Tutorial]Creating a faction.
« Reply #8 on: August 06, 2010, 12:03:49 AM »
script_initialize_aristocracy is where it's all at.
Each family basically needs a distinct ancestor seed.
In Native, there are 20 lords per faction. The first at last 8 are father-sons, with randomized fraternal relationships. The middle 4 are independent lords. As for ladies, those are mother-daughter relationships, assigned to each father-son pairs, with the last 4 being sisters to the 4 independent lords iirc.

Oh, and there are many more places you need to change for your faction to work properly, especially in multiplayer.

Nord Champion

  • Sergeant Knight
  • *
  • Defenders of Faith
    • View Profile
    • DoF
  • Faction: Swadian
  • MP nick: DoF_Constable_William
  • M&BWBWF&SNW
Re: [Tutorial]Creating a faction.
« Reply #9 on: August 06, 2010, 12:04:53 AM »
Thanks for the tutorial. I'm currently working on splitting the current factions into 3 or 4 different ones (one for each town). That's 22 factions all together. It works, no script errors, compiles fine, etc, but there are weird anomalies on the notes screen. Some lords/ladies have negative numbers for ages and family members from other factions. I'm thinking it might be because I split up the existing lords among the different factions instead of adding more. Could that be the case?

It happens to me as well. I'll figure it out asap...


SPD_Phoenix

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
Re: [Tutorial]Creating a faction.
« Reply #10 on: August 06, 2010, 12:29:10 AM »
You also need (some might not required):
- Faction banner (which appear in the diplomatic screen) if it is not player faction (module_map_icons, module_mesh, module_scene_props: same thing, different usage).
- Faction adjective string (might not need).
- Assign faction leader and lord(s) banners, renown, money.
- Initialize faction troop tier, reinforcement template, guard troops, town walkers (as egbert said and also in "game_start").
- Add new merchants and tavern keeper (module_troops).
- Set up town arena/tournament info.
- If copy scenes from town/castle that must be sieged with tower, then need to set that info.
- Initialize the new town (and its villages) economy, set up caravans if needed.
-
That's all I can remember for now.

« Last Edit: August 06, 2010, 12:32:14 AM by SPD_Phoenix »

JethroKirby

  • Knight at Arms
  • *
  • He who defends everything defends nothing.
    • View Profile
  • Faction: Swadian
  • MP nick: Wappaw_JethroKirby
  • WB
Re: [Tutorial]Creating a faction.
« Reply #11 on: August 06, 2010, 01:57:48 AM »
script_initialize_aristocracy is where it's all at.
Each family basically needs a distinct ancestor seed.
In Native, there are 20 lords per faction. The first at last 8 are father-sons, with randomized fraternal relationships. The middle 4 are independent lords. As for ladies, those are mother-daughter relationships, assigned to each father-son pairs, with the last 4 being sisters to the 4 independent lords iirc.

Oh, and there are many more places you need to change for your faction to work properly, especially in multiplayer.

You also need (some might not required):
- Faction banner (which appear in the diplomatic screen) if it is not player faction (module_map_icons, module_mesh, module_scene_props: same thing, different usage).
- Faction adjective string (might not need).
- Assign faction leader and lord(s) banners, renown, money.
- Initialize faction troop tier, reinforcement template, guard troops, town walkers (as egbert said and also in "game_start").
- Add new merchants and tavern keeper (module_troops).
- Set up town arena/tournament info.
- If copy scenes from town/castle that must be sieged with tower, then need to set that info.
- Initialize the new town (and its villages) economy, set up caravans if needed.
-
That's all I can remember for now.

That should help me out quite a bit guys. Without guys like you I wouldn't know a damn thing about modding. I really appreciate the help :D

All religions must be tolerated... for every man must get to heaven in his own way.
- Frederick II

Egbert

  • Master Knight
  • *
    • View Profile
  • Faction: Swadian
  • MP nick: Egbert
  • M&BWB
Re: [Tutorial]Creating a faction.
« Reply #12 on: August 06, 2010, 02:42:41 AM »
I'm currently working on splitting the current factions into 3 or 4 different ones (one for each town). That's 22 factions all together. It works, no script errors, compiles fine, etc, but there are weird anomalies on the notes screen. Some lords/ladies have negative numbers for ages and family members from other factions. I'm thinking it might be because I split up the existing lords among the different factions instead of adding more. Could that be the case?

If you have less than 20 lords and ladies in a faction you'll want to change that script so the ":npc_seed" is based on the number of lords in the faction instead of exactly 20. I changed mine so it counts the lords and assigns the three groups by a ratio of the total lords.

mr.master

  • Grandmaster Knight
  • *
  • A Proud Christian, A Member of Knights Of WEe, 6-1
    • View Profile
  • Faction: Neutral
  • MP nick: WEe
Re: [Tutorial]Creating a faction.
« Reply #13 on: August 06, 2010, 04:20:15 PM »
Interesting tutorial. Seems that it still needs some information? But it basically works yes?Anyways, really needed this so thanks :D



JethroKirby

  • Knight at Arms
  • *
  • He who defends everything defends nothing.
    • View Profile
  • Faction: Swadian
  • MP nick: Wappaw_JethroKirby
  • WB
Re: [Tutorial]Creating a faction.
« Reply #14 on: August 06, 2010, 06:30:52 PM »
I decided to post this here as it's related. I'm trying to understand the "initialize_aristocracy" script and I'm sure there are others who'd like it explained in more detail. I'm just getting into scripting - M&B pretty all I've messed with - so bear with me :).

Here is what I'm getting from the script. The whole unmodified native script is in the spoiler...

(click to show/hide)

If I halve the number of lords to 10 per faction instead of 20, all of the numbers/number ranges highlighted in green need to be halved as well right? I'm unsure what I need to do with what I've highlighted in purple (if anything), and I'm assuming the part I've highlighted in blue needs to be extended to include all of my factions. I've no clue what the :ancestor_seed and the associated number is for (highlighted in red), but I'm assuming I need to add six to the number for each faction added... or does that number need to change since the number of lords per faction is 10 instead of 20?

All religions must be tolerated... for every man must get to heaven in his own way.
- Frederick II