OSP Kit QoL Tournament Play Enhancements 1.5

Currently Viewing (Users: 0, Guests: 1)

Windyplains

Grandmaster Knight
WB
Best answers
0
    • Tournament Play Enhancements 1.5 (Complete Overhaul)


      General Description:
          This mod completely rebuilds the native tournament system from scratch with an entirely different style to how it is handled.  For players that do not like the changes it can be disabled leaving the native tournament system completely intact.  Below lists all of the various settings players have access to as I have tried to make customization as transparent as possible.  It should be noted that this will significantly increase the difficulty of your tournament experience, but the kit is very easily customized via constants to suit your mod's needs.  You can see an example of this kit in action in the latest Floris Expanded Mod Pack (2.5).
          Modmerger Kit: This has become a modmerger kit for easier installation and updating.  Please ensure you have modmerger installed before attempting to install this kit.  Installation instructions are now included in the kit and on the mbrepository page so I have removed the source posts below.  Please let me know if you encounter any trouble installing or running this.


      Features::
      Point Based System 
      The entire way that tournaments are handled has been altered to improve the challenge while reducing some of the more frustrating aspects of native tournaments.
      [*] Placement in tournaments is now based upon earning points based on your performance instead of being the last man standing.  You earn points by elminating opponents (+1), surviving the current round (+2) or being a member of the highest scoring team (+1).
      [*] The participant with the highest cumulative score wins the tournament.
      [*] The second and third place ranked participants also win lesser rewards.
      [*] After each round of combat the player will be directed to a "post combat ranking screen" displaying the ranking of everyone in that round as well as the tournament as a whole.
      [*] Being knocked out in a round will no longer result in disqualification from the tournament.  You cannot leave the round either until only a single team remains to allow your team to potentially win the team score reward.

      Customizing Options 
      Players have been given a number of options to customize tournaments to their preference.
      [*] The equipment the player has available in each round.  Three options are given to select between weapons or "enhancements".
      [*] These equipment options can be left for random choice as determined by the touranment design system described below.
      [*] The ability to custom set these same equipment options for companions within the player's party.
      [*] The player can choose to prevent specific companions from joining tournaments if desired.
      [*] The number of teams participating in the next round or leave it random.
      [*] The size of the teams participating in the next round or leave it random.
      [*] Which team the player will be on each round or leave it random.
      [*] The ability to set a bet amount that will be applied each round instead of having to select it between rounds.
      [*] The option to see the damage dealt by teammates.
      [*] The option to view when achievement awards are earned in combat.
      [*] The option to see when points are awarded to any team.
      [*] The option to see when points are awarded to each participant.

      AI Opponents 
      Changes have been made to give the troops a better responsive way of fighting, a more unique look and greater diversity of options.
      [*] Opponents are now uniquely named troops.  Some are "veteran" difficulty while a few are "champion" difficulty.
      [*] The AI troops are significantly more powerful in combat compared to native.
      [*] An option to further increase their difficulty using "level scaling" if desired.
      [*] AI troops will randomly select from the same equipment and enhancement options as the player receives.
      [*] AI troops will more dynamically switch between melee and ranged weapons in combat if they have both.

      Tournament Design System 
      An original criticism of the TPE overhaul was that it removed the faction specific flavor of tournaments.  The aim of the tournament design system was to restore this as the player chooses.
      [*] Players can select exactly which weapon types are available in each center.
      [*] Players can select the appearance of weapon types.  Swords vs. axes, throwing axes vs. javelins, etc.
      [*] Players can select the frequency that each type of weapon is used or if it is used at all.
      [*] Players can elect if a given tournament is completely mounted, unmounted or somewhere between.

      In Combat Display 
      A new combat heads up display tracks things going on in the current tournament round.
      [*] Scores and remaining number of members for each team are tracked.
      [*] The top five scoring individuals of the round are tracked.

      Betting 
      An entirely new system of betting has replaced the native version.  You now bet on whether your team will "win the round" or not.
      [*] Bets are automatically placed each round based upon your option setting.
      [*] Winning bets are paid to the player each round.
      [*] The odds calculated take into account the next round's difficulty setting and number of teams present.

      Achievements 
      Performance achievements can be earned each round based on specific criteria.  Each achievement awards a small amount of experience (scaled with your level) and renown.  These achievements are listed after each round on the post-combat ranking display.  The achievements that currently exist are:
      [*] Swiftest Cut - Awarded for scoring the first defeat in a round.
      [*] Fiercest Competitor - Awarded for scoring the most defeats in a round.  (min: 3 players)
      [*] Dominant Presence - Awarded for scoring 25+% of defeats in a round.  (min: 12 players)
      [*] Legendary Presence - Awarded for scoring 50+% of defeats in a round.  (min: 10 players)
      [*] Mythical Presence - Awarded for scoring 100% of defeats in a round.  (min: 10 players)
      [*] Cautious Approach - Awarded for surviving a round without scoring any points.

      Final Rewards 
      Rewards are paid out to the participant with the highest total score.  A lesser reward is paid to the participants that finish in second or third place.
      [*] Final experience and renown awarded for winning a tournament have been increased due to the increased difficulty.
      [*] The magnitude of the experience reward is based upon cumulative difficulty throughout the tournament.  The harder you set each match the higher the reward will be.  A level scaling cap is applied to prevent too much experience being earned at lower levels.
      [*] Money awarded is also determined based upon cumulative difficulty.
      [*] Winning a tournament will gain you reputation with the town it is being held in.  Each win in that town will increase the size of the reputation gain.
      [*] (Disabled) Items are awarded for winning the tournament.  This is left disabled by default as the reward items need to be defined for your specific mod.
      [*] Lords within the town will react to your win based upon their personality type, your gender and their relationship to you.  Their reaction will alter their relation with you.
      [*] Ladies will react to your win based upon their personality type, your gender and their relationship with you.  Their reaction will alter their relation with you.

      New Quest 
      A new quest as been added with this kit that automatically triggers when an active tournament is available to attend.
      [*] Depending on the player's renown they will either hear of it or be invited.
      [*] The quest lets players know where a tournament is being held and how long before it expires.


      Screenshots:
      New Quest:


      Tournament Options Panel:


      Tournament Design Panel:


      In Combat Display:


      Post Combat Ranking Panel:


      Final Winners:


      Main Access Menu (under the "camp" menu):

      Download Link:
      Tournament Play Enhancements 1.5 - Modmerger Kit

      Note: If you want a lesser version that gains the equipment choices, but doesn't create a complete overhaul the TPE 1.2 lite version a couple of posts down will work.
 

