Custom Commander v1.230 update on 11/4/2010 (full source code is included)

Users who are viewing this thread

rubik

Squire
Note: The MOD have been renamed, the former name is Everyone can be the leader.

Hi,everyone. I'm from china. I come here to introduce my mod.  :grin:

The original thread:
http://bbs.mountblade.com.cn/viewthread.php?tid=55212

v1.230 is updated on 11/4/2010, save-game is compatible with 1.225 to 1.228a
Full installer download link:
http://www.mbrepository.com/file.php?id=1571


Patch_1.225_to_1.230:
http://www.mbrepository.com/file.php?id=1154


Credits:
fisheye      Autoloot-source
Mordachai  Save-game compatibility for global variable changes

Special thanks dyhdyh123123, G36E, Ginn for Translating the following features and Changelogs of my MOD for me.

  As the title suggests, this modification will allow you (the player) to pick a hero (this includes your character of course) to control in battle so that they fare better in combat. As a bonus, this means that as long as there is a NPC who is not wounded, you do not have to resort to auto-resolving fights (as anyone who has played M&B knows, auto-resolve is not exactly the best way to finish fights...).

But I digress, for this is but one of the many new features available in this mod that you may uncover (the rest are listed below, don't worry). Right now this is little more than the beginnings of a mod, you can safely expect to see more features added in the future (and they won't all be centered around the title). Currently however, the main objective is to add a few features other mods might not have.

P.S.: Let us get some things straight first, I (The mod maker, not the translator) will not be adding any new weapons or armours into this mod, nor will I spin a bunch of fabricated places, names, items or troop types. If you wish to play what amounts to a reskin of M&B, this mod will hold NOTHING of interest to you. Those who wish to use parts of this mod will have to PM me (Mod maker, not the translator) first.

FEATURES(more in change Logs):
#. Add a new menu before encounter that can choose NPC(unwounded) to be the leader instead of player .
#.  Increasing proficiency in a weapon type now gives bonuses as listed below:
----------------------------
Every increase of the following weapon proficiencies by 120 gives the bonuses listed below
1-handed weapons: +1 Agi, +1 +1 Shield
2-handed weapons: +1 Str, +1 Power Strike
Polearms: +1 Power Strike, +1 Riding
Archery: +1 Agi, +1 Power Draw
Crossbows: +1 Str, +1 Agi
Throwing weapons: +1 Str, +1 Power Throw

----------------------------
#.  "Auto loot"(thanks to fisheye) and "Battle morale"(thanks to Chel) include.
#.  All 16 NPCs can now read from the books purchaseable from the Book Merchant.
#.  All parties can reinforce their ally like Lord parties and they can join in the battle directly .
#.  All cities and castles will recruit from their prisoners every 24 hours. Desertion rate is 20%.
#.  The skill 'Path-finding' increases Party map speed by 6% per skill level.
#.  If you enounter stronger enemies and leaving some soldiers behind to cover your retreat or after escaping, the movement speed will be twice the normal speed for half an hour (game time), then it will return to normal .
#.  Clock added to the bottom right corner of the world map, displays time in 24 hour format.
#. NPC Prisoner Management levels now influences the amount of prisoners that can be captured after a battle. The skill level of Prisoner Management of NPC can only be add when they are selected as the leader for that round of battle.
#.  A few changes to Native models, made a flying arrow model of my own, now flying arrows are more... immersive.
#.  The reinforcement waves(both sides) depends on the current commander's tactics of player'party, each level of tactics increases the reinforcement waves by 2 .
#.  Persuasion reduces the morale penalty for each prisoner recruited. Every four ranks in persuasion reduces the morale penalty by 1.
#.  Rhodok Crossbow line now advances like this: Rhodok Crossbowmen ? Rhodok Trained Crossbowmen ? Rhodok Veteran Crossbowmen ? Rhodok Sharpshooters.
#.  Some disabled native items added to game, e.g. Black Khergits and Dark Knights.
#.  Bugfixes, tweaks etc.

