Jump to content
The Dark Mod Forums

Some sort of description for entity's spawn args ?


motorsep

Recommended Posts

Is there a way to add a description for entity's spawnargs? (so it's visible in when using entity in DR)

 

I have an entity (func_mover / func_mover with gui screen) which has 12 gui_parms. I'd like to add some sort of comment / description for each of those so that when someone else will use the prefab with that entity, that person would know what those gui_parms are for.

 

Thanks.

Link to comment
Share on other sites

You can add editor_* spawnargs to make certain properties show up in DR under "inherited" spawnargs, with optional descriptive text. If you use a specific type for the * then DR will show an appropriate selector for the user to choose a value.

 

 

entityDef light {
"inherit" "atdm:entity_base"
"editor_color" "0 1 0"
"editor_mins" "-8 -8 -8"
"editor_maxs" "8 8 8"
"editor_rotatable" "1"

"editor_displayFolder" "Lights/Sources"
"editor_usage" "Generic light source. If health is set, light becomes breakable and turns off when shot."

"editor_material texture" "Light shader to use."
"editor_color _color" "The color of the emitted light, in RGB."
"editor_var shaderParm3" "shaderParm 3"
"editor_var shaderParm4" "shaderParm 4"
"editor_var shaderParm5" "shaderParm 5"
"editor_var shaderParm6" "shaderParm 6"
"editor_var shaderParm7" "shaderParm 7"
"editor_var count" "How many times light must be triggered to toggle."
"editor_bool break" "If set to true, this light breaks when triggered."
"editor_model model" "model to use."
"editor_model broken" "model to use when the light is broken (defaults to model name with '_broken' appended to name)"
"editor_bool hideModelOnBreak" "Hides the model when broken."
"editor_var health" "Amount of damage to receive before becoming broken. 0 is nonbreakable."
"editor_var target" "Entities to trigger if shot."
"editor_int levels" "The number of times a light must be triggered until it turns off. Each time it's triggered, it's dimmed to a lower level."
"editor_bool start_off" "Causes the light to be off when the level starts."
"editor_snd snd_broken" "Sound shader to use when broken."
"editor_material mtr_broken" "Material to use when broken."
"editor_color color_demonic" "Demonic color to use if in demonic mode."
"editor_material mat_demonic" "Demonic shader to use if in demonic mode."
"editor_var leave_demonic_mat" "Leaves the demonic shader when the effect expires. Color is still reverted back."

"editor_bool editor_light" "If set to true, tells the editor this entity is a light source."
"editor_int shouldBeOn" "When light is off, 0 = AI comments; 1 = AI comments and relights; 2 = AI comments, relights, and raises alert."
"editor_bool nodiffuse" "If true, the light does not render a diffuse pass, only specular and shadows."
"editor_bool noshadows" "If true, the light does not cast shadows. This improves performance, but might look wrong. Useful for very small point lights."
"editor_bool nospecular" "If true, the light does not render a specular pass. This improves performance, but might look wrong."
"editor_bool parallel" "If true, the light is parallel instead of a point light."
"editor_var light_radius" "The size of the light in X, Y and Z direction in units."
"editor_bool falloff" "Whether the light has a falloff, or not."
"editor_skin skin_unlit" "When the light is turned off, it will try to set the skin to this material on the object the light is bound to."
"editor_skin skin_lit" "When the light is turned on, it will try to set the skin to this material on the object the light is bound to."

"spawnclass" "idLight"
"health" "0"
"levels" "1"
"start_off" "0"
"count" "1"
"break" "0"

// For fog lights #3664
"noFogBoundary" "0"
"editor_bool noFogBoundary" "If set to true, stops a fog light drawing fog on its bounding box. Only surfaces will be fogged. Use case: stops fogs drawing over caulk skies."
}

 

 

 

You can use "editor_setkeyvalue" to force the spawnarg always to show up in the entity inspector, without waiting for the user to click inherited. As least that's how I think it works.

 

 

entityDef atdm:grabable_custom_item
{
"inherit" "atdm:moveable_small_base"
"editor_displayFolder" "Items/Custom"
"editor_usage" "A customisable, grabable and/or pushable object. Almost any model can be selected and other displayed properties easily modified. The model must have a collision model or the map will not run. If you want it to go in the inventory use atdm:moveable_custom_item"
"model" "-"
"mass" "0.6"
"friction" "0.1"
"bouncyness" "0.1"
"snd_bounce" "-"
"notpushable" "0"
"editor_setKeyValue model" "Select a model here(essential)"
"editor_setKeyValue mass" "0.6"
"editor_setKeyValue friction" "0.1"
"editor_setKeyValue notpushable" "0"
"editor_setKeyValue bouncyness" "0.1"
"editor_setKeyValue frobable" "1"
"editor_setKeyValue snd_bounce" "tdm_impact_small_hard_object"
"editor_setKeyValue COMMENT" "MODIFY PROPERTIES AS REQUIRED"
"editor_setKeyValue spr_object_hardness" "hard"
"editor_setKeyValue spr_object_size" "medium"

"editor_var snd_bounce" "Enter a suitable impact sound beginning tdm_impact_ plus eg, wood, cloth, bottle_01, steelplate_01, small_hard_object. Example: tdm_impact_wood. For others read the file sound\tdm_sfx_impact.sndshd in a plain text editor."
"editor_var spr_object_hardness" "Enter hardness of object: hard, medium, or soft. (used for AI alert levels after impact)"
"editor_var spr_object_size" "Enter size of object: large, medium, or small (used for AI alert levels after impact)"
"editor_var notpushable" "If 1 this object cannot be pushed about. Set to 0 (default) to make it pushable."
"editor_var model" "Click this line then the 'choose model' button below. You must select a model as there is no default."
"editor_var frobable" "Set to 0 for pushable only"
}

 

 

Link to comment
Share on other sites

Right, but can I add that to the map entity ? I know I can do that for entities in .def file, but this is something that should only pertain to a particular entity that was created as func_static / func_mover, and then then adjusted to work with certain gui_parms.

 

If I use that on the root func_mover/func_static, all of the entities I make will have the same description / comments for gui_parms, when in reality those gui_parms can serve entirely different purpose.

Link to comment
Share on other sites

Is this a reusable entity, or do you just want to add a note for your own reference to a specific entity that you set up in a map? If re-usable, you should make a new entity def for your special entity that inherits from func_static / func_mover and then adds its special spawnargs. Then when someone creates an instance of that entity in DR they'll get to see your new spawnargs.

 

If you just want to add comments something you put in your map, then just add some extra spawnargs. "GUI_PARM3_NOTE" "This does blah blah blah". The game will ignore any spawnargs that it doesn;t recognise.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...