• 0

    posted a message on return cargo or drop off issue.

    Hello,

     

    I'm not 100% sure about what you asked.

     

    - To make harvesters collect without waiting :

    Probe -> Mineral Field : The "Gather" Ability has a flag called "Bypass Resource Queue". All units owning this ability can gather at the same time the same resource field.

     

    - To allow resources be dropped off to a building :

    Probe -> Nexus : The default behavior does not set a queue to drop resources. To drop resources, set Unit flags for "Resource Drop Off +" field.

     

    - To make harvesters collect without spreading :

    Probe -> Mineral Field : Uncheck "Bypass Resource Queue" flag and set "Acquire Radius" to 0, the harvester won't go to another Mineral Field if this one is already being collected. Which also means, the harvester won't acquire a new one if the previous one is depleted.

     

    - To make harvesters wait during resources drop off :

    Probe -> Nexus : Create a dummy Ability (Ex : Effect - Instant) to be channeled by the harvester (don't forget to add it to the unit). Look for the example "Nuclear Strike" to do a channeled ability. Here is the schema :

    > "Resources" Behavior :: Effect - final : "Apply behavior" Effect.

    > "Apply behavior" Effect :: Effect - behavior : "Bonus" Behavior.

    > "Bonus" Behavior :: Effect - initial : "Give Order" Effect / Display Duration + : Self / Duration : 3.334 (for example) / Modification + : Behavior > Suppress moving, Suppress turning / Validators : (Caster Not Dead)

    > "Give Order" Effect :: Effect - ability : "Effect - Instant" Ability / Command Flags + : Preempt, Smart Rally

    > "Effect - Instant" Ability :: Effect : "Persistent" Effect / Uninterruptible + : Channel / Validated + : Approach, Prep, Cast

    > "Persistent" Effect :: Initial delay : 1.0 / Expire delay : 2.334 (The sum is generally equal to value 3.334 above)

     

    Bonus : You can change it to make resources added to player step by step :

    > "Resources" Behavior :: Effect - final : "Set" Effect.

    > "Set" Effect :: Effects : "Apply behavior" Effect. "Modify Player" Effect [A].

    > "Modify Player" Effect [A] :: Effect - Resources : -175 Minerals (for example).

    > "Bonus" Behavior :: Effect - initial : "Give Order" Effect / Display Duration + : Self / Duration : 3.334 (for example) / Modification + : Behavior > Suppress moving, Suppress turning / Validators : (Caster Not Dead) / Period count : 7 (for example) / Period : 0.4 (for example) / Periodic effect : "Modify Player" Effect [B]

    > "Modify Player" Effect [B] :: Effect - Resources : +25 Minerals (for example).

    > "Give Order" Effect :: Effect - ability : "Effect - Instant" Ability / Command Flags + : Preempt, Smart Rally

    > "Effect - Instant" Ability :: Effect : "Persistent" Effect / Uninterruptible + : Channel / Validated + : Approach, Prep, Cast

    > "Persistent" Effect :: Initial delay : 1.0 / Expire delay : 2.334 (The sum is generally equal to value 3.334 above)


    Note : 25 minerals per 0.4 second for 7 periods = 175 minerals total during 2.8 seconds. Plus, 2.8 < 3.334 seconds. All good !

     

     - Unfortunately, I did't get the time to try to create a queue to drop off resources ... but that would mean complex things, I saw nothing native (data fields) going to this sense.

     

     

    Have a nice day !

    Posted in: Data
  • 0.956173475225998

    posted a message on [SOLVED]found a blank button to use for secret achievement but it still shows border on hover.

    Nice work !

     

    I think the "When" tag compares the string in the Text attribute as it is than retrieve the value of a reference beforehand.

    Because I already did a label with Text attribute using a reference and worked as expected.

     

    With the property binding brackets "{" && "}", it retrieves the reference's value.

    <When type="Property" frame="NameLabel" Text="{@Unit/Name/DTRCommandCenter}"/> 

     

    What a trick to create a dummy frame to stock values. Might be useful.

     

     

    About the Alpha, you obliterate the fading animation with :

    [...]
    <FadeTime val="0"/>
    [...]
    <Action type="SetProperty" frame="$layer/CommandTooltip" Alpha="255"/>
    [...]

    But yeah, that's a good workaround if not very concerned about !

     

     

    Lastly, I discover the "$layer" frame referencing.

    Does this reference what's on the current XML sheet / layout (which is extremely useful, headache savior to find frames) ?

     

    Posted in: Data
  • 0.95618350303169

    posted a message on [SOLVED]found a blank button to use for secret achievement but it still shows border on hover.

    OMG (deserves the highlight) you made me discover we can override UIs, that's so powerful !

    That opens so much more possibilities !

     

    So I tried and modified the previous XML to hide the tooltip like previously but :

    - It depends on the Unit's name in the info panel (also called unit status) "InfoPanel".

    - New StateGroup for the info panel of the unit (child of the info panel) "InfoPaneUnit".

     

    Note : However, this inherits an odd behavior, the tooltip shows up when you play around with the mouse.

     

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <Desc>
        <Frame type="CommandPanel" name="GameUI/UIContainer/ConsoleUIContainer/CommandPanel" file="GameUI">
            <Frame type="CommandTooltip" name="CommandTooltip">
                <FadeTime val="1"/>
                <StateGroup name="TooltipState">
                    <DefaultState val="Visible"/>
                    <State name="Hidden">
                        <Action type="SetProperty" Alpha="0"/>
                    </State>
                    <State name="Visible"/> <!-- Engines makes it fading with Alpha property -->
                </StateGroup>
            </Frame>
        </Frame>
    
        <Frame type="InfoPanel" name="GameUI/UIContainer/ConsoleUIContainer/InfoPanel" file="GameUI">
            <Frame type="InfoPaneUnit" name="InfoPaneUnit">
                <StateGroup name="NameState">
                    <DefaultState val="UnitNameOff"/>
                    <State name="UnitNameOn">
                        <!-- For unknown reasons, it doesn't make the link to the text reference -->
                        <!--<When type="Property" frame="$this/NameLabel" Text="@Unit/Name/DTRCommandCenter"/>-->
                        <!-- Replace the text value to yours -->
                        <When type="Property" frame="$this/NameLabel" Text="Command Center"/>
                        <!-- Command buttons from 00, 01 ... to 14 -->
                        <When type="Property" frame="$GameUI_CommandPanel/CommandButton00/NormalImage" Texture="Assets\Textures\btn-blank.dds"/>
                        <When type="Property" frame="$GameUI_CommandPanel/CommandButton00" Hovering="True"/>
                        <Action type="SetState" frame="$GameUI/$parent/CommandTooltip" group="TooltipState" state="Hidden"/>
                    </State>
                    <State name="UnitNameOff">
                        <Action type="SetState" frame="$GameUI/$parent/CommandTooltip" group="TooltipState" state="Visible"/>
                    </State>
                </StateGroup>
            </Frame>
        </Frame>
    </Desc>

     

     

    Posted in: Data
  • 0.95638236977676

    posted a message on [SOLVED]found a blank button to use for secret achievement but it still shows border on hover.

    I was afraid of "always hidden", so it happens on any selection. That sucks.

     

    I don't think you can get a better result with the standard UI.

     

    Kudos to the person who wrote the XML above.

     

    Posted in: Data
  • 0.956372380625215

    posted a message on [SOLVED]found a blank button to use for secret achievement but it still shows border on hover.

    Ok, that person added a condition for the existing command panel.

     

    Is your background on button 14 (row 3, column 5) always hidden or only when you select your thingy ?

    Posted in: Data
  • 0

    posted a message on CSV Utility Library

    Let's see ...

     

    Open the Console (Window > Console) and type  "browse" to open the assets explorer.

    Search for "shapes\" to enumerate all doodad models.

     

    From a CSV of strings representing shape's names (subtract the prefix "Shape"), create the shape Unit if exists.

    Example : "Strawberry,Orange,Thing,Heart,Box,X,Cube" with "Thing" non-existent.

     

    Can you show me a picture of the result ?

     

    Note : There's a trap.

    Posted in: Triggers
  • 1.87428129978538

    posted a message on CSV Utility Library

    Hello,

     

    I want to add a note :

    In the Data Editor, you can do data management with User Types (Click on + button > Modify Advanced Game data > User Types).

    They are similar to sheet values, usually done with CSV files, indeed.

     

    To people who needs string functions to do what is described, you can try the library. Or create yours.

     

    Have a nice day !

    Posted in: Triggers
  • 0.956910382764153

    posted a message on [SOLVED]found a blank button to use for secret achievement but it still shows border on hover.

    Do you mean something like this (See attached picture 1) ?

     

    I hovered the button on the bottom left of the command card.

     

    If yes :

    I successfully hooked up the command card's tooltip.

    However, any element of the command card shares the tooltip. That means it's updated according to the button you hover.

    I set the background image of the tooltip to a blank image, it helps to hide without explicitly hiding it.

    See attached picture 2.

     

    Note : CTRL + ALT + F12 to open the UI debugger in the game.

    I followed the tree structure to hook up the intended element.

    On the picture 2 : The 1st hook shows that the command card's tooltip is not linked directly to the command panel.

     

     

    Finally, you must wonder when you change the background image.

    Since the tooltip is shared, there are several ways :

    - When the player hovers / "un-hovers" the button. => Impossible.

    - When the player selects / deselects the building and according to conditions (did all upgrades). => Yes but no, that means there's only 1 button on the command card.

    - All tooltips are modified and you don't care. => Yeah ok (wrong).

    - You change something else about the tooltip. => Inset values are 15 for top, right, bottom, left. Set to 0 does no effect.

    - You change something else about the tooltip. => AnchorFrame has an offset of 15 for bottom and right anchors. Set to 1 does effects, see attached pictures 3 and 4.

     

    Nevertheless, I did the changes in the UI debugger, to find the culprit (See attached picture 5). We now need to do that in triggers.

    Unfortunately, we can't change anchors.

    This is a dead end.

     

    Have a nice ... night !

    Posted in: Data
  • 0.957000343997248

    posted a message on [SOLVED]found a blank button to use for secret achievement but it still shows border on hover.

    Oh. You meant the tooltip, not the button itself.

     

    I tried with empty text for the tooltip, it doesn't show up. See attached pictures.

     

    If it doesn't help, detail how you create your button, please.

    Posted in: Data
  • 0

    posted a message on Emoticons = add news to existing list

    Hello,

     

    I look for panels related to emoticons, they are all "locked" and cannot be modified with hooks (= cannot change the standard usage).

     

    What do you exactly want to do ?

    What frames do you use ?

    Does it use the standard chat box ?

    Where do you create your image ?

    Etc ....

     

    Have a nice day !

    Posted in: UI Development
  • 0

    posted a message on Change valid target units of behavior or effect via trigger

    Hello,

     

    You can make it with Data Editor (and you can make lots !).

     

    What you need to know :

     

    A) To make it simple :

    You load your bank in triggers and apply the correct Behavior to your Hive Mind Emulator.

    Duplicate your Behavior and Effects and change filters.

     

    B) If you really want to do something more complex without duplication :

    Use a "Switch" Effect : Validators checking filters will allow or prevent cases Effects to execute.

     

    ---

     

    To link your bank values to data :

    I personally use Upgrades (I call them "ScriptUtility"). They are upgrades that does no effect.

    You set them to 0 or 1 depending on your bank values.

     

    Then you do what you want to in triggers.

     

    Have a nice day !

    Posted in: Triggers
  • 0.956980612596077

    posted a message on [SOLVED]how to make items work in inventory bag instead of on hero?

    Hello,

     

    A unit can wear an inventory bag and any item is considered as "carried" by the unit.

    You may "equip" this item to the unit in a specific slot, depending on the class like "sword", "bow" ... that you decide the function.

     

    Look for the field "Carry Behavior Array +" in Item tab.

    Add a Behavior to execute Effects while the item is carried by the unit.

     

    You have some examples in tabs :

    - Game data > Ability : Test Inventory

    - Game data > Item : Healing Potion TEST [Target, Instant]

    - Advanced Game data > Item Container : WoW Character ... .

    - Advanced Game data > Item Class : Bag, Potion, Sword ... .

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on Create Unit On Death

    Hello,

     

    Yeah, sorry, it's more complicated than that.

    I explicitly wrote some off-putting phrases to keep words talking about the same thing.

     


    To achieve your goal, choose the approach between :

    A) We could create 2 separate units to manage differently the bunker when it's alive and when it's dead.

    B) We could also prevent the death to preserve the unit and make it behaves differently.

     

     

    A) 2 units :

    - The everyday Bunker Unit.

    - The wrecked Bunker Unit. This one has the ability to morph to simulate the repairing.

    When the building is destroyed, create the wrecked unit.

     

    You need a Behavior activated on death (see Behavior Flags). It will executes a "Create Unit" Effect.

    Make the unit to disappear on death (via actor events) and play the death animation on the wrecked unit (via actor events).

     

    You need a "Morph" Ability. Easy task, I skip details.

     

     

    B) Prevent death :

    When the bunker reaches 1 HP, it disables all abilities except the repair ability (can be initially hidden).

    When the building reaches 1 HP, play the death animation and swap the model to the wrecked model.

     

    You need a Behavior (Beh1) with a "Damage Response" which cancels any damage. Look for the field and change :

    - Chance : 0 to 1 to make it happen on any damage.

    - Fatal : Check the box to include damage that should kill the unit.

    - Modify Fraction : Set to 0 to multiply the damage amount by this value. Math : Any number multiplies 0 equals 0.

    - Handled : Execute an Effect. Set an "Apply Behavior" to apply Beh2.

     

    Inconvenient : If the unit has a life regeneration, it will regenerate as expected.

     

    You need another Behavior (Beh2) with modifications :

    - Set regeneration fraction to -1 (= -100%) (Alternative : See side note).

    - Disable abilities with Beh2.

    - Enable ability you created to repair the bunker with Beh2 (Alternative : See bonus note).

     

    Important note : The ability to repair the bunker must set the life and remove the behavior "Beh2".

     

    Side note :

    If you want to repair on time, you can set a high value for the regeneration with another behavior (Beh3) applied with the ability to repair the bunker.

     

    Bonus note - Prerequisite :

    Use the field "Use+" to lock/unlock or "Show+" to show/hide a restricted button of an ability. As follow :

    > Greater Than

    >> Count stacks of a behavior (Beh2)

    >> Constant 0

     

     


    I tried to detail the most things for both routes.

    Do your choice, I think you can learn some from both.

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on Removing a unit's ground collision

    Hello,

     

    There are some simple things to know, properties from Unit tab :

    - Radius : It is a simple circle of collision. Set to 0 to reduce to minimum the chance to collide (because the mechanism doesn't work solely with this parameter).

    - Collide : Categories to collide with. Uncheck all to disable collisions. I recommend to use an "Unused" category to separate to any standard unit.

    - Plane Array : BE CAREFUL false friend ! It marks the unit as Ground or Air unit for the attack system.

    - Separation Radius : Same as radius property but intended for the distance between same unit type (air units usually use this to spread them when idle). Set to 0 to disable it.

    - Footprint : Another collision system with layers. Set to none to remove the terrain collisions. Usually used by Unit buildings.

     

    About the kill thingy, you can create a Behavior which executes a "Search" Effect. This effect validates a filter (+ optional validators) to "detect" any other unit. If in the area, the "Search" Effect executes, for example, a "Damage" Effect to kill the source unit.

    I did something like this in my project Prime Hunter, as a Shoot Them Up, I created a collision system with behaviors for missiles. If the player ship meets a missile, the behavior deals damages to the ship.

     

    Have a nice day !

    Posted in: Data
  • 0

    posted a message on Need help getting a Behavior to add an Ability to a unit

    Oooh I see !

    The link is not duplicated, it doesn't create a new one for your new unit (native function error or something, should not happen, sooooo it's a bug on dev's side).

     

    Any idea of how to keep this from happening in the future? Or am I just stuck having to edit the XML every time I want to make a zerg unit that burrows?

    The XML fix is necessary but don't delete the line. The duplication process must need this line to rename properly. It went wrong for a specific case but it works fine usually.
     

    Can you try to set the name value to "Unit/Name/NewZerglingBurrowed" ?

    Then, in your Text Editor, look for the ID "Unit/Name/NewZerglingBurrowed" and set the text you want for the actual name.

     

    That would be even better.

     

    I looked in my Prime Hunter map and found similar links. You should find yours.

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