Change Logs:
2009-3-21 0.70 updated(new game required)
1. Reorganized how NPCs will choose their loots, they will accord to the performance instead of the price.
2. Auto-choosing readable books, put the books into the booty and NPCs will choose the books their like.
  2.1 After auto-loot, NPCs will read the book by themselves, do not need talk and order them to read anymore.
  2.2 After finishing the book, NPCs will throw it into the booty and let others choose.
3. Add control raining and snowing possibilities. Snowing for snowlands and raining for the other lands.
4. Make the command map read-only and shows in battle, press Backspace to close it and only display the troop ratio bar, presss it again is the command interface.
5. Low the weapon proficiency's bonus as:
    1 agi for every 120 one-hands proficiency
  1 power strike for every 120 two-hands proficiency
  1 str for every 120 polarm proficiency
  1 power draw for every 120 archery proficiency
  1 str for every 120 crossbow proficiency
  1 power throw for every 120 throwing proficiency
  1 weapon master for every 120 proficiency for all weapons

6.  Add if force all rescued prisoners and captured enemies to join the player's party or not in MOD option.
7.  In the horse training, add a mini map to show all gourds' postion
8.  Adjust the command menu, contains player and NPC's information for quick view, and easier to make decisions.
9.  In the MOD option, add select all and select invert for auto sell.
10. Cound deposit money in the inn, a fee for storage is needed, and interest is available. Each town is separated.
11. Memorandum now contains repair information, estate building information, NPC's reading progress, deposit information, how special units ungrade, player and NPCs' quck view information.
12. Could reveive repaired items directly in the town meun instead of enter the town and talk to the merchant.
13. Added netural untis and the units do not belong to the kongoms in the custom battle.
  In the meun of choosing soldiers, the high-level untis are on the top and low-level are at the bottom, make easier to choose.
14. Add moral when the deserters join the player's party .
15. Adjust the BUG of blunt weapons do not cost stamina.
16. Adjust the BUG when NPC is the commander and player will atuo equip items from the inventory.
17. Adjust 2 train fields' horce archery's scene, the colour of training information in the up-left corner changes to black
18. Some other adjustments.

2009-3-9 version 0.699a updated (no need to start new game for version 0.699)
1. Adjust the BUG of battle moral, NPCs and player will be counted in the calculation.
2. Add some new colours for change flags or country colours.

2009-3-9 version 0.699 updated (new game required)
1. Add the whole Custom Battle MOD, thanks for Iberon's permission
  Source: http://forums.taleworlds.com/index.php/topic,27343.0.html
  Choose "quick battle" and choose "custom battle", then you can play the custom battle.
2. Adjust some bugs in autoloot
3. You can change your faction' coulor, the banners and can custom your banner in the camping meun if you own a banner.
4. Add reminders and show progress in the training field, such as how many time, opponents or gourds left.
5. Adjust morals
  5.1 NPCs, kingdom heroes and players do not counted into the cohesions.
  5.2 High level units contribute more cohesions.
  5.3 Emenies are harder to rout than player's party.
  5.4 Add 1% cohesions for every enemy the player killed instead of every 2 two enemies killed by player.
  5.5 Adjust the bug for add cohesions if player kill his own men.
6. Add three times more people in the archer position in seige for defenders, archers are more important.
  Three times people in the street battle, and it will be more exciting.
7. Add a memorandum and view it in the report meun, only repair information is available now and will be improved.
  Do not need to worry about forgeting the repair or where or when to take it any more.
8. Books will not be looted if you are caputred.
9. Adjust the upgrade tree for kergits, view " view upgrade trees" for details.
10. Adjust the " after defeat a strong enemy, choose to take first six best loots or reward a good prefixion"
  10.1 The modifier will be the best available for the item, there will be no more such as "Lordly Ragged Outfit"
  10.2 There will be music reminder if you trigger such rewards.
