Unvanquished icon indicating copy to clipboard operation
Unvanquished copied to clipboard

implement "target_force_class" entity to map mappers able to change a player's class

Open bmorel opened this issue 2 years ago • 17 comments

This entity is used in operation blackout, which itself very probably requires a tremulous mod. Licence and author of the map are unknown to me, but the source is available.

An example of use of this entity from that map is:

// entity 919
{
"classname" "target_force_class"
"origin" "-3376 -2484 904"
"class" "builder"
"targetname2" "Teleport-1"
}
// entity 920
{
"classname" "trigger_class"
"target" "Teleport-1"
"classes" "level0"
"wait" "5"
// brush 0
{
( -3368 -2460 840 ) ( -3368 -2524 840 ) ( -3432 -2460 840 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( -3328 -2500 800 ) ( -3392 -2500 800 ) ( -3328 -2500 792 ) common/trigger 0 32 0 0.5 0.5 0 0 0
( -3360 -2468 800 ) ( -3360 -2468 792 ) ( -3360 -2532 800 ) common/trigger 0 32 0 0.5 0.5 0 0 0
( -3432 -2524 792 ) ( -3368 -2524 792 ) ( -3432 -2460 792 ) common/trigger 0 0 0 0.5 0.5 0 0 0
( -3424 -2532 792 ) ( -3424 -2532 800 ) ( -3360 -2532 792 ) common/trigger 0 32 0 0.5 0.5 0 0 0
( -3392 -2564 792 ) ( -3392 -2500 792 ) ( -3392 -2564 800 ) common/trigger 0 32 0 0.5 0.5 0 0 0
}
}

From what I can guess, this entity (919) is triggered by 920, and transform what triggered it into a granger.

Since this map have no licence information, it must be considered non-free, hence should not be modified (despite we have the source). Full support of this map would still be desirable since it implements a scenario game, which could be useful to create unvanquished scenarios, like tutorial (@necessarily-equal might be interested) or campaigns. It can also, of course, allow to implement objective-based maps like one can find in Unreal Tournament 99.

bmorel avatar Jul 21 '22 15:07 bmorel

Actually, I'm not sure it's desirable to have full support of this outside of a mod, several things in there are pretty weird (bool algebra with entities for example) but the feature detailed here really look like something which could be pretty useful

ghost avatar Jul 21 '22 15:07 ghost

I believe the mod was called AMP (Advanced Map Pack(?)). That was the only map I heard of using it, so it probably doesn't make sense to add support.

slipher avatar Jul 21 '22 16:07 slipher

For the record it's already possible to do this by using g_disabledClasses, or by setting it inside the map

necessarily-equal avatar Jul 21 '22 16:07 necessarily-equal

I believe the mod was called AMP (Advanced Map Pack(?)).

Thanks, I'll try to find that.

I agree that some of the entities they use are pretty weird and I do not see those as useful for (non-modded) unvanquished, but the feature to force equipment/class changes after a teleportation seems interesting to me.

For the record it's already possible to do this by using g_disabledClasses, or by setting it inside the map

Huh... I do not see how g_disabledClasses can be used to force a player to respawn as a bigger class for free or to force a human to "acquire" a lucifer cannon?

ghost avatar Jul 21 '22 16:07 ghost

Reworded title, it's clearer like this.

ghost avatar Jul 22 '22 07:07 ghost

Is this about spawn class only? So that you can evolve to something else? Or does this lock the player into some form and equipment?

For the record it's already possible to do this by using g_disabledClasses, or by setting it inside the map

Huh... I do not see how g_disabledClasses can be used to force a player to respawn as a bigger class for free

Well, that isn't implemented yet because no need was shown yet, but it could be done.

… or to force a human to "acquire" a lucifer cannon?

Huh, does this do weapons too? You could really say bsuit+lcannon?

necessarily-equal avatar Jul 22 '22 09:07 necessarily-equal

The feature request is about making a player automatically receive a specific class when going through a specific area. Blackout uses this, and also uses target_force_weapon. I suspect (with good reasons to do so) that this is what they are meant to do. It also features a target_equipment, I am unsure yet about what this does (I think it opens things if the player wields a specific weapon. If so, they it's already implemented under a different name in unvanquished).

ghost avatar Jul 22 '22 13:07 ghost

You should really find the mod and ascertain what these things actually do before trying to implement compatibility with them...

slipher avatar Jul 22 '22 17:07 slipher

imo, the AMP patch is too mapper specific though it does unlock nice functionality. Unlocking this functionality via generic scripting will be much better.

DolceTriade avatar Jul 23 '22 06:07 DolceTriade

Sure, it would be better via scripting, but the easiness to implement it directly in code might be much higher.

ghost avatar Jul 23 '22 08:07 ghost

I'm not sure I agree. There was a reason that the AMP patch wasn't upstreamed into Tremulous: the devs thought it was hacky.

DolceTriade avatar Jul 23 '22 23:07 DolceTriade

Would you happen to have a trace of the hack around? Even if I do not upstream it, it might be nice to have a branch for it, "for future". And for my fun.

ghost avatar Jul 23 '22 23:07 ghost

Maybe we can consider whether we want to allow the feature the day we will actually need it? For both the juggernaut and the tutorial who attempt forcing a class, don't use such an entity and don't benefit from such an entity.

necessarily-equal avatar Jul 23 '22 23:07 necessarily-equal

Juggernaut: I'm calling ClientSpawn directly because I want to control precisely where the client spawn, and set client->pers.classSelection to whatever I want to spawn before. https://github.com/necessarily-equal/Unvanquished/blob/juggernaut/src/sgame/sg_juggernaut.cpp#L118

Tutorial: I'm using g_disabledClasses. I'll need to improve the UI to hide the disabled one.

On Sat, Jul 23 2022 at 16:30:06 -07:00:00, Morel Bérenger @.***> wrote:

Would you happen to have a trace of the hack around? Even if I do not upstream it, it might be nice to have a branch for it, "for future". And for my fun.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

necessarily-equal avatar Jul 25 '22 13:07 necessarily-equal

So, if you wanted to force the player to use a specific weapon or equipment, like marauder for walljumping, lucifer cannong to teach the use of the 2 modes, you would simply forbid all equipment but those ones?

ghost avatar Jul 25 '22 18:07 ghost

I think I would disable all class/equipment except for dretch or naked+rifle, and make a map where the next part is only accessible if. For example with a sensor entity and a commanded door. But maybe Ishq has some lua in mind

On Mon, Jul 25 2022 at 11:00:40 -07:00:00, Morel Bérenger @.***> wrote:

So, if you wanted to force the player to use a specific weapon or equipment, like marauder for walljumping, lucifer cannong to teach the use of the 2 modes, you would simply forbid all equipment but those ones?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

necessarily-equal avatar Jul 26 '22 00:07 necessarily-equal

I see.

ghost avatar Jul 26 '22 07:07 ghost

ping @cu-kai after our talking in-game today

ghost avatar Mar 28 '23 17:03 ghost