1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

WW2: World in Flames [REVISED]

Discussion in 'Map Development' started by Fingolfin, Jul 16, 2010.

  1. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    That's great, who knows, this could even be the RTS version of a DotA.
     
  2. PastTime

    PastTime

    Joined:
    Sep 30, 2010
    Messages:
    156
    Resources:
    0
    Resources:
    0
    How?
    It's more of a sandbox game where you can decide what you want to do. To parcipate in war or keep quiet until they come for you, you don't get gold for ever lasting items.
    DotA is DotA
    WiF is WiF
    I would say a lot of other things but Im tired and I think most people will get the point.
    If you meant that it could be as popular as DotA then I can admit that there's always chance for big popularity beneath W3noLifers
     
  3. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    What do you think about making motorized infantry? i.e. infantry sitting on tanks?
    That would require to display the infantry sitting on the tank 1), to make infantry able to fire 2) and be able to load/unload infantry 3).
    3) Can use hashtable to store the number of soldiers loaded into each tank
    2) Can use dummy units and rotated special effects with "Head" bone. To rotate a special effect you could create it as a dummy unit and lock it's body part to a point with height. The dummy's model could be a flash. Then sitting infantry's guns should be pointed forward.
    1) you can use attachment points sprite first, sprite second, sprite third, sprite fourth to attach sitting infantry models to (by giving dummy abilities to units) them (those points are used for fire on buildings, btw).
    So what do you think?

    EDIT: @Vuormalainen, you do not have to use the real Cargo Hold, Load and Unload abilities, so as not to override the interface. And I think I said in part 3) that you should use a hashtable to store loaded infantry, which would give you an idea that you can fake Cargo Hold with dummy load/unload abilities. In a hashtable you could also maybe store a Unit Group, which contains all units in it that in fact are hidden using Unit - Hide. Anyway, just random thoughts.

    I can make an example map to show how this can work whilte retaining the normal interface.

    EDIT2: Made the map and attached it, just to show things like these are possible and easy.
     

    Attached Files:

    Last edited: Jun 7, 2011
  4. Hugomath

    Hugomath

    Joined:
    Sep 4, 2008
    Messages:
    591
    Resources:
    0
    Resources:
    0
    kkots: that sounds like an interesting idea, but lets see what they think.
     
  5. Vuormalainen

    Vuormalainen

    Joined:
    Oct 19, 2008
    Messages:
    567
    Resources:
    2
    Maps:
    2
    Resources:
    2
    This is not Men of War. That would require a lot work and code that runs pretty often and won't be worth it for the rare times you even would use this feature. Also, as when units are loaded into another, you can't see the transporters stats expect mana and hp as they are hidden by the transport interface. And We already have troop transports :D (which I've rarely seen anybody use)

    And to remind people yet again how BIG WiF is and how many units we usually have on the map.
    WiF's map size is 480x480, the biggest possible with JassNewGen. The biggest possible with the normal editor is 256x256.

    A image from one of the earlier tests showing 9832 units produced.
    [​IMG]
     
  6. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    Nice, WoWWars is good lol...
    What I meant earlier was that it could be as popular as DotA, but among the RtS Games.
     
  7. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,190
    Resources:
    153
    Models:
    143
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    153
    We already have the land transports for this, as i believe vuorma mentioned. Also, it was VERY uncommon to have infantry fighting from atop of tanks, they only did that for transport, occasionally, otherwise they were more likely to huddle up behind the tanks for cover.
     
  8. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    I've got 2 suggestions.
    1) If you haven't already implemented mass control, what do you think about having a hero unit (a dummy hero for example which can be selected using F1) with abilities like Order all nearby units to move, attack-move, stop, hold position?
    Or if it is a dummy hero, then you could select a circle area in which to pick units and then perform a mass order.
    2) If you are going to make it so that X units are trained instead of 1, maybe you should order them to attack-move to the structure's rally point. It can be done using Unit group - Last created unit group to refer to units created via Unit - Create X Footmen.

    I've got these ideas from The Alternate Future I've just been playing for 1 hour on Battle.net. It didn't have these features, making it hard to control so many units.
    Also, what about a unit limit?
     
  9. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,190
    Resources:
    153
    Models:
    143
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    153
    Yeah, we hav emass control in the map already which is very appreciated, and we have discussed the idea of making several infantry units train at once, but we sort of came to the conclusion that infantry is good for when you have those last 80 gold that can't be used for anything else, and you can jsut spend them on some soldiers. Having a squad would make it have to cost about as much as a light tank, and then it wouldn't be as appealing for players to purchase them (and it would feel like you afford less of them).

    If you are still interrested in our transport system, you can check it out here.
     
  10. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    It says that your transport engine takes 750 lines of code.
    I've got an idea of how to do it with less lines, but in GUI. Going to edit this post in some short time with trigger.
     
  11. .VTZ.

    .VTZ.

    Joined:
    Dec 17, 2009
    Messages:
    784
    Resources:
    0
    Resources:
    0
    just awesome :)
    the ship and the system
     
  12. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    attachments' names
    Origin Ref
    Overhead Ref
    Foot Left Ref
    Foot Right Ref
    Hand Left Ref
    Hand Right Ref
    Chest Ref
    Weapon Ref
    Head Ref
    Sprite First Ref
    Sprite Second Ref
    Sprite Third Ref
    Sprite Fourth Ref
    Sprite RallyPoint Ref
    BirthLink
    Foot Right Rear Ref
    Foot Left Rear Ref
    Chest Mount Ref
    Chest Mount Rear Ref
    Chest Mount Right Ref
    Chest Mount Left Ref
    Chest Ref
    Origin Alternate Ref
    Overhead Alternate Ref
    Foot Left Alternate Ref
    Foot Right Alternate Ref
    Chest Alternate Ref
    Head Alternate Ref
    Hand Left Alternate Ref
    Hand Right Alternate Ref
    Weapon Alternate Ref
    Chest Right Ref
    Chest Left Ref

    (33)
    Attachment names seem to consist of the following words: Foot, Hand, Chest, Origin, Overhead, Head, Weapon, Sprite, Mount, Rear, Left, Right, RallyPoint, First, Second, Third, Fourth and they always end with Ref. No other words must be used.
    For example "foot mount rear first left right ref" will work, while "customname left" will not.
    Also, I've made an example map with that smaller transport thing done.
    And triggers.
    • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- counter is an Integer initially equal to 0 --------
      • -------- effect1, effect1f, effect2, effect2f, effect3, effect3f, effect4, effect4f, effect5 are Special Effect Arrays --------
      • -------- temp_point is a Point --------
      • -------- unitgroups is a Unit Group Array --------
      • Unit - Set the custom value of Siege Engine 0000 <gen> to counter
      • Set counter = (counter + 1)
      • Special Effect - Create a special effect attached to the foot mount rear alternate of Footman 0007 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl

    • Load
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to LOAD
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to unitgroups([Custom value of (Casting unit))]
      • Unit - Hide (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in unitgroups[(Custom value of (Casting unit))]) Equal to 1
        • Then - Actions
          • Unit - Add UNLOAD to (Casting unit)
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using war3mapImported\BarEmpty.mdx
          • Set effect1[(Custom value of (Casting unit))] = (Last created special effect)
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using war3mapImported\Bar1.mdx
          • Set effect2[(Custom value of (Casting unit))] = (Last created special effect)
          • Special Effect - Create a special effect attached to the foot left of (Casting unit) using units\human\Footman\Footman.mdx
          • Set effect1f[(Custom value of (Casting unit))] = (Last created special effect)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in unitgroups[(Custom value of (Casting unit))]) Equal to 2
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using war3mapImported\Bar2.mdx
          • Set effect3[(Custom value of (Casting unit))] = (Last created special effect)
          • Special Effect - Create a special effect attached to the foot right of (Casting unit) using units\human\Footman\Footman.mdx
          • Set effect2f[(Custom value of (Casting unit))] = (Last created special effect)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in unitgroups[(Custom value of (Casting unit))]) Equal to 3
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using war3mapImported\Bar3.mdx
          • Set effect4[(Custom value of (Casting unit))] = (Last created special effect)
          • Special Effect - Create a special effect attached to the hand left of (Casting unit) using units\human\Footman\Footman.mdx
          • Set effect3f[(Custom value of (Casting unit))] = (Last created special effect)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in unitgroups[(Custom value of (Casting unit))]) Equal to 4
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using war3mapImported\Bar4.mdx
          • Set effect5[(Custom value of (Casting unit))] = (Last created special effect)
          • Special Effect - Create a special effect attached to the foot right of (Casting unit) using units\human\Footman\Footman.mdx
          • Set effect4f[(Custom value of (Casting unit))] = (Last created special effect)
          • Unit - Remove LOAD from (Casting unit)
        • Else - Actions

    • Unload
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to UNLOAD
    • Actions
      • Set temp_point = (Position of (Casting unit))
      • Unit Group - Pick every unit in unitgroups[(Custom value of (Casting unit))] and do (Actions)
        • Loop - Actions
          • Unit - Unhide (Picked unit)
          • Unit - Move (Picked unit) instantly to temp_point
      • Custom script: call RemoveLocation(udg_temp_point)
      • Unit Group - Remove all units from unitgroups[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect1[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect1f[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect2[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect2f[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect3[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect3f[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect4[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect4f[(Custom value of (Casting unit))]
      • Special Effect - Destroy effect5[(Custom value of (Casting unit))]
      • Unit - Add LOAD to (Casting unit)
      • Unit - Remove UNLOAD from (Casting unit)


    EDIT: BirthLink attachment doesn't seem to work. I found it in Undead Necropolis from War3x.mpq
     

    Attached Files:

  13. Vuormalainen

    Vuormalainen

    Joined:
    Oct 19, 2008
    Messages:
    567
    Resources:
    2
    Maps:
    2
    Resources:
    2
    kkots:
    If you had watched our video with several features you wouldn't need to ask how mass command works
    http://www.youtube.com/watch?v=BhYagUuzrpo&feature=channel_video_title

    Also you don't need to explain how to code, all you have to tell us is your ideas. I'am just saying this because you're just waisting your own time by doing so.

    Actually, I think that your transport system would be equally long in JASS code... And as far as I know, theres no way for GUI to register the events of when players simply right click to load units, or left click to unload them. Also, our system still uses the base of the "normal" transport system with some additions, while yours is a unnecessary reconstruction which as I mentioned can not use the simple right click and left click functions which are necessary for a massively big game as wif.
     
  14. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    @Vuormalainen I've made GUI use right click.
    Though, I was lazy a bit and decided not to change channel-based Load ability into Sorceress' Slow. So I used a bit of custom script...
    • Right-Click
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Owner of (Ordered unit)) Equal to (Owner of (Target unit of issued order))
      • (Issued order) Equal to (Order(smart))
      • (Leve of LOAD for (Ordered unit)) Not equal to 0
    • Actions
      • Custom script: call IssueTargetOrderBJ( GetOrderedUnit(), "channel", GetOrderTargetUnit() )


    EDIT: new map.

    EDIT2: Registering just a left click requires Trackables, as I heard. Those are weird monsters to me and the only thing I know about them is that there're no such things in GUI, so instead of just left clicking you could... use a hotkey to order transport to unload.
     

    Attached Files:

  15. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,190
    Resources:
    153
    Models:
    143
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    153
    kkots: i never said that the transport system took 750 lines of code, i said that the unit indexer does. A unit indexer is a library made for giving each unit on the map an index spanning from 0 to 8191, so that you can use it as an array index to store data. It also features other functions for attaching data to objects.

    The transport code itself is only 40 lines of code, and endlessly more eficcient than what you wrote. I see no point in creating a new transport system when there is one integrated with warcraft. What vuorma ment about left clcking to unload units, is that in this integrated system, unit show little icons in the UI to display exactly what kind of untis are being transported. You can click on those to unload the unit, but there is no way to register when a player does that, therefore i had to import a custom event handler that i use to check whenever one of the transported units reenters the map.

    If we WOULD make a custom transport system though, we would do it like we do everything else - in jass.
    Usinga jass struct would be way more efficient than that simply because:

    If you make a group array of maximum ammount of groups, once again that is 8192, and set their deafult value in GUI to be a new group, then the compiler will simply make a loop that initializes each of theese handles with a new group. This means that regardless of how many transports you have, you will always have 8192 groups in memory taking up space!!
    In vJass, you can simply create a struct that holds a group variable, and have the group be created when the struct is created (which is when the transport is built), and destroy it when the struct is destroyed (when the transport dies).

    Incase you are interrested, here is the transport script:

    Code (vJASS):
    scope TransportUnits initializer OnInit
        private function OnLoad takes nothing returns boolean

            //german
            if GetUnitTypeId(GetTransportUnit()) == 'h01K' then
              call SetUnitAbilityLevel(GetTransportUnit(), 'A01R', Transport_CountPassengers(GetTransportUnit())+1)
            endif
            //soviet
            if GetUnitTypeId(GetTransportUnit()) == 'h00I' then
              call SetUnitAbilityLevel(GetTransportUnit(), 'A01S', Transport_CountPassengers(GetTransportUnit())+1)
            endif
            //allied
            if GetUnitTypeId(GetTransportUnit()) == 'h00G' then
              call SetUnitAbilityLevel(GetTransportUnit(), 'A01T', Transport_CountPassengers(GetTransportUnit())+1)
            endif
           
            return false
        endfunction
       
        private function OnUnload takes nothing returns boolean
            //german
            if GetUnitTypeId(GetUnloadingTransport()) == 'h01K' then
              call SetUnitAbilityLevel(GetUnloadingTransport(), 'A01R', Transport_CountPassengers(GetUnloadingTransport())+1)
            endif
            //soviet
            if GetUnitTypeId(GetUnloadingTransport()) == 'h00I' then
              call SetUnitAbilityLevel(GetUnloadingTransport(), 'A01S', Transport_CountPassengers(GetUnloadingTransport())+1)
            endif
            //allied
            if GetUnitTypeId(GetUnloadingTransport()) == 'h00G' then
              call SetUnitAbilityLevel(GetUnloadingTransport(), 'A01T', Transport_CountPassengers(GetUnloadingTransport())+1)
            endif
            return false
        endfunction
       
        private function OnInit takes nothing returns nothing
            local trigger t=CreateTrigger()
            call Transport_RegisterLoadEvent(t)
            call TriggerAddCondition(t,Filter(function OnLoad))
           
            set t=CreateTrigger()
            call Transport_RegisterUnloadEvent(t)
            call TriggerAddCondition(t,Filter(function OnUnload))
        endfunction
    endscope


    Instead of having different if-statements for how many units the transport contains, i simply use a spellbook that i give to it on spawn, containing 6 different levels - one with a "target" attachment of a soldier sitting in the back, one with two soldiers sitting in the back, one with two in the back and one in the middle, etc. I then simply check when a unit is loaded or unloaded, and then i set the ability level to the ammount of soldiers carried. Voila!

    Also, you have to remember, that behind that GUI code of yours, there is a ton of jass code hiding. Just try converting it into custom text and you will see! Conditions in GUI get their very own function, instead of being inlined, which is a very clumsy way of handling it.
    Also, remember that everytime you use a "unit group" function, you create a group that will leak unless you destroy it. use this: "set bj_wantDestroyGroup = true" in a custom text field before you use theese functions to make it so that the group will be destroyed when the script is finished with it.

    Finally, i have no idea why you did this:

    • Custom script: call IssueTargetOrderBJ( GetOrderedUnit(), "channel", GetOrderTargetUnit() )


    since you are making it in custom script anyways, please do the trouble of removing the "BJ" at the end of the function. "BJ" is simply an indicator that this function is not really a native, it is just a function that has been "dummified" to be forced into GUI and will only lead to another function inside it, doing practically the same thing but faster.

    I appreciate that you are trying to help us, but as told before - we know how to code, don't worry.
     
  16. Vuormalainen

    Vuormalainen

    Joined:
    Oct 19, 2008
    Messages:
    567
    Resources:
    2
    Maps:
    2
    Resources:
    2
    EDIT:
    Fin got faster :(
     
  17. Garfield1337

    Garfield1337

    Joined:
    Jul 6, 2009
    Messages:
    1,806
    Resources:
    4
    Maps:
    1
    Spells:
    3
    Resources:
    4
    You should null the t local trigger variable in the end, Fin, it's leaking the handle pointer. Though it doesn't matter that much since it's only executed once ;D
     
  18. kkots

    kkots

    Joined:
    Jun 21, 2007
    Messages:
    534
    Resources:
    0
    Resources:
    0
    Okay, but I don't really know any JASS (I didn't understand 95% of that JASS code). I never knew function IssueTargetOrderBJ, I got it from a converted trigger and simply modified it.
    Fingolfin, I'm not sure you need to import a custom event handler to register when units are unloaded. Take a look:
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Goblin Zeppelin) and do (Actions)
        • Loop - Actions
          • Set temp_unit = (Picked unit)
          • Unit Group - Pick every unit in loadedunits[(Custom value of temp_unit)] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is loaded into temp_unit) Equal to False
                • Then - Actions
                  • Game - Display to (All players) the text: a unit has been unloaded
                  • Unit Group - Remove (Picked unit) from loadedunits[(Custom value of temp_unit)]
                • Else - Actions
                  • Do nothing


    LAST EDIT: Well, looks like I've got to learn JASS. And an enlightenment came to me and said that basically there's a little chance that you might add anything new to your project when it is in its final stage of production. This rule applies to all projects.
     
    Last edited: Jun 9, 2011
  19. Vuormalainen

    Vuormalainen

    Joined:
    Oct 19, 2008
    Messages:
    567
    Resources:
    2
    Maps:
    2
    Resources:
    2
    You do know this code is executed 3 times a second?

     
  20. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    How about an effect on tanks which affect them when they're moving on a hill.
    Like, if an enemy tank shoots your tank "upwards" from the hill below you, there's a higher chance for your engine or tires to be destroyed.