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.

Sign in to follow this  
Followers 0
7ime

Retail
Trait Zones

7 posts in this topic

Here's another long over due tutorial, this time on making trait zones.

 

This was written with an earlier version than 5040.

You may or may not need to change the widget number depending on if your gametype already uses Widget0.

It is also worth noting that only 4 traits can be shown within the gametype's options.

 

 

1.  Add this to the StringTable:

      <String name="Alpha Traits">        <English>[Alpha: 0] Trait Zone Traits</English>        <Japanese>[Alpha: 0] 形質ゾーンの特徴</Japanese>        <German>[Alpha: 0] Merkmal Zone Merkmale</German>        <French>[Alpha: 0] Caractéristiques du caractère zone</French>        <Spanish>[Alpha: 0] Rasgos de la zona de rasgo</Spanish>        <Mexican>[Alpha: 0] Rasgos de la zona de rasgo</Mexican>        <Italian>[Alpha: 0] Tratti di zona del tratto</Italian>        <Korean>[Alpha: 0] 기능 영역 기능</Korean>        <ChineseTrad>[Alpha: 0] 功能區功能</ChineseTrad>        <Portuguese>[Alpha: 0] Traços da área recursos</Portuguese>      </String>      <String name="Bravo Traits">        <English>[Bravo: 1] Trait Zone Traits</English>        <Japanese>[Bravo: 1] 形質ゾーンの特徴</Japanese>        <German>[Bravo: 1] Merkmal Zone Merkmale</German>        <French>[Bravo: 1] Caractéristiques du caractère zone</French>        <Spanish>[Bravo: 1] Rasgos de la zona de rasgo</Spanish>        <Mexican>[Bravo: 1] Rasgos de la zona de rasgo</Mexican>        <Italian>[Bravo: 1] Tratti di zona del tratto</Italian>        <Korean>[Bravo: 1] 기능 영역 기능</Korean>        <ChineseTrad>[Bravo: 1] 功能區功能</ChineseTrad>        <Portuguese>[Bravo: 1] Traços da área recursos</Portuguese>      </String>      <String name="Trait Zone Desc">        <English>Traits applied to players within a Trait Zone.</English>        <Japanese>形質ゾーン内のプレーヤーに適用される特性。</Japanese>        <German>Merkmale, die auf Spieler innerhalb einer Trait-Zone angewendet.</German>        <French>Caractéristiques appliquées aux joueurs au sein d'une Zone de Trait des traits.</French>        <Spanish>Rasgos aplicados a los jugadores dentro de una zona de rasgo.</Spanish>        <Mexican>Rasgos aplicados a los jugadores dentro de una zona de rasgo.</Mexican>        <Italian>Elementi applicati ai giocatori all'interno di una zona caratteristica</Italian>        <Korean>특성 특성 영역 내에서 플레이어에 게 적용 합니다.</Korean>        <ChineseTrad>應用於球員特質區域內的性狀。</ChineseTrad>        <Portuguese>Traços aplicados a jogadores dentro de uma zona de traço.</Portuguese>      </String>
      <String name="Traits Applied">        <English>Traits Applied</English>        <Japanese>適用の特徴</Japanese>        <German>Merkmale Angewendet</German>        <French>Appliquée des traits</French>        <Spanish>Rasgos Aplicados</Spanish>        <Mexican>Rasgos Aplicados</Mexican>        <Italian>Tratti Applicati</Italian>        <Korean>특성 적용</Korean>        <ChineseTrad>應用特性</ChineseTrad>        <Portuguese>Traços Aplicados</Portuguese>      </String>

2.  Add this to the PlayerTraits:

      <entry nameIndex="Alpha Traits" descIndex="Trait Zone Desc" name="Alpha Trait Zone" />      <entry nameIndex="Bravo Traits" descIndex="Trait Zone Desc" name="Bravo Trait Zone" /> 

3.  Add this to the HudWidgets:

      <Widget position="4" name="Widget0" /> 

4.  Add this to the ObjectFilters:

      <Filter labelIndex="trait_zone" name="trait_zone"></Filter>

