• 0

    posted a message on The best way to implement a custom hotkey bar?

    So I've built some custom action bars, theyre 90% functional (just have to add in count quantities for some things) but I'm having a dilemma.

    Basically I use some 60x60 dialog items stacked together to display a key. Say the base clickable button, an image overlay to show the actual icon since normal button images have to be twice as tall for 2 images which I dont need. Next up is the mapped-key display then I have a countdown timer over the main image and lastly a quantity counter in the bottom right corner.

    The thing is, is it better to create the all the dialog items for each key space or to only create them when theyre actually being used? I'm honestly not sure whats better for memory usage etc to have it all pre-made and just leave say the labels blank when theyre not being used?

    Any help would be appreciated 'cause im trying to keep my display, and code, clean.

    Posted in: Triggers
  • 0

    posted a message on [Question]Forcing a unit to cast any ability possible?
    Quote from SouLCarveRR: Go

    @Sneakervek: Go

    Issue order will only work if the unit actually has the ability...

    you could try to add the ability to the unit through the "set catalog field value" but i have no idea if that would would....

    what you can do is create the psi-storm persistent effect from the unit with a trigger though...

    That's basically what I was afraid of having to do, oh well I guess I can't use the built in abilities then.

    Posted in: Triggers
  • 0

    posted a message on [Question]Forcing a unit to cast any ability possible?

    I want to make it so through triggers any unit can cast any ability without me having to pre-add and enable the ability on the unit. Is this possible?

    I've tried issuing an order to a unit without psi-storm to cast psi-storm on a point and nothing happens. Is there any way to force an ability to be cast by a unit that doesn't have the ability explicitly pre-setup on it?

    Posted in: Triggers
  • 0

    posted a message on Using mouse UI position with dialogs.

    So I'm creating a function to have a dialog item follow the mouse. The problem is that the UI position of the mouse is different from where I can move a dialog no matter how I set it up. Say my screen is 1920*1080 when I move the mouse to the bottom right corner at coords 1920*1080 the equivalent position for a dialog item in a full-screen dialog is several inches (on screen) up and left. And this ratio changes when the resolution changes as well so I ant just multiply it by a number.

    Anyone have an idea how to get a dialog item to follow the mouse?

    Posted in: Triggers
  • 0

    posted a message on A way to get a .Member from a Parameter directly?

    @RileyStarcraft: Go

    Yeah I'm not a programmer, you lost me there. But everything I've tried looking like what you said isn't working so I'm just going to have to make a different function for each .member. Honestly it works it just sucks having to make 8 functions with 10 if then else statements in each. Seeing as how it would seem galaxy doesnt have real switches and using the built in switch generates one of those big ugly variables.

    Thanks though,

    Posted in: Galaxy Scripting
  • 0

    posted a message on A way to get a .Member from a Parameter directly?

    I tried using a preset with a script value equal to the var used but I cant get it to go in right it always shows up as the parameter not the script value of the preset.

    Item Refine
        Options: Function
        Return Type: Integer
        Parameters
            Player = 0 <Integer>
            Window <Itm_Win_Desc>
            Index = 0 <Integer>
        Grammar Text: Item Refine(Player, Window, Index)
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            General - Switch (Actions) depending on Window
                Cases
                    General - If (Bag 1)
                        Actions
                            General - Return Bag Items[0][Player][Index].Refine
                    General - If (Bag 2)
                        Actions
                            General - Return Bag Items[1][Player][Index].Refine
                    General - If (Bag 3)
                        Actions
                            General - Return Bag Items[2][Player][Index].Refine
                    General - If (Bag 4)
                        Actions
                            General - Return Bag Items[3][Player][Index].Refine
                    General - If (Bag 5)
                        Actions
                            General - Return Bag Items[4][Player][Index].Refine
                    General - If (Cmb/Brk)
                        Actions
                            General - Return Cmb_Brk Items[Player][Index].Refine
                    General - If (Craft)
                        Actions
                            General - Return Craft Items[Player][Index].Refine
                    General - If (Equipment Window)
                        Actions
                            General - Return Equipped Items[Player][Index].Refine
                    General - If (Pickup)
                        Actions
                            General - Return Pick Item[Player].Refine
                    General - If (Storage)
                        Actions
                            General - Return Storage Items[Player][Index].Refine
                Default
                    General - Return 0
    

    Basically I want that .Refine to be based on a parameter rather than having to create a diff function for each .Member.

    Tell me there's a way to do this? I tried custom code but it wasn't working either.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Whats more efficient, vars in a record or one var parsed?

    I'm not really sure whats better. Currently I use an integer and parse it as a string to pull values from it ie the number 3151002. I parse this out as:
    [3][1][5][10][0][2]
    [3] Crafting Class
    [1] Critical Flag
    [5] Material Class
    [10] Upgrades
    [0] Broken Flag
    [2] Stat Modifier
    Would it be better to store these as individual variables and just call them rather than running them through something to parse them? I'm not honestly sure what is more efficient. I think they would store better in the data bank as a single integer.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Can you copy an entire record over to another?

    I am not a programmer but I did mess around with the code for an MMO emulator. I know in there they would copy a struct over with one command. I was wondering if there is something like that in the SC editor. Rather than copying a specific part of a record you could just copy the whole record over with one command, to an equal record of course.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Can you set a variable arrays index to always be a preset?

    Alrighty, I guess I just have to deal with my record having a relatively large list. Thanks, and yeah I hadn't even thought of the fact that I had reals mixed in ><

    I've basically been rebuilding large portions of my maps "engine" to be more fluid to improve my work flow. Also I didn't even know about records(structs) once I found out about those I had to change all my player variables from 10 index arrays each to this 10 index array record which is like WAY easier to use.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Can you set a variable arrays index to always be a preset?

    So I have this record

    Player Data
        Variables
            ------- Stats
            Flags <flags>
            Avatar = No Unit <Unit>
            Shield Models = No Actor <Actor[1]>
            Class = 0 <Integer[3]>
            Race = 0 <Integer[1]>
            Level = 1 <Integer>
            Level Cap = 1000 <Integer>
            Placement Points = 0 <Integer>
            Stat Points = 0 <Integer[4][6]>
            Armor Proficiency = 4 <Integer>
            Dual Wield Skill = 0 <Integer>
            Shields Skill = 0 <Integer>
            Weapon Skills = 0 <Integer[12]>
            ------- Gear
            Gear - Slot Stats = 0 <Integer[18][6]>
            ------- HP
            HP - Max = 0 <Integer>
            HP - Current = 0 <Integer>
            HP - Fraction = 0 <Integer>
            HP - Regen = 0.0 <Real>
            HP - Bonus % = 0.0 <Real>
            HP - Bonus = 0 <Integer>
            ------- MP
            MP - Max = 0 <Integer>
            MP - Current = 0 <Integer>
            MP - Fraction = 0 <Integer>
            MP - Regen = 0.0 <Real>
            MP - Bonus % = 0 <Integer>
            MP - Bonus = 0 <Integer>
            ------- Energy
            Energy - Max = 100 <Integer>
            Energy - Current = 0 <Integer>
            ------- Focus
            Focus - Max = 10 <Integer>
            Focus - Current = 0 <Integer>
            ------- combat stats
            Combat - Haste = 0 <Integer>
            Combat - Speed = 0 <Integer>
            Combat - Hit = 0.0 <Real[1]>
            Combat - Crit = 0.0 <Real[1]>
            ------- Attack Power
            Combat - Attack Power = 0 <Integer>
            Combat - Attack Power Bonus % = 0 <Integer>
            Combat - Attack Power Bonus = 0 <Integer>
            ------- Elemental Power
            Combat - Ele Power = 0 <Integer>
            Combat - Ele Power Bonus % = 0 <Integer>
            Combat - Ele Power Bonus = 0 <Integer>
            ------- Light Power
            Combat - Light Power = 0 <Integer>
            Combat - Light Power Bonus % = 0 <Integer>
            Combat - Light Power Bonus = 0 <Integer>
            ------- Weapon
            Combat - Weapon Min Dmg = 0 <Integer[2]>
            Combat - Weapon Max Dmg = 0 <Integer[2]>
            ------- Armor
            Combat - Armor Reduction = 0.0 <Real>
            Combat - Vital Defense = 0 <Integer>
            Combat - Armor = 0 <Integer>
            Combat - Armor Bonus % = 0 <Integer>
    

    And I was wondering if I could set it so instead of having 6 variables for HP - if i could use one array and have the index be a preset when I go to set those values. i.e. Player Data[1].HP[Max] but have that be the default. Right now everything I try doesn't work and I have to manually set the preset which is just not worth it because there's such a gigantic list of presets to navigate through. I want the default INDEX for the variable to be a preset.

    Can this be done?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Whats better for storing values? data tables or records (2 questions really)

    Ok so all the values below I just added into a record, basically they each had a 10 array at the start of them for each player.
    My question is, when I go to store these values with starcode (when i get around to adding it) will it be easier to store them as this record or use my original arrays for them all.

    plyr_data
        Variables
            dw_shld = false <Boolean>
            dw_2h_wp = false <Boolean>
            plyr_avtr = No Unit <Unit>
            regen = false <Boolean[2]>
            med = false <Boolean>
            shld_atch = No Actor <Actor[1]>
            plyr_cl = 0 <Integer[3]>
            plyr_rc = 0 <Integer[1]>
            lvl = 1 <Integer>
            lvlcp = 1000 <Integer>
            ------- Stats
            gear_st = 0 <Integer[18][6]>
            plc_pts = 0 <Integer>
            plyr_st_pts = 0 <Integer[4][6]>
            ------- HP
            hp_max = 0 <Integer>
            hp_crn = 0 <Integer>
            hp_frc = 0 <Integer>
            hp_rgn = 0.0 <Real>
            ------- % and Static Mods
            hp_md_pc = 0 <Integer>
            hp_md_val = 0 <Integer>
            ------- MP
            mp_max = 0 <Integer>
            mp_crn = 0 <Integer>
            mp_frc = 0 <Integer>
            mp_rgn = 0.0 <Real>
            ------- % and Static Mods
            mp_md_pc = 0 <Integer>
            mp_md_val = 0 <Integer>
            ------- Energy
            en_max = 100 <Integer>
            en_crn = 0 <Integer>
            ------- Focus
            fcs_max = 10 <Integer>
            fcs_crn = 0 <Integer>
            ------- combat stats
            cmbt_hst = 0 <Integer>
            cmbt_spd = 0 <Integer>
            cmbt_hit = 0.0 <Real[1]>
            cmbt_crt = 0.0 <Real[1]>
            ------- Attack Power
            cmbt_pwatk = 0 <Integer>
            cmbt_pwatk_mdpc = 0 <Integer>
            cmbt_pwatk_mdval = 0 <Integer>
            ------- Elemental Power
            cmbt_pwele = 0 <Integer>
            cmbt_pwele_mdpc = 0 <Integer>
            cmbt_pwele_mdval = 0 <Integer>
            ------- Light Power
            cmbt_pwlgt = 0 <Integer>
            cmbt_pwlgt_mdpc = 0 <Integer>
            cmbt_pwlgt_mdval = 0 <Integer>
            ------- Weapon
            cmbt_wp_mnd = 0 <Integer[2]>
            cmbt_wp_mxd = 0 <Integer[2]>
            ------- Armor
            cmbt_arm_rdc = 0.0 <Real>
            cmbt_vtl_def = 0 <Integer>
            cmbt_arm_val = 0 <Integer>
            cmbt_arm_mdpc = 0 <Integer>
    

    My next question is, right now I'm storing NPCs as data table entries with each one having several mods. Already I'm thinking a record would be better. But right now I have it setup to hold about 300 NPCs because in my tests with each monster having about 7 different data table entries anything over 400 or so npcs seems to stop coming up in the table. Is there a size limit to the data table?

    Edit: so after testing turns out I wasnt capping out my data table i just screwed up a function to only search to monster Id 500 >< anyways I still feel records holding monster stats is prolly better than massive numbers of data tables entries since theyre easier to access.

    Posted in: Triggers
  • 0

    posted a message on [Info] Patch 1.1 Undocumented Editor Changes
    Quote from DJSplendid: Go

    I have just stumbled upon a repeatable crash (though I doubt it's specifically since 1.1)

    When one of my unfinished maps is launched, Starcraft dies completely right at the end of the loading screen progress bar.

    I undid the recent changes to my map and it worked fine again. I re-applied them, and it crashed in the same way as before.

    The changes were:

    Four object duplications of a duplicate of the Melee dependancy Marine which also duplicated all actors in all cases (as I understood that this was a required step or you get the default actor).

    I looked through the duplicates for oddities and found HUNDREDS of actors, all with hugely over-elaborate names such as 'marine attack copy copy 2 copy 3 copy copy'

    I fixed the issue by deleting the actor spam (although now I need to learn how to connect my duplicates up to some happy/stable actors).

    Anyone else seen this?

    When you duplicate something, if you select everything under the list some things show up twice. Like the effects associated with a weapon will show up on the list, but if you duplicate the weapon AND the effects, they will get duplicated again with the weapon duplicate. I think this is what happened to you probably.

    IE marine attack shows up on the list because its part of the weapon, if you duplicate the attack AND the weapon the attack which is part of the weapon gets duplicated as well as the one in the list, so you get two and they will both still be attached to the duplicate. So if you duplicate the duplicate (and possibly even the original) you'll exponentially increase the number of things being duplicated.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [Info] Patch 1.1 Undocumented Editor Changes

    More math functions have been added such as exponentiation (raising to the power of n). Also I don't know if anyone else has noticed but some graphics seem to be displaying better I have been using a thin border for my displays and it shows up a lot better now than before.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Patch 1.1 Notes

    Great, I patched and now it wont let me use the editor until I connect to battle.net which now I cant do for another 2 hours because they had to extend the maintenance. Never should have patched. Now I cant work on anything.

    Posted in: General Chat
  • 0

    posted a message on [Help] dds plugin for Photoshop not working

    I just started messing with this using cs2 on my 64 bit os (dunno if the prog itself is 64 but whatever) so far Ive found that saving as DXT5 ARGB 8 bpp | interpolated alpha gives you the small file size AND working alpha. I just downloaded the latest plugin from nvidia (it may not be new tho) and so far its working great.

    My only complain is the stupid thing grays out both my moniters when I go to save and i have open and close photoshop to get the gray to go away.

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