Windyplains

Grandmaster Knight
WB
Best answers
0
TPE 1.6.0 is featured in the following mods::
Note: If not mentioned, send me a message and I'll add you to the list.
SilverstagReleased

TPE 1.5.3 is featured in the following mods::
Note: If not mentioned, send me a message and I'll add you to the list.
Floris Expanded Mod Pack 2.55 & Floris Gameplay Mod Pack 2.55Released

TPE 1.4.6 is featured in the following mods::
Note: If not mentioned, send me a message and I'll add you to the list.
Diplomacy Compilation 3.5bReleased
Freelancer 2.0In Development
TaleWorlds - World of FantasiesIn Development
 

Windyplains

Grandmaster Knight
WB
Best answers
0
Tournament Play Enhancements 1.2 (Lite)
This modification makes a number of game changes to how tournaments are played as well as several minor tweaks to fit my own preferences.  If you have ever desired a bit more consistency from tournaments or wished to have more control over equipment this should cover your needs.
This is a first public project for me, so if you have any suggestions for future features or improvements I’m certainly open to the ideas.  I hope those of you who implement it enjoy the changes.  You are free to add this to any mod you wish, though I'd appreciate credit, and modify it to your own preferences.  If you come up with ideas for significant improvements though I'd like to hear them so they can be incorporated into this kit.
        Modmerger Kit: This has become a modmerger kit for easier installation and updating.  Please ensure you have modmerger installed before attempting to install this kit.  Most other changes for the current release include bug fixes or refinements.  Installation instructions are now included in the kit and on the mbrepository page so I have removed the source posts below.  Please let me know if you encounter any trouble installing or running this.