5.  Add this to the Triggers:

      <Trigger execMode="OnEachPlayer" name="TriggerWidgets">        <Elements>          <E type="Action" name="WidgetSetText">            <Param type="Widget">Widget0</Param>            <Param type="Tokens2" stringIndex="Traits Applied"></Param>          </E>          <E type="Action" name="WidgetSetPlayerVisibility">            <Param type="Widget">Widget0</Param>            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />            <Param type="Bool">False</Param>          </E>        </Elements>      </Trigger>      <Trigger execMode="OnObjectFilter" name="TriggerTraitZone" objectFilter="trait_zone">        <Elements>          <E type="Action" name="ObjectSetUnknownFilter">            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />            <Param type="EntityFilter" filterType="Any" />          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" execMode="OnEachPlayer" name="TriggerTraitZone_Sub1">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Team" varRefType="Object.OwnerTeam" dataType="Iterator.Object" />                    <Param type="VarReference" varRefKind="Team" varRefType="Player.OwnerTeam" dataType="Iterator.Player" />                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Team" varRefType="Object.OwnerTeam" dataType="Iterator.Object" />                    <Param type="VarReference" varRefKind="Team" varRefType="ExplicitTeamType" dataType="TeamNeutral" />                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="ObjectIsInBoundary" unionGroupID="-2">                    <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub1">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ApplyPlayerTraits">                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                            <Param type="PlayerTraitsReference">Alpha Trait Zone</Param>                          </E>                          <E type="Action" name="WidgetSetPlayerVisibility">                            <Param type="Widget">Widget0</Param>                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                            <Param type="Bool">True</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub2">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ApplyPlayerTraits">                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                            <Param type="PlayerTraitsReference">Bravo Trait Zone</Param>                          </E>                          <E type="Action" name="WidgetSetPlayerVisibility">                            <Param type="Widget">Widget0</Param>                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                            <Param type="Bool">True</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                </Elements>              </T>            </Param>          </E>        </Elements>      </Trigger>
Edited by 7ime

Share this post


Link to post
Share on other sites

Can the trait zones be applied to players, or objects (such as objectives, weapons & armor abilities)? Also, how many of these traits could we possibly have in the gametype?

Share this post


Link to post
Share on other sites

Can the trait zones be applied to players, or objects (such as objectives, weapons & armor abilities)? Also, how many of these traits could we possibly have in the gametype?

They're player traits but the object filter must be on an object and have a zone currently, however I may actually change it up so that the owner of the object gets the traits without having to have a zone on the object now that you mention it.  Technically you can add sixteen player traits to a gametype but only a max of four will actually show up in the gametype options in game.

 

I hope this helps.

Pfeuff and Cosmic lightning like this

Share this post


Link to post
Share on other sites

They're player traits but the object filter must be on an object and have a zone currently, however I may actually change it up so that the owner of the object gets the traits without having to have a zone on the object now that you mention it.  Technically you can add sixteen player traits to a gametype but only a max of four will actually show up in the gametype options in game.

 

I hope this helps.

 

Wonder why the Max of 4 showing in menu. Kinda a pain I think. Oh Well. 

Share this post


Link to post
Share on other sites

Well, you could possibly have traits apply when and object is picked up, and apply a trait zone at the same time... then have a user defined option to disable the zone, as well as change the size/radius.

 

I currently have a H4 gametype in development which uses these kind of traits. Thought I might work on a similar version for Reach as well, if doable.

Edited by Pfeuff

Share this post


Link to post
Share on other sites

Again, I'm not too sure that there is really much interest left in this but in case there is somebody out there, here is where my trait_zone filter ended.

 

First off, this code adds one more trait and allows traits to be applied to weapons and armor abilities without zones.  So when a player picks up a weapon with the label but without a zone, they will automatically receive the traits assuming their teams match.  It is necessary to note however that armor abilities automatically have zones so you'll actually need to set the zone of an armor ability to a sphere and then set all of the parameters to zero for this to work.

 

You'll want to replace step five from the original post with this updated trigger.

<Trigger execMode="OnObjectFilter" name="TriggerTraitZone" objectFilter="trait_zone">        <Elements>          <E type="Action" name="ObjectSetBoundaryVisibilityFilter">            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />            <Param type="EntityFilter" filterType="Any" />          </E>          <E type="Action" name="ActivateTrigger">            <Param type="TriggerReference">              <T type="Trigger" trigType="Subroutine" execMode="OnEachPlayer" name="TriggerTraitZone_Sub1">                <Elements>                  <E type="Condition" name="Comparison" unionGroupID="-2">                    <Param type="VarReference" varRefKind="Team" varRefType="Object.OwnerTeam" dataType="Iterator.Object" />                    <Param type="VarReference" varRefKind="Team" varRefType="Player.OwnerTeam" dataType="Iterator.Player" />                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Condition" name="Comparison" unionGroupID="-3">                    <Param type="VarReference" varRefKind="Team" varRefType="Object.OwnerTeam" dataType="Iterator.Object" />                    <Param type="VarReference" varRefKind="Team" varRefType="ExplicitTeamType" dataType="TeamNeutral" />                    <Param type="ComparisonType">Equal</Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub1">                        <Elements>                          <E type="Action" name="ItemGetOwnerPlayer">                            <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object" />                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="GlobalPlayer1" />                          </E>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Player" varRefType="ExplicitPlayerType" dataType="GlobalPlayer1" />                            <Param type="VarReference" varRefKind="Player" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ActivateTrigger">                            <Param type="TriggerReference">                              <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub1">                                <Elements>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                                    <Param type="ComparisonType">Equal</Param>                                  </E>                                  <E type="Action" name="ApplyPlayerTraits">                                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                                    <Param type="PlayerTraitsReference">Alpha Trait Zone</Param>                                  </E>                                  <E type="Action" name="WidgetSetPlayerVisibility">                                    <Param type="Widget">Widget0</Param>                                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                                    <Param type="Bool">True</Param>                                  </E>                                </Elements>                              </T>                            </Param>                          </E>                          <E type="Action" name="ActivateTrigger">                            <Param type="TriggerReference">                              <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub1">                                <Elements>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                                    <Param type="ComparisonType">Equal</Param>                                  </E>                                  <E type="Action" name="ApplyPlayerTraits">                                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                                    <Param type="PlayerTraitsReference">Bravo Trait Zone</Param>                                  </E>                                  <E type="Action" name="WidgetSetPlayerVisibility">                                    <Param type="Widget">Widget0</Param>                                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                                    <Param type="Bool">True</Param>                                  </E>                                </Elements>                              </T>                            </Param>                          </E>                          <E type="Action" name="ActivateTrigger">                            <Param type="TriggerReference">                              <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub2">                                <Elements>                                  <E type="Condition" name="Comparison" unionGroupID="-2">                                    <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                                    <Param type="VarReference" varRefKind="Custom" varRefType="Int16">2</Param>                                    <Param type="ComparisonType">Equal</Param>                                  </E>                                  <E type="Action" name="ApplyPlayerTraits">                                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                                    <Param type="PlayerTraitsReference">Charlie Trait Zone</Param>                                  </E>                                  <E type="Action" name="WidgetSetPlayerVisibility">                                    <Param type="Widget">Widget0</Param>                                    <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                                    <Param type="Bool">True</Param>                                  </E>                                </Elements>                              </T>                            </Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                  <E type="Condition" name="ObjectIsInBoundary" unionGroupID="-2">                    <Param type="ObjectReference" varRefType="Player.SlaveObject" dataType="Iterator.Player"></Param>                    <Param type="ObjectReference" varRefType="ExplicitObjectType" dataType="Iterator.Object"></Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub1">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">0</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ApplyPlayerTraits">                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                            <Param type="PlayerTraitsReference">Alpha Trait Zone</Param>                          </E>                          <E type="Action" name="WidgetSetPlayerVisibility">                            <Param type="Widget">Widget0</Param>                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                            <Param type="Bool">True</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub2">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">1</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ApplyPlayerTraits">                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                            <Param type="PlayerTraitsReference">Bravo Trait Zone</Param>                          </E>                          <E type="Action" name="WidgetSetPlayerVisibility">                            <Param type="Widget">Widget0</Param>                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                            <Param type="Bool">True</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                  <E type="Action" name="ActivateTrigger">                    <Param type="TriggerReference">                      <T type="Trigger" trigType="Subroutine" name="TriggerTraitZone_Sub1_Sub3">                        <Elements>                          <E type="Condition" name="Comparison" unionGroupID="-2">                            <Param type="VarReference" varRefKind="Custom" varRefType="SpawnSequence" dataType="Iterator.Object" />                            <Param type="VarReference" varRefKind="Custom" varRefType="Int16">2</Param>                            <Param type="ComparisonType">Equal</Param>                          </E>                          <E type="Action" name="ApplyPlayerTraits">                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player"></Param>                            <Param type="PlayerTraitsReference">Charlie Trait Zone</Param>                          </E>                          <E type="Action" name="WidgetSetPlayerVisibility">                            <Param type="Widget">Widget0</Param>                            <Param type="PlayerReference" varRefType="ExplicitPlayerType" dataType="Iterator.Player" />                            <Param type="Bool">True</Param>                          </E>                        </Elements>                      </T>                    </Param>                  </E>                </Elements>              </T>            </Param>          </E>        </Elements>      </Trigger>

You'll also need to add the following to the string table:

      <String name="Charlie Traits">        <English>[Charlie: 2] Trait Zone Traits</English>        <Japanese>[Charlie: 2] 形質ゾーンの特徴</Japanese>        <German>[Charlie: 2] Merkmal Zone Merkmale</German>        <French>[Charlie: 2] Caractéristiques du caractère zone</French>        <Spanish>[Charlie: 2] Rasgos de la zona de rasgo</Spanish>        <Mexican>[Charlie: 2] Rasgos de la zona de rasgo</Mexican>        <Italian>[Charlie: 2] Tratti di zona del tratto</Italian>        <Korean>[Charlie: 2] 기능 영역 기능</Korean>        <ChineseTrad>[Charlie: 2] 功能區功能</ChineseTrad>        <Portuguese>[Charlie: 2] Traços da área recursos</Portuguese>      </String>

Along with the following under player traits:

      <entry nameIndex="Charlie Traits" descIndex="Trait Zone Desc" name="Charlie Trait Zone" />
OrangeMohawk and Pfeuff like this

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
Sign in to follow this  
Followers 0