This topic will be used to keep a running list of "pro tips", cool things you can do in ULX that you probably never realized
Tip #1You can and should use the garrysmod root for configs! For example, the default ULX config is at garrysmod/addons/ulx/data/ulx/config.txt. Instead, you can put it simply at garrysmod/data/ulx/config.txt. You can also do this for map- or gamemod-specific configs. We also strongly recommend sticking your ulx_motd.txt in the garrysmod root.
The advantages of doing it this way are as follows. First and foremost, you don't have to go as deep in folders looking for the config. This also makes it so that the next version of ULX won't overwrite your files.
Tip #2 (power users only)Very few people know about the "ulx ent" command, and fewer still know the power behind the command. You can spawn
any entity with
any parameters you can specify from Hammer. The format for this command is "ulx ent <entity> <flag>:<value> | <flag2>:<value2>...". The entity can be any of the
supported entities. The flags and values are the same you would specify from Hammer, also
listed here.
We'll start off with an easy example. Say the server I'm playing on restricts the rpg, but I need it for artistic reasons. Assuming I have access to the command, I simply open my console and enter:
ulx ent weapon_rpg
There is now an rpg where I was looking when I used the command.
Next, let's say I want to spawn an Alyx ragdoll. This time I would use:
ulx ent prop_ragdoll model:models/alyx.mdl
There's the Alyx ragdoll!
Now, let's say I want to spawn an Alyx ragdoll at the origin. A bit trickier this time, more than one flag and value pair needs to be separated with '|'
ulx ent prop_ragdoll model:models/alyx.mdl | origin:0 0 0
Alyx ragdoll at the origin!
To create an ammo crate (play around with the ammotype number for a different ammo):
ulx ent item_ammo_crate ammotype:8 | solid:6
To create a chair you can sit in:
ulx ent prop_vehicle_prisoner_pod model:models/nova/jeep_seat.mdl | limitview:0
Create a combine that goes around releasing manhacks:
ulx ent npc_metropolice manhacks:10 | additionalequipment:weapon_stunstick
Now for the most advanced ent we'll cover here, a molotov bottle. You can specify outputs from the ulx ent command as well! The format for this is <outputname>:<targetname>,<inputname>,<parameter>,<delay>,<max times to fire, -1=infinite>. This following command makes a bottle that explodes and lights whatever it hits on fire.
ulx ent prop_physics physdamagescale:0.05 | model:models/props_junk/garbage_glassbottle001a.mdl | explodedamage:10 | exploderadius:100 | OnBreak:!activator,ignite,,0,-1 | health:9999
Other notes: You can set spawnflags using "spawnflags:value", IE "spawnflags:256" on a prop_physics makes the prop generate an output on use. This value is a
bitmask.