Features:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Entry OptionsYou may now choose three options upon entry into the tournament to decide which weapons you will take, if you will have a horse or if you will gain other enhancements.  There is an option to “always randomize” if you wish things to remain closer to the Native design.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Renown ScalingRenown gained from winning a tournament now scales based upon your level.  A low level character (unknown upstart) winning a tournament will greatly increase renown, while a crowd favorite was already expected to win.  This also scales relation gained with the town.  The max amount for this can be changed in the constants file and will still scale appropriately.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Companion SpecializingCompanions can have permanent entry options set for them.  You can also select for certain companions to “never spawn” which will prevent them from being selected as a tournament participant.  This is intended to keep your non-fighter companions out of the games.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RandomizingCompanions can have permanent entry options set for them.  You can also select for certain companions to “never spawn” which will prevent them from being selected as a tournament participant.  This is intended to keep your non-fighter companions out of the games.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Lord ReactionsFriendly lords that are present at the tournament will have a favorable reaction to your win while enemies will have a negative one.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Lady ReactionsYour relation will improve with all ladies present to witness your valor in the arena.  Any in an active courtship with you will receive an extra bonus in relation.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Persistent BettingYou may select your bet amount from a drop down menu in the settings window that stays set throughout the tournament.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dynamic Weapon AIEnemies in the tournament will now switch between ranged and melee weapons (assuming they have acquired both) depending on the distance of the closest enemy.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Player CustomizationPlayers can now elect to disable the mod in game returning tournaments back to function as they do in the native game.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Screenshot:

Download Link:
Tournament Play Enhancements 1.2 Lite - Note that this will be the last "mostly native" release of TPE.  The next version will be an overhaul of the entire system, but both downloads will be kept for those wishing minimal changes from native.
 

Windyplains

Grandmaster Knight
WB
Best answers
0
Additional Credits:
A few other individuals deserve credit for their help due to posting public scripts that I could learn from or use as inspiration for elements of this mod.
  • Rubik – I drew the options screen’s initial look as a start from the custom commander’s auto-sell option and learned a fair bit from his custom commander presentation.
  • Lazeras – His backup weapon fixes triggers became the initial inspiration and template for the Dynamic Weapon AI feature.
  • Sphere - For his Modmerger framework contribution.

TPE 1.2 Installation Instructions:
INSTALLATION INSTRUCTIONS (with Modmerger):
  • Verify that you have modmerger framework 0.2.5 (last version since Aug 2010) installed.
  • Add the tournament_*.py files to the same directory as your module system *.py files.
  • In "modmerger_options.py" add (under the mods_active section):