11. Adjust the bug of could not exchange prisoners and companions after independent.
12. The optional settings also be applied to siege and battles in villages.
13. The camping meun reports how long could recruit captives instead the recruit period.

2009-2-27 0.697 updated (new game required)

1.Auto-selling system
  1.1 Could choose the price limit for the auto-sold items in MOD options
  1.2 Could choose which kind of items will be auto-sold in to detail in MOD options
  1.3 Foods, trade goods and books could not be auto-sold
  1.4 Unlock NPCs' inventory, and NPCs will take all the surplus loots by themselves
  1.5 NPCs will auto-sell their loots and there is no need to translate the loots to players from NPCs any more. NPCs will revceive the money and show the associated information.
  1.6 Could take NPCs' money by talk to them.
  1.7 Could choose a storage keeper, and he will neither take any loots nor sell any, and it's not necessary to choose noe.
  1.8 Could move all the items in someone's inventory to player by talk to NPCs.
  1.9 The total weight of items in NPCs' inventory will affect the party's moving speed.
  1.10 Auto-selling options shows up on the town and village's menu that let NPCs and player to trade with all merchants in the town (or with the village older) automatically. Auto-selling stops when all merchants run out of money or space.
  1.11 If you meet the book merchant, you may do auto-selling with him too.
  1.12 The order of auto-selling is form the bottom of the party list to the player, and they will sell cheap itms first.
  1.13 NPCs' auto-choosing equitpemts does not affect their auto-looting, they will put the remainder into the loot pool and let others choose. and throw from the most expensive item until the loot pool is full. After autoloot, the remainder will auto-talken by NPCs.
2. Could view upgrade trees in the report.
3. If you lost the stamina books, you will get another one later.
4. After defeat a strong party, you will be reminded for get a good reward.

2009-2-23 0.695 updated (new game required)

1. Change the Mod's English name to Custom Commander (CC).
2. Adjust the bug of " after defeat a strong enemy, there will be good prefixion for loots, now it is really random form the first 6 loots"
  (it was a bug for previous versions because the range is incorrect.)
3. In a field battle could choose just let NPCs or soliders to join the battle, in a battle help others could only choose if let NPCs to join.
4. Throw weapons chagne to melee weapons ( press E key, the weapon will show on the ground), onlt tested for field battles and the battle in town when snake failed)
5. When using bow with a shield, if the weight of the shield is greater than 2.5, power draw -1, horse archery -2
6. Each tactic level increase 1 reinforcement chance, and reinformance could be adjust in the options of the field menu.
7. Bonus for become Marshal or King, +30 basic moral, +30 party maximum, +30 prisoner maximum.
8. Adjust reading speed, and the one who already read the book could speed the reading speed of others, but there is a maximum.
  Added reading information when exchange books.
  Reading progress accurated to 0.1
9. The defence of the armour also affects the chance of be damaged when get strike down.
10. Weapon proficiency bonus have the level evaluation, there are:S, A, B, C, D
11. Adjust the time of repair, decrease the time needs to repair high price items.
  The horse cureng time doubled for horse merchant.
12. Remake the MOD options.
13. Only the player's side be effected by battle morale.
14. In the defence battle of a siege, player could get ammunition supplies only if there is at lest 10 companions left.
15. Added some troops, some other adjustments.

2009-1-18 0.691 updated (new game required)
 
1. You can hold a bow with a shield, but heavy shields will decrease your power draw and horse archery
2. Some heavy gloves will low your power draw and horse archery
3. Crtl+H will also cover the horse's HP of the player
4. Weight level does not decrease power strike, MOD options move to the camp menu
5. After defeat a strong enemy, choose one of the best six loots for the good item modifier, if there are less than 6, choose randomly in one of them.
  Means good item modifier will choose form good loots.
6. Some ohter adjustments.

