What is a verb?

Started by Bolgfred, October 25, 2017, 05:11:46 AM

Previous topic - Next topic

Bolgfred

Dear Colony Community,

the answer might seem obvious, but what does the actual word <verbs> stands for?
I have seen this tag containing mostly projectile/weapon definitions, so I basicly understand what it is doing, but what's this one standing for?

Additionally, is there any documentation where I can recherche things like that? rimwiki has some kind of docs around this but theres a lot missing I think.
"The earth has only been lent to us,
but no one has said anything about returning."
-J.R. Van Devil

CannibarRechter

I can't answer your second question, but there is one really, really great thing about the RimWorld code. It is generally quite literately written. By "literate" here, I mean it tends to use object and function names with what things do. For example, you might find somewhere in the code "AddThingToContainer()". I just made that up, but the point being is that you can often tell what RimWorld does internally by simply reading how things are named, because Tynan and crew learned how to program right (retired from programming guy here, seen a lot of code, this stuff is pretty good).

Anyway, that leads me up the best place to look things up: Get ILSpy, decompile RimWorld, and you can answer many questions that way.

Sadly, those of us who do this a lot don't spend a lot of time on the wikis. We should, but we don't.

CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Spar10Tech

Pretty much as you have figured it out it is used with weapons.  They are kind of the action words and stats for the damage type of the weapon.  For example on a club you might see this in the xml def of the weapon.

<verbs>
<li>
<verbClass>Verb_MeleeAttack</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<meleeDamageDef>Blunt</meleeDamageDef>
</li>
</verbs>


You can also find it in save game files within an equipped weapon's def that includes the verb class type (melee,ranged,projectile) and a target and unique verb ID for the weapon.  This is used so the game can track data like PawnX hit PawnY for melee blunt damage with unique weapon ID.  Then if you inspected PawnY with damage in another save you would see a HEDiff of type blunt damage caused by PawnX with unique weapon ID.

I'm not sure if there are any lists for the verb classes and the sub items that can be included.