Code:
   	"tournament",      # Tournament Play Enhancements (1.2)
  • Follow the rest of the file specific instructions listed below.  Some of these items should already be done, but are listed to help catch conflicts.
    • TOURNAMENT_CONSTANTS:
      • Verify that the "slot_troop" numbers used below are not already used in your mod.  This is presently slot #'s 340-357.
      • Verify that the "slot_center" number used below is not already in use for your mod.  This is presently slot # 233.
      • In module_items.py you need to define what "normal" or "enhanced" weapons you want the mod to use.  I have designated items that are (non-standard) as such next to their constant below.  Items listed as having a (team color) needs to have 4 of these items in the specific order of red, blue, green and yellow.  The tournament_items.py file already includes all needed items (as specified in constants) if you do not wish to change them.
      • Ensure that the constants denoting "wp_tpe_bet_tier_#" fit for your module's economy. To adjust them simply change the constant values for tiers 1-5.
      • wp_tpe_player_can_disable is set to 1 by default.  This lets players chose if they want this mod activated or not.  You can force TPE to always be active by setting this to 0.
    • TOURNAMENT_GAME_MENUS
      • In module_game_menus.py you need to do the following:
        • Rename "town_tournament_won" to "orig_town_tournament_won".
        • Rename "town_tournament" to "orig_town_tournament".
        • Note: The new name isn't as important as simply changing the old names so that the menus are replaced on compile.  Yes, I am aware Modmerger should do this itself, but that feature doesn't appear to function properly.  It simply doesn't add the menus if they are duplicate instead of replacing the old ones.
    • VARIABLES.TXT
      • Add the following list of global variables:
Code:
g_wp_tpe_active
g_wp_tpe_renown_scaling
g_wp_tpe_troop

History of Changes:
Version 1.2  - 9/21/11
* Completely redesigned the tournament options panel.
* Added a help display on the tournament options panel that explains each setting.
* Added the ability for a player to simply disable this mod if wished.  Certain parts of it will
  run in the background regardless, but it will look and feel like native.
* Added menu options to the main tournament menu to enable or disable this mod returning it to
  native status.  These can be disabled in tournament_constants.py which will cause the mod to
  automatically activate itself.

Version 1.11 - 9/13/11
* Fixed a bug where the never spawn feature wasn't working.  Simply forgot to copy it over.

Version 1.1  - 8/30/11
* Fixed a bug where ladies were not gaining reputation upon a tournament win.
* Fixed a bug where lords were not gaining reputation upon a tournament win.
* Fixed a bug allowing tournament bets to be placed even when you did not have enough money to
  do so.
* Fixed a bug causing the AI to choose a melee weapon over their lance even when mounted.
* Fixed an oversight where boots were not assigned correctly to troops.  No more shall the
  player run around in the arena hobbit-style.
* Reworked betting amounts to be constants for easier editing.
* Repackaged kit in Modmerger format.

Version 1.0  - 7/14/11
* Initial release.

Troubleshooting / FAQ:
  • I keep getting strange "DEBUG" messages showing up in game.
    In tournament_constants.py set wp_tpe_debug to 0 as I must have forgot to upon release.  Sorry about that and please leave a comment to remind me to fix the download.
  • Why do ranged characters under native rules now have swords instead of daggers?
    This isn't a bug.  It was intended so that the dynamic weapon AI feature will still work even under native rules.
  • Why won't the tournament options menu show up when I join a tournament?
    Make sure you followed the instruction to rename "town_tournament_won" menu to "orig_town_tournament_won".  Otherwise the native version of that menu will take precedence.
  • Is my version of modmerger framework up to date enough?
    Probably, but Sphere had some odd version names in his code vs. his mbrepository releases.  The easy answer is if you have the formations kit installed then yes.
    Otherwise look at the bottom of your game_menus.py (as an example) and see if it looks like this example.  If the start version is 201 you're fine.  If not get modmerger's updated version.
Code:
# modmerger_start version=201 type=2
try:
    component_name = "game_menus"
    var_set = { "game_menus" : game_menus }
    from modmerger import modmerge
    modmerge(var_set)
except:
    raise
# modmerger_end
 

Idibil

Grandmaster Knight
Best answers
0
This seem interesting, it change Tournaments totally, I have look...
Thanks Windyplains



 

Arch3r

Count
M&BWBNW
Best answers
0
Looks great! Just one question though: what happens when a companion wins the tournament? I've never seen it happen in Native, but do you still get money when a companion wins or would it just count as if a random Hired Blade wins?
 

Windyplains

