User talk:Amicdict

From Valve Developer Community
Jump to: navigation, search
Icon-message-48px.png
Welcome to User talk:Amicdict!
This is the start of the Amicdict discussion page.

To add a new message, click on "Add Topic/Reply" button below, and set the "Subject".
To add a Reply, do the same as above, but leave the "Subject" blank.

I'm the 8.558kBind guy.

PSA: conflicts in the archer_proxy and base_boss pages

Icon-user.png
Empty.png
Orinuse11:32, 24 May 2021 (UTC)
They both use template pairs that intend to show the same thing: Template:KV Targetname + Template:KV BaseEntity pair, and Template:I Targetname + Template:I BaseEntity pair. So this is what the page ends up looking like this:

How the page is displayed

KeyValues section



Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (in all games since Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function (thinkfunction) <string> (in all games since Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note.pngNote:Try to avoid expensive operations in this function, as it may cause performance problems.

Base:
Name (targetname) <string>
The name that other entities use to refer to this entity.
Parent (parentname) <targetname>
Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (parentname [targetname],[attachment])
Tip.pngTip:Entities transition to the next map with their parents
Tip.pngTip:phys_constraint can be used as a workaround if parenting fails.
Origin (X Y Z) (origin) <coordinates>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Note.pngNote:Hammer does not move the entities accordingly only in the editor.
Pitch Yaw Roll (X Y Z) (angles) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Note.pngNote:This works on brush entities, although Hammer doesn't show the new angles.
Classname (classname) <string> !FGD
Determines the characteristics of the entity before it spawns.
Tip.pngTip:Changing this on runtime still has use, like making matching an entry in S_PreserveEnts will persist the entity on new rounds!
Spawnflags (spawnflags) <flags> !FGD
Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.
Effects (effects) <flags> !FGD
Combination of effect flags to use.

Inputs section



Base:
AddContext <string>
Adds to the entity's list of response contexts. See Context.
AddOutput <string>
Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"

// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
ClearContext
Removes all contexts from this entity's list.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
FireUser1 to FireUser4
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKillinput.
RemoveContext <string>
Remove a context from this entity's list. The name should match the key of an existing context.
SetParent <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Use  !FGD
Same as a player invoking +use; no effect in most cases.
DispatchResponse <string> !FGD
Dispatches a response to the entity. See Response and Concept.
DispatchEffect <string> (removed since Left 4 Dead) !FGD
Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since Left 4 Dead.
RunScriptFile <script> (in all games since Left 4 Dead 2) (also in Team Fortress 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (in all games since Left 4 Dead 2) (also in Team Fortress 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Icon-Bug.pngBug:In Hammer, using string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.
Note.pngFix:Remove the string argument manually with a text editor.
Note.pngNote:Team Fortress 2 Backtick characters ` are replaced with quotation marks at runtime, allowing quotation marks to be used when normally not possible.
CallScriptFunction <string> (in all games since Left 4 Dead 2) (also in Team Fortress 2) !FGD
Calls a VScript function defined in the scope of the receiving entity.
TerminateScriptScope  (only in Team Fortress 2) !FGD
Destroys the script scope of the receving entity.
SetLocalOrigin <coordinates> (in all games since Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles> (in all games since Alien Swarm) !FGD
Set this entity's angles.

Base:
AddContext <string>
Adds to the entity's list of response contexts. See Context.
AddOutput <string>
Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"

// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
ClearContext
Removes all contexts from this entity's list.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
FireUser1 to FireUser4
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKillinput.
RemoveContext <string>
Remove a context from this entity's list. The name should match the key of an existing context.
SetParent <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Use  !FGD
Same as a player invoking +use; no effect in most cases.
DispatchResponse <string> !FGD
Dispatches a response to the entity. See Response and Concept.
DispatchEffect <string> (removed since Left 4 Dead) !FGD
Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since Left 4 Dead.

My Proposal

TheTargetnametemplates, Template:KV Targetname and Template:I Targetname are actually deprecated, and theBaseEntitytemplates are the currently maintained and more updated ones, so I advise against using any of them.

BUT if you still are thinking about theTargetnametemplates, I request that when using{{KV Targetname}} template, do it like this:

{{KV Targetname|basehl2=1}}


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.

As for the{{I Targetname}}template, there isn't a way to control what infomation is displayed, so I won't give any suggestions on how to use it.

One more thing, give the Show Preview and Show Changes buttons some tries, they're very helpful before you publish edits! I use Show Preview after pasting my VDC edit .HTML file drafts to a page, then Show Changes to write out a summary, or an alternate method to double-check on edits.

Icon-user.png
Empty.png
Amicdict12:47, 24 May 2021 (UTC)
I'll fix these issues as soon as I can since I have exams this week.

FYI to KV_WeaponSpawn

Icon-user.png
Empty.png
Orinuse6:23, 1 November 2021 (UTC)
FYI, "WeaponSpawn" and "WeaponSpawnSingle" is only for Left 4 Dead Left 4 Dead and Left 4 Dead 2 Left 4 Dead 2. Dedicated weapon spawners can be found in L4Ds that let players pick up players from them, and that's what the template refers to. Afaik the only way to pickup weapons in tf2 is from dead players, and those are tf_dropped_weapon entities only.

The 2nd closest candidate would be weapons from the CS series: Counter-Strike: Source Counter-Strike: Source or Counter-Strike: Global Offensive Counter-Strike: Global Offensive, but a page like weapon_glock seems to suggest otherwise.

I don't mind too much since the template is set up messily, has no documentation, and a lot of pages to clean up if the mess is to be cleared (Special:WhatLinksHere/Template:KV_WeaponSpawn. The effort to clear up the mess is discouraging solo, so I'm not sure how long will this take.

Stop for a while, please

ERR
UserAvatarFrame-THE OWL.png
THE OWL12:10, 2 April 2023 (UTC+7)(edited)
{{MultiPage}} is not for the Talk namespace. This is an international namespace, so it doesn't need {{MultiPage}}.

Also, I would like you to stop moving pages for a while, otherwise we will have to fix everything again for a very long time. The use of {{MultiPage}} presupposes the correction of everything on the pages (text formatting, template parameters, etc.), including the removal of suffixes and language categories.

Icon-user.png
Empty.png
Amicdict21:37, 2 April 2023 (UTC)
{{MultiPage}} is not for the Talk namespace. This is an international namespace, so it doesn't need {{MultiPage}}.

Ah, sorry. I will keep that in mind.

The use of {{MultiPage}} presupposes the correction of everything on the pages (text formatting, template parameters, etc.), including the removal of suffixes and language categories.

Oh, well I didn't realize. I didn't see that. Removal of language categories is easy; I moved pages using the :-suffix to /-suffix explicitly so that the links to the pages using the old :-suffix don't get messed up.

Well, if I can't immediately use {{MultiPage}}, where are we supposed to start then?

ERR
UserAvatarFrame-THE OWL.png
THE OWL22:37, 22 April 2023 (UTC+7)
Damn, I noticed this message just now :/

Well, now the template has instructions for moving pages. See "Using MultiPage on existing pages".