Custom Settlements Original Thread

Currently Viewing (Users: 0, Guests: 1)

Status
Not open for further replies.

wickedshot

Sergeant Knight
Best answers
0
Custom Settlements [WIP] Download

Purpose:
I made this mod because of the times when I'd be given a village and do everything I could to make it better, only to see no noticeable effect.  So the main purpose of this mod is to have your efforts on your settlement matter.  Mainly I do this by changing the scene when you finish a stage of development, and having the troops in the scenes be the ones you put in.  Also, the overland map icon changes according to the stages.  Another purpose of this mod is to add more long term goals.  Theres a lot more for me to do but I figured I'd post what I've got so people can try it out or use parts of it.  A lot of what I've made is also based on the things people have requested on the forums.

Basic Details:
Native map but with only custom settlements (currently 8 settlements and 12 empty settlements with names like EmptXXX).  After you claim a settlement you'll be made part of a new faction belonging to you.  You can then rename the settlement and your new faction (will be renamed your current player name, which you can change to achieve desired results), and change its colour.  Then you can work on improving the settlement so you can increase its economy level or military level, both of which start at 0 and can be upgraded to 1 then 2.  If your settlement reaches mili1 you are considered a Lord and get a banner.  If your settlement reaches mili2 you can turn a hero companion into your Steward (betters your settlement over time, useful for organizing your Lords/Ladies when you have them; other functions coming).  If your settlement reaches econ2 and mili2 you are considered King/Queen and can start claiming extra settlements, and for every extra settlement you have you can turn a hero companion into a Lord/Lady.  Currently I've got a fair bit of functionality (much more than I want to list for brevities sake) with minimal issues, but its still a work in progress.

Settlement Main Features:
Growing world.
Patrols, Caravans, and Peasant Parties
Turn 1 hero into your steward
Settlement AI for lords
Multiple Settlements
Turn Heroes into Lords/Ladies
Customizable and upgradeable
Troops can be garrisoned
Can wait in town
Battles nearby take place in the settlement with the help of the settlement troops
Different scenes for each combination of economy and military upgrades (9 different outdoor scenes)
Indoor scenes for tavern (requires economy level 2), manor (military 1), castle (military 2), prison (economy 1, military 2)
Chests you can store items in (1 to start, another one in manor and one more in castle)
Troops in scenes are actual units in the garrison and are active: prisoners run about gathering resources, peasants visit others and spend time at home, troops attack enemies and then return to their post
Occasional random encounters: travellers can visit, looters can wander near and become a nuisance
Time spent in settlement outdoor scenes improves your parties morale (they enjoy the downtime) and your reputation with the settlement
Time spent in settlement indoor scenes has benefits as well depending on building
Patrolling the scene can lower corruption.
Ability to set up mock battles using wooden weapons (got the idea from Lancien) under "Organize Population" menu (adds XP and upgrades to garrisoned troops based on training skill)
Can spend time training workers (upgrades peasants into crafters, increasing productivity)
Can spend time training recruits (upgrades peasants into recruits)
Personal food stores aren't used up when near settlement
Talk to Peasant Elder to get some information about your Lords.
Talk to your lords/ladies to give them orders.

