Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

OrangeMohawk

Retail
Grenade Regeneration

8 posts in this topic

This is the Halo 4 version of Grenade Regeneration for Reach that I posted last night.
 
This uses the same logic as Reach's Grenade Regen, but we've got a bit more stuff to work with in Halo 4 (16 entries for a UDF, and Pulse grenades in this case), so it's just a bit different here.

  • Add these to the StringTable (Skip "Disabled" if your gametype already has it):
           <String name="Disabled">         <String>Disabled</String>       </String>       <String name="Grenade Regen Type">         <String>Grenade Regen Type</String>       </String>       <String name="Which grenades will be effected with Grenade Regeneration">         <String>Which grenades will be effected with Grenade Regeneration</String>       </String>       <String name="Grenade Regen Time">         <String>Grenade Regen Time</String>       </String>       <String name="How long it takes for grenades to regenerate.">         <String>How long it takes for grenades to regenerate.</String>       </String>       <String name="One Frag">         <String>One Frag</String>       </String>       <String name="One Plasma">         <String>One Plasma</String>       </String>       <String name="One Pulse">         <String>One Pulse</String>       </String>       <String name="One Frag, One Plasma">         <String>One Frag, One Plasma</String>       </String>       <String name="One Frag, One Pulse">         <String>One Frag, One Pulse</String>       </String>       <String name="One Plasma, One Pulse">         <String>One Plasma, One Pulse</String>       </String>       <String name="One of Each">         <String>One of Each</String>       </String>       <String name="Instant">         <String>Instant</String>       </String>       <String name="One Second">         <String>One Second</String>       </String>       <String name="Two Seconds">         <String>Two Seconds</String>       </String>       <String name="Three Seconds">         <String>Three Seconds</String>       </String>       <String name="Four Seconds">         <String>Four Seconds</String>       </String>       <String name="Five Seconds">         <String>Five Seconds</String>       </String>       <String name="Six Seconds">         <String>Six Seconds</String>       </String>       <String name="Seven Seconds">         <String>Seven Seconds</String>       </String>       <String name="Eight Seconds">         <String>Eight Seconds</String>       </String>       <String name="Nine Seconds">         <String>Nine Seconds</String>       </String>       <String name="Ten Seconds">         <String>Ten Seconds</String>       </String>       <String name="Fifteen Seconds">         <String>Fifteen Seconds</String>       </String>       <String name="Twenty Seconds">         <String>Twenty Seconds</String>       </String>       <String name="Thirty Seconds">         <String>Thirty Seconds</String>       </String>       <String name="One Minute">         <String>One Minute</String>       </String>
  • Add these to your UserDefinedOptions (Replacing String6 with your gametype's blank string):
          <entry nameIndex="Grenade Regen Type" descIndex="Which grenades will be effected with Grenade Regeneration" name="Grenade Regen Type" valueIndex="0">        <Values defaultIndex="0">          <entry nameIndex="Disabled" descIndex="String6" value="0" />          <entry nameIndex="One Frag" descIndex="String6" value="1" />          <entry nameIndex="One Plasma" descIndex="String6" value="2" />          <entry nameIndex="One Pulse" descIndex="String6" value="3" />          <entry nameIndex="One Frag, One Plasma" descIndex="String6" value="4" />          <entry nameIndex="One Frag, One Pulse" descIndex="String6" value="5" />          <entry nameIndex="One Plasma, One Pulse" descIndex="String6" value="6" />          <entry nameIndex="One of Each" descIndex="String6" value="7" />        </Values>      </entry>      <entry nameIndex="Grenade Regen Time" descIndex="How long it takes for grenades to regenerate." name="Grenade Regen Time" valueIndex="0">        <Values defaultIndex="0">          <entry nameIndex="Instant" descIndex="String6" value="0" />          <entry nameIndex="One Second" descIndex="String6" value="1" />          <entry nameIndex="Two Seconds" descIndex="String6" value="2" />          <entry nameIndex="Three Seconds" descIndex="String6" value="3" />          <entry nameIndex="Four Seconds" descIndex="String6" value="4" />          <entry nameIndex="Five Seconds" descIndex="String6" value="5" />          <entry nameIndex="Six Seconds" descIndex="String6" value="6" />          <entry nameIndex="Seven Seconds" descIndex="String6" value="7" />          <entry nameIndex="Eight Seconds" descIndex="String6" value="8" />          <entry nameIndex="Nine Seconds" descIndex="String6" value="9" />          <entry nameIndex="Ten Seconds" descIndex="String6" value="10" />          <entry nameIndex="Fifteen Seconds" descIndex="String6" value="15" />          <entry nameIndex="Twenty Seconds" descIndex="String6" value="20" />          <entry nameIndex="Thirty Seconds" descIndex="String6" value="30" />          <entry nameIndex="One Minute" descIndex="String6" value="60" />        </Values>      </entry>
  • Under PlayerVariables > Timers, add a new timer (in my example and in the code, it's called PlayerTimer0)
            <Var name="PlayerTimer0" varRefType="Int16">0</Var>
  • Add this trigger to your Triggers (This is in ksoft 5040 code, 4912 is at the bottom):
          <Trigger execMode="OnEachPlayer" name="GrenadeRegen">        <Elements>          <E type="Action" name="TimerRateSet">            <Param type="TimerReference" varRefType="Player.TimerVar" dataType="Iterator.Player">PlayerTimer0</Param>            <Param type="TimerRate">Minus100p</Param>          </E>          <E type="Condition" name="TimerIsZero">            <Param type="TimerReference" varRefType="Player.TimerVar" dataType="Iterator.Player">PlayerTimer0</Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="GrenadeRegen_Frag">                <Elements>                  <E type="Condition" name="Comparison">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">4</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">5</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">7</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="PlayerAdjustGrenades">                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                    <Param type="GrenadeType">Frag</Param>                    <Param type="OperationType">Add</Param>                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="GrenadeRegen_Plasma">                <Elements>                  <E type="Condition" name="Comparison">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">2</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">4</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">6</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">7</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="PlayerAdjustGrenades">                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                    <Param type="GrenadeType">Plasma</Param>                    <Param type="OperationType">Add</Param>                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="GrenadeRegen_Pulse">                <Elements>                  <E type="Condition" name="Comparison">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">3</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">5</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">6</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">7</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="PlayerAdjustGrenades">                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                    <Param type="GrenadeType">Pulse</Param>                    <Param type="OperationType">Add</Param>                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="VariableOperation">            <Param type="VarReference" varRefKind="Timer" varRefType="Player.TimerVar" dataType="Iterator.Player">PlayerTimer0</Param>            <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Time</Param>            <Param type="OperationType">Set</Param>          </E>        </Elements>      </Trigger>

And that's it! In Halo 4, the maximum count that the grenades will regenerate to is 2, rather than 4 as in Reach.

 

Example: Slayer (Had to remove a couple UDF's to make enough room)

 

Here's the trigger in ksoft 4912

      <Trigger execMode="OnEachPlayer" name="GrenadeRegen">        <Elements>          <E type="Action" name="TimerTick">            <Param type="TimerReference" varRefType="Player.TimerVar" dataType="Iterator.Player">PlayerTimer0</Param>            <Param type="UInt5">5</Param>          </E>          <E type="Condition" name="TimerIsZero" unionGroupID="-2">            <Param type="TimerReference" varRefType="Player.TimerVar" dataType="Iterator.Player">PlayerTimer0</Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="GrenadeRegen_Frag">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">4</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">5</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">7</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="PlayerAdjustGrenades">                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                    <Param type="GrenadeType">Frag</Param>                    <Param type="OperationType">Add</Param>                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="GrenadeRegen_Plasma">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">2</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">4</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">6</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">7</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="PlayerAdjustGrenades">                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                    <Param type="GrenadeType">Plasma</Param>                    <Param type="OperationType">Add</Param>                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" name="GrenadeRegen_Pulse">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">3</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">5</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">6</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Type</Param>                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">7</Param>                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="PlayerAdjustGrenades">                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                    <Param type="GrenadeType">Pulse</Param>                    <Param type="OperationType">Add</Param>                    <Param type="CustomReference" varRefType="Int16">1</Param>                  </E>                </Elements>              </T>            </Param>          </E>          <E type="Action" name="VariableOperation">            <Param type="VarReference" varRefKind="Timer" varRefType="Player.TimerVar" dataType="Iterator.Player">PlayerTimer0</Param>            <Param type="VarReference" varRefKind="Custom" varRefType="UserDefinedOption">Grenade Regen Time</Param>            <Param type="OperationType">Set</Param>          </E>        </Elements>      </Trigger>

Cosmic lightning and Pfeuff like this

Share this post


Link to post
Share on other sites

Does this make the pulse grenades actually regenerate. ? As the playertrait one that does this does not work.

Yes, I tested each of the settings in the UDF here, and they all worked as expected.

Cosmic lightning likes this

Share this post


Link to post
Share on other sites

Yes, I tested each of the settings in the UDF here, and they all worked as expected.

That is Really, Really, Cool. People would love this option in a popular game-type. Take the U mod for instance, they loved the regeneration of grenades mainly on it. lol.

Share this post


Link to post
Share on other sites

That is Really, Really, Cool. People would love this option in a popular game-type. Take the U mod for instance, they loved the regeneration of grenades mainly on it. lol.

What's the "U mod"? And I forgot to upload an example to the OP, so here's slayer with grenade regen. I also tried to upload the gametype to my fileshare but apparently I'm all out of Gold, so here's the raw .game for anyone interested.

Share this post


Link to post
Share on other sites

What's the "U mod"? And I forgot to upload an example to the OP, so here's slayer with grenade regen. I also tried to upload the gametype to my fileshare but apparently I'm all out of Gold, so here's the raw .game for anyone interested.

 

Just a Silly mod I made with horizon's game-type maker before ksoft.tool and I got cozy. Basically made the player bigger, faster, flood appearance, and camo with damage boost to make it look really creepy and have regenerating grenades via player trait access.

Hence why I did that. I'd show the youtube off but it kinda ruined it. But this will beast it up a bit, I give props to you. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now