Staredit Network > Forums > SC1 Mapping Tools > Topic: Tool to generate triggers to create a random unit
Tool to generate triggers to create a random unit
Jan 25 2022, 10:47 pm
By: Prankenstein  

Jan 25 2022, 10:47 pm Prankenstein Post #1



Maps that give random units to players are popular (and the map I'm currently creating relies on it) so I created a little tool using Javascript and decided to share it here for what it might be worth to someone. It's in a very crude state, as I created it for my specific purpose alone.

It allows the user to create and input a CSV file (created in Excel or other spreadsheet) which in turn generates the necessary trigger conditions and actions to create a random unit.

In my case, I'm randomizing 6 switches to give me one random unit out of 64 possible units. In the HTML file, I simply set the variable "x = 6", and in the CSV file, there's 64 rows which contain the unit and the number of units to be spawned.

Zip file containing the HTML file and sample CSV is attached. Just simply run the HTML file and select the CSV to see it in action.



Attachments:
random-unit-trigger-generator.zip
Hits: 1 Size: 122.13kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:12 am]
NudeRaider -- cwinowich
cwinowich shouted: guys does anyone know, what is the max unit limit on extended now ?
don't quote me on it, but I think they doubled these limits. (not dimensions)
[07:10 am]
NudeRaider -- Ultraviolet
Ultraviolet shouted: these guys may as well be pissing in the wind
sounds liberating
[04:43 am]
cwinowich -- i cant quite remember, and cant find it anywhere, 2400 or something? idk
[04:43 am]
cwinowich -- guys does anyone know, what is the max unit limit on extended now ?
[2026-7-30. : 2:47 am]
Ultraviolet -- these guys may as well be pissing in the wind
[2026-7-29. : 12:59 pm]
Vrael -- 1
[2026-7-29. : 10:32 am]
NudeRaider -- too much text. i cant tell which one yuo want removed. tell me 1, 2 or 3 for the one you want to keep.
[2026-7-29. : 3:16 am]
Symmetry -- that is a serious crime
[2026-7-29. : 3:11 am]
O)FaRTy1billion[MM] -- right to jail
[2026-7-28. : 11:29 pm]
Vrael -- idk what I did but I like triple-posted in SD sorry
Please log in to shout.


Members Online: RIVE