Supplementary Features:
Talk to village elders to convince some of the peasants there to travel to your settlement (when the peasants arrive they'll be added to your garrison and improve the settlements prosperity and such up to a point).
Talk to guild masters to convince them to form a trade route with your settlement (caravans will visit your settlement and improve its prosperity).

Terms used:
Productivity: the quality of the workers from 0 to 100.
Workforce: total number of civilians + prisoners
Population: total number of non-military troops (currently, peasants and crafters only)
Corruption: higher corruption is generally bad, reduces your profits.

Two general upgrade paths:
Build personal structures and fortifications (military)
Build public structures (economy)

Three levels of economy:
None, Village, Town
Three levels of military:
None, Manor, Castle

To upgrade a level of military or economy has certain requirements found under menu option "Manage settlement", for example:
To upgrade to the first level of economy (i.e. build housing for a village), you need a prosperity of 50, a relation with the settlement of 10, a civilian population of 50, and 5000 gold, and then to wait 15 days









Next Planned Main Features:
quests
upgradeable indoor areas
ability to close doors to castle
ability to add ladders during siege
general dynamic scene object placement
being raidable and degradeable and conquerable
arena
spouses, children
different dialogue personalities and options based on the random face numbers, also corruption and relation affecting convo
ability to raise a townsperson into a noble hero in scene (so if you find a random you like, you can talk to them and make them a hero char)
make it possible to garrison heroes again
hunting animals in scene
more and more ways to customize settlement and have it show
everything better
ive also got a very very long todo list of non-main features

General Versions Outline:
0.1 - Single settlement
0.2 - Multiple settlements
0.3 - AI Lords, stewards
0.4 - patrols, caravans
0.5 - enemy settlements, map with only settlements
0.6 - raidable, conquerable, degradeable settlements
0.7 - dynamic objects, doors, ladder, and more
0.8 - upgradeable indoor areas and special areas
0.9 - spouses, children? more interaction with heroes
1.0 - new overlandmap, polishing
1.x+ Adding content made by others and generally improving everything

Additional Settlement Scene Makers:
Achilles_ (Kargala)
Liquidninja (Braemar, Ravenspire)

I'd appreciate any ideas that are in line the with purpose of this mod or to generally improve it, which is basically anything that makes the settlement more personal and worth spending time at.  Also if anyone loves making scenes and would like to make a settlement in 9 stages of development (see the one currently in use to get a basic idea) let me know and I'll try to incorporate it.  And let me know of any issues or bugs you encounter, balance concerns, or any extra options and such you'd like.
 

wickedshot

Sergeant Knight
Best answers
0
Source files for Custom Settlements 0.64

Main files edited:
module_game_menus.py
module_scripts.py
module_constants.py
header_operations.py (didnt edit this one, but very good for reference)
module_mission_templates.py
module_simple_triggers.py
and then id open whereever the code led me (most commonly editing parties, troops, party templates, etc.)

generally i put all my code at the end of the files and after a:
##gwen code start
or some such, and sometimes theres places where i needed to interject some changes in the middle of other menus or scripts, in which case i tried to add a:
#gwen edit
or a:
#gwen start

using just the source code and compiling wouldnt be enough on its own, so you need the main mod or you'll be missing the actual scenes.

Custom troop tree Guide:

find the following lines in modules_game_menus.py (around lines 10'750+)
(faction_set_slot,"fac_player_settlement_faction",slot_faction_tier_1_troop,"trp_swadian_recruit"),
(faction_set_slot,"fac_culture_6",slot_faction_tier_1_troop,"trp_swadian_recruit"),
and change the "trp_swadian_recruit" to your custom base unit troop id.

then so long as your troops are in the module_troops.py file (remember to start a new game after adding your troops or placing them at the end before the upgrades). it should work.

from then on you can use the "Manage Faction" menu, then "Pick Culture" and then choose the option "Custom" to get your custom troop as the base recruit for your faction from then on.  this will make any patrols you make start as your units, and any peasants you train into a recruits as your base unit
 

SPQR

Master Knight
Best answers
0
Those are some nice ideas you have there.  I especially like the ability to have prisoners doing slave labor in a town/village area.  Best of luck.  :wink:
 

Slate024

Master Knight
M&BWBWF&S
Best answers
0
Yea a great start on something that can grow huge.  I'll be keeping an eye on this one for sure.
 

saxondragon

Sergeant Knight
Best answers
0
Wow..cosmic convergence lol.

So.. after releasing Prophesy of Pendor today, I took a short break of a few hours, then  I opened up my notes for improvements that I had planned to work on for the next release.  Top of my list~

#1 - Improved village/town/city management system
  1A - Build a town - in stages and graphically representing them
  1B - Ways to conquer a town or reduce the level.
  1C - Possible ways to increase the ways to interact with the town.

Imagine my both my surprise and delight when I came back to this forum and saw this thread.

Nice job!  What you have done already surpasses what I had hoped to accomplish on my own. 

You have asked for some ideas to further this concept.  Ok..here are some off the top of my head.  Many of these ideas have routines in the module code that can be lifted out and used.


Sub locations:

The Marketplace : Place to buy and sell items, lower level at first, but increasing as the market items increase.
  Quests with the marketplace:
              Bandit kidnap merchant son/daughter.  Success lowers market $, but increases productivity and morale.
              Escort caravan from market to distant city.  Success increase market $, increases city $ and morale.
              Special Order - Merchant requires 3-8 of a trade good.  Player has to deliver for increase in market $ and + morale.
   
The Hunt
Wolves/bandits/orcs/whatever are pillaging the outer homesteads and fields.  Mini fight (ie.. like the village bandit encounter at night or the last castle defense scene where you and a few troops/companions) to clear the problem.

The Sheriff
Three possible candidates for the new sheriff are presented and the player must decide which one will be the best.  This is strictly a dialogue quest, with the possible results ranging from +/- Morale, +/- merchant $, +/- production.

The Thief
As the Hunt, but it is a city scene and the object is to take out the thieves or lose $.

The Lords Justice
I can think of about half a dozen dialogue only quests that can crop up for the lord to decide between various key folks such as the Abbott, the Miller, the sheriff, the farmers, the Inn Keep, the Senchal, and the Steward the results of which could modify any of the stats that you run the city with.

I hope that this is what you were looking for..I know that I will be first in line to integrate what you have done here into my existing body of work.

Best regards,

Saxondragon








 

ben34698

Banned
Best answers
0
I don't know how to do the amazing work you just did, so I have no idea what files this edits.  So, for a poor fool like me, do you think you could list the module files this system is created using?  Thank you very much, sir, and a fine job you have done here!
 

ben34698

Banned
Best answers
0
Uhm, sir, your signature is way too large.  Shrink it now, before you get punished.  Seriously.  And it's also a little bit rude.
 

haste

Veteran
Best answers
0
How do you get peasants to work for you?
The caravan option is around, just not the peasants that come to your place.
 

haste

Veteran
Best answers
0
Nevermind, you get peasants and can work them up as crafts(wo)men, the tools thingy is silly though, you got to keep buying tools for them..
 

wickedshot

Sergeant Knight
Best answers
0
Source code has been linked in second post since last night, so tada I'm magic, there it is heh.  As for which files I've edited in the source, the modify dates should tell you, but my general strategy was to open files in this order:
module_game_menus.py
module_scripts.py
module_constants.py
header_operations.py (didnt edit this one, but very good for reference)
module_mission_templates.py
and then id open whereever the code led me (most commonly editing parties, troops, party templates, etc.)

generally i put all my code at the end of the files and after a:
##gwen code start
or some such, and sometimes theres places where i needed to interject some changes in the middle of other menus or scripts, in which case i tried to add a:
#gwen edit
or a:
#gwen start


as for information on how to play, my next post will be Settlements201 and ill try listing more information, but this mod was over 100 hours of coding so theres a lot to go over and small things i might overlook in retelling
 

wickedshot

Sergeant Knight
Best answers
0
Settlements 201

Raising Production, Prosperity, and Relation with settlement with (#) being highest you'll get doing just that:
Bring Cattle to the settlement.  Adds Prod (80), Prosp (80), and Relation (80).
Bring tools for the peasants.  Adds Prod(50).
Crafter training.  Adds Prod (50).
Caravans coming.  Adds Prosp (90), only adds bonus once per day max.
Peasants joining the settlement.  Adds Prod (25), Prosp (25), Relation (50).  To get peasants to come to your settlement you must have a relation of 2 or more with the village you're trying to get them from, and your relation will go down by 2 when they come with you (idea being the people of the village that like you are the ones that come).

Effects of Production, Prosperity, and Relation with settlement:
Required for upgrading to next stages.
Determines profits generated by settlement, with heaviest influence being prosperity.  Population and Workforce also affect profits.

In scene bonuses:
Outdoor Scenes:  Patrolling around lowers corruption; time spent in outdoor scenes improves party morale (higher bonus with higher leadership skill) and relation with settlement;  as time goes on more random encounters can happen, including wander peasant who you can convince to join your settlement, and hostile looters and the like (if not dealt with they'll raise corruption).
Indoor Scenes:
Manor:  Your hero companions spend their downtime in here, and when you join them you increase your relation with them and they become more forgiving of other party members who they may not like (making them less likely to quit).  Also increases part morale.
Castle:  Spending time in your castle lowers the settlements corruption.  Also increases party morale.
Tavern:  Spending time in your tavern increases party morale the fastest, remember to look upstairs too as there may be more companions.  Can buy drinks to increase settlement relation and can hire mercenaries and companions as usual.
Prison: Need ideas for here, atm only benefit is you can go enjoy the stripped down prisoners including lord prisoners heh.

Outdoor scenes current random encounters:
Crazed looter: will charge the settlement and try to kill people, on appearance corruption increases by 1, on death corruption lowers by 1, relations with settlement improve, party morale improves.
Camping looters and thief:  if confronted you'll have to fight them, their appearance adds 3 to corruption, killing each of them has same effect as killing the crazed looter.
Subdued (knocking unconscious) looters and thieves adds them to settlement prisoners.
Wandering Travellers:  a peasant man, if he's gotten close enough to the settlement to see it and the prosperity is good, you can ask him to stay and he'll invite his family to come too, adding 2-8 peasants to your settlement.
Shady Character:  an assassin will come scout your settlement, increasing corruption the longer shes around collecting information.  Killing lowers corruption by 5.

Extra Characters in outscenes based on Economic/Military levels:
Econ1:  A peasant elder, no uses as of yet.  Mercenaries can be found by the camp and hired as like when in tavern.
Econ2: Horse merchant and General merchant, can buy and sell as usual.
Mili1:  Weaponsmith.
Mili2:  Armorsmith.

Overland Map bonuses:
Battles fought nearby have an option to "Lure enemies near settlement" which places the fight at your settlement and gives you up to 30 extra troops aid from the settlement.  Any prisoners from the fight will be directly added to the settlement, as will any freed prisoners as troops.

Overland over time bonuses:
Profits once a week.
Settlement growth once a month: for every 50 peasants/crafters you'll get a few new peasants coming of age (need econ1), and for every 100 you'll get a townsfolk (need econ2).

General Advice:
Avoid pissing off any major factions til you've got atleast enough troops to deal with them sieging you with their mega parties.
If settlement is sieged, use the option "Attack besiegers from outside." if your settlement doesn't have that many troops but your party does.

Troop changes:
Made Forest bandits female and part of the following upgrade path:
Thieves>Forest Bandits>Assassins
Added mountain bandit upgrade:
Looter>Mountain Bandit>Blackguard
Townsfolk upgrade paths (for men and women, same generally but separate):
Townsman>Adventurer>Protector>Paladin
Townsman>Bandit>Pillager>Dark Knight


That's most of the less big things I can think of on quick perusal of the code.  Currently Corruption doesn't do all the much, but I've got plans to make higher corruption allow more nefarious options like hiring bandits and the like, and low corruption + high honor make paladins and such likely to visit and become hireable.
 

wickedshot

Sergeant Knight
Best answers
0
saxondragon said:
Wow..cosmic convergence lol.

So.. after releasing Prophesy of Pendor today, I took a short break of a few hours, then  I opened up my notes for improvements that I had planned to work on for the next release.  Top of my list~

#1 - Improved village/town/city management system
  1A - Build a town - in stages and graphically representing them
  1B - Ways to conquer a town or reduce the level.
  1C - Possible ways to increase the ways to interact with the town.

Imagine my both my surprise and delight when I came back to this forum and saw this thread.

Nice job!  What you have done already surpasses what I had hoped to accomplish on my own. 

You have asked for some ideas to further this concept.  Ok..here are some off the top of my head.  Many of these ideas have routines in the module code that can be lifted out and used.


Sub locations:

The Marketplace : Place to buy and sell items, lower level at first, but increasing as the market items increase.
  Quests with the marketplace:
              Bandit kidnap merchant son/daughter.  Success lowers market $, but increases productivity and morale.
              Escort caravan from market to distant city.  Success increase market $, increases city $ and morale.
              Special Order - Merchant requires 3-8 of a trade good.  Player has to deliver for increase in market $ and + morale.
   
The Hunt
Wolves/bandits/orcs/whatever are pillaging the outer homesteads and fields.  Mini fight (ie.. like the village bandit encounter at night or the last castle defense scene where you and a few troops/companions) to clear the problem.

The Sheriff
Three possible candidates for the new sheriff are presented and the player must decide which one will be the best.  This is strictly a dialogue quest, with the possible results ranging from +/- Morale, +/- merchant $, +/- production.

The Thief
As the Hunt, but it is a city scene and the object is to take out the thieves or lose $.

The Lords Justice
I can think of about half a dozen dialogue only quests that can crop up for the lord to decide between various key folks such as the Abbott, the Miller, the sheriff, the farmers, the Inn Keep, the Senchal, and the Steward the results of which could modify any of the stats that you run the city with.
Yes thats the kind of thinking I'm looking for.  Been thinking of a good marketplace setup so more ideas there always good.  More important people is one of the areas I want to work on next as well, and I'm thinking possibly of being able to appoint your companions to such positions too (part of why I added 6 new basic companions).

I'll think on those ideas.
 

wickedshot

Sergeant Knight
Best answers
0
rkid3 said:
How do you add population to settlement?
2 ways.  First way, you can go to any village that you have a good relation with (2 or more) and ask the town elder if theres any people who might want to join your settlement, you need 200 gold to pay their expenses, and then a peasant party will appear on the overland map and make its way to your settlement.

the other way is to spend time inside your settlement scene and wait for travellers to come, if a peasant man spawns he'll walk from the spawn spot (where you started too) to near the settlement so he can get a good look.  you'll know he's ready to decide to join your settlement when he stops walking.  the other factor in this is that he wont want to join your settlement if your prosperity is too low.
 

wickedshot

Sergeant Knight
Best answers
0
Ostheim said:
Can we use this with other mods? I currently use the Native Expansion mod (http://forums.taleworlds.com/index.php/board,109.0.html), and would love to use this in combination.
There are likely conflicts if only in the parties, party templates, and troops files, so I don't know how easily it could be used with that mod.  Anyone is certainly granted permission to use any of the work I've done if they can.

This mod is already outdated though as I've finished the adjustments needed to allow for multiple settlements, and as the [WIP] implies, this is a work in progress and changing for the better all the time, so I don't know that I'd bother porting it for anything, atleast not yet.  Also my lofty purpose is to make many custom settlements in their own overland map to create a constantly changing world with new kings rising and falling, so I'm uncertain as to how that might mesh with Native Expansion.
 

vadermath

Count
M&BWB
Best answers
0
Great job wickedshot, love the mod, but i was just wondering why you don't have a thread in the Pioneers Guild, most of the mods are there. Great work anyway, can't wait to see more settlements like this :mrgreen:
 
Status
Not open for further replies.