Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
*Geek Talk & Media
Open Source d20 API/Engine
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="reanjr" data-source="post: 2147880" data-attributes="member: 20740"><p>As to the second point what you do is define functions inside different root elements. For example, stonecunning (the dwarf ability) is defined like so:</p><p></p><p>[CODE]</p><p><monsters></p><p> <function name="stonecunning"></p><p> <text-representation></p><p> <a>"Stonecunning: automatically search secret doors...blah blah"</a></p><p> </text-representation></p><p> <add-conditional-skill-mod skill="search" mod="2" type="racial" reason="stonecunning" /></p><p> </function></p><p></monsters></p><p>[/CODE]</p><p></p><p>Now in the dwarf data, we write</p><p></p><p>[CODE]</p><p><monsters></p><p> <monster name="dwarf"></p><p> <stonecunning /></p><p> </monster></p><p></monsters></p><p>[/CODE]</p><p></p><p>When you apply a race to a character (in this case dwarf), all of the stuff in the dwarf element is basically merged into the character element and executed. So you create a character, add dwarf stuff, which triggers stonecunning to execute, which in turn adds a conditional skill modifier to search checks.</p><p></p><p>So, basically, because the stonecunning function is found inside <monsters>, that is its scope. But once monster data is merged with character data, it allows the character context to use the function.</p><p></p><p>So, nope. No additional tags needed.</p><p></p><p>I haven't seen a need for a new tag outside the data tags (create-context, add-data, add-property, delete-data, delete-property, and import-data) in several days, so it seems like a decent set of functions. I will probably have to think of string functionality of some kind, but I might just treat that like an array of chars. "level"::count would be 5 for instance and "level"::3 would be "v".</p><p></p><p>I think that actually pretty much covers it except for events, which I'll explain here just so that I have talked about it. I'll use the dwarven ability to move at full speed while encumbered as an example, because it's pretty straight forward.</p><p></p><p>An event is declared in a similar fashion to a function, but it never takes arguments (I don't think, don't hold me to that). It generally handles a simple operation that could easily be done without a function.</p><p></p><p>[CODE]</p><p><event name="speed-change" amount="0" reason=""></p><p> <set name=".speed"></p><p> <add></p><p> <a>.speed</a></p><p> <a>amount</a></p><p> </add></p><p> </set></p><p></event></p><p>[/CODE]</p><p></p><p>Basically, you can declare a function as normal but set two reserved properties on it: attach and when.</p><p></p><p>attach indicates an event to attach the function to. when indicates when to run the function in relation to the event: "before" or "after".</p><p></p><p>So, in the monsters stuff you have</p><p>[CODE]</p><p><monsters></p><p> <function name="encumbered-movement" attach="speed-change" when="before"></p><p> <assert></p><p> <e></p><p> <a>reason</a></p><p> <a>"encumbrance"</a></p><p> </e></p><p> <set name="amount"></p><p> <a>0</a></p><p> </set></p><p> </assert></p><p> </function></p><p></monsters></p><p>[/CODE]</p><p></p><p>When a character becomes encumbered, you call</p><p><speed-change amount="-10" reason="encumbrance" /></p><p></p><p>This triggers the encumbered-movement function because it was told to attach to the speed-change event. It was also told to run before the event itself. It checks the reason, which is "encumbrance", and so sets the amount to 0. Then it lets the event run, but since amount has been changed to 0, it doesn't do anything.</p></blockquote><p></p>
[QUOTE="reanjr, post: 2147880, member: 20740"] As to the second point what you do is define functions inside different root elements. For example, stonecunning (the dwarf ability) is defined like so: [CODE] <monsters> <function name="stonecunning"> <text-representation> <a>"Stonecunning: automatically search secret doors...blah blah"</a> </text-representation> <add-conditional-skill-mod skill="search" mod="2" type="racial" reason="stonecunning" /> </function> </monsters> [/CODE] Now in the dwarf data, we write [CODE] <monsters> <monster name="dwarf"> <stonecunning /> </monster> </monsters> [/CODE] When you apply a race to a character (in this case dwarf), all of the stuff in the dwarf element is basically merged into the character element and executed. So you create a character, add dwarf stuff, which triggers stonecunning to execute, which in turn adds a conditional skill modifier to search checks. So, basically, because the stonecunning function is found inside <monsters>, that is its scope. But once monster data is merged with character data, it allows the character context to use the function. So, nope. No additional tags needed. I haven't seen a need for a new tag outside the data tags (create-context, add-data, add-property, delete-data, delete-property, and import-data) in several days, so it seems like a decent set of functions. I will probably have to think of string functionality of some kind, but I might just treat that like an array of chars. "level"::count would be 5 for instance and "level"::3 would be "v". I think that actually pretty much covers it except for events, which I'll explain here just so that I have talked about it. I'll use the dwarven ability to move at full speed while encumbered as an example, because it's pretty straight forward. An event is declared in a similar fashion to a function, but it never takes arguments (I don't think, don't hold me to that). It generally handles a simple operation that could easily be done without a function. [CODE] <event name="speed-change" amount="0" reason=""> <set name=".speed"> <add> <a>.speed</a> <a>amount</a> </add> </set> </event> [/CODE] Basically, you can declare a function as normal but set two reserved properties on it: attach and when. attach indicates an event to attach the function to. when indicates when to run the function in relation to the event: "before" or "after". So, in the monsters stuff you have [CODE] <monsters> <function name="encumbered-movement" attach="speed-change" when="before"> <assert> <e> <a>reason</a> <a>"encumbrance"</a> </e> <set name="amount"> <a>0</a> </set> </assert> </function> </monsters> [/CODE] When a character becomes encumbered, you call <speed-change amount="-10" reason="encumbrance" /> This triggers the encumbered-movement function because it was told to attach to the speed-change event. It was also told to run before the event itself. It checks the reason, which is "encumbrance", and so sets the amount to 0. Then it lets the event run, but since amount has been changed to 0, it doesn't do anything. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Geek Talk & Media
Open Source d20 API/Engine
Top