Board index DeFRaG Mapping

New entities

Maps and the process of creating them

New entities

Postby BeRsErKeR » Jun 4th, '10, 7:41 am

Hi mappers,

I talked to cgg about new defrag entities. He said that he will add them to defrag if I write the code and send it to him. So this might be a chance to add many cool new entities. In this thread I want to gather some ideas.

Here is a list of entities I'm going to implement:

Code: Select all
trigger_savespeed
{
Speed storing trigger. Must be targeted at one or more entities.
Must point at a target_speed, which will store the speed value
of the player on touching.
-------- KEYS --------
wait : Seconds between triggerings, 1 default, -1 = one time only.
}

//=============================================================================

trigger_loadspeed
{
Speed restoring trigger. Must point at one target_speed.
The touching players speed will be set to the value that was stored
in the target_speed entity.
-------- KEYS --------
wait : Seconds between triggerings, 1 default, -1 = one time only.
}

//=============================================================================

target_speed
{
Used as a speed value storage by trigger_savespeed and trigger_loadspeed.
-------- SPAWNFLAGS --------
RESET         speed is reset to 0 when triggered by a trigger_loadspeed
}

//=============================================================================

target_addspeed
{
Adds speed to the player.
Negative values reduce the speed.
-------- KEYS --------
targetname: name used to trigger
speed: speed to add (default: 100)
-------- SPAWNFLAGS --------
PERCENTAGE: value is treated as percentage of current speed
}

//=============================================================================

target_stopMPTimer
{
Timer will stop if the given count of
players has triggered this timer.
-------- KEYS --------
targetname: name used to trigger
count: amount of players to stop timer (default: 2)
}

//=============================================================================

target_startMPTimer
{
Timer will start if the given count of
players has triggered this timer.
-------- KEYS --------
targetname: name used to trigger
count: amount of players to start timer (default: 2)
}

//=============================================================================

trigger_exchange
{
Must point to a target_exchange_pos or
target_exchange_items. The trigger is only
retriggerable if the exchange has happened.
-------- KEYS --------
target: name of target entity
}

//=============================================================================

target_exchange_pos
{
The first two clients which triggered this
entity will exchange their positions.
This will not work if the same client activates
this entity twice of course.
-------- NOTES --------
The used positions are not the trigger
positions but the positions at the time when
the second player activates this entity.
-------- KEYS --------
targetname: name used to trigger
}

//=============================================================================

target_exchange_items
{
The first two clients which triggered this
entity will exchange their equipment.
Basically this includes weapons, powerups, current
health and armor.
This will have no effect if the same client activates
this entity twice of course.
-------- KEYS --------
targetname: name used to trigger
-------- SPAWNFLAGS --------
NO_WEAPONS: no weapons will be exchanged
NO_POWERUPS: no powerups will be exchanged
NO_ARMOR: no armor will be exchanged
NO_HEALTH: no health will be exchanged
}



Ideas and feedback are required. ;)

Many of the above entities are well-suited for multiplayer runs. Maybe coop-competitions would be possible with cool tricks like exchanging weapons so the partner behind a wall can make his way further and so on.
User avatar
BeRsErKeR
 
Posts: 151
Joined: May 24th, '10, 10:20 pm

Re: New entities

Postby <)Ghost(> » Jun 4th, '10, 10:46 am

func_breakables!!!!!! as seen in Urban Terror Mod.
<)Ghost(>
 
Posts: 347
Joined: May 2nd, '09, 3:19 pm

Re: New entities

Postby BeRsErKeR » Jun 4th, '10, 12:04 pm

Uff this sounds difficulty. But I'll give it a try.
Maybe you can specify the keys and spawnflags of this entity a bit more.

My idea would be a key for a break sound. Of course a damage amount before breaking and a targetname if the entity should be destroyed by a trigger. Other suggestions? Maybe an option to specify an item that will spawn on destruction?


But now to the recent progresses: I've coded the trigger_savespeed, trigger_loadspeed and target_speed. They work fine in my test map (with my own q3 mod) and I hope cgg will add it soon to defrag. In the next days I'm going to implement other mentioned entities. But I still have to learn a few things about the code. Saw it first time yesterday. ;)
User avatar
BeRsErKeR
 
