• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Multiplayer graphical design (image based windows)

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
i wanna ask about images and about the menues based on image, example full screen invetory/hero selection etc

once i check the full screen gui hero inventory, there was a terrain part with locked camera distance, camera attack angle got 90grade with terrain and if i remember the destructibles was change with images or something like that.

Problem with that all player need 1 area if its multiplayer and 12 place is pretty huge terrain waste.

1. so i can do it with 1 area with getlocalplayer tricks or no way for dont dc ?

2. i can make menu without wasteing terrain with different methode, like if i remember the dgui without changeing anything else than stuff in my map? (i mean without changeing in wc3 or useing local files etc)

not that complex like this, just window where u can click normally to icons
http://www.youtube.com/user/Thyra3lWC3?feature=mhee

3. with dgui only no targets could be used, so cant use a bar for store there the point/unit target abilities?

4. healthbar design change with this
It's simple wc3 texture, I removed some alpha channel so it show black, or should I say, remove any other color :)

how can i do this? i must extract the healthbar.blp then have program what remove colors from blp files?

(its like in LoL, the healbar got many little squares like in kobas map)

5. how can i use image in multiboard instead text? (one map if i remember show progress bars for stats in multiboards, and its like a 3d progress bar so i guess it is image)

6. have any way for make something like the below video (atleast window thing with hero invetory, that hp/mana etc bars and with good quality model) and still lower than 8 mb and can use it for multiplayer, so ist srpg?

7. have any good tutorial for more advanced image things then put to x,y a image and still useable in multiplayer?

8. dgui thing for make right clickable is a unit or what?http://www.wc3c.net/showthread.php?t=102351


i checked this video and it is far from any wc3 map what i watched yet, its really look like a different game, totally and seems its isnt have delay or lagg even use alot image and things
http://www.youtube.com/watch?v=TbOuVCNtJzM&list=UUFaDv03kqz5fzZpOGl343Vw&index=2&feature=plcp
 
Level 11
Joined
Apr 28, 2008
Messages
696
First at all, thank you, that you promoted my videos. I'll try to answer your questions in return.

If you want to make a fullscreenmenu(fsm) in which the players are able to click/mouseover buttons there are some things you should know. You can catch selection events(left clicking an unit) or IssueTargetOder(right clicking a unit, while having a unit of your own selected). Mouse over events can only be detected via trakables. Sadly trackables make no difference between left and right click. In addition to that you can't catch which player clicks a specific trackable. So each player will need his own set of trackables.

Ths fsms in the videos you've link were made out of a combination of the above methods. The visible icons are units with locust. By that they can't be selected. Below the units there are trackables. Those catch the mouse over and mouse click events. The rest is more or less clever scripting.

Now to your questions.

1. You can use trackables in LocalPlayer stuff. You have to set the path of the model for the trackable only for the Player who should be able to interact with it. For the other players the path have to be i.e. "". That is needed cause you have to create the trackable for all player or you will cause a desynch. Same is possible to units. Here you have also to create the unit for all player, but in the get LocalPlayer you have to set the visibility. By using SetunitVertexColor() you can make the units transparent or visible for the player.

2. DGUI is kinda different to fsm. The elements are aligned to the camera scene by using 3d vectors. In DGUI you can only use selection or IssueTargetOder events, no mouse over. All elements are units. DGUI is also very resource intensiv. I made it running for multiplayer, but it is still far from being perfect.

3. I simply don't understand that question.

4. As far as I know you can only remove/edit the texture for the filled hp/mp bars. But not for the black background.

5. Multiboards make use of multiboarditems aligned to a matrix. Each item can have text and/or an image. By putting many images together you can simulate i.e. progress bars. For changing the background texture, you have to overwrite it, by importing to the correct path it into your map.

6. If you don't want to reuse the standard WC3 textures for your fsms there is no way around than importing the custom textures. Also the needed models have to be imported as well.

7. Sorry, I don't know any.

8. As allready mentioned above all visible elements used by DGUI are units. In my project I improved that fact by adding the ability to attach special effects to units(screen elements). Because of that the game have to align/calculate less. Cause if you update the unit's position/rotation etc, the SFX will follow.

I hope I was able to help you.

Best regards,
Thy
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
First at all, thank you, that you promoted my videos. I'll try to answer your questions in return.

If you want to make a fullscreenmenu(fsm) in which the players are able to click/mouseover buttons there are some things you should know. You can catch selection events(left clicking an unit) or IssueTargetOder(right clicking a unit, while having a unit of your own selected). Mouse over events can only be detected via trakables. Sadly trackables make no difference between left and right click. In addition to that you can't catch which player clicks a specific trackable. So each player will need his own set of trackables.

Ths fsms in the videos you've link were made out of a combination of the above methods. The visible icons are units with locust. By that they can't be selected. Below the units there are trackables. Those catch the mouse over and mouse click events. The rest is more or less clever scripting.

Now to your questions.