2009-1-9 0.69 updated (new game required)

1. Make soft restricts for party and prisoner limits, you may let all prisoners and companions.
  If over the limit, some prisoners or companions will left until the limit.
2. You man exchange companions or prisoners with NPC's party as you will.
3. Adjust auto-recruit prisoner system
  3.1 Auto recruit form prisoners each 24 hours, one kind of soldier each time.
  3.2 All cities, castles and parties not controled by the player could also auto recruit prisoners at 100% success chance without any restrictions.
  3.3 You need to build a prison in your town or castle to auto recruit.
  3.4 The NPC parties could recruit prisoners too, depends on the NPC's persuasion.
  3.5 Auto-recruit prisoner will recruit prisoners depends on their numbers, the stack with max number first.
4. The horse merchant could cure horses, and reduce the time needs to repair items or cure horses.
5. The horse's HP is shown under the player's HP.
6. The player's stamina is shown left of the player's HP in green.
  The stamina will not shown if the stamina system is turn off.
7. the stamina will affects not only field battle but also all other battles.
8. Could switch morale system on/off by talking to NPC.
9. Player could recover ammunition two times in siege defence.
10. New troops which could upgrade with special equipments
11. Some ohter adjustments.

2009-1-2 0.685 upgraded (no need to start new game, for 0.6:cool:
 
1. Adjust the BUG of no loots after a battle.
2. The repair time now depends on the repair cost.

2009-1-2 0.68 upgraded (new game required)

1. After defeat a strong enemy, some loots many have the best item modifier.
2. The weapon and armour merchant could repair equipments with normal prefixions, one person could repair one weapon/armour and needs 24 hours.
3. The highest-level soldiers of five kingdoms could use some special equipments(could not be bad item modifier) to upgrade, it will improve their ability a little.
4. Some MOD options move to the speech with NPCs
5. Some other adjustments

12-21 0.66 upgraded (new game required)

1. Be stunned would not lose stamina, and NPCs kill enemies will also cost stamina.
2. Add MOD options in the capm meun, you can switch many options such as weight punishment or stamina system.
3. Could change reinforcements in MOD options, minimum 2, max 2+(tactic level)*2
4. Adjust the reading BUG
5. Most good items will be sold, but the chance is very little.
6. Some other adjustments

12-13 0.65 upgraded (new game required)
 
1. Add the battle moral systen made by Chel, thanks to Chel's premission.
  The keys:
  T---show everyone's HP and cohesion force.
  Y---reassemble our troops to prevent routing.
  U---Call reinforcements for both sides.
2. Add stamina to the player and NPCs
  The stamina is depends on the character's level, strength and ironflesh.
  The stamina decreases slowly on the battle field, heavy weights will increase the descending rate, each enemy the play/NPC killed/stunned cost 1 stamina.
  After the stamina is run out, it will cost HP instead.
  After a single battle, the skill ironflesh will regain 6% per skill level of stamina lost during mission
  On the grand map, ironflesh will increase the stamina recover rate, and double while resting.
  Add the book of stamina to show the player and NPCs's stamina (only show the ones in the player's party)
  The stamina is shown under the HP in yellow in the battle.
3. After be stunned, the NPC's armour may get damaged too.
4. Add exp bar in the battle interface, now it will clearly show the exp information.
5. After the player or the NPC be stunnned, stamina -5, and lost 2%~5% exp for the current level.
6. persuasion +1 for each 50 times of recruting prisoners successly, maximum +5
7. When exchange books with NPC, the related information will show (if already read or could read)
8. In the menu of changing the commander, the HP and stamina is shown after each NPC's name.
9. Could recruit prisoners each 24 hours for the towns or castle owned by the player, no restriction for AI.
10. Some already read the book will increase the reading speed of the one who is reading it.
11. Prisoner management only affects the player, and charm could increase the prisoner limit.

11-30 0.61 upgraded (new game required)