Grandmaster Knight
WB
Best answers
0
I would expect the same result would occur as in Native, where you do not get the cash as stated above.  The persistent betting option only applies to you, but it is still displayed on the settings screen even if you're showing stats other than your own.  The same is true of the "renown scaling" checkbox. 

My intention in letting you customize companion tournament gear is simply to enhance challenge and keep them from being pushovers.  Consider that most of the "tournament troops" that get loaded have the same proficiency level for all weapons, yet your companions (especially the ones you get at a low level) tend to be much more specialized.  This was also the reason for allowing you to eliminate companions from loading into a tournament ("never spawn") that aren't really geared for fighting as they tend to die quickly without being much fun to fight against or alongside.

The natural setting for everyone is "always randomize" which retains a more native feel if you don't want to micromanage equipment settings for companions although these settings, once made the first time, remain the same between tournaments until you choose to change them again.

Belendor said:
Damn, all of my work is now going to trash. Good Work...:smile:

Someone gotta try a Jousting Tournament.
This would actually be a future thought for enhancement.  I had been thinking something along the lines of using those jousting props though I'd have to figure out how to manage determining a winner.  Perhaps a timer variable might work.  The same would apply to an archery contest.
 

taragoth

Lord Lukjan said:
I  dont have module-constants file or i cant find it anywhere in freelancer mod... :sad:
You'd need my module source Luk :wink: you can create your own by downloading my source, adding it to the module system then doing the same with this. I'm looking at adding this to standalone also.
 

Ørbæk

Regular
Best answers
0
Windyplains said:
Source Code:
Global variables
These variables need to be added to the end of the “variables” text file.  You will need to assign, “g_wp_tpe_active” to 1 somewhere in the beginning of the game or in your mod’s options menu to activate the mod or remove it from the settings menu conditions.
Code:
g_wp_tpe_active
g_wp_tpe_renown_scaling
g_wp_tpe_troop
Sounds like a great kit  :grin:
I have some difficulties installing it though - "g_wp_tpe_active is not defined" whenever i launch the build module command.
How exactly do i "assign, 'g_wp_tpe_active' to 1 somewhere in the beginning of the game"?

Can't wait to try it out  :smile:
 

Windyplains

Grandmaster Knight
WB
Best answers
0
Ørbæk said:
Sounds like a great kit  :grin:
I have some difficulties installing it though - "g_wp_tpe_active is not defined" whenever i launch the build module command.
How exactly do i "assign, 'g_wp_tpe_active' to 1 somewhere in the beginning of the game"?
You can add the line below in the "game_start" script in the module_scripts.py file.  Adding it anywhere as long as it isn't between a (try_begin / try_for_range) & (try_end) grouping should work fine.  I left it unassigned since many mod makers create their own system of toggling features on and off.

(assign, "$g_wp_tpe_active", 1),

Adding that will cause it to always be active.  If you have any other questions let me know.
 

Ørbæk

Regular
Best answers
0
Thanks for the quick answer - got that running now.


SyntaxError: invalid syntax - WP_TPE_weapon_ai = <      - Dunno what to do about that?  :oops:
                                                                        ^

Where do i place the  “WP_TPE_weapon_ai” trigger ? Can't seem to find tournament_triggers block, or simply adding it in directly - how do i do that? 


 

Bayard-X

Sergeant Knight at Arms
WB
Best answers
0
Lovely, just what I needed some time next. I'll wait for a couple of days and then I'll add it to the Renaissance Mod.  :grin:
 

Windyplains

Grandmaster Knight
WB
Best answers
0
Ørbæk said:
SyntaxError: invalid syntax - WP_TPE_weapon_ai = <      - Dunno what to do about that?  :oops:
Where do i place the  “WP_TPE_weapon_ai” trigger ? Can't seem to find tournament_triggers block, or simply adding it in directly - how do i do that?
Tournament_triggers should exist unless you're using a mod that has replaced it with something else.  So let's try that first.