1. You can use trackables in LocalPlayer stuff. You have to set the path of the model for the trackable only for the Player who should be able to interact with it. For the other players the path have to be i.e. "". That is needed cause you have to create the trackable for all player or you will cause a desynch. Same is possible to units. Here you have also to create the unit for all player, but in the get LocalPlayer you have to set the visibility. By using SetunitVertexColor() you can make the units transparent or visible for the player.

2. DGUI is kinda different to fsm. The elements are aligned to the camera scene by using 3d vectors. In DGUI you can only use selection or IssueTargetOder events, no mouse over. All elements are units. DGUI is also very resource intensiv. I made it running for multiplayer, but it is still far from being perfect.

3. I simply don't understand that question.

4. As far as I know you can only remove/edit the texture for the filled hp/mp bars. But not for the black background.

5. Multiboards make use of multiboarditems aligned to a matrix. Each item can have text and/or an image. By putting many images together you can simulate i.e. progress bars. For changing the background texture, you have to overwrite it, by importing to the correct path it into your map.

6. If you don't want to reuse the standard WC3 textures for your fsms there is no way around than importing the custom textures. Also the needed models have to be imported as well.

7. Sorry, I don't know any.

8. As allready mentioned above all visible elements used by DGUI are units. In my project I improved that fact by adding the ability to attach special effects to units(screen elements). Because of that the game have to align/calculate less. Cause if you update the unit's position/rotation etc, the SFX will follow.

I hope I was able to help you.

Best regards,
Thy

thx very much the answers, still i wanna ask more
(sry if i ask many q but i have 0 experience from this side of map editing, and seems this is very usefull thing)

so example the potions in potionbar, are units and u allways set their height(depend on GetLocationZ), so if locust unit is trackable, then each player need a unit and set the dummy icon unit position in periodic event, this dont make sometimes bit weird effect? (example u move foward where is a cliff-coz even with getlocation z then most of unit change a bit his height on edge of cliffs)

so please again this trackable thing, if unit with locust are trackable thing, and u cant select it, then how u detect? point target order thing?

1. what happen if more player want use potion and every player got potion on his sreen?
(i guess for whole suystem u need alot alot unit, right?)

2. why far? if dont cause dc, then its laggy if have amny player?

3. i meant, i watched a demo map with cube and other geometric form spining, there u must right click for use, could be usefull this right click-target point thing for make unit order example a non target ability like immolation, but i guess no for example storm bolt, where u must select the target, since it is just a dummy unit with special effect, how u solved this?
or impossible make example a ability bar?

4. so i must extract the blp, then u can draw me a example or screenshot how? or u know a tutorial for that? its seems easy but i never made that, also idk with what program could i start, i guess wc3 viewer for extract the model but for rest?

5. each cell could contain only 1 image? so if have a progress bar there have damn much column?
i guess this work different way than this
JASS:
local image val = CreateImage(file, size, size, size, GetLocationX(where), GetLocationY(where), zOffset, 0, 0, 0, imageType)
set mbitem = MultiboardGetItem(mb, 1, 1)
call MultiboardSetItemValue(mbitem, val)
call MultiboardReleaseItem(mbitem)

6. y, i thought u made the hero with model editor,(its look cool really how him move)
(secret question the hair style is a head attachment right?)
still lets say i want use the wc3 textures for map, then the system with things dont make too much file size difference (because i guess example for few thing still u need image like health bar/mp bar and icons etc)?

8. then most of thing is ability attachment so u dont must set the pitch, angles etc then, if i understanded well

(u dont got a very basic demo map when u started this with just 1 simple basic menu ? :D)

ofc this was very informative, ty really the response
 
Level 11
Joined
Apr 28, 2008
Messages
696
Trackables are a type of object that can detect mouse events on them. Mouse over or mouse click. They are no units or doodads, they are... trackables :) The units in the potionbar don't directly use GetLocationZ. Their relativ position to screen is calculated by using 3d vectors and some pieces of math.

DGUI in multiplayer is resource intensiv, because every shown object must be updated for every player. And that with an interval of like 0.04 seconds to a smooth movement. You can count yourself how much calculation that is for one,two or even 12 players.

To hide objects(units) for other players you have to set their visibility(alpha) in LocalPlayer part. You set the alpha for the player that should be able to see the object to 0% and for all other player to 100%.
 
Level 28
Joined
Oct 28, 2011
Messages
4,759
@Thyrael This is my face when I saw your video

211785-albums5408-picture56757.jpg
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Trackables are a type of object that can detect mouse events on them. Mouse over or mouse click. They are no units or doodads, they are... trackables :) The units in the potionbar don't directly use GetLocationZ. Their relativ position to screen is calculated by using 3d vectors and some pieces of math.

oh, i never heard about this trackables before but seems was thread too about them
http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=38300

i read have something solution for getting the trigger player


JASS:
function GetTrackableOwner takes trackable t returns player
    return Player(GetHandleInt(t, "player"))
endfunction

function NewTrackable takes string path, real x, real y, real facing, player owner returns trackable
    local trackable tc
    local string invisible = ""
    if GetLocalPlayer() != owner then
        set path = invisible
    endif
    set tc = CreateTrackable(path, x, y, facing)
    call SetHandleReal(tc, "x", x)
    call SetHandleReal(tc, "y", y)
    call SetHandleReal(tc, "facing", facing)
    call SetHandleString(tc, "path", path)
    call SetHandleInt(tc, "player", GetPlayerId(owner))
    return tc