1. After the player or the current commander of player party is stunned, there is a change for the armour( inculde body, head led and hand) to become deformed (get a worse item modifier) or damaged (disappeared).
2. The total weight will affect the archery/horse archery skills, even power strike.
3. Could ban NPC's grumble in the camping meun.
4. Adjust the bug of books will be throw into loot pool by NPCs.
5. The reading progress only shows the player's and the NPC's who are in the party.
6. The dark knights will show hotilities to all five kingdoms.
7. The weight doubled for arrows and bolts.
8. The good items will not be sold, you can only get them form the loots.
9. Increase the kings and the lords' level of path-finding.

V 0.60 Changelog (Previous saves not compatible)
0. Updated
1. "Auto loot" include, thanks to fisheye.
2. Global increases of weapon proficiencies by 120 give +1 to Weapon Master.
3. Fixed the bug regarding heraldry on heraldric mail and shields on companion parties, now the heraldry is the same as the player's.
4. Fixed bug regarding non-recovery of ammunition for throwing weapons.
5. Fixed bug regarding party surgery not in use properly when a companion is in command. (Special thanks to oolonglgx)
6. Fixed bug regarding Cheat (Alt+A) to recover ammunition.
7. Dark hunters only appear after the player has reached level 15. Also, Dark Knights and Black Khergits cannot be captured by the player.
8. Hidden chest readded to Jelkala (As an added bonus, there's a set of gloves in there).
9. Bugfixes, tweaks etc.

V 0.59 Changelog (Previous saves compatible)
0. Updated
1. Increasing proficiency in a weapon type now gives bonuses as listed below:
----------------------------
Every increase of the following weapon proficiencies by 120 gives the bonuses listed below
1-handed weapons: +1 Agi, +1 +1 Shield
2-handed weapons: +1 Str, +1 Power Strike
Polearms: +1 Power Strike, +1 Riding
Archery: +1 Agi, +1 Power Draw
Crossbows: +1 Str, +1 Agi
Throwing weapons: +1 Str, +1 Power Throw
----------------------------
2. Pathfinding adds 6% of map speed instead (9% was too much)
3. Bugfixes, tweaks etc.

v 0.4 Previous saves not compatible
NOTE: This is a patch, not the whole thing, download version 0.2 first then extract this .RAR where you installed version 0.2 (Remember, this is a mod for version 0.960)

1) Troop Ratio Bar added.
2) Reinforcement for towns, castles and lords added.
3) Persuasion skill now affects morale loss when recruiting from prisoners.
4) The “Cannot be used on horseback” crossbows now have the v1.003 description .
5) Claimants can now be controlled by the player.
6) Dark Knights and Black Khergits added.
7) Some unimplemented Native items added as uniques.
:cool: Bug fixes, tweaks.

V 0.3 Previous saves not compatible
1) Bug fix for: Being unable to allow NPCs to take command.
2) Bug fix for: Control not returning to PC.
3) Flying arrow meshes and textures changed.
4) One random quest added for lords.
5) Tactics now influences reinforcement waves, see above for details.
6) NPC Prisoner Management levels now influences the amount of prisoners that can be captured after a battle.
7) Bug fixes, tweaks.


Screenshots:
200922811256.jpg


200922811315.jpg


200922811233.jpg


9e8b5e38686449cd2bb79aa5ea61f4be.jpg


5fa9d0e27f166f5bdd7178118fc1f03d.jpg


80bc094ddf172d245333e56c26cb11cd.jpg


1a9dc020ee11b0646ab7e609f78600ec.jpg


c90a634bf66dc7b54a118d3c9410a9ab.jpg


ad74b3f8c8e604317ed75308c4eba3e9.jpg


38665c6d8836198462ad96803fbf55f3.jpg


ca8ae4fa4505fd70d26a5fe4195c50d2.jpg


e6f932bc2ad33337bdd5591af69407ea.jpg


