Open schockocraft opened 2 years ago
i think it would be a lot better if weapons were grouped according to their ammo type
while grouping them by "pistol", "heavy", whatever seems to make real-world sense, it doesn't really make sense for a weapon replacement system where they'd spawn next to incorrect ammo which is just really inconvenient
or outright just group them based on the exact weapon they're replacing, like spawn types can just be "shotgun", "m16", "glock", etc and it'd be more explicit and give more control over where you want certain weapon types to be spawned (like if i wanted automatic pistols to have the "glock" spawn type and semi-auto pistols to have the "pistol" spawn type)
having weapon spawn type be a bitflag or table would also be great if you want a weapon to replace different kinds of weapon spawns
mhhh if you would go that route i'd suggest keeping the weapon groups but splitting off separate ammo consuming weapons into own groups. Because imo there's actually no reason a mac10 and a Huge shouldn't replace each other.
The weapon groupd could then be
Also regarding my
Then again there should be a way to spawn random primaries/ppistols/grenades
i have had some more thoughts, what if you'd use the weapon entitie's names for that? they get ignored by original ttt, and ttt2 could use these to derive additional information about how to replace these weapons.
for example weapons with the name ttt2_replaceable
would still be replaced, even on a map that already has ttt_random_weapon
s
One could also implement further subcategories for addons that add custom sweps to use.
for example grenades could be grouped into primarily damaging (Incendiary, etc.) and primarily tactical (Disco, Smoke) grenades. An incendiary grenade with the name ttt2_keep_similar
would then only be replaced by grenades that damage the player, aka only incendiary grenades in vanilla ttt2, but with the right addons also frag grenades and HEs.
alternatively i'd suggest splitting WEAPON_TYPE_NADE in the first place.
Idk if that would be worth an own suggestion tho, as it is already quite away from the original point.
imo there's actually no reason a mac10 and a Huge shouldn't replace each other
mappers typically place the m249 without any ammo nearby
i think there should be 3 options • a bundle to place the weapon + its ammo • place ammo alone • place weapon alone
i think there should be 3 options • a bundle to place the weapon + its ammo • place ammo alone • place weapon alone
already possible
I will come back to the general issue here, but I'm very busy at the moment
i think there should be 3 options • a bundle to place the weapon + its ammo • place ammo alone • place weapon alone
Yea that's already possible. there's a random ammo entity that will not have a weapon spawned, and the random weapon entity also has a configurable value to specify how much ammo it will spawen (which allows 0 aka no ammo aswell)
Also in vanilla TTT just placing specific weapons or ammo can be done however you want. just with TTT2's weapon randomization you get them being replaced aswell.
Unrelated: I thought about it furthert, and wouldn't it be actually possible to add support for a custom keyvalue in weapon entities for ttt2 only? i think vanilla ttt would just ignore it, and there wouldn't be an error or any other issues from that.
Then you could add a keyvalue to the ttt_map_settings for map wide weapon replacement rules, and to the weapon entities themselfes for rules for only that one weapon.
Is your feature request related to a problem? Please describe. With the automatic weapon replacement TTT2 introduces now weapons can spawn besides the wrong kind of ammo, because Weapons with differrent ammo types are grouped in the same weapon type.
This causes Pistols and Glocks to spawn besides Deagle Ammo (when replacing a Deagle), M16s besides smg ammo (when replacing a Mac10/249), and Mac10s/249s besides 9mm ammo (when replacing a M16).
Also there is no way for map makers or Server owners to define that certain maps should not have their weapons replaced.
Generally i would say, weapons should not be replaced, if there are (at least a few?)
ttt_random_weapon
entities on the map, as that already indicates that all other weapons are meant to stay the specific weapon chosen by the map maker or spawn script creator.Then again there should be a way to spawn random primaries/ppistols/grenades, instead of just a random anything, for maps created or edited with tt2 in mind, but this way should work so that the map would still be compatible with base ttt.
Describe the solution you'd like
ttt_random_weapon
entities seems to be the obvious choice to me.ttt_
), or not at allDescribe alternatives you've considered Alternatively to solution 1 you could also change close by ammo to the ammo type of the new random weapon type
Additional context -