• 0

    posted a message on Hero attribute system help

    I'm not sure if you've solved this already but I figured I'd put my method of handling this here just in case. Are you keeping track of attribute points in triggers? I set up my system entirely with triggers except for the attributes and attribute buffs. Here’s how.

    Leveling folder
        Variable – Int – P1 Attribute Points
        <Duplicates for all players>
        Variable – Int – P1 Strength
        Variable – Int – P1 Intelligence
        Variable – Int – P1 Vitality
        Variable – Int – P1 Agility
        Variable – Int – P1 Dexterity
        <Duplicates for all players>
        Variable – Dialog Item – Str Count Label
        <Duplicates for all Attributes>
        Variable – Dialog Item – Str Add Btn
        <Duplicates for all Attributes>
        Variable – Dialog Item – Close Btn
        Variable – Dialog Item – Attribute Point Count
        Variable – Dialog – Attribute Dialog

        Trigger – Points for leveling
            Events
                Unit – any Unit gains an experience level
            Local Variables
            Conditions
            Actions
                General – If (Conditions) then do multiple (Acions)
                    If Then Else
                        General – Else if (Conditions) Then do (Actions)
                            Else if
                                (Owner of (Triggering Unit)) == 1
                            Then
                                Variable – Modify P1 Attribute Points: + 10
                        <Duplicates for all players>

        Trigger – Attribute Dialog
            Create a dialog and set Variable – Dialog – Attribute Dialog to it
            Create a dialog label to display the number of attribute points and set it to Variable – Dialog Item –                   Attribute Point Count
            Create labels to display each Attribute name
            Create labels to display the points in each attribute and set each on to it’s corresponding Variable –                   Dialog Item – (Attribute) Count Label
            Create buttons to add points to each attribute and set them to their corresponding Variable – Dialog            Item – (Atribute) Add Btn
            Create a button to close the dialog and set it to Variable – Dialog Item – Close Btn

        Trigger – Attribute Dialog Mechanics
            Events
                Dialog – Any dialog Item is used by Player Any Player with event type Clicked
            Local Variables
            Conditions
                Or
                    Conditions
                        (Used dialog item) == Str Add Btn
                        <one entry for each attribute add button>
            Actions
                General – If (Conditions) then do multiple (Actions)
                    If Then Else
                        General – Else if (Conditions ) then do (Actions)
                            Else if
                                (Triggering Player) ==  1
                                (Used Dialog Item == Str Add Btn)
                                P1 Attribute Points != 0
                            Then
                                Unit – Add 1 (Your Str Attribute Buff) to P1 Hero from P1 Hero
                                Variable – Modify P1 Attribute Points: -1
                                Variable – Modify P1 Strength: +1
                                Dialog – Set Attribute Point Count text to (Text(P1 Attribute Points)) for (Player                                                    group((Triggering Player)))
                                Dialog – Set Str Count Label text to (Text(P1 Strength)) for (Player group((Triggering                                      player)))
                        <One clause for each attribute for each player – lots of entries!>

        Trigger – Open Attribute Dialog
            Events
                UI – Player Any Player presses <Button you’re using to open attribute dialog, mine is a button in                 the units command card>
            Local Variables
            Conditions
            Actions
                 Dialog – Show Attribute Dialog for (Player group((Triggering Player)))
                            General – If (Conditions) then do multiple (Actions)
                    If Then Else
                        General – Else if (Conditions) then do (Actions)
                            Else if
                                (Triggering player) == 1
                            Then
                                Dialog – Set Attribute Point Count text to (Text(P1 Attribute Points)) for (Player                                                  group((Triggering player)))
                                Dialog – Set Str Count Label text to (Text(P1 Strength)) for (Player group((Triggering                                     player)))
                                <One entry for each attribute>
                        <Same thing for each player>

        Trigger – Close Attribute Dialog
            Events
                Dialog – Any Dialog Item is used by Player Any Player with event type Clicked
            Local Variables
            Conditions
                (Used Dialog Item) == Close Btn
            Actions
                Dialog – Hide Attribute Dialog for (Player group((Triggering Player)))

    To answer your question more directly -- I have a variable to keep track of each players unspent attribute points and deduct one point from it when they add one to an attribute. I then set the label showing their number of attribute points to equal the variable holding their number of attribute points.

    "
                 General – Else if (Conditions ) then do (Actions)
                            Else if
                                (Triggering Player) ==  1
                                (Used Dialog Item == Str Add Btn)
                                P1 Attribute Points != 0
                            Then
                                Unit – Add 1 (Your Str Attribute Buff) to P1 Hero from P1 Hero
                        ----  Variable – Modify P1 Attribute Points: -1  ----
                                Variable – Modify P1 Strength: +1
                        ----  Dialog – Set Attribute Point Count text to (Text(P1 Attribute Points)) for (Player                                          group((Triggering Player))) ----
                                Dialog – Set Str Count Label text to (Text(P1 Strength)) for (Player group((Triggering                                   player)))
    "

    Posted in: Miscellaneous Development
  • 0

    posted a message on (Solved) Armor from upgrade not reducing damage

    Ah that was it. My damage effects weren't set to be reduced by armor. Thanks!

    Posted in: Data
  • 0

    posted a message on (Solved) Armor from upgrade not reducing damage

    I have a neutral upgrade building which players are given control of when a unit of theirs enters a region around it. When purchasing armor upgrades from it the armor on the unit goes up correctly (the number is displayed in yellow) but damage from enemies is not reduced accordingly. The upgrade ability increases life armor and life armor level.

    Can anyone point me to what's going wrong here?

    Posted in: Data
  • 0

    posted a message on Need advice with data editor bugs

    Great! So I've been looking at the XML data for the Large Rat (Burowed) and Huge Rat (Burowed) units and what I noticed is under the <CUnit id> line there was <Name value="Unit/Name/Zergling". So I changed that to "Unit/Name/LargeRatBurrowed" and committed the XML changes and the unit showed up in the Text Editor!

    Wanting my naming conventions to remain consistent I opened the Unit Properties dialog and named it correctly (Name: Large Rat (Burrowed); ID: LargeRatBurrowed) and something curious happened. The <Name value=""> line disappeared from the XML view. ?? But the unit still shows up properly in the Text Editor and doesn't rename itself upon saving and reloading.

    It's strange that that line went away but I'm not too concerned about it. Now I'll just be going through and making sure the names and ID's of trouble units aren't the same and see if that helps with my other issues.

    I'm not too optimistic about the dependency units being uneditable issue because the vast majority of them I've never duplicated, copied or otherwise messed with, but we'll see.

    Posted in: Data
  • 0

    posted a message on Need advice with data editor bugs

    Aah, I searched around and figured it was some kind of MPQ archive, but I wasn't able to open the map in a MPQ editor for some reason. However I was able to save it as a component list so I'll be taking a peak at the files in there.

    If I'm unable to make heads or tails of it I'll probably post it up here.

    Thanks again for the lead.

    Posted in: Data
  • 0

    posted a message on Need advice with data editor bugs

    Thanks for the reply!

    By XML files do you mean putting the data editor into XML view mode? If not could you tell me where these xml files can be found?

    Posted in: Data
  • 0

    posted a message on Need advice with data editor bugs

    So I've been working on an ORPG map for a few weeks now and I'm starting to have some real difficulties with a few things such as units renaming themselves, certain units and their abilities owned by dependencies being uneditable, and my map seemingly claiming ownership of units that belong to dependencies.

    Here are some screenshots of the unit my map has seemed to claim ownership of. I'm making this claim from information I'm getting from the Text Editor (F8) and I don't fully understand it, so I may be way off base.

    This screenshot shows me selecting the Zergling in the data editor. You can see that it's owned by Liberty.SC2Campaign. In the Text editor on the right however it's showing up under data source: My map. I edited the Text Entry field to make this clear. What's going on here?

    This screenshot shows the custom units I've created so far. I've selected the second "Zergling" in the list and opened it's Properties. You can see that it's ID is LargeRatBurrowed (the burrowed counterpart to rawn mob Large Rat, which I'm not experiencing problems with). In the text editor on the right I've selected the only mention of "LargeRatBurrowed" in the list, and it's the Editor Suffix. Why isn't it under Unit/Name/~ ?? This unit and the one above it (HugeRatBurrowed) rename themselves every time I open my map. I have no idea what's going on here.

    My other problem is with certain units and their abilities, etc, becoming completely uneditable. I can't open the unit properties tab or change any fields on the right. Double clicking them or selecting and hitting enter does nothing. For some units, I can edit fields on the right, but not access the unit properties tab. This problem seems to increase in severity, affecting more and more units as time goes on. This problem seems to be limited to data from dependencies, an not data that I've created or duplicated before this problem began.

    If anyone could shed any light on these issues I would greatly appreciate it! I'd really hate to restart this map.

    Posted in: Data
  • To post a comment, please or register a new account.