[list type=decimal]
[*]Search for "tournament_triggers" in the module_mission_templates.py file.
[*]It should look like.
[/list]
Code:
tournament_triggers = [
  (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest"),
                                       (assign, "$g_arena_training_num_agents_spawned", 0)]),
  (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []),
  (ti_tab_pressed, 0, 0, [],
   [(try_begin),
      (eq, "$g_mt_mode", abm_visit),
      (set_trigger_result, 1),
    (else_try),
      (question_box,"str_give_up_fight"),
    (try_end),
    ]),
  (ti_question_answered, 0, 0, [],
   [(store_trigger_param_1,":answer"),
    (eq,":answer",0),
    (try_begin),
      (eq, "$g_mt_mode", abm_tournament),
      (call_script, "script_end_tournament_fight", 0),
    (else_try),
      (eq, "$g_mt_mode", abm_training),
      (get_player_agent_no, ":player_agent"),
      (agent_get_kill_count, "$g_arena_training_kills", ":player_agent", 1),#use this for conversation
    (try_end),
    (finish_mission,0),
    ]),
[*]Replace it with this.  Or just add the one line I commented where it is shown.
Code:
tournament_triggers = [
  (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest"),
                                       (assign, "$g_arena_training_num_agents_spawned", 0)]),
  (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []),
  WP_TPE_weapon_ai, # <--- PUT IT HERE.
  (ti_tab_pressed, 0, 0, [],
   [(try_begin),
      (eq, "$g_mt_mode", abm_visit),
      (set_trigger_result, 1),
    (else_try),
      (question_box,"str_give_up_fight"),
    (try_end),
    ]),
  (ti_question_answered, 0, 0, [],
   [(store_trigger_param_1,":answer"),
    (eq,":answer",0),
    (try_begin),
      (eq, "$g_mt_mode", abm_tournament),
      (call_script, "script_end_tournament_fight", 0),
    (else_try),
      (eq, "$g_mt_mode", abm_training),
      (get_player_agent_no, ":player_agent"),
      (agent_get_kill_count, "$g_arena_training_kills", ":player_agent", 1),#use this for conversation
    (try_end),
    (finish_mission,0),
    ]),
[/list]

IF you can't find tournament_triggers then try this:
[list type=decimal]
[*]In module_mission_templates.py -> search for "You enter a melee fight in the arena."
This should get you to the mission_template for arenas.  You'll see a bunch of lines that start like
"(3,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,".
[*]Scroll down a bit to the last of those.
[*]You should see a section of code like this.  Enter the line as shown below.
Code:
      (56, mtef_visitor_source|mtef_team_0, af_override_all, aif_start_alarmed, 1, [itm_practice_sword, itm_practice_shield, itm_padded_cloth, itm_segmented_helmet]),
      (57, mtef_visitor_source|mtef_team_0, af_override_all, aif_start_alarmed, 1, [itm_practice_sword, itm_practice_shield, itm_padded_cloth, itm_segmented_helmet]),
    ],
    tournament_triggers
    WP_TPE_weapon_ai,  #  <----- PUT IT HERE.  May or may not need that ',' since tournament_triggers didn't have one.
  ),

If either of those don't work let me know.
 

Bayard-X

Sergeant Knight at Arms
WB
Best answers
0
Windyplains, is there a way to reap only the benefits of the interaction with lords and ladies, towns and reputation? I'd be glad if I could put those social effects into the Renaissance Mod. Could you also specify how exactly it changes the social situation with lords and ladies.
 

Somebody

Code Pope
Baron
WBWF&S
Best answers
1
mnu_town_tournament_won – This should be inserted right at the beginning of this menu code replacing the three commented out lines at the bottom that grant renown & relation.  This code handles the relation gain with ladies, lords & the hosting town.  It is optional if that feature is undesired.
+1 if lord relation is already 10 or above, -1 if -5 or below. +1 to all ladies at the center, +3 if you are already courting.