Author Topic: randomweps.cs  (Read 1397 times)

I wanted to make a TDM more exciting.
So I made a script that gives each team a new set of weapons every round.
If you are not in a team, or are outside of a minigame, you get a new set of weapons every time you spawn.

exec("base/randomweps.cs");
use /dumpweapons
  goto Blockland/config/RandomWeps/chanceslist.txt to change each items "chance" of being chosen.
  by default all are set to 0.  so this script wont do anything.

Use InitRandomWeps();
(Or wait for someone to join.)

Congrats now everyone gets a few random items when they spawn.


you could make it easier where it gets all the weapon datablocks from all the bricks in the map that have their assigned items.

Blockland has a very clean-cut and simple Add-On system, designed specifically so players don't have to fill random folders with miscellaneous files. It's really, really not that hard to call your file server.cs, make a blank description.txt and compress it in to a .zip

you could make it easier where it gets all the weapon datablocks from all the bricks in the map that have their assigned items.
That's one way to do it.  I'm assuming you mean to search through all of the bricks on the server for items, and then enter those into a list of random items to pick from.

Which- I dunno.  My first thought is that the datablock limit is about 8000, and the brick limit is around a million.  So,there could be lag when dumping the list.  But that only happens once, so that's not really an issue.

My second thought is that there could be problems if someone built a map with say, a super weapon in the middle that's really hard to get.  But with a randomized item system using spawned items, someone could just randomly get the super-weapon.  I guess you could make a system for enabling or disabling certain weapons.  But that makes things more complicated.

So I think that using spawned items for the weapon randomizer would work for a simple minigame, but makes things more complicated the larger or more complicated the minigame is.

Blockland has a very clean-cut and simple Add-On system, designed specifically so players don't have to fill random folders with miscellaneous files. It's really, really not that hard to call your file server.cs, make a blank description.txt and compress it in to a .zip
Yes, Blockland has a great add-on system.  It works well.

I don't really appreciate the new ui though.  Everything is so big and requires so much scrolling.  I liked the old system where I could see more of my add-ons at once.