028b90cc87e831fd8a24e25a4b95e109.jpg


6d17be509703367e5e366865586df000.jpg
 
great work you have done!

I think you didn't describe your main feature clearly enough. maybe this way can be better:

The charactor created by player(you, we) at the first beginning of the game, is no longer the only one charactor we can use in battle. We can directly controll any other company NPCs instead of our charactor to fight. We can choose which NPC we want to use/controll befoe every battle, one time one man/woman, the old player charactor won't show up in the coming battle(that is according to the description in chinese forum. according to the screenies in this thread, he will still show up, wont he?)

not chare, but charge
ps: you have done the translation work, thats great! but please tell me right after you decide to do this next time. if I didn't find this thread I would probably still work on this translation.
 
Awsome Maw! This would be my intention two. Then you could die in battle a few times but not unlimited (number of availible heir´s) until your game is over. 
 
Great job, Rubik. 
Maybe this great feature will join into Native of next version :smile:     

  NPCs are more important now.  but how can make they unhurted before player fall down from his horse?
 
maw said:
coulcn't this concept be rolled over into the 'if i die, i can become my heir' idea? maw

Could be but I suppose you can't really remove trp_player, from p_main_party. And as far as I know loads of stuff uses trp_player as the player. Regardless the set troop...


I'll check that one out, I guess 1.003 operation is identical to .960s.

Edit; that is of course if I wasn't a lazy a bastard to download .960 again.
 
You can do a total character transfer into trp_player, copying skills, stats and equipment, no? Only the name would be the same, but, eh... it's your heir after all.
 
Actually I already have a script that just does that, thought it copies only equipped items and certain skills but it is almost effortless to convert it to do the whole thing.

Right here;
http://mbx.streetofeyes.com/index.php/topic,872.msg29253.html#msg29253
 
It did got into my head and I downloaded 960 and have the recipe for heir system!

-set_player_troop does change the player for good
-you can remove trp_player from the p_main_party after setting player_troop something else
-but it is still trp_player's skills that taken into account, so use the script from http://mbx.streetofeyes.com/index.php/topic,872.msg29253.html#msg29253 to update trp_player's skills
-to do this first update players skills to player2's skills then update player's with player2's skills.
-Application suggestions, add player to a scene (to manor if retired, to graveyard if dead :razz:), in dialouges the set_player_troop will be treated as plyr but the talk troop will be trp_player!

Notes;
Xp does go to the set troop, not trp_player
Money rewards and all go to the trp_player :xf-mad: thankfully almost every event that uses a script rather then directly troop_add_gold command. Thought it is a find/replace job not too hard.
The inventory screens are still trp_player. Not a biggie with my copy items/skills script.
Thankfully {playername} and most other calls do work. Tournamnets don't work since they directly check for trp_player. Other then those there is nothing that can't be fixed.
 
Wow. Nice. So a global search-and-replace for the trp_player to something like "$g_current_player_troop" will just make everything work.

This has astounding implications. Forget the heir system, you can now make a real squad-based mod with no "main character", e.g. like XCOM.
 
That's the first thing that came to my mind, a tight knit group of adventurers instead of one and you get to switch around characters. Wish Darklands were still around.

But it wouldn't "switch" during a mission.
 
That would be cool...but putting it into native would really change the whole "It's your life, do what ever you want and see how much Calradia changes because of you" theme.
 
M&B Unofficial File Repository is Temporarily Offline now.
You can download the patch V0.2 to V0.4 of my MOD from the following link:
http://files.filefront.com/My+mod+patch+V02+to+V04/;12098121;/fileinfo.html

By the way, download link for V0.2 of my MOD:
http://files.filefront.com/Everyone+Can+Be+The+Leade2rar/;11913870;/fileinfo.html
or
http://www.rayfile.com/en/files/53d7dd9c-8d98-11dd-9c5a-0014221b798a/
 
Back
Top Bottom