endfunction


i think i got the eahc player trackable thing
JASS:
  // t1 and t2 are visually the same trackable, but in fact they only work for one player each
    local trackable t1 // Player 1's trackable
    local trackable t2 // Player 2's trackable
    local string peasant = "units\\human\\Peasant\\Peasant.mdl"
    local string invisible = ""
    local string path = invisible

    if ( GetLocalPlayer() == Player(0) ) then
        set path = peasant
    endif
    set t1 = CreateTrackable(path, -500, 0, 0)

    set path = invisible
    if ( GetLocalPlayer() == Player(1) ) then
        set path = peasant
    endif
    set t2 = CreateTrackable(path, -500, 0, 0)

    call SetHandleInt(t1, "player", 0) // Store which player "owns" this trackable
    call SetHandleInt(t2, "player", 1) // Same for player 2

    // Add events to register track/hit on t1 and t2...

see need invisble patform to set the trackable height but question is, i must set the platform height when i moe with camera or how can i fix the trackable position to a fixed point on screen (example left bottom corner)-(noob with verctors, never liked them :D).
 
Last edited:
Level 11
Joined
Apr 28, 2008
Messages
696
You can't move trackables, after you'Ve created them. There are two ways to set their init Z. First one is to created an invisible platform and than create the trackable on top of it. Second is in my opinion the better one. Create custom models for the trackables(i.e. squares for buttons etc.) and the Z inside the model itself.

Their is no direct way to get the clicking player. Only with massiv work arounds. But if you set the trackables "owned" by a player to being only visible and with that clickable for that player, you can catch the event and know the clicking player can only be that one who actually sees the trackable.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
You can't move trackables, after you'Ve created them. There are two ways to set their init Z. First one is to created an invisible platform and than create the trackable on top of it. Second is in my opinion the better one. Create custom models for the trackables(i.e. squares for buttons etc.) and the Z inside the model itself.

so similiar than floating rocks in outland map, right? ok but how u make it follow the camera? u create a new trackable each second? or it is used only for menuers and units for dynamic thing like potion bar?
 
Level 11
Joined
Apr 28, 2008
Messages
696
Like allready said. You can't move trackables. The objects DGUI uses are made out of UNITS. Trackables can only be used for static fullscreenmenus, not for dynamic grafic user interfaces like DGUI.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Like allready said. You can't move trackables. The objects DGUI uses are made out of UNITS. Trackables can only be used for static fullscreenmenus, not for dynamic grafic user interfaces like DGUI.

i got that just idk how u do with unit, because unit sometimes behave weird in few case also if example each potion cell a dummy unit then it must set allways there pitch and height and x, y depend on camera, question is how?

dummy allways must show 1 side for keep attachment allways to player with right direction, else the potion cell is moved, no?
that part harder to me

i tryed something like this

  • Untitled Trigger 002
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set real1 = (Angle from (Source of current camera view) to (Target of current camera view))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between (Position of Paladin 0001 <gen>) and (Source of current camera view)) Less than 220.00
        • Then - Actions
        • Else - Actions
      • Unit - Move Paladin 0001 <gen> instantly to ((Source of current camera view) offset by 210.00 towards real1 degrees)
      • Unit - Add Crow Form to Paladin 0001 <gen>
      • Unit - Remove Crow Form from Paladin 0001 <gen>
      • Animation - Change Paladin 0001 <gen> flying height to ((Source Z of current camera view) / 2.00) at 0.00
atleast this keep paladin on bottom/center but idk if its work same with every screen resolution also still dont work when i am on bottom of map so source camera is outside from map
 
Last edited:
Level 11
Joined
Apr 28, 2008
Messages
696
The models of the units used as buttons etc. are fully billboarded. That means they auto align to the viewer. The system only have to update their position and flyhight. The needed values are calculated in DGUI by simulating a camera and storing the values in 3d vectors.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
The models of the units used as buttons etc. are fully billboarded. That means they auto align to the viewer. The system only have to update their position and flyhight. The needed values are calculated in DGUI by simulating a camera and storing the values in 3d vectors.

y, i checked dgui but i failed to convert to normal jass, coz i wanted make my own functions for set it.

ok i can check the camera z-angle(attack angle or what), roll etc.

in calculations atm just tryed get manually what height and x,y needed for for make the correct unit position, i wanna try make something like ur potion bar later :)

sadly i cant give more rep coz dont allow me

[UPDATE]
I am curios about things like the trade system, there have alot item slot, each item slot 1 trackable and eahc potion slot 1 unit but the more interesting the hp bar, coz the hp bar length is dynamic (so i guess 0-100% i guess that not 100 unit if hp is 100%)

also this getlocal path thing work with image too, example i want make multiplayer inventory system based on ground (camera angle is 90 grade with ground), so i can make invetory system without change the image or unit height so something like 2d instad using height?
 
Status
Not open for further replies.
Top