Help plz

Beaves36

New Member
Reaction score
0
Ok so i took a regular playing map and i want to be able to add new races without over riding the old ones. How do i do it? and make it an option that can be picked like you normally do before a game starts? I looked under tech tree properties but it does give any new options for the race i created. Help plz
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
as far as i know, without being some mad wc modder, in which case it would only take effect on your own computer, you cant make additional races available to be picked before a game starts :/

my suggestion is making the players choose a race when the game starts with a dialog :thup: then you could have as many as you want.
 

Beaves36

New Member
Reaction score
0
dang because i wanted to keep it basically the same because me and my friends just like to play simple games but we need more variety. Using same shit over and over is boring hahaha. Because if i use a option in the beginning the computer wouldnt pick id had to randomize it all and thatd be gah... i hate gui code. Could it be possible to get one of the new races if the person picked random like how u can random a secret hero in footmen?
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
oh yeah, very easily =p its literally a thing that acts just like this conversation:

atkthis: alright guys, pick a number 1-10

Harry: 7!! 7!!!@ GAAAH I PICK 7!!
atkthis: >.> jesus. fine 7, that was orcs
Pete: 5.
atkthis: that was the raging homo's >.>

etc.

you have it give each player a random number :] and according to that number, you get a race.

edit:
here, im going to bed, but tell you what. do your races and things, and ill do those triggers for you :] k? wouldn't take me very long, and you guys would get to have fun, which in the end, is all a mapper does what they do, for ... if that made any sense :p just send me a private message with the map or a link or something, and what exactly it is you want to be done, and ill send it back completed :]
 

aussj4link

New Member
Reaction score
3
This is actually pretty simple, I did it in a couple of my maps actually.

Trigger:
  • Ini Options
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of Diag_1 to Choose Your Style
      • Dialog - Create a dialog button for Diag_1 labelled Hero War
      • Set Diag_Hero = (Last created dialog Button)
      • Dialog - Create a dialog button for Diag_1 labelled Melee
      • Set Diag_Melee = (Last created dialog Button)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 1 (Red)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 2 (Blue)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 3 (Teal)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 4 (Purple)
        • Else - Actions
          • Do nothing




Trigger:
  • Race Pick Buttons Red
    • Events
      • Dialog - A dialog button is clicked for RacePick_Red
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Human_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Human starting units for (Triggering player) at ((Triggering player) start location) (Include Heroes)
          • Player - Set (Triggering player) Current gold to 450
          • Player - Set (Triggering player) Current lumber to 175
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Orc_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Orc starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 450
          • Player - Set Player 1 (Red) Current lumber to 175
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to NightElf_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Night Elf starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 700
          • Player - Set Player 1 (Red) Current lumber to 350
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Undead_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Undead starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 1600
          • Player - Set Player 1 (Red) Current lumber to 500
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Demon_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Demon starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 800
          • Player - Set Player 1 (Red) Current lumber to 500
        • Else - Actions



You can change whatever you need here, starting units, players, pretty much anything. Also I used a specific player on everything but you can change it all to (Triggering Player) to make the triggers a lot simpler.
Also as an Initialization probably will need:

Trigger:
  • Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Remove creeps and critters from used start locations (for all players)


This way it will get rid of creeps if you have them on your map. Hope this helps let me know if anything is not clear. :D
 

Beaves36

New Member
Reaction score
0
just wondering if that would random any custom type races or if thatd just random the 4 classes
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
thats not a random system, its a pick your race system. combine what he sied and what i sied in that other post :thup: then you can have a choice as to weather you random, or pick
 

aussj4link

New Member
Reaction score
3
Ok I made a bran new map to test everything out, this should do what you want:

Trigger:
  • Dialog Ini
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Dialog - Change the title of Race_Pick to Choose your Race
              • Dialog - Create a dialog button for Race_Pick labelled Human
              • Set Human_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Orc
              • Set Orc_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Night Elf
              • Set NightElf_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Undead
              • Set Undead_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Random
              • Set Random_Button = (Last created dialog Button)
              • Dialog - Show Race_Pick for (Picked player)
            • Else - Actions


This will create a dialog for all user controlled players, including a random button.

Trigger:
  • Race Pick
    • Events
      • Dialog - A dialog button is clicked for Race_Pick
    • Conditions
    • Actions
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Human_Button
        • Then - Actions
          • Melee Game - Create Human starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Orc_Button
        • Then - Actions
          • Melee Game - Create Orc starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to NightElf_Button
        • Then - Actions
          • Melee Game - Create Night Elf starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Undead_Button
        • Then - Actions
          • Melee Game - Create Undead starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Random_Button
        • Then - Actions
          • Set Random_Int = (Random integer number between 1 and 4)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 1
            • Then - Actions
              • Melee Game - Create Human starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 2
            • Then - Actions
              • Melee Game - Create Orc starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 3
            • Then - Actions
              • Melee Game - Create Night Elf starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 4
            • Then - Actions
              • Melee Game - Create Undead starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
        • Else - Actions


This will enable the buttons on your dialog to work, including the random button which uses a random Integer Variable to decide which race is chosen. If you want a chance that if you chose random you can get kind of a secret race just add another:

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)


And change the integer value to 5, also make sure you change:

Trigger:
  • Set Random_Int = (Random integer number between 1 and 4)


to:

Trigger:
  • Set Random_Int = (Random integer number between 1 and 5)


and place you custom starting Building(s) and Unit(s) in place of

Trigger:
  • Melee Game - Create starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)


Trigger:
  • Comp Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to Computer
            • Then - Actions
              • Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Include Heroes)
            • Else - Actions
      • Melee Game - Run melee AI scripts (for computer players)


This will run the computer for you, you can choose which race the comp will be or random from the map selection screen. Again let me know if you need any help. Sorry I didn't realize you wanted a random system before, so I made one here, hope it helps.


Conclusion:

This will use 1 Integer Variable which is used for the randomize for the races. It will also need Dialog Button Variables for all your races, here I have used 4 of them for the default races any more will require a Dialog Button Variable if you plan to use it for your Dialog, if you just want it to be a chance in the random you wont need it. Essentially its 3 triggers, one for your dialog, 1 for the dialog buttons to work, and one so the computer will do its thang.
 

Attachments

  • Triggers!.w3x
    29 KB · Views: 128
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top