I made a working item shop prefab in Halo 5!

Discussion in 'Halo and Forge Discussion' started by CrystalEggnog, Dec 13, 2016.

  1. CrystalEggnog

    CrystalEggnog Legendary

    Messages:
    17
    Likes Received:
    17
    Hey all, I haven't posted here or even been here in a while, so forgive me if someone else came up with something similar.

    I'm excited to present my project I've been working on these past two days; a working item shop! Due to certain...restrictions...I've had to make two different kinds: one for FFA modes, and one for team-based modes. I did my best to keep it as simple as possible, and have as little of a scripting footprint as possible. Please, give it a look, and provide feedback on what I did good on, and how to improve it!

    As of the time of this writing, Halo Waypoint seems to not want me to look at my own maps, so please forgive me for not linking the example maps here.

    I posted instructions on how to use these things on pastebin, but I'll also post it here as well.

    Instructions:
    ~~~ELEVENTH SNIPER'S GUIDE TO SHOP TEMPLATE PREFABS~~~

    Contents
    i)Intro
    ii)FFA Shop
    iii)Team Shop
    iv)Example Maps



    i)Intro

    Hello there, and thank you for taking time out of your day to take a look at my little project here. This guide is for the shop template prefabs I made in Halo 5: Guardians. In this guide, I'll explain how to set these items up, what they're used for, and the scripting logic behind them. You can find these prefabs on the content browser by searching my Gamertag (Eleventh Sniper) and finding "FFA Shop Template", and "Red/Blue Shop Template". Or, simply follow these links:

    https://www.halowaypoint.com/en-us/games/halo-5-guardians/xbox-one/forge-object-groups?lastModifiedFilter=Everything&sortOrder=BookmarkCount&page=1&gamertag=Eleventh Sniper#ugc_halo-5-guardians_xbox-one_forgeobject_Eleventh Sniper_7f452452-0811-49f5-8a54-e38492c7920a

    https://www.halowaypoint.com/en-us/games/halo-5-guardians/xbox-one/forge-object-groups?lastModifiedFilter=Everything&sortOrder=BookmarkCount&page=1&gamertag=Eleventh Sniper#ugc_halo-5-guardians_xbox-one_forgeobject_Eleventh Sniper_b7ef4ca5-4bda-4588-91df-2dcbedb05907

    https://www.halowaypoint.com/en-us/games/halo-5-guardians/xbox-one/forge-object-groups?lastModifiedFilter=Everything&sortOrder=BookmarkCount&page=1&gamertag=Eleventh Sniper#ugc_halo-5-guardians_xbox-one_forgeobject_Eleventh Sniper_9973189d-a90f-402c-9aa6-98466fa2f5e8



    ii)FFA Shop

    The FFA Shop Template prefab is useful for making shops and purchasables in a Free-For-All gametype. These can be placed in "safe zones", or the middle of the battlefield. Player points are used as currency, and are deducted when making a valid purchase. This can be used for puzzle games and maps, "sports" modes (Ex. Grifball) to provide a means of obtaining bonuses for yourself at the expense of points, or in straight-up deathmatch modes, where kills are counted by a separate, invisible counter that eventually brings about a means of ending the round.

    When you spawn the FFA Shop Template prefab, there will be two items: an interactable terminal and a script brain. Ungroup these items. The terminal will have four scripts attached to it. I will outline the purpose of these scripts below...

    SCRIPT 1
    This script, when activated by using the terminal, takes the total in-game points earned by the player, and produces a number unique to that player on their Alpha channel equal to their own score. This number is not inherently shared by other players; it is completely independent of other players' scores and Alpha number channel values. In other words, this script takes their points and turns it into POTENTIAL CURRENCY.

    SCRIPT 2
    This script compares the player's Alpha value to the Global Alpha value (outlined in SCRIPT 4). If the Global Alpha value is Greater Than the player's Alpha value, then a viable transaction has not been made, and a Negative sound will play for the player who interacted with the Terminal. No points on the scoreboard will be deducted, and the player's Alpha channel will not change. In other words, this scirpt manages invalid transactions.

    SCRIPT 3
    This script compares the player's Alpha value to the Global Alpha value (outlined in SCRIPT 4). If the Global Alpha value is Less Than or Equal To the player's Alpha value, then a valid transaction has been made, and the player's score will decrease by the amount defined in Action 1 (Default is 5). A Positive sound will play for the player who interacted with the Terminal. A message is then sent on the Alpha channel, which is up to the Cartographer to decide what to do with. In other words, this script manages valid transactions.

    SCRIPT 4
    This script sets the Global Alpha channel's default value at round start, which is used to gauge whether a player has sufficient "currency" to make a valid transaction (Default is 5). In other words, this script sets the price for that shop.

    THE SCRIPT BRAIN that is bundled with the Terminal is scripted to display a nav point upon itself. This can be customized to display different colors, words, and at what distance by editing SCRIPT 1 on the script brain.

    HOW TO SET UP
    Each individual shop MUST be set to it's own channels to function properly (Alpha, "Barvo", and so on). To make things simpler for yourself, be sure to set the channels for each shop to the same phonetic letter. This way, you aren't struggling to determine if this Romeo script goes with this Whiskey channel, and so forth.

    SCRIPT 1 must have the player's number channel set to a unique number channel in Action 1.
    SCRIPT 2 must have a Global number channel that matches the one in SCRIPT 4. SCRIPT 2 must also be comparing the Global value to the same player value as the one in SCRIPT 1.
    SCRIPT 3 must have a Global number channel that matches the one in SCRIPT 4. SCRIPT 3 must also be comparing the Global value to the same player value as the one in SCRIPT 1. Also, if you decide to have the transaction result in a message being sent/power being switched on, it's recommended that you change it's message/power channel to one that is unique to that terminal. Lastly, be sure to change the points being deducted to match the amount set in SCRIPT 4.
    SCRIPT 4 must have it's own Global number value channel. Finally, set the Global value to the "price" you would like to set for this shop.

    NOTE: FFA Shop Templates do not work for team-based gamemodes.



    iii)Team Shop

    IMPORTANT NOTE: The Red Shop Template utilizes "Alpha" channels by default, while the Blue Shop Template prefab utilizes "Barvo" channels by default. While reading below, keep this in mind as it may affect your scripting.

    The Team Shop Template prefab is useful for making shops and purchasables in a Team-Based gametype. These can be placed in "safe zones", or the middle of the battlefield. The team's collective pool of points are used as currency, and are deducted when making a valid purchase. This can be used for puzzle games and maps, "sports" modes (Ex. Grifball) to provide a means of obtaining bonuses for your team or yourself at the expense of points, or in straight-up deathmatch modes, where kills are counted by a separate, invisible counter that eventually brings about a means of ending the round.

    When you spawn the Team Shop Template prefab, there will be two items: an interactable terminal and a script brain. Ungroup these items. The terminal will have four scripts attached to it. I will outline the purpose of these scripts below...

    SCRIPT 1
    This script, when activated by using the terminal, takes the total in-game points earned by the player's team, and produces a number unique to that player on their Alpha/Barvo channel equal to their team's score. This number is not inherently shared by other players; it is completely independent of other teams'/players' scores and Alpha/Barvo number channel values. In other words, this script takes their team's points and turns it into POTENTIAL CURRENCY.

    SCRIPT 2
    This script compares the player's Alpha/Barvo value to the Global Alpha/Barvo value (outlined in SCRIPT 4). If the Global Alpha/Barvo value is Greater Than the player's Alpha value, then a viable transaction has not been made, and a Negative sound will play for the player who interacted with the Terminal. No points on the scoreboard will be deducted, and the player's Alpha channel will not change. In other words, this scirpt manages invalid transactions.

    SCRIPT 3
    This script compares the player's Alpha/Barvo value to the Global Alpha/Barvo value (outlined in SCRIPT 4). If the Global Alpha/Barvo value is Less Than or Equal To the player's Alpha/Barvo value, then a valid transaction has been made, and the player's team's score will decrease by the amount defined in Action 1 (Default is 5). A Positive sound will play for the player who interacted with the Terminal. A message is then sent on the Alpha/Barvo channel, which is up to the Cartographer to decide what to do with. In other words, this script manages valid transactions.

    SCRIPT 4
    This script sets the Global Alpha/Barvo channel's default value at round start, which is used to gauge whether a player has sufficient "currency" to make a valid transaction (Default is 5). In other words, this script sets the price for that shop.

    THE SCRIPT BRAIN that is bundled with the Terminal is scripted to display a nav point upon itself, but only to the related team. This can be customized to display different colors, words, and at what distance by editing SCRIPT 1 on the script brain.

    HOW TO SET UP
    Each individual shop MUST be set to it's own channels to function properly (Alpha, "Barvo", and so on). To make things simpler for yourself, be sure to set the channels for each shop to the same phonetic letter. This way, you aren't struggling to determine if this Romeo script goes with this Whiskey channel, and so forth.

    SCRIPT 1 must have the player's number channel set to a unique number channel in Action 1.
    SCRIPT 2 must have a Global number channel that matches the one in SCRIPT 4. SCRIPT 2 must also be comparing the Global value to the same player value as the one in SCRIPT 1.
    SCRIPT 3 must have a Global number channel that matches the one in SCRIPT 4. SCRIPT 3 must also be comparing the Global value to the same player value as the one in SCRIPT 1. Also, if you decide to have the transaction result in a message being sent/power being switched on, it's recommended that you change it's message/power channel to one that is unique to that terminal. Lastly, be sure to change the points being deducted to match the amount set in SCRIPT 4.
    SCRIPT 4 must have it's own Global number value channel. Finally, set the Global value to the "price" you would like to set for this shop.

    Note: Team Shop Templates do not work for FFA gamemodes.



    iv)Example Maps

    For examples on how to set these up to have different prices, channels, team affiliations, and "products sold", look for my "FFA Shop Prototype" and "Team Shop Prototype" maps in the content browser (Once again, my Gamertag is Eleventh Sniper). Please note that the FFA map only works for FFA modes, and the Team map only works for team modes.

    Ultimately, the choice is up to you as to what you do with these. Buy a weapon or vehicle! Spawn barriers around your base! Blind the enemy team with super-dark filters! Purchase armor abilities and buffs with the player traits system! The possibilities are endless....
    http://pastebin.com/6nVHrvfE

    In the example maps, the green terminal adds one point to your score every time you press it. The keypad next to it will reset your score and despawn all previous "purchases".

    FFA Shop Template
    Red Shop Template
    Blue Shop Template


    Thank you for taking a look!

    EDIT: Oh, and by the way, my GT is Eleventh Sniper.
     
    #1 CrystalEggnog, Dec 13, 2016
    Last edited: Dec 13, 2016
  2. Ascend Hyperion

    Ascend Hyperion The Homeslice
    Staff Member Forge Critic

    Messages:
    1,099
    Likes Received:
    3,062
    This seems really wicked! I'd love to see these in action. Are the maps you provided fully functional maps or do you still need maps to test the shops on?
     
  3. CrystalEggnog

    CrystalEggnog Legendary

    Messages:
    17
    Likes Received:
    17
    They are simple demo maps. As far as functional maps go, I've been tossing some ideas around in my head, but haven't settled on anything yet.

    Hilariously enough, I already have you on my friend's list because I wanted to see that desert canvas you made forever ago. Maybe we could put forth a joint effort?
     
  4. CrystalEggnog

    CrystalEggnog Legendary

    Messages:
    17
    Likes Received:
    17
    Ironing out an issue Ascend pointed out to me. I have a working solution, but my hope is to get it working in such a way that it'll leave less of a "footprint" on the global number channels.

    I do have a repeating shop setup now, Ascend. Come take a look when you get the chance.
     
    Ascend Hyperion likes this.

Share This Page