Announcement

Collapse
No announcement yet.

Equal Opportunity Stat Gains

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Equal Opportunity Stat Gains

    This script will allow modders to add their own characters to stat gain events. Like the HP increase gotten from Hell to Pay and the Magic increase mages get from Eulania Relationship reward.

    If a modder is code savvy enough they can even use it to add their own stat gain events. And as an example I've made it possible to add characters to my Neopolitan mod's Luck gain during winter wonderland.

    ***For Players***
    If you are just here to get the mod because another modder sent you here, simply download Equal Opportunity Stat Gains v1.zip and install as usuall

    Compatible Mods
    Install instructions:
    1. Download the mod from the link below
    2. Unzip this file into your /HaremCollector_vxxx folder
    3. Play the game and enjoy the mod

    Mega Download Link

    ***For Modders***

    Adding Party Members to the rotations
    If you are here to use this script to add your character to the stat gain rotation. You can either download the Stats addon guide.txt for an explanation or continue reading here:
    Code:
    #--------------------------------------------------------------------------
    # Adding a character to the rotation is fairly easy. It's got two argument
    # the id of character in the database, and whether or not the character
    # is a mage (Because Eulania gives all mages a +2 in magic). Mage example:
    # $equal_stat[:therese]={:id => 2, :mage => true} unless $equal_stat[:therese]
    # Non-mage example
    # $equal_stat[:hero]={:id => 1} unless $equal_stat[:hero]
    # you also need to give it a unique KEY. In the examples shown above it was
    # :therese and :hero
    # THIS NEEDS TO BE A LOAD IN SCRIPT. PUT IT IN: Mods/Data/Scripts
    #--------------------------------------------------------------------------
    
    $equal_stat[:KEY]={:id => ID, :mage => true} unless $equal_stat[:KEY]
    $equal_stat[:KEY]={:id => ID} unless $equal_stat[:KEY]

    Adding your own stat rotations
    If you are here to use this script to add your own stat rotations. You can either download the New stat rotation guide for an explanation or continue reading here:
    Code:
    #--------------------------------------------------------------------------
    # Okay this is a bit complicated. There are 3 steps to and we'll take it
    # 1 step at a time. First step is created that actual stat gaining function
    # This function can be named whatever you want, so long as it's unique. And
    # There is no need to Alias anything. Example:
    # def example_stat_gain
    # $equal_stat.each do |key, actor|
    # $game_actors[actor[:id]].add_param(1, 100) unless actor[:example]
    # $equal_stat[key][:example] = true
    # end
    # end
    # The unless actor[:example] and the line that sets it to true are very
    # important. It prevents the same girl to be recycled multiple times, when
    # girls are give stats retroactively
    # In this case I add 100 MMP. A list of stat IDs can be found in my toolbox
    # Other conditions can be added to the unless if needed. Like for example the
    # :mage symbol. Keep in mind if you add more symbols like :archer, other modded
    # characters won't be limited unless you add that symbol to them yourself
    # or the mods owner does it on their end. Last I recommend not adding basegame
    # Party members to the $equal_stat hash as that could let them get double benefits
    # from the base code, unless you add the needed locked symbols to them yourself
    #--------------------------------------------------------------------------
    
    def FUNCTION_NAME
      $equal_stat.each do |key, actor|
        $game_actors[actor[:id]].add_param(STAT_ID, VALUE) unless actor[:SYMBOL]
        $equal_stat[key][:SYMBOL] = true
      end
    end
    
    #--------------------------------------------------------------------------
    # Secondly you need some way to run the stat gain naturally. If you do this
    # via events in your own mod. Great you can completely skip this step.
    # but if you need it to happen with base game events you may need other ways
    # here are two examples I think will work the best, but any way to trigger it is fine
    # first is via variable change: #  class Game_Interpreter
    #   alias example_variable operate_variable
    #   def operate_variable(variable_id, operation_type, value)
    #     example_variable(variable_id, operation_type, value)
    #     example_stat_gain if variable_id == 666 && $game_variables[666] == 69
    #   end
    # end
    # This runs the example stat gain from step one, when the variable 666 gets
    # set to 69
    #
    # Next up is switch changing:
    # class Game_Switches
      #   alias example_switch []=
    #   def []=(switch_id, value)
    #   example_switch(switch_id, value)
    #   example_stat_gain if switch_id == 666 && value == true
    #   end
    # end
    # This runs the example stat gain from step one, when the switch 666 gets set to true
    #--------------------------------------------------------------------------
    
    #--------------------------------------------------------------------------
    # Last step is adding it to the retroactive functionality:
    # alias example_retro run_all_eso
    # def run_all_eso
    # example_retro
    # example_stat_gain if $game_variables[666] >= 69
    # end
    # So yeah this is just a standard alias and you need to add a condition
    # for when you retroactive would be allowed to be run. This could for example
    # be a variable or switch that would mean a quest has been finished.
    #--------------------------------------------------------------------------
    
    alias ALIAS_NAME run_all_eso
      def run_all_eso
      ALIAS_NAME
      FUNCTION_NAME if CONDITION
    end
    You are free to include the Equal Opportunity Stat Gains script itself in your mod, I however suggest not doing so, because I might update or bugfix the original code. So if you included it in yours, you would have to update aswell or your mod would revert it back. Instead I'd suggest just referring people to this page instead
    Last edited by RomeoPapa; 12-17-2022, 02:33 AM.

  • #2
    Now has a Mega Link

    Comment

    Working...
    X