Posts: 151
Joined: May 24th, '10, 10:20 pm

Re: New entities

Postby <hk> » Jun 4th, '10, 12:14 pm

Feedback:
I don't really see the use for storing and loading playerspeeds. You have to find out what the mapper did and which entity he used to give you than boost you are experiencing. It's a nice tool to build some really cool entity combinations. It will be abused in the end, though :(

Adding X ups is a fine idea. It will make predicting jumps a bit easier for the mapper.

I see you are mainly looking at team runs. Those really need some attention.


I am not a fan of breakables. I missed them when i started mapping for quake3. I was using them in Halflife a lot. The problem is that they spawn many objects that bounce around the floor. Those have to be transmitted to the client and will cause lags at best. It's ok when you use them every now and then though. You also have to model gips for every material you use.

Suggestions:
In HalfLife 1 they have this concept of a "multimanager"-entity. It's one of the things I really miss in quake.

A multimanager contains a list of entities to trigger and a time offset when to trigger them. You place it and throw in some keys like:

0.1 func_door4
0.2 func_door4
2.0 func_door2

This will trigger func_door4 0.1 seconds after the multimanager got triggered.
0.2 seconds after the multimanager is triggered the func_door4 is triggered again. Finally 2 whole seconds after the manager ist triggered func_door2 will be triggered.

This saves a lot of entities, which really helps, because mappers already hit the entity limit quite often. You could make a button that triggers some doors in a predefined sequence. Usually you would trigger them all at once and delay the signal with timers. This pushes the entity count up very fast. Also it's very easy to use. :)
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: New entities

Postby BeRsErKeR » Jun 4th, '10, 2:15 pm

Thanks for your ideas. I will comment them in a second.

I've implemented a first version of func_breakable. It's working as expected. You create a brush, make it a func_breakable, specify some health. Ingame the entity will look like a normal non-solid brush and will disappear when it "dies". I also implemented a sound (can be set as an entity key) that should be played when the breakable is destroyed, but this doesn't work yet. Another point are the mentioned gips. This would be quite difficult.

Moreover I implemented an entity called target_setspeed. It's an extension of the planned target_addspeed entity. The new entity can set OR add (also reduce) speed. Fixed speed amounts or percentage values are possible. I've tested this and it's very funny. I think about some plasma-like powerup-gates that will increase the players velocity.

Now to your feedback hk: The storing and loading of speeds can be also used in MP. Example: One player has to do some strafe parts. The end speed can be used for the second player as a start speed to make another strafe part behind a glass wall. Think of a relay race or something like this. Or maybe the second player needs 1200U to reach the first strafe pad and so the first player have to provide a suitable speed for him. Also it can be used to restore the previous speed after passing a teleporter and so on.

Breakables don't have to spawn items (this can be specified by the mapper). They also can be used to interfere the line of fire of aim targets or can be used as platforms where rocketlaunchers shouldn't be used. I see a problem in making gips. I'm a programmer, no model artist. :D

Yeah I remember: The multimanager. This is a nice idea. I will add it soon.
User avatar
BeRsErKeR
 
Posts: 151
Joined: May 24th, '10, 10:20 pm

Re: New entities

Postby <)Ghost(> » Jun 4th, '10, 3:36 pm

i have no idea what u guys are talking about because im not that in-depth with this stuff, but heres the .def file for breakables...

Code: Select all
/*QUAKED func_breakable (0 .5 .8) ?
A breakable thing just sits there, doing nothing,
but will break if damaged or collided with.

-------- KEYS --------
model2 : path/name of model to include (eg: models/mapobjects/pipe/pipe02.md3).
color : constantLight color
light : constantLight radius
type : 0: glass 1: wood 2: ceramic 3: plastic 4: metal-normal 5: metal-explosives 6: metal-hk69 7: stone-explosives 8: stone-hk69 9: wood-explosives 10: wood-hk69(SEE NOTES)
axis : 1 - x, 2 - y, 4 - z
health : health of object
model2 : path/name of model to include (eg: models/mapobjects/pipe/pipe02.md3).
shards : number of shards object should shatter into (0-255)
bombable : allows the entity to be destroyed by the bomb in bomb mode. The size of blast shown when the entity breaks is determined by this value (Values : 1 none - 255 huge blast).

-------- NOTES --------
 - For glass windows that break easily, set health to 1.
 - Any func_breakable with a health of less than 10 will slowly weaken if a player is in contact with it.  You can make a roof that collapses in after a period of time by setting the health to a value like 5.  This will mean that a player standing on such a surface for around 5 seconds will fall thru.  The effect is cumulative: if you stand there for 3 seconds and then come back you can only stand on it for another 2 seconds.
 - The type parameter selects the shader that is used for fragments and sets the sound the object makes when it breaks.
 - If the brush you are making is on an angle (for example, a skylight in a sloping roof) then you will need to set the break axis to "4" if you want it to break when people stand on it.
 - You can build anything to break using the breakables.  Use the model2 key to create things like breakable pots -- see Wetwired's map "ricochet" for an example.
 - Set shards as high as you want (it maxes out at 32 anyway) - players can reduce the number of shards they see using cg_maxFragments
 - Bombable key is to be used for things that can only be broken by the Bomb Mode bomb explosion. For example a large propane tank near a bomb target. The key's value will determine the size of the explosion graphics from this entity when broken, with a value of 1 being no explosion and a value of 255 being a large secondary blast.
 - Type values info for 1,2,3,4 - The game will attenuate the damage caused by each hit to a value of 1-3. Health values above 10 will choose a random health between 6 and 10. Specifics are as follows: 0: is for glass/windows 1: is for all woods 2: is for ceramics and pottery 3: is for various plastics 4: is for metal that can be broken by normal means
 - Type values info for 5,6,7,8,9,10 - The game will use the literal health value compared to the weapon damages. They should be set quite high (metals and stone at 50+). Specifics are as follows: 5: is for metal that requires explosives to break (HE grenade or hk69) 6: is for metal that requires the hk69 to break 7: is for stone that requires explosives to break (HE grenade or hk69) 8: is for stone that requires the hk69 to break 9: is for wood that requires explosives to break (HE grenade or hk69) 10: is for wood that requires the hk69 to break
*/

//      *       *       *       *       *       *       *       *


this would be a great function to add to defrag, however it would be perfect for single player maps only. wouldnt work well with online for example, doors/buttons.
<)Ghost(>
 
Posts: 347
Joined: May 2nd, '09, 3:19 pm

Re: New entities

Postby RetroHelix » Jun 4th, '10, 4:25 pm

I remember a request for new entities by Morbus over at cggdev.org:
http://cggdev.org/node/5#comment-77

There was also a comment by <hk> (http://cggdev.org/node/5#comment-71) in case you forgot about it :)
User avatar
RetroHelix
 
Posts: 137
Joined: Dec 12th, '09, 10:39 pm

Re: New entities

Postby BeRsErKeR » Jun 4th, '10, 5:02 pm

Finished the func_breakable. It spawns items correctly and plays a sound. Only the gips are missing.

Yeah I know the comments on cggdev. I already contacted morbus. :D
The acc-problem is very difficult. Don't have an idea how to fix this. :?
User avatar
BeRsErKeR
 
Posts: 151
Joined: May 24th, '10, 10:20 pm

Re: New entities

Postby |PsY|blumen » Jun 4th, '10, 6:16 pm

i only suggest a clientside door + button entity. so we can use doors for online modes again.
User avatar
|PsY|blumen
sparkle bunny
 
Posts: 46
Joined: May 2nd, '09, 3:43 pm

Re: New entities

Postby BeRsErKeR » Jun 4th, '10, 6:25 pm

Have a lot of coding to do I think. But I'll try to find a way to implement clientside doors and buttons.
User avatar
BeRsErKeR
 
Posts: 151
Joined: May 24th, '10, 10:20 pm

Next

cron