SC2Mapster Forums

Development > Triggers

Help with Diablo Attribute Type System

  • 11 posts
    #1 Dec 02, 2012 at 08:03 UTC - 0 likes

    Hiya guys, I've recently been playing with the ^ asset and managed to copy it into a little map.

    My map includes a hero, with 4 rpg like attributes called psi, core, void, and force. Upon level up, I'm supposed to gain 5 attribute points which I can spend, but for some reason the max count for the attributes points are stuck at 5, and the dialog label number indicating how many attributes I have left to spend doesn't quite fit in the dialog box.

    Here are the triggers that manipulate the attributes upon level up and use.

    Melee Initialization
        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Camera - Pan the camera for player 1 to (Position of Scythe [134.19, 110.38]) over 0.0 seconds with Existing Velocity% initial velocity, 10.0% deceleration, and Do Not use smart panning
            Visibility - Create a visibility revealer for player 1 within (Playable map area)
            Unit - Create one Psi item in the inventory of Scythe [134.19, 110.38]
            Unit - Create one Core item in the inventory of Scythe [134.19, 110.38]
            Unit - Create one Void item in the inventory of Scythe [134.19, 110.38]
            Unit - Create one Force item in the inventory of Scythe [134.19, 110.38]
            UI - Display boss bar 1 with title "Droney", portrait Assets/Textures/zergdronenormal.dds and maximum value (Integer((Droney [152.27, 120.57] Life (Default)))) for (All players)
            UI - Set boss bar 1 boss to Droney [152.27, 120.57] (Do refresh the boss bar)
    
    Hero Leveling Trigger
        Events
            Unit - Any Unit gains an experience level
        Local Variables
        Conditions
        Actions
            Unit - Add 5 Attrpoints to (Triggering unit) from (Triggering unit)
    
    Remove charge of Attrpoints
        Events
            Unit - Any Unit attribute points changed
        Local Variables
        Conditions
        Actions
            Unit - Remove 1 Attrpoints from (Triggering unit)
    
    Heroattributebox
        Events
            ------- After 2 seconds pass make the Box.
            Timer - Elapsed time is 1.0 Game Time seconds
        Local Variables
        Conditions
        Actions
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    Dialog - Create a Modal dialog of size (150, 75) at (350, 350) relative to Center of screen
                    Variable - Set Attrpointdialog[(Player 1 from (Active Players))][0] = (Last created dialog)
                    Dialog - Create a Label for dialog Attrpointdialog[(Player 1 from (Active Players))][0]
                    Variable - Set Attrpointdialogitem[(Player 1 from (Active Players))][0] = (Last created dialog item)
                    Dialog - Set Attrpointdialogitem[(Player 1 from (Active Players))][0] text to "0" for (Active Players)
                    Dialog - Set Attrpointdialogitem[(Player 1 from (Active Players))][0] tooltip to "How many Attribute Points you have ..." for (Active Players)
                    Dialog - Show Attrpointdialog[(Player 1 from (Active Players))][0] for (Active Players)
                    Dialog - Show Attrpointdialogitem[(Player 1 from (Active Players))][0] for (Active Players)
    
    checkstats
        Events
            Unit - Any Unit gains an experience level
        Local Variables
        Conditions
        Actions
            Variable - Set Attrpointremainingpoints[(Triggering player)][0] = (Stack count of Attrpoints on (Triggering unit))
            Variable - Set AttrpointText[(Triggering player)][0] = (Text(Attrpointremainingpoints[(Triggering player)][0]))
            Dialog - Set Attrpointdialogitem[(Triggering player)][0] text to AttrpointText[(Triggering player)][0] for (Player group((Triggering player)))
    
    checkstats 2
        Events
            Unit - Any Unit attribute points changed
        Local Variables
        Conditions
        Actions
            Variable - Set Attrpointremainingpoints[(Triggering player)][0] = (Stack count of Attrpoints on (Triggering unit))
            Variable - Set AttrpointText[(Triggering player)][0] = (Text(Attrpointremainingpoints[(Triggering player)][0]))
            Dialog - Set Attrpointdialogitem[(Triggering player)][0] text to AttrpointText[(Triggering player)][0] for (Player group((Triggering player)))
    

    I also have a bit of trouble understanding how to control the inventory spaces for containers. If someone can help me a bit here - that would be great.

    Last edited Dec 02, 2012 by msong7229
    #2 Dec 03, 2012 at 09:21 UTC - 0 likes

    @msong7229: Go

    In my opinion if a library forces you to do this much work but you cannot get it to work off the bat you should code a system yourself.

    Barring that, what asset are you using? Your description is rather vague.

    #3 Dec 03, 2012 at 11:47 UTC - 0 likes

    I have made a system like this... and then remade it to be much more efficient. Here is a video which includes it:

    <iframe width="420" height="315" src="http://www.youtube.com/embed/xo9RHoPar78" frameborder="0" allowfullscreen></iframe>

    If that is what you are looking for in concept; then I can send you the system; it is pretty customizable, and can be copy/pasted without too much effort.

    #4 Dec 03, 2012 at 19:11 UTC - 0 likes
    Quote from Yaksmanofage: Go

    @msong7229: Go

    In my opinion if a library forces you to do this much work but you cannot get it to work off the bat you should code a system yourself.

    Barring that, what asset are you using? Your description is rather vague.

    The asset is literally called, Diablo Attribute Type System lol.

    Quote from GlornII: Go

    I have made a system like this... and then remade it to be much more efficient. Here is a video which includes it:

    <iframe width="420" height="315" src="http://www.youtube.com/embed/xo9RHoPar78" frameborder="0" allowfullscreen></iframe>

    If that is what you are looking for in concept; then I can send you the system; it is pretty customizable, and can be copy/pasted without too much effort.

    Woah nice map there, I used to play that in wc3 years years back lol.

    OT: Yea that is kind of what I'm looking for. IT would be great if i can get a copy, except I'm pretty bad with dialogs. If anyone's played Dragon Quest RPG - it's one of the top played rpg systems on arcade - The system that game uses to upgrade attribute points, is exactly what I'm looking for. On leveling up your character, you get attribute points that you can use to upgrade the behaviors (i.e. str, agi) on your unit.

    Last edited Dec 03, 2012 by msong7229
    #5 Dec 05, 2012 at 09:21 UTC - 0 likes

    @msong7229: Go

    Not to belittle your attribute idea, but a more balanced approach (in my opinion) is to add 1 point towards each attribute when the hero levels then the player chooses where to add 2 or 3 extra points whether he or she wishes to spread it around or all in one.

    I am making a sort of third-person-shooter Black Ops 2 Zombie survival with a StarCraft II Left 2 Die theme. I have nearly everything crucial completed such as the Traceline and lag-less movement (camera restrictions and fog play a huge part).

    #6 Dec 08, 2012 at 01:51 UTC - 0 likes

    @admielke: Go

    lol npnp, thanks for he advice - but those are just numbers that i can fix later.. i can't even get this to work, there are no tutorials or assets that i can look at it to see how its done :/ I'm just interested in how to make a rpg like attribute system. http://www.sc2mapster.com/assets/diablo-attribute-system/ here's the link to the original

    Last edited Dec 08, 2012 by msong7229
    #7 Dec 08, 2012 at 15:21 UTC - 1 like

    @msong7229: Go

    I could most likely create a system like this pretty fast with a dialog. You will just have to create 5 global integer variables with array room enough for each player (16). 1 for the Attribute Points Remaining to spend. and then 4, 1 for each attribute.

    Then create a trigger that increases the Attribute Points Remaining by 5 when your unit gains an expirience level.

    Then you will have to create 4 buff behaviors (1 for each attribute) that each will increase the coresponding attribute by 1, make it stack as many times as possible.

    Then you will have to create a dialog with 4 buttons, 1 for each attribute. Then make the buttons add the attribute to the unit when a player uses the button, and increase the amount of the global variable coresponding to attribute, with 1. You will have to add a condition that checks if the Attribute Points Remaining is higher than 0.

    Then you could also add a label that displays the amount of attribute points remaining, and maybe make the dialog toggle able with a button, or a hotkey.

    This will only work for 1 unit for each player though.

    I can make it for you, but I want to know if you can use it before I make it though ;)

    #8 Dec 09, 2012 at 16:53 UTC - 0 likes
    Quote from Demtrod: Go

    @msong7229: Go

    I could most likely create a system like this pretty fast with a dialog. You will just have to create 5 global integer variables with array room enough for each player (16). 1 for the Attribute Points Remaining to spend. and then 4, 1 for each attribute.

    Then create a trigger that increases the Attribute Points Remaining by 5 when your unit gains an expirience level.

    Then you will have to create 4 buff behaviors (1 for each attribute) that each will increase the coresponding attribute by 1, make it stack as many times as possible.

    Then you will have to create a dialog with 4 buttons, 1 for each attribute. Then make the buttons add the attribute to the unit when a player uses the button, and increase the amount of the global variable coresponding to attribute, with 1. You will have to add a condition that checks if the Attribute Points Remaining is higher than 0.

    Then you could also add a label that displays the amount of attribute points remaining, and maybe make the dialog toggle able with a button, or a hotkey.

    This will only work for 1 unit for each player though.

    I can make it for you, but I want to know if you can use it before I make it though ;)

    EDIT: That would be great.. Maybe you can make a tut on this or something. What do you mean if I can use it?

    Last edited Dec 09, 2012 by msong7229
    #9 Dec 09, 2012 at 20:03 UTC - 0 likes

    @msong7229: Go

    I mean that if this is not the kind of system you need, I dont want to waste time creating it ;)

    NOTE: The system I'm making will only work for 1 unit per player, btw.

    Last edited Dec 09, 2012 by Demtrod
    #10 Dec 09, 2012 at 20:25 UTC - 0 likes

    @Demtrod: Go

    Yea of course I will be using it - It's just what I need! :D

    #11 Dec 09, 2012 at 22:23 UTC - 0 likes

    @msong7229: Go

    http://www.thehelper.net/threads/diablo-style-stat-system.157925/

    Here you go ;) I'll post it on SC2Mapster aswell, but that will be tomorrow.

    Last edited Dec 09, 2012 by Demtrod
  • 11 posts

You must login to post a comment. Don't have an account? Register to get one!