https://dmwiki.atomas.com/w/api.php?action=feedcontributions&user=WikiSysop&feedformat=atomDmWiki - User contributions [en]2024-03-29T02:05:46ZUser contributionsMediaWiki 1.35.4https://dmwiki.atomas.com/w/index.php?title=DSB/Archetypes&diff=3027DSB/Archetypes2013-01-05T00:45:13Z<p>WikiSysop: styling css sample</p>
<hr />
<div>== Overview ==<br />
An Archetype is a general category of item, such as "Axe", "Iron Keyhole", "Screamer" or "Wooden Door".<br />
<br />
Here's a very basic example of a simple archetype, an apple, as defined in DSBs base code:<br />
<br />
<pre><br />
obj.apple = {<br />
name="APPLE",<br />
type="THING",<br />
shortdesc="CONSUMABLE",<br />
class="FOOD",<br />
mass=4,<br />
icon=gfx.icons[168],<br />
dungeon=gfx.apple,<br />
foodval=500,<br />
fit_pouch = true, <br />
on_consume=eatdrink<br />
}<br />
</pre><br />
<br />
The base code defines hundreds of different archetypes that fall into broad categories. Every archetype has a number of properties that define its type, graphics, sounds and behaviour. <br />
<br />
==Properties==<br />
All archetypes share a few basic properties such as Type and Class, but there are a lot of properties only used by certain types of Archetype. <br />
<br />
Customisations can be made to any existing dungeon object by altering or adding to the properties of its archetype. Completely new archetypes can also be created, either from scratch or by cloning an existing archetype and modifying or adding to its properties. Existing properties can be changed during gameplay and even new properties added.<br />
<br />
Link: [[DSB/Archetypes/Properties|Full list of properties]]<br />
<br />
==Types==<br />
An archetype's TYPE defines its core behaviour. For example, type "DOOR" automatically sets the item to behave as a door, while type "THING" is anything that can be picked up by the party. <br />
<br />
Here's the full list of types, and a brief explanation of how they are used. Each of these types [will] also links to an example that shows all the properties you can use with that type.<br />
<br />
;UNDEFINED<br />
:Special types used by core engine system functions<br />
<br />
;FLOORFLAT<br />
:A dungeon object that sits on a tile, such as a drain, pit, trigger, movable wall, etc. Floorflats include decorative items as well as dungeon mechanics. By default, foorflats occupy an entire tile and are placed in the centre of a tile when using the ESB editor. You can also move floorflats to the corners of a tile, but this may invoke odd behaviour.<br />
<br />
;FLOORUPRIGHT<br />
:Flooruprights are items that sit within the centre of a tile and may block or otherwise affect party progress. The default items of this type are stairs and doorframes, but you can create new types such as tables, pillars and statues.<br />
<br />
;DOOR<br />
:Doors are self-explanatory. These will block party progress when closed. Doors can be opened and closed using dungeon mechanics and can also be destroyed using weapons or magic handled by strong characters.<br />
<br />
;HAZE<br />
:Hazes are full-tile items that show some kind of magical effect, such as the animated teleporter and fluxcage. Hazes are rendered in such a way as to appear to completely fill one tile, even though the bitmaps used may simply be a very small pattern.<br />
<br />
;CLOUD<br />
:A cloud is normally created when a magic spell explodes on a tile, or a creature is killed. Some clouds expire very quickly (fireball) while others expire after a duration, getting smaller as they dissipate.<br />
<br />
;WALLITEM<br />
:Wallitems are used to decorate the walls of the dungeon and can be used simply as static eye-candy, or as triggers. Every wallitem can be made into a trigger using the editor. Typical triggers are keyholes and levers, but you can make anything respond to player input if you choose. Some wallitems already have default behaviours. For example, fountains will allow a champion to fill a flask or waterskin.<br />
<br />
;THING<br />
:Things are the items in the dungeon that the champions can pick up and manipulate. A key, a torch, a dagger or a pair of boots are classed as Things. Things can be very simple and have no special functions, or more complex such as a torch that affects the light level of the dungeon. Different properties allow Things to be worn, consumed or used as weapons. Flying magic spells are also classed as Things, but these generally can't be influenced by the player once launched.<br />
<br />
;MONSTER<br />
:The Monster archetype is used to define anything that you want to behave as a creature. Monsters have the largest group of properties and can be customised very heavily to change their behaviour.<br />
<br />
==Classes==<br />
Classes are used to arrange archetypes into sensible groups for easy identification in the editor, ESB. Classes do not define any behaviour, graphics or sounds and are simply labels collecting together similar archetypes. For example, the DECO class is used to identify archetypes that are certain style of decorative dungeon object.<br />
<br />
Classes can be used to sub-group items based on their type. For example, both the FLOORFLAT type and the WALLITEM type contain a DECO class. This is useful for quickly finding the archetype you need while building your dungeon in the editor.<br />
<br />
{{#css:<br />
pre {<br />
-moz-box-sizing: border-box;<br />
border: 1px solid rgb(204, 204, 204);<br />
border-radius: 5px 5px 5px 5px;<br />
background: none repeat scroll 0% 0% rgb(245, 245, 245);<br />
margin: 9px 0px;<br />
width: 100%;<br />
padding: 5px 10px;<br />
overflow: auto;<br />
white-space:pre;<br />
font-family: "Bitstream Vera Sans Mono","DejaVu Sans Mono",Monaco,monospace;<br />
font-size: 12px;<br />
line-height: 1.4;<br />
}<br />
}}</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=Conflux/Spells&diff=2019Conflux/Spells2011-12-23T10:57:43Z<p>WikiSysop: Reverted edits by Squidmonger (talk) to last revision by Joramun</p>
<hr />
<div>Many of the spells in Conflux have been renamed and use different runes than you have become accustomed to. Moreover, their behaviour has become much more complex and may do different things depending on the circumstances. Some cannot be cast until you find the scroll that tells you how to cast the spell. Some may require that you possess special objects. Some may work differently for different characters. Spells are definitly going to be new territory if you just came from playing Dungeon Master.<br />
<br />
=== Wizard spells ===<br />
{| border="1" cellpadding="3" cellspacing="0"<br />
!Runes !!Effect<br />
|-<br />
|<runes>FUL</runes> || Magical Light<br />
|-<br />
|<runes>YA VEN</runes> || Poison Bolt<br />
|-<br />
|<runes>OH VEN</runes> || Poison Cloud<br />
|-<br />
|<runes>FUL KATH</runes> || Fireball (L at 00,12,07)<br />
|-<br />
|<runes>ZO VEN</runes> || Poison Bolt<br />
|-<br />
|<runes>ZO EW</runes> || Dispel magic bolt. Damages immaterial creatures<br />
|-<br />
|<runes>OH EW SAR</runes> || "Invisibility"<br />
|-<br />
|<runes>OH BRO ROS</runes> || "Infrared Vision" Magic Footprints<br />
|-<br />
|<runes>DES IR RA</runes> || "Sunlight" : Long magic light<br />
|-<br />
|<runes>DES GOR DAIN</runes> || Open Door<br />
|}<br />
<br />
=== Priest spells ===<br />
==== Standalone spells ====<br />
{| border="1" cellpadding="3" cellspacing="0"<br />
!Runes !!Effect<br />
|-<br />
|<runes>FUL EW</runes> || Darkness spell. Useless?<br />
|-<br />
|<runes>FUL BRO</runes> || Fire shield<br />
|-<br />
|<runes>YA EW DAIN</runes> || "Clairvoyance" : See through walls<br />
|-<br />
|<runes>ZO KATH RA</runes> || Generates a plasma in hand<br />
|}<br />
<br />
==== Flask spells ====<br />
{| border="1" cellpadding="3" cellspacing="0"<br />
!Runes !!Effect<br />
|-<br />
|<runes>YA</runes> || Stamina potion<br />
|-<br />
|<runes>YA BRO</runes> || "Serum Potion": Cures all levels of poisoning even at LO<br />
|-<br />
|<runes>VI GOR</runes> || Healing Potion<br />
|-<br />
|<runes>VI IR KU</runes> || Strength Potion<br />
|-<br />
|<runes>VI IR ROS</runes> || Dexterity Potion<br />
|-<br />
|<runes>VI IR DAIN</runes> || Wisdom Potion<br />
|-<br />
|<runes>VI IR NETA</runes> || Vitality Potion<br />
|-<br />
|<runes>DES KATH RA</runes> ||"Fluid of Virtus" : Mana potion<br />
|-<br />
|<runes>DES BRO KU</runes> || "Ya elixir" : Heroism Brewage (Shield Potion)<br />
|}<br />
<br />
=== Non-aligned spells ===<br />
{| border="1" cellpadding="3" cellspacing="0"<br />
!Runes !!Requirement!! Effect<br />
|-<br />
|<runes>VI</runes> ||Flask<br><runes>UM</runes> Master Wizard|| Water<br />
|-<br />
|<runes>ZO</runes> || || Curse an item at random in the character's inventory<br />
|-<br />
|<runes>YA KATH</runes> || || "Find North." Rotates the party northwards. Somewhat random<br />
|-<br />
|<runes>YA GOR ROS</runes> || Bag || "Mischevious bag" Creates an item in the bag:<br />
* <runes>LO</runes>: Nothing.<br />
* <runes>UM</runes>: ashes.<br />
* <runes>ON</runes>: Snapdragon.<br />
* <runes>EE</runes>: Chalcidony.<br />
* <runes>PAL</runes>: rope.<br />
* <runes>MON</runes>: dying torch.<br />
|-<br />
|<runes>FUL BRO SAR</runes>||Full special armor worn|| "Awaken the spirit of armors"<br />
|-<br />
|<runes>FUL GOR RA</runes> ||Dead blast Spore|| "Energize dead spores" (L at 16,12,30)<br />
|-<br />
|<runes>DES EW DAIN</runes>||Coin || "Anchor" Creates a return point for teleport. Must be cast next to a wall<br />
|-<br />
|<runes>ZO VEN SAR</runes> || || "Vampiric Starvation" (L at 05,06,21)<br />
|-<br />
|<runes>ZO EW NETA</runes> ||Skullseeds|| "Holds back Vecna's minions" : Dispell-type bolt ?<br />
|-<br />
|<runes>ZO GOR SAR</runes> ||Cerberus|| Makes a cerberus fiery<br />
|}<br />
<br />
=== Others spells ===<br />
{| border="1" cellpadding="3" cellspacing="0"<br />
!Runes !!Alignment!!Requirement!! Effect<br />
|-<br />
|<runes>OH</runes> || ? || || SPECIAL: Activate teleport scroll<br />
|-<br />
|<runes>DES</runes> || ? || || SPECIAL: Activate DES SABRE (proper level only)<br />
|-<br />
|<runes>VI EW</runes> || ? || || SPECIAL: "Soap and Water"<br />
|-<br />
|<runes>OH KATH</runes> || ? || || Improves hearing, briefly obscurity<br />
|-<br />
|<runes>OH GOR</runes> || W? || || Lightning bolt (L at 02,31,18)<br />
|-<br />
|<runes>FUL VEN</runes> || ? ||Kath Vinegar<br>Cursed Torch(?)|| "Makes Bomb" (L at 16,07,01 area somewhere<br />
|-<br />
|<runes>YA EW NETA</runes> || ? || || Nabi's special spell<br />
|-<br />
|<runes>YA KATH KU</runes> || ? || || "Speed" (L) (Found on Alex Anders)<br />
|-<br />
|<runes>OH IR ROS</runes> || ? ||Compass|| [[Conflux/Treasure locator spell|Treasure Locator spell]] (L at 03,00,26)<br />
|-<br />
|<runes>FUL GOR RA</runes> || ? ||Dead blast Spore|| "Energize dead spores" (L at 16,12,30)<br />
|-<br />
|<runes>DES BRO RA</runes> || ? || || "Stoneskin" : Monster shield spell (L at 08,21,17)<br />
|-<br />
|<runes>ZO BRO NETA</runes> || ? ||Skullseeds|| "Ultimate Sacrifice" : ???<br />
|}<br />
<br />
[[Category:Conflux|Spells]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=RTC/Iceball&diff=1987RTC/Iceball2011-05-09T14:09:50Z<p>WikiSysop: added category</p>
<hr />
<div>Though this spell is available in RTC, it has not yet been scribed here.<br />
<br />
[[Category:RTC|Iceball]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=RTC/Iceball&diff=1986RTC/Iceball2011-05-09T14:09:25Z<p>WikiSysop: moved Iceball to RTC/Iceball: was not properly named</p>
<hr />
<div>Though this spell is available in RTC, it has not yet been scribed here.</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=Conflux/Path_of_Joramun&diff=1985Conflux/Path of Joramun2011-05-09T14:08:41Z<p>WikiSysop: added category</p>
<hr />
<div>HEAVY SPOILER !<br />
<br />
Remember, I'm not a hardcore gamer like Antman. The following took me hours of game time.<br />
<br />
My strategy: I reincarnate Iaido, because of the lock-picks.<br />
Usually, my first goal is to find Furx (Dragon slayer sword) ASAP.<br />
<br />
I usually avoid using keys unless I'm stuck, or now that there is no other way.<br />
<br />
I go to down to train in the Storage area, then to the Wine Cellar,<br />
then I clean up the full Cellar level, and go the the Food Storage (guild level).<br />
<br />
Then, some adventure (but not too much) in the Sewers, and then back up to the Minotaur maze, beyond the rats area.<br />
<br />
When I'm strong enough, I go to the sewers and progress until the "river". It's a tough fight, which should be taken progressively.<br />
<br />
In the river, there is an area on the right side (going with the flow) where you can find a secret path to the Dwarven mine, then to the Crypt.<br />
<br />
By now, you should have a mace to fight the spectres and skeletons in the Crypt. Find the Ogre and kill him. Now, in the first Crypt area where equipment is found, there is a secret passage.<br />
<br />
Beyond this secret passage, are two bosses that should be dispatched: the King skeleton, and the Spiked Dragon.<br />
Once both are dead, you should have the necessary key to reach the tomb of Knight Whoe Veritis, which happens to contain Furx.<br />
<br />
Now is the joke. It's cursed. You have to conquer the Temple now. Go beyond the river, and find the stairs up to the temple.<br />
Kill the Couatls one by one before fighting the high priest. Kill the high priest.<br />
<br />
Gather all your cursed items (it should include notably the Vampiric and Funereal dagger) and put a copper coin to get EE-blessed.<br />
<br />
Now you can fight down to the spider level without too much problems. Don't forget to open the guild gates regularly.<br />
<br />
[[Category:Conflux|Path of Joramund]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=Conflux/Path_of_Joramun&diff=1984Conflux/Path of Joramun2011-05-09T14:08:11Z<p>WikiSysop: moved Path of Joramund to Conflux/Path of Joramund: was not properly named</p>
<hr />
<div>HEAVY SPOILER !<br />
<br />
Remember, I'm not a hardcore gamer like Antman. The following took me hours of game time.<br />
<br />
My strategy: I reincarnate Iaido, because of the lock-picks.<br />
Usually, my first goal is to find Furx (Dragon slayer sword) ASAP.<br />
<br />
I usually avoid using keys unless I'm stuck, or now that there is no other way.<br />
<br />
I go to down to train in the Storage area, then to the Wine Cellar,<br />
then I clean up the full Cellar level, and go the the Food Storage (guild level).<br />
<br />
Then, some adventure (but not too much) in the Sewers, and then back up to the Minotaur maze, beyond the rats area.<br />
<br />
When I'm strong enough, I go to the sewers and progress until the "river". It's a tough fight, which should be taken progressively.<br />
<br />
In the river, there is an area on the right side (going with the flow) where you can find a secret path to the Dwarven mine, then to the Crypt.<br />
<br />
By now, you should have a mace to fight the spectres and skeletons in the Crypt. Find the Ogre and kill him. Now, in the first Crypt area where equipment is found, there is a secret passage.<br />
<br />
Beyond this secret passage, are two bosses that should be dispatched: the King skeleton, and the Spiked Dragon.<br />
Once both are dead, you should have the necessary key to reach the tomb of Knight Whoe Veritis, which happens to contain Furx.<br />
<br />
Now is the joke. It's cursed. You have to conquer the Temple now. Go beyond the river, and find the stairs up to the temple.<br />
Kill the Couatls one by one before fighting the high priest. Kill the high priest.<br />
<br />
Gather all your cursed items (it should include notably the Vampiric and Funereal dagger) and put a copper coin to get EE-blessed.<br />
<br />
Now you can fight down to the spider level without too much problems. Don't forget to open the guild gates regularly.</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=RTC/Grouped_Monster_Images/Vehicles&diff=1983RTC/Grouped Monster Images/Vehicles2011-05-09T14:06:03Z<p>WikiSysop: added category</p>
<hr />
<div>==Mine Cart==<br />
Spore inspired using Creature Creator, will remove on request.<br />
<gallery><br />
Image:MINE_CART_FRONT.png<br />
Image:MINE_CART_SIDE.png<br />
Image:MINE_CART_FRONT0.png<br />
Image:MINE_CART_SIDE0.png<br />
</gallery><br />
Idea: used with a teleporter zoom type setting. Constant weight mechanic activates the 'view0' images to be viewed by the players in the direction being faced.<br />
<br />
==Sail Ship==<br />
Spore inspired using Creature Creator, will remove on request.<br />
<gallery><br />
Image:SHIP_FRONT.png<br />
Image:SHIP_SIDE.png<br />
Image:SHIP_BACK.png<br />
Image:SHIP_FRONT0.png<br />
Image:SHIP_SIDE0.png<br />
Image:SHIP_BACK0.png<br />
</gallery><br />
Idea: same as above but without the teleporters.<br />
<br />
[[Category:RTC|Grouped Monster Images/Vehicles]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=RTC/Skill_Level&diff=1982RTC/Skill Level2011-05-09T14:05:22Z<p>WikiSysop: added category</p>
<hr />
<div>== Experience Needed ==<br />
<br />
You Need 500 experience to gain From Level 0 to Level 1, 1000 to get to Level 2, 2000 to get to Level 3, etc. Each subsequent level requires x2 as much experience.<br />
<br />
== Level Increase Bonuses ==<br />
<br />
All percentages and averages are guessed and not based on a statistically viable sample (ie they will only give you the gist of it...sample size = 4)<br />
<br />
=== Fighters gain bonus in: ===<br />
<br />
Strength +1 all the time (+2 25% of the time)<br />
<br />
Dex +1 25% of the time<br />
<br />
Vit +1 25% of the time<br />
<br />
Anti Magic (+1 25% of the time)<br />
<br />
Stamina (+1 at each level not counting level 1)<br />
<br />
Health Bonus Averages:<br />
<br />
Level 1 +8, Level 2 +10, Level 3 +15, Level 4 +19, Level 5 +24, Level 6 +26, Level 7 +29<br />
<br />
=== Ninjas gain bonus in: ===<br />
<br />
<br />
Strength +1 25% of the time<br />
<br />
Dex +1 all of the time (+2 25% of the time)<br />
<br />
Vit +1 25% of the time<br />
<br />
Anti Magic (+1 25% of the time)<br />
<br />
Stamina (+1 25% of the time)<br />
<br />
Health Bonus Averages:<br />
<br />
Level 1 +5, Level 2 +7, Level 3 +9, Level 4 +11, Level 5 +15, Level 6 +19, Level 7 +21<br />
<br />
=== Priests gain bonus in: ===<br />
<br />
Vit +1 25% of the time (+2 25% of the time)<br />
<br />
Wiz +1 25% of the time<br />
<br />
Anti Magic +1 all of the time (+2 25% of the time)<br />
<br />
Anti Fire +1 all of the time (+2 25% of the time)<br />
<br />
Stamina (+1 not often maybe 25%)<br />
<br />
Health Bonus Averages:<br />
<br />
Level 1 +4, Level 2 +6, Level 3 +8...<br />
<br />
Mana Bonus Averages:<br />
<br />
Level 1 +4, Level 2 +6, Level 3 +7...<br />
<br />
=== Wizards gain bonus in: ===<br />
<br />
Vit +1 all of the time<br />
<br />
Wiz +1 all of the time(+2 25% of the time)<br />
<br />
Anti Magic +1 25% of the time<br />
<br />
Anti Fire +1 25% (+2 25% of the time)<br />
<br />
Stamina +1 25%<br />
<br />
Health Bonus Averages:<br />
<br />
Level 1 +3, Level 2 +4, Level 3 +5, Level 4 +6,<br />
<br />
Mana Bonus Averages:<br />
<br />
Level 1 +5, Level 2 +6, Level 3 +8, Level 4 +10,<br />
<br />
=== Method ===<br />
The data was gathered by placing a floor trigger in the dungeon that activated an action 'Increase Fighter Experience' strength 100, three other triggers were used for Ninja, Wizard, and Priest.<br />
<br />
[[Category:RTC|Skill Level]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DSB/Monster_Scripting&diff=1981DSB/Monster Scripting2011-05-09T14:04:11Z<p>WikiSysop: </p>
<hr />
<div>==Monster Scripting==<br />
See the base/monster.lua file for more information on functions called by objects (monsters!) but be careful of overriding them. <br />
<br />
<br />
;<b>special_attack</b>(monster_arch, monster_id, target_position, target_char, damage_type, damage_amount)<br />
:Adds a special_attack method to the monster's archetype. By default, it has a 50% chance of occurring, but you can set <b>special_chance</b> in the archetype to change this percentage. This function is executed after the character takes normal damage from an attack. [http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28854&p=118957#p118893 Example]<br />
<br />
[[Category:DSB|Monster Scripting]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DSB/Messages&diff=1980DSB/Messages2011-05-09T14:03:48Z<p>WikiSysop: </p>
<hr />
<div>Base messages as defined by DSB and used in ESB are the following:<br />
* Activate (M_ACTIVATE) - Enables instances, opens pits, closes doors, triggers generators, etc.<br />
* Deactivate (M_DEACTIVATE) - Disables instances, closes pits, opens doors, etc.<br />
* Toggle (M_TOGGLE) - Enables a disabled instance and disables an enabled one.<br />
* Next Tick (M_NEXTTICK) - Tells instances to proceed. Makes doors continue to open and close, monster generators re-enable, etc.<br />
* Clean Up (M_CLEANUP) - Deletes the targeted instance from the target list of all instances in the dungeon.<br />
* Reset Counter (M_RESET) - Sets a counter back to its default value.<br />
* Destroy (M_DESTROY) - Removes the instance from the dungeon. This can cause Lua errors if triggers etc. target it and it isn't sent a Clean Up first.<br />
<br />
Define new messages with <b>dsb_add_msgtype</b>.<br />
<br />
[[Category:DSB|Messages]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DSB/Locking_Flags&diff=1979DSB/Locking Flags2011-05-09T14:03:35Z<p>WikiSysop: added category</p>
<hr />
<div>To lock multiple aspects just put them together with a '+'. Such as, to lock both movement and actuators use:<br />
<br />
<code><br />
dsb_lock_game(LOCK_MOVEMENT + LOCK_ACTUATORS)<br />
</code><br />
<br />
<br />
; LOCK_ACTUATORS : Triggers will not work<br />
; LOCK_MOVEMENT : Party cannot move<br />
; LOCK_MOUSE : Mouse clicks will not work at all<br />
; LOCK_MAGIC : Cannot enter runes or cast spells<br />
; LOCK_INVENTORY : Cannot view inventories<br />
; LOCK_ATTACK : Cannot trigger attack methods<br />
; LOCK_FLYERS : Flying objects will not update<br />
; LOCK_CONDITIONS : Timed conditions will not update<br />
; LOCK_MESSAGES : Message timers will not run<br />
; LOCK_ALL_TIMERS : No game timers will run at all<br />
<br />
[[Category:DSB|Locking Flags]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DSB/Editing_in_ESB&diff=1978DSB/Editing in ESB2011-05-09T14:03:11Z<p>WikiSysop: added category</p>
<hr />
<div>== "Editor Strikes Back" - A GUI editor for DSB ==<br />
<br />
Included with DSB is '''Editor Strikes Back''', a GUI editor for DSB. <br />
<br />
The first thing you'll have to do to get started is to create a new game directory. You can do that from within the editor, or just make a folder in Windows before you start. This will be where ESB puts your newly created ''dungeon.lua'', and where you can store any other files you need, like graphics or a custom ''startup.lua''. After you've created a new dungeon, you'll be presented with a grid of walls, where, by selecting items from the tree view on the right, you can stick in all the objects necessary. Most that use exvars (external variables) have a standard selection of exvars predefined when you place them.<br />
<br />
The test_dungeon provides a lot of examples of most of the game's objects in use, as well as some additional ones that expand the functionality of traditional DM and show what DSB can do. The test_dungeon's Lua source code also contains examples for adding new objects and adding new spells.<br />
<br />
[http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28414&p=104460&hilit=esb#p104460 Questions?]<br />
<br />
== First Steps ==<br />
<br />
* Step 1: Explore<br />
<br />
:Open the dungeon.lua file in the test_dungeon directory with ESB.<br />
<br />
:Explore it. Check the mechanics. Play the dungeon.<br />
<br />
* Step 2: Experiment<br />
:Do you start from scratch or from RTC?<br />
<br />
:Try and modify things.<br />
<br />
:Mechanics in DSB are using a MESSAGE system.<br />
<br />
:For example: If you walk on a ''pad'', the said ''pad'' will send a message to a target.<br />
<br />
:In ESB, edit the ''pad'' you will see the following exvars: '''msg=M_ACTIVATE''' and '''target=128''' <br />
:Where '''128''' is the identity number of the target item (it can be any number).<br />
<br />
:In ''dungeon.lua'', you will see:<br />
<br />
exvar[55]={ msg=M_ACTIVATE, target=128 }<br />
<br />
:Where '''55''' is the identity number of the pad (it can be any number).<br />
<br />
* Step 3: Get ready<br />
The main mechanics in ESB are the following:<br />
<br />
** trigger: ground item that will send a message when it's stepped on by the party / by a monster / by an item<br />
<br />
** msg_sender: it's a relayer of messages. When it receives a M_ACTIVATE message, it will send a message to its own targets. It can be used as a repeat fire: add the exvar repeat_rate=number, then it will send the message every number ticks (roughly 1/5 of a second). If it receives a M_DEACTIVATE, it will stop doing so.<br />
<br />
** sequencer: it's like a msg_sender, except that it sends its messages to its targets ONE AT A TIME, every tick. It can be used to make a sequence of events. If you add the exvar send_reverse=true, everytime it sends a message to a target, the previous target will get the opposite message (NB: the opposite compared to what it received on the previous step, not compared to the current message being sent to the new target)<br />
<br />
** counter: it's like a msg_sender, except it will send its message when it's count is zero. You guessed, it has an exvar count=number<br />
<br />
** qswapper: will exchange it's target type of item (for example, a fountain) for another defined type (for example exvar: arch=gorface)<br />
<br />
** item_action: it incorporates many of the actions in RTC's '''WALLITEM_ACTION''', and allows shuffling of the "operating instance" of a trigger etc. as well as the manipulation of various objects in the dungeon. For example, you can use it to send a certain message to any monster that steps on a certain trigger, or send a message to all instances of a certain type, or create a new instance and put it somewhere in the dungeon, or whatever else.<br />
<br />
:I leave the rest to your curiosity. The main messages are: '''M_ACTIVATE''', '''M_DEACTIVATE''', '''M_TOGGLE''', '''M_DESTROY'''<br />
<br />
* Step 4: Customize<br />
:Open the ''object.lua'' of the ''test_dungeon'' and in ''base''.<br />
:Open the ''startup.lua'' of the ''test_dungeon''.<br />
<br />
:See how items are defined by an "archetype": '''obj.arch = { graphics, properties }'''<br />
:Explore the files to see what's what. Graphics are the easiest to modify.<br />
<br />
<small>[http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28860#p118919 By Joramun]</small><br />
<br />
[[Category:DSB|Editing in ESB]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DSB/DSBTutorials&diff=1977DSB/DSBTutorials2011-05-09T14:02:35Z<p>WikiSysop: added category</p>
<hr />
<div>== DSB Tutorials (external links) ==<br />
* [http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28981 Getting Started with DSB Editing]<br />
* [http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28984 Wallitems, Triggers, and Multiple Levels]<br />
* [http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28988 More on Triggers, and Writing Custom Lua]<br />
* [http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=29007 Custom Methods and Monsters]<br />
<br />
[[Category:DSB|Tutorials]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=Conflux/Included_tips&diff=710Conflux/Included tips2009-01-06T16:53:56Z<p>WikiSysop: </p>
<hr />
<div>==Tips==<br />
*The aim of this dungeon is to propose another experience of DM. Be prepared to have to learn it all again.<br />
*Many monsters are lethal with enhanced powers and AI. Think about new strategies!<br />
*Get a flask as soon as possible and try the spells.<br />
*The game is not linear. Though you may access almost any zone from the start, you shouldn't hurry to go downstairs. It is possible to reach the emerald level in a few minutes, but you wouldn't survive very long.<br />
*You were sent in the undercity with a very blur task: "to save the city". You should explore the undercity and figure what's going on. There is much more than just a main quest ending.<br />
*There are no starving-to-death traps. There is always an exit.<br />
<br />
<br />
==Difficulty==<br />
*Pick the 4 guides the first time to uncover many secrets.<br />
*For a greater challenge, start with only one guide and try to get 3 guildmasters by venturing into the dungeon and earning guilds' grades.<br />
*For the greatest challenge of all, start the game with the maleficient guild. Only for insane players. It is probably impossible to reach the ending. I repeat: difficulty=impossible. So don't complain if you try it!<br />
*Unleash Hell for more difficulty. (hardcore gamers only!)<br />
<br />
[[Category:Conflux|Included Tips]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin&diff=709CSBwin2009-01-06T16:52:28Z<p>WikiSysop: split</p>
<hr />
<div>There is a tremendous amount of information about CSBwin at http://dmweb.free.fr/ and on the forums at http://dungeon-master.com/ . The game [[Conflux|Conflux]] uses CSBwin as its platform and CSBuild as its editor. One of the features of these programs is the ability to write things a bit like scripts using a funny language (the product of upgrading a much less ambitious endeavor to do things not originally envisioned) in things called Designer Specified Actuators (DSAs).<br />
<br />
For more informations about building, or editing a dungeon, see [[CSBwin/CSBuild|CSBuild]]<br />
<br />
[[Category:CSBwin| ]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/Tools&diff=708CSBwin/Tools2009-01-06T16:51:12Z<p>WikiSysop: </p>
<hr />
<div>Here you'll find informations on how to handle the various editors used for building CSBwin custom dungeons.<br />
<br />
== [[CSBwin/CSBuild/Basics|Basics]] ==<br />
The main tool to create a custom dungeon for CSBwin.<br />
<br>Pretty self-explanatory for basic customizing, but needs a lot of patience to get into when it comes to all the advanced options it provides, like adding custom decoration, wallsets, monsters and of course DSA.<br />
<br />
Usage is directly connected to:<br />
== [[CSBwin/CSBgraphics|CSBgraphics]] ==<br />
Used to organize additional graphics, sounds, overlays, decorations.<br />
<br>VERY hard to use for the average dungeon designer. Lots of fiddling with file format. Very little documentation available.<br />
<br />
== [[CSBwin/CSBuild/Adding custom sounds|Adding custom sounds]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate graphics for monsters|adding alternate graphics for monsters]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate wallset|Adding alternate wallset]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding custom items|Adding custom items]] (no idea how to do this :-) ) ==<br />
<br />
<br />
<br />
== [[CSBwin/ADGE|ADGE]] made by rain ==<br />
The editor covering almost everything concerning replacement of the original graphics.<br />
<br>Easy point 'n click usage. Also features editing attack names for weapons/items, experience gained when using an item, the damage done, attack combos, monster drops, the rune combination used for spell, aso.<br />
<br>VERY powerful and easy to use and fun.<br />
<br />
You will find it here:<br />
<br>http://dmweb.free.fr/?q=node/906<br />
<br>There are some "candy fixes" by kentaro-k.21 around. The above link is not the latest version. <br />
<br />
A list how to correctly install ADGE and a list of places where to get all relevant files from will follow<br />
<br />
It is very likely ADGE will hang on file 561 when loading a graphics.dat.<br />
<br> Kentaro has fixed this problem. Download the bugfix here: http://www.dmjump.net/ADGEv02bCandy1fix1.rar<br />
<br />
== Additional tools to be used with CSBuild ==<br />
*<br />
*<br />
* kentaro custom wallset tool. (Creating wallsets to be used with CSBgraphics)<br />
<br />
== Links unsorted ==<br />
* find vital information on creating custom dungeons http://www.dungeon-master.com/forum/viewtopic.php?t=25391<br>(List of engine, editor and DSA help threads)<br />
* making custom wallsets for Dummies: http://www.dungeon-master.com/forum/viewtopic.php?t=24696<br />
<br />
[[Category:CSBwin|Tools]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/Tools&diff=707CSBwin/Tools2009-01-06T16:42:52Z<p>WikiSysop: </p>
<hr />
<div>Here you'll find informations on how to handle the various editors used for building CSBwin custom dungeons.<br />
<br />
== [[CSBwin/CSBuild/Basics|Basics]] ==<br />
The main tool to create a custom dungeon for CSBwin.<br />
<br>Pretty self-explanatory for basic customizing, but needs a lot of patience to get into when it comes to all the advanced options it provides, like adding custom decoration, wallsets, monsters and of course DSA.<br />
<br />
Usage is directly connected to:<br />
== [[CSBwin/CSBgraphics]] ==<br />
Used to organize additional graphics, sounds, overlays, decorations.<br />
<br>VERY hard to use for the average dungeon designer. Lots of fiddling with file format. Very little documentation available.<br />
<br />
== [[CSBwin/CSBuild/Adding custom sounds|Adding custom sounds]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate graphics for monsters|adding alternate graphics for monsters]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate wallset|Adding alternate wallset]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding custom items|Adding custom items]] (no idea how to do this :-) ) ==<br />
<br />
<br />
<br />
== [[CSBwin/ADGE]] made by rain ==<br />
The editor covering almost everything concerning replacement of the original graphics.<br />
<br>Easy point 'n click usage. Also features editing attack names for weapons/items, experience gained when using an item, the damage done, attack combos, monster drops, the rune combination used for spell, aso.<br />
<br>VERY powerful and easy to use and fun.<br />
<br />
You will find it here:<br />
<br>http://dmweb.free.fr/?q=node/906<br />
<br>There are some "candy fixes" by kentaro-k.21 around. The above link is not the latest version. <br />
<br />
A list how to correctly install ADGE and a list of places where to get all relevant files from will follow<br />
<br />
It is very likely ADGE will hang on file 561 when loading a graphics.dat.<br />
<br> Kentaro has fixed this problem. Download the bugfix here: http://www.dmjump.net/ADGEv02bCandy1fix1.rar<br />
<br />
== Additional tools to be used with CSBuild ==<br />
*<br />
*<br />
* kentaro custom wallset tool. (Creating wallsets to be used with CSBgraphics)<br />
<br />
== Links unsorted ==<br />
* find vital information on creating custom dungeons http://www.dungeon-master.com/forum/viewtopic.php?t=25391<br>(List of engine, editor and DSA help threads)<br />
* making custom wallsets for Dummies: http://www.dungeon-master.com/forum/viewtopic.php?t=24696<br />
<br />
[[Category:CSBwin|Tools]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/Tools&diff=706CSBwin/Tools2009-01-06T16:42:09Z<p>WikiSysop: </p>
<hr />
<div>Here you'll find informations on how to handle the various editors used for building CSBwin custom dungeons.<br />
<br />
== [[CSBwin/CSBuild Basics|CSBuild/Basics]] ==<br />
The main tool to create a custom dungeon for CSBwin.<br />
<br>Pretty self-explanatory for basic customizing, but needs a lot of patience to get into when it comes to all the advanced options it provides, like adding custom decoration, wallsets, monsters and of course DSA.<br />
<br />
Usage is directly connected to:<br />
== [[CSBwin/CSBgraphics]] ==<br />
Used to organize additional graphics, sounds, overlays, decorations.<br />
<br>VERY hard to use for the average dungeon designer. Lots of fiddling with file format. Very little documentation available.<br />
<br />
== [[CSBwin/CSBuild/Adding custom sounds|Adding custom sounds]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate graphics for monsters|adding alternate graphics for monsters]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate wallset|Adding alternate wallset]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding custom items|Adding custom items]] (no idea how to do this :-) ) ==<br />
<br />
<br />
<br />
== [[CSBwin/ADGE]] made by rain ==<br />
The editor covering almost everything concerning replacement of the original graphics.<br />
<br>Easy point 'n click usage. Also features editing attack names for weapons/items, experience gained when using an item, the damage done, attack combos, monster drops, the rune combination used for spell, aso.<br />
<br>VERY powerful and easy to use and fun.<br />
<br />
You will find it here:<br />
<br>http://dmweb.free.fr/?q=node/906<br />
<br>There are some "candy fixes" by kentaro-k.21 around. The above link is not the latest version. <br />
<br />
A list how to correctly install ADGE and a list of places where to get all relevant files from will follow<br />
<br />
It is very likely ADGE will hang on file 561 when loading a graphics.dat.<br />
<br> Kentaro has fixed this problem. Download the bugfix here: http://www.dmjump.net/ADGEv02bCandy1fix1.rar<br />
<br />
== Additional tools to be used with CSBuild ==<br />
*<br />
*<br />
* kentaro custom wallset tool. (Creating wallsets to be used with CSBgraphics)<br />
<br />
== Links unsorted ==<br />
* find vital information on creating custom dungeons http://www.dungeon-master.com/forum/viewtopic.php?t=25391<br>(List of engine, editor and DSA help threads)<br />
* making custom wallsets for Dummies: http://www.dungeon-master.com/forum/viewtopic.php?t=24696<br />
<br />
[[Category:CSBwin|Tools]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/Tools&diff=705CSBwin/Tools2009-01-06T16:41:01Z<p>WikiSysop: links spelling</p>
<hr />
<div>Here you'll find informations on how to handle the various editors used for building CSBwin custom dungeons.<br />
<br />
== [[CSBwin/CSBuild Basics|CSBuild Basics]] ==<br />
The main tool to create a custom dungeon for CSBwin.<br />
<br>Pretty self-explanatory for basic customizing, but needs a lot of patience to get into when it comes to all the advanced options it provides, like adding custom decoration, wallsets, monsters and of course DSA.<br />
<br />
Usage is directly connected to:<br />
== [[CSBwin/CSBgraphics]] ==<br />
Used to organize additional graphics, sounds, overlays, decorations.<br />
<br>VERY hard to use for the average dungeon designer. Lots of fiddling with file format. Very little documentation available.<br />
<br />
== [[CSBwin/CSBuild/Adding custom sounds|Adding custom sounds]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate graphics for monsters|adding alternate graphics for monsters]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding alternate wallset|Adding alternate wallset]] ==<br />
<br />
== [[CSBwin/CSBuild/Adding custom items|Adding custom items]] (no idea how to do this :-) ) ==<br />
<br />
<br />
<br />
== [[CSBwin/ADGE]] made by rain ==<br />
The editor covering almost everything concerning replacement of the original graphics.<br />
<br>Easy point 'n click usage. Also features editing attack names for weapons/items, experience gained when using an item, the damage done, attack combos, monster drops, the rune combination used for spell, aso.<br />
<br>VERY powerful and easy to use and fun.<br />
<br />
You will find it here:<br />
<br>http://dmweb.free.fr/?q=node/906<br />
<br>There are some "candy fixes" by kentaro-k.21 around. The above link is not the latest version. <br />
<br />
A list how to correctly install ADGE and a list of places where to get all relevant files from will follow<br />
<br />
It is very likely ADGE will hang on file 561 when loading a graphics.dat.<br />
<br> Kentaro has fixed this problem. Download the bugfix here: http://www.dmjump.net/ADGEv02bCandy1fix1.rar<br />
<br />
== Additional tools to be used with CSBuild ==<br />
*<br />
*<br />
* kentaro custom wallset tool. (Creating wallsets to be used with CSBgraphics)<br />
<br />
== Links unsorted ==<br />
* find vital information on creating custom dungeons http://www.dungeon-master.com/forum/viewtopic.php?t=25391<br>(List of engine, editor and DSA help threads)<br />
* making custom wallsets for Dummies: http://www.dungeon-master.com/forum/viewtopic.php?t=24696<br />
<br />
[[Category:CSBwin|Tools]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/CSBuild&diff=704CSBwin/CSBuild2009-01-06T16:38:27Z<p>WikiSysop: New page: == Introduction == There has been some call for a simplified explanation of how to use DSAs. I don't think it is possible to learn to use DSAs without a bit of mental effort. They use a ...</p>
<hr />
<div>== Introduction ==<br />
There has been some call for a simplified explanation of how to use DSAs. I don't think it is possible to learn to use DSAs without a bit of mental effort. They use a language with unpronounceable words, a syntax backward from normal languages and discourse, and provide very little in the way of debugging the syntax or the execution.<br />
<br />
Let us begin by discussing the ''backwardness'' of the language. If you have heard of the Forth language then what I say here will be very familiar. I did it this way because it is easy to compile. In fact, it is not necessary to compile because the person writing the code for the DSA does the compiling in his head! I just translate the strange-looking words into numbers to be executed as the game runs.<br />
<br />
== DSA tutorial ==<br />
*[[CSBwin/DSA Lesson 1|Lesson 1 - BackwardsTalking]]<br />
*[[CSBwin/DSA Lesson 2|Lesson 2 - The State Machine]]<br />
*[[CSBwin/DSA Lesson 3|Lesson 3 - Messages: Set and Clear/To and Fro/Sooner or Later]]<br />
*[[CSBwin/DSA Lesson 4|Lesson 4 - A DSA Can Speak]]<br />
*[[CSBwin/DSA Lesson 5|Lesson 5 - Our First Example (InterLevel/LongDelays)]]<br />
*[[CSBwin/DSA Lesson 6|Lesson 6 - Building a Torch from Sticks and Ashes]]<br />
<br />
== DSA unsorted ==<br />
*[[CSBwin/DSA examples|examples of DSA to be looked at right in the game]]<br />
*[[CSBwin/DSA bug hunting tips|bug hunting Tips]]<br />
*[[CSBwin/DSA Library|DSA Library (for copy/pasting)]]<br />
*[[CSBwin/Tools|Tools and editors for CSBwin]]<br />
*[[CSBwin/Graphics_Library|Graphics Library]]<br />
**Monsters<br />
**wallsets<br />
**decorations<br />
**items<br />
<br />
== Bugs and Requests ==<br />
*[[CSBwin/Bugs and Requests|Bugs and Requests]]<br />
*[[CSBwin/User_Questions|User Questions]]<br />
<br />
== See also ==<br />
* [[ConfluxTech:Main_Page|ConfluxTech]] (restricted zone, ask [[user:Paul Stevens]] for permission)<br />
<br />
<br />
[[Category:CSBwin|CSBuild]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/Bugs_and_Requests&diff=703CSBwin/Bugs and Requests2009-01-06T16:32:55Z<p>WikiSysop: </p>
<hr />
<div>== Floor decoration glitch - High Priority (maybe already fixed, to be checked) ==<br />
just to test the extreme case, I made a 244 x 136 floor (see attachment)<br />
views 0 and 2 are glitched because they should be cut off.<br />
views 6,7 and 8 are glitched due to the width of 224.<br />
<br />
<br />
== Floor decoration in stairwell - Medium Priority ==<br />
could the floor decorations be visible on staircases?<br />
<br />
This should probably be implemented in your extended graphics code. You can draw whatever you please whereever you please. I am willing to help after some discussion of what exactly you need.<br />
<br />
== DSA start state limitation - Medium Priority ==<br />
the starting state of a DSA can only be between 0 and 15. is it on purpose?<br />
<br />
<br />
== 3D floor decorations - High Priority ==<br />
I'd like to make floor decorations with height, which means that items on the far side of the tile should be drawn before drawing the tile decoration, as for doors. Could you have a try about this bit in the floor descriptors to behave like doors?<br />
<br />
<br />
22Oct08 - PRS - Don't you have your own code in CSBGraphics.dat which is responsible for drawing the viewport? You can draw the floor decorations and objects in any order you please. If you want me to try and help with this, send a sample dungeon and your source code for the graphics. Perhaps these decorations could be recognized by being in a certain number range (like 400-499).<br />
<br />
<br />
<br />
<br />
== DSA function to slow party - Already coded, should be tested ==<br />
2) would it be possible, through a DSA instruction, to slow down the party for their next step, as when heavily loaded?<br />
- The slow down counter would decrease for each step taken. (if a counter is not technically possible, the effect would simply be gone as soon as the party makes a step.)<br />
- Turning would be slowed too but it wouldn't decrease the counter.<br />
<br />
== Adding/Referencing flag in Missile - Low Priority ==<br />
3) about missiles, I saw the thread on the forum... great ideas!<br />
out of joke, I'd like to be able use one of the unsed byte as a flag. <br />
I would set it during the &CAST, &FILTEREDCAST, &THROW, so I cand find it later in the MissileEncounterFilter.<br />
(maybe with a &FLAG operator, so you don't have to change the current syntax of the current commands?)<br />
If you allow me to change the direction besides cancelling the impact, I would have a lot of fun.<br />
<br />
== Slow Missile - Low Priority ==<br />
4) Another interesting idea: the slow missile. is it possible to use a byte as a flag telling if it is a normal or slow missile?<br />
<br />
== Delayed Sound - (Refused - Paul recommends sending a &MESSAGE to a sound DSA) ==<br />
6) &SOUND ( SoundNumber attenuation(divisor) flags ... )<br />
could the flags be used as delay before hearing the sound?<br />
<br />
<br />
<br />
== Monster Poison/Magic resistance - Medium Priority ==<br />
from the documentation published by Christophe, for monsters descriptors:<br />
12h (18) 1 word (big endian):<br />
<br />
* Bits 15-12: Unused, always 0.<br />
* Bits 11-8: Poison resistance (Clouds and Bolts). Value 15 means the creature is immune.<br />
* Bits 7-4: Fire resistance (Magic resistance). Value 15 means the creature is immune. Does it apply only to fire or all magic?<br />
<br />
The resistances, thus, are wether a complete vulnerability or a complete immunity.<br />
<br />
Would it be possible, to compute partial resistances when the value is between 1 and 14 (included)?<br />
For backward compatibility, put a general check in CSBuild for the dungeon: "allow partial resistances for monsters".<br />
<br />
== Playback bug when clicking on Prison Door - ??? Priority ==<br />
I think the bug that was fixed involved left clicking in the game<br />
loaded screen, this one involves right clicking. Anyway, I was able to<br />
recreate the bug with the latest version, 10.089, from constructtorch.<br />
How about the game I tried to splice the logs of? I don't won't to<br />
keep playing until I can make it work. Something weird happens when I<br />
try to cast a YA spell. For some reason in the playback I have less<br />
mana at the point I try to cast it than I did in the actual game.<br />
<br />
<br />
<br />
== DSA function to get Skin Number - Medium Priority - FIXED ==<br />
2) it would be interesting to be able, through a DSA, to know the skin number associated to a location.<br />
this would allow me to link rules directly to skins (no fireball when on a tile with an aquatic skin, for example)<br />
<br />
OK. I will provide a &SKIN ( location . . . skinNumber ) PRS 19Oct08<br />
<br />
DONE 20Oct2008 PRS<br />
<br />
<br />
== Alternate Froor Decoration Glitched - FIXED ==<br />
<br />
this alternate floor decoration is glitched, I don't know why. It's the concatenation of group0.txt (54bytes+2) and F.bin (800bytes)<br />
I checked the floordec000.bin that came in the construct torch, and it doesn't have the two bytes of zero after the 54bytes of the descryptor, yet the documentation states that they should be there since 54 is not a multiple of 4.<br />
Just for the sake of it, I tried using only 54 bytes instead of 56 with my alternate decoration, and the view 8 is correct, the other glitched. With 56 bytes everything is glitched.<br />
<br />
== DSA function &DISTACEFROMPARTY - DONE and FIXED ==<br />
3) I'm thinking about making a few selected animated floor and wall decorations.<br />
this time I'm not forgetting about the possible choking of the CPU.<br />
The most frequent operation that will occur will be to check if the party is on the level and near the DSA.<br />
would it be possible to create a command like this:<br />
&DISTANCEFROMPARTY (location . . . Distance)<br />
Distance would be -1 if the party is not on the same level than location<br />
otherwise, distance is the number of tiles between location and the party (x + y), 0 meaning the party is on the location.<br />
<br />
&PARTYDISTANCE with CSBuild 3.01 gives an error of DSA code when I close/open the DSA containing this instruction.<br />
<br />
== Request Overlay transparent color - Completed and FIXED ==<br />
About &overlay: I was wondering if it would be possible to define a transparent color for the viewport overlays since p1,p3 and p4 are not used.<br />
<br />
I have implemented this in CSBwin10.093. See documentation at:http://www.dianneandpaul.net/CSBwin/documentation/ViewportOverlay.html<br />
<br />
Paul 15 October 2008<br />
<br />
== Item Pick area too low - RESOLVED ==<br />
2) for certain items, in CSBwin, when you click on them on the floor to pick them up, the responsive area the the click is like 2 pixels too low.<br />
ie, if you click under the item, you pick it up, and if you click on its upper border, nothing happens.<br />
try the magic box (blue) named MAGIC PURSE in this graphics.dat.<br />
<br />
<br />
== Mirroring decorations - COMPLETED ==<br />
1) I wanted to set a mirroring effect for north and east, which should give the flags: 00 06<br />
but nothing happens. It only works if I also set mirroring for the 9 views: FF 07.<br />
Yes, this is as you said, but then how could I set a north and west mirrorring AND a mirroring for views 0,4,7 for example?<br />
I think that it should be a XOR operation, not an AND: mirror if facing bit XOR tile bit is set, otherwise don't.<br />
<br />
<br />
I think you want to mirror a cell if (Cell bitset) XOR (facing bit set).<br />
<br />
That makes some sense. I will do it.<br />
<br />
PRS 20Oct2008<br />
<br />
Implemented in CSBwin 10.096 22Oct08 PRS<br />
<br />
== Graphic of dropped items missing - FIXED ==<br />
if at runtime I drop (through a &ADD or a monster dying) an actuator or a decoration DSA on the floor, the graphic won't appear if there are items on the floor. I have to remove the items to make the graphic appear.<br />
Fixed in CSBwin version 10.097 PRS 24Oct2008<br />
<br />
== Using DSA as data - COMPLETED ==<br />
4) I have a great idea about a flood, but I'd need the following commands:<br />
&DSATYPE (ObjectID . . . DSAType) yields -1 when it's not a DSA, 0 to 255 when a DSA<br />
&DSASTATE (ObjectID . . . DSAType) yields -1 when it's not a DSA, 0 to err, 200000? when a DSA<br />
&DSA_A (ObjectID . . . DSA_A) yields -1 when it's not a DSA, parameter A when a DSA<br />
&DSA_B (ObjectID . . . DSA_B) yields -1 when it's not a DSA, parameter B when a DSA<br />
<br />
It appears that you want to solve partial differential equations using difference methods.<br />
CSBwin was not really designed with this in mind!<br />
This has been implemented as &DSAINFO@. PRS 25Oct2008<br />
<br />
== Mechanism to sleep/awaken monster AIs - Very Low Priority ==<br />
This is ''what-if'' thinking (therefore the priority): A dungeon with a ton a monsters will burn CPU time updating monsters that (frequently) will have no effect on the player's experience. In these instances it could be useful to allow the designer to activate/deactivate those monster's processing. I'm mainly thinking in conjunction with the ''Party Move Filter''<br />
<br />
COMMENT by PRS: Except on very slow machines I have never seen CPU time be any problem in CSBwin. If you have a counter-example, perhaps I should look at it to see what is going on. We could certainly consider some mechanism to use less time processing non-essential monster AI. I think the code already causes monsters on distant from the party to move less often. It might be easy to extend that capability. I think it would be best to slow them down rather than to deactivate or stop them completely. What mechanism(s) did you have in mind?<br />
<br />
By the way - Did you mean Priority 1 = Top priority? Zyx was the first to assign priorities here and he used number one to mean the most important.<br />
<br />
'''Follow-up''': For the priority I meant the lowest-possible. My intention was to throw this out as food-for-thought (if a designer ever starts to see slow-down). The potential situation I was considering was a dungeon with a heavy-weight ''Monster Moving'' filter or filters (and lots of monsters). I should have been more explict, as I wasn't thinking about any fine-grain control (say group-by-group) but more at the on-this-level type granularity. For instance, when a party is on level ''n'', monster moving around on levels above ''(n-1)'' and below ''(n+1)'' in most cases won't have any gameplay effect, so it could (in this hypothetical case) be desirable to sleep and awaken monsters on a given level when the party moves between levels. Removing the cost of the ''Monster Moving'' filter (as I understand it) seems to be currently possible by using the level-specific variant and moving the instances around on party level change to effectively enable/disable the filter for the given level, I was simply tossing out the idea of going one step beyond this.<br />
<br />
[[Category:CSBwin|Bugs and Requests]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_bug_hunting_tips&diff=702CSBwin/DSA bug hunting tips2009-01-06T16:32:33Z<p>WikiSysop: CSBwin/DSA bug hunting tips moved to CSBwin/DSA/bug hunting tips</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/bug hunting tips]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/bug_hunting_tips&diff=701CSBwin/DSA/bug hunting tips2009-01-06T16:32:33Z<p>WikiSysop: CSBwin/DSA bug hunting tips moved to CSBwin/DSA/bug hunting tips</p>
<hr />
<div>== General ==<br />
The first thing to say is always use the timer trace when something strange happens...you can try to follow the logic of your code, and usually find where the wheels are coming off quickly enough. Open using notepad and always use the 'find' option to zoom in to certain words if you have alot of activity going on - the name of the particular filter, a certain key 'type' value you know should be appearing, etc. Common things you can spot are stack overflows (if a command isn't geting used right, chances are it is leaking values, especially in a recurrisve loop). Get the hang of what the trace is saying, and diagnosing becomes so much simpler.<br />
<br />
Also, if you get a DSA error and not sure where to start, be logical - start from the beginning and make sure each step works and move on to the next. Sometimes where the wheels are coming off can be because a bad value was fed much earlier into the array, or a rogue literal from earlier is combining with another error you would otherwise spot (like a stack underflow)<br />
<br />
== Errors ==<br />
I already stated a few in a thread to add, but here's some of the many I've managed to generate through stupidity.<br />
<br />
== Stack underflows ==<br />
<br />
an error message shown when CSB crashes. Caused if there is a variable missing from the stack when you enter a command.<br />
<br />
Either you have simply forgot to put in a value (easy to do with long commands like &move) or some other function isn't providing the right information. I personally also get it because I usually increment using a '&1+' which requires one variable, and I always put '&+ instead, which adds two together to increment<br />
<br />
== Stack overflows ==<br />
An error message shown before CSB crashes.<br />
<br />
You need to be generating a large amount of values to the stack to do this, and usually is the sign of a recursive loop not breaking out of itself, that is hemoraging (however you spell it) values onto the stack each cycle. Or, in other words, usually you have two problems, to stop the loop, and then you will probably want to work out why you are leaving values on the stack instead of them being used up in the first place!<br />
<br />
== Game freezes ==<br />
If the game simply freezes in place, this is the sign that a DSA is locked in an infinite loop.<br />
<br />
This will be because you have missed out a '?' in a conditional jump so it always jumps, you are not reaching a target value to break out of the loop, or you simple have a jump command pointing to the wrong place.<br />
<br />
== Something happening all the time ==<br />
Watch out for those pesky '?' in front of conditional jumps.<br />
<br />
Also, watch out for simple literal checks like &< for 'less than'.<br />
<br />
== Something never happens ==<br />
Again it could be the above, but also make sure you are actually checking the values or situations you think you are.<br />
<br />
The syntax for &Param and any other check like &monster is reversed. Or, in other words you might think you are filling twelve memory arrays starting from 1' with party information, but in reality you are just assigning the first party variable to '12', and thus any checks you are making will be to garbage numbers. It is also hideously easy to forget to do '&@' when checking the value of an array - so you can be comparing a figure to '0' all the time, not comparing a figure to the contents of array '0'<br />
<br />
== Tips ==<br />
I personally always like to keep a single line of code in each DSA (usually 0T3) free as a noop.<br />
<br />
It makes it quick to know how to break out of the DSA or a gosub loop - just use JT3!<br />
<br />
If you are doing complex code, it is a good idea while you are right in it and know exactly where logical breaks are to add the phrase 'L0 ?JT3' to the code. Currently it will do nothing, but it is very quick to then delete the '?' during debugging and create a break, and restore the ? to remove the break again.<br />
<br />
You can, in a small way, comment your DSA code. CSBwin's error checking for parameters is quite good, and any parameter called it knows doens't exist will just be ignored and a zero generated instead. So if you insert the line 'lm lu lm lm ly ld le la lt lh' it will be allowed as viable code, and just generates a set of zeroes to the stack if it is actually acted upon. Whereas you can now remember that weird line of code was the one that killed mummies. Personally I use this kind of small comments in certain states (in unusaed lines) or at the end of a DSA function as reminders.<br />
<br />
You can also create the DSA code 'offline', using a standard text editor like notepad, and then IMPORT it. This allows you to include as many comments as you like.<br />
<br />
''Written by Beowuuf''<br />
<br />
[[Category:CSBwin|Bug hunting tips]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/CSBuild_Basics&diff=700CSBwin/CSBuild Basics2009-01-06T16:32:19Z<p>WikiSysop: CSBwin/CSBuild Basics moved to CSBwin/CSBuild/Basics</p>
<hr />
<div>#REDIRECT [[CSBwin/CSBuild/Basics]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/CSBuild/Basics&diff=699CSBwin/CSBuild/Basics2009-01-06T16:32:19Z<p>WikiSysop: CSBwin/CSBuild Basics moved to CSBwin/CSBuild/Basics</p>
<hr />
<div>== Download ==<br />
Download the most recent version of CSBuild [http://www.dianneandpaul.net/CSBwin/CSBuild286.exe here]<br />
<br />
== Getting familar with CSBuild ==<br />
Zed5Duke has posted a beginners guide covering the very first steps to be taken when building a custom dungeon: [[CSBwin/Building first steps|Building first steps]]<br />
<br />
Also Kentaro wrote a very nice and easy to understand documentation with lots of screen shots about the basic usuage of CSBuild and DSAs.<br />
<br />
It is a -very- good starting point and covers all the things you need to know about to get started:<br />
[http://members.at.infoseek.co.jp/danmasu/Contrib_08/sample1/index.htm First steps in CSBuild + include a first DSA (written by Kentaro)]<br />
<br />
You'll learn how to increase the level size, how to add wall decorations, buttons and champions. You'll also see how doors can be opened not only by a button to be pressed, but also how a DSA can open the door for you. This way you'll get familar with the idea of DSAs. However, for now you may find yourself feeling more comfortable with the 'standard' options like preasure pads and alcoves you know so well from Dungeon Master.<br />
<br />
Another almost covering everything collection was done by Beo. Look [http://www.dungeon-master.com/forum/viewtopic.php?t=25391 here].<br />
<br />
== Examples ==<br />
Adopting Kentaros style you may have a look how a torchmaker can be added to your dungeon: [[CSBwin/Building a torchmaker|Building a torchmaker]].<br />
<br />
Let's say you have the general idea of light being a problem in your dungeon. You may want to force the player to actually generate them in a kind of workshop instead of finding them.<br />
<br>Torches usually are made of wood and pitch. There are sticks in DM, but no pitch to be found. Let us instead use ashes. Well, ashes won't burn, so we have to alter the graphics for ashes and change the item name using ADGE. So this will not only cover how a wall decoration works as an actuator and how counters and teleporters are used, but also the basic usuage of ADGE. It will also show the limits of the standard DM engine and how handy a DSA can be.<br />
<br />
Next we will use DSAs to create a series of [[CSBwin/Example Quests|Example Quests]] given by a 'non-player character'. This NPC (a monster actually) will give you new quest (items, monster hunt) after you accomplished the previous one.<br />
<br />
[[Category:CSBwin|Basics]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_examples&diff=698CSBwin/DSA examples2009-01-06T16:31:48Z<p>WikiSysop: CSBwin/DSA examples moved to CSBwin/DSA/examples</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/examples]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/examples&diff=697CSBwin/DSA/examples2009-01-06T16:31:48Z<p>WikiSysop: CSBwin/DSA examples moved to CSBwin/DSA/examples</p>
<hr />
<div>=== Introduction ===<br />
<br />
Throughout the years people have asked for specific DSA for their custom work and various examples have been set up you can learn from. You can directly play most of these examples as they come in a complete package including CSBwin to see what effects are created. You may then load the dungeon.dat into CSBuilt and have a lock at the DSA. You can use these examples in a direct way without even knowing anything about DSA, just by copy/pasting. Right after you have become used to the Editor CSBuilt you may quickly be able to add them to your dungeon.<br />
<br><br />
<br />
=== DSA Library Demo ===<br />
[http://www.dianneandpaul.net/CSBwin/DSA_Library/DSA-LibraryDemo.zip DSALibraryDemo]<br />
<br />
*An example of a 'training station', with which you can add experience to your party leader operating a coin slot. A good way to reward a player for unusual awareness or successfully accomplishing a quest.<br />
*Also shows how to teleport a monster not only to a specific location, but also on an other level of the dungeon.<br />
<br />
=== Questions ===<br />
[http://www.dianneandpaul.net/CSBwin/Questions.zip Questions]<br />
<br />
*Changes attack names (just the names, not the action itself)<br />
*creates an object when the party steps on a certain tile.<br />
<br />
=== CustomGraphicsDemo ===<br />
[http://www.dianneandpaul.net/CSBwin/CustomGraphicsDemo21.zip CustomGraphicsDemo]<br />
<br />
*Creates an object like in "Questions", but this time it is a champion (you then can add to your party). You may do this until your party is full.<br />
*Shows how to display the ingame text in a different color than the standard white.<br />
*Increases attack speed of a monster (which by the way is invisible) and the experience gained by getting hit.<br />
*Seems to do various other things, just play it and find out afterwards when looking at it in CSBuilt.<br />
<br />
=== The ultimate example of course is Conflux itself ===<br />
It is ''highly'' recommended NOT to look at it in CSBuilt if you're not at least familar or maybe even 'done' with Conflux.<br />
<br />
You may spoil the game badly, depending on your inner strenght to resist looking at a riddle you could solve on your own with just a little more patience.<br />
<br />
It is your choice. Here is a version of [http://hometown.aol.com/TToommii/DM/wiki/CSBuild_spoil.exe CSBuilt] and the [http://hometown.aol.com/TToommii/DM/wiki/Dungeon_ConIII_BFIII.dat dungeon.dat] from Conflux III (buxfixIII) you can look at. (Don't forget to add the [http://hometown.aol.com/TToommii/DM/wiki/tiles.bmp tiles] to the folder of CSBuild.) If you know about how the riddles and all those clever mechanisms work from first hand gaming experience, you'll find real treasures of DSA.<br />
<br />
=== Others ===<br />
However, if you do not want to have a all-revealing look at this jewel and take away its mystery, there are many more examples to be found you can learn from here:<br />
http://www.dianneandpaul.net/CSBwin<br />
<br />
Play around with them. Like the last example they do not only show you how to use DSA, but also how alternate wall decorations and monster graphics can be of use. These things and the general usage of the various editors are covered elsewhere.<br />
<br />
A very complete documentation has also been set up already by Paul, but as you will see it is nothing you can get into with ease, as it is written from a coders point of view and thus quite hard to understand: http://www.dianneandpaul.net/CSBwin/documentation/<br />
<br />
[[Category:CSBwin|Examples]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_Lesson_1&diff=696CSBwin/DSA Lesson 12009-01-06T16:31:33Z<p>WikiSysop: CSBwin/DSA Lesson 1 moved to CSBwin/DSA/Lesson 1</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/Lesson 1]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/Lesson_1&diff=695CSBwin/DSA/Lesson 12009-01-06T16:31:33Z<p>WikiSysop: CSBwin/DSA Lesson 1 moved to CSBwin/DSA/Lesson 1</p>
<hr />
<div>; You probably recognize an algebraic formula like :<br />
<pre>1 + 2 * ( 3 + 4 )</pre><br />
<br />
which means to add 3 to 4, multiply the sum by 2 and add the product to 1. Notice that the operations take place in an order different than the order in which they are written. The parentheses cause 3 and 4 to be added before the multiplication by 2 and the \'operator precedence\' causes the multiplication by 2 to take place before adding 1. In a DSA, the operations always take place in the order written. So it looks a bit backward on paper.<br />
<br />
How can we write this in the order that it is to take place? Like this?<br />
<br />
<pre>3 + 4 * 2 + 1</pre> ?<br />
<br>'''WRONG!'''<br />
<br />
NO! There are three operations and they happen in the correct order but when the first plus sign is encountered, it does not yet know what two things are to be added. Pretend you are typing this formula into the computer. As you enter each \'word\' it must \'know\' what to do. For example, after you type \"3 +\", it will try to do the addition but will fail because there is only one number to be added! Here is how it must be done :<br />
<br />
<pre>3 4 + 2 * 1 +</pre><br />
<br>'''RIGHT!'''<br />
<br />
Here is what happens. There is a pile of numbers (usually called a stack) on the floor. Each 'WORD' we write does something to the numbers on the top of that pile. We start with an empty pile. We type the word "3" and this causes the number three to be put on the top of the pile. We type the word "4" and it causes the number four to be added to the pile. The pile now contains a three on the bottom and a four on the top. Now we type the word "+" and that causes the top two numbers on the pile to be removed from the pile, added together, and the result placed back on the pile. The pile now has a single number---the number seven. We type the word "2" and it causes the number two to be added to the pile. The pile now has two numbers--seven and two. Then we type the word "*" and the top two numbers on the stack are removed, multiplied, and the result (14) is put on the pile which now contains only that one number. Then we type the words "1" and "+" which cause the number one to be put on the stack then the top two numbers (1 and 14) to be removed and added and the result (15) to be put on the pile. We are done. The answer is a single number, fifteen, and it is all by itself on the pile.<br />
<br />
==== Vocabulary ====<br />
<br />
*From now on we are not going to use the word "pile". We are going to call it by its proper Christian name: "Stack".<br />
*We are not going to refer to this language as "backwards". We will call it by its proper Christian name: [[http://en.wikipedia.org/wiki/Reverse''Polish''notation|Postfix Polish]]. It used to be called "Postfix Polish" before it became insensitive to include any nationality or race or gender in common nouns. Now it can be called [[http://en.wikipedia.org/wiki/Jan_Łukasiewicz|"Lukasiewicz Notation"]].<br />
*The things we type are going to be called "WORDS", even if they are numbers. A "WORD" is anything between two spaces (or any whitespace such as the start and end of lines). We typed seven words in our little example above.<br />
<br />
Now we will see it done in the CSBuild Editor. Here is the corner of the DSA editor. For now you can ignore everything except the one line of code : [[image:DSASimpleExpressionEdit.gif]] [http://www.dianneandpaul.net/CSBwin/documentation/DSAwiki/DSALesson001.zip]<br />
<br />
Yes, that is our sample expression that computes the number 15. You may think that it has turned ugly. You would be right. But that is what we have and the reasons are historical and boring. There are a few 'WORDS' that do not start with an ampersand, but most 'WORDS' do start with an ampersand.<br />
<br />
In our example, we must put numbers onto the stack by using the 'L' command. "L4" means to 'Load' the number four onto the stack. "&+" means plus. Sorry about the ugliness. By clicking on the 'HELP' button, you can get a list of all the available 'WORDS' and a hint as to their meaning and how they are used. Here is a piece of that help information which includes the word "&+" : [[Image:DSAHelpPlus.gif]]<br />
<br />
Notice that the name is followed by a parenthesised expression: ( x y ... x + y ). This shows the effect of the 'WORD' on the contents of the stack. The contents of the stack are shown before the operation (on the left of the ellipsis) and after the operation (right of the ellipsis). The 'x' and the 'y' are assumed to be on the stack before the &+ does its thing and the sum 'x+y' is what is on the stack afterwards. The topmost number on the stack is to the right so that in this case the 'y' is in the top and the 'x' is just below it. There may be additional numbers on the stack below the 'x' but it is not necessary for the '&+' to work properly and so is not included in the documentation for '&+'.<br />
<br />
Now we are going to put this DSA into a program and use it to compute the number 15. We turn on tracing so that we can see the DSA in action and verify that it does, indeed, do what we want it to do. Here is the trace that is produced : =~MoveParty forward from 00(04,00)=<br />
<br><br />
<pre><br />
Object ffff stepped On pressure pad 0001 00(04,01)<br />
000025 timer create 001 00 DLY=0000 06 00 05 01 00 00 9211d2fd Set 0x01 in DB at 00(05,01)00<br />
000025 timer Process 001 00 DLY=0000 06 00 05 01 00 00 9211d2fd Set 0x01 in DB at 00(05,01)00<br />
DSA Compute 15 State 0 MSG 0<br />
(0)Execute DSA at 0(5,1) master at 0(5,1) state=0,msg=0<br />
LOAD INTEGER 3 (3)<br />
LOAD INTEGER 4 (3 4)<br />
&+ (7)<br />
LOAD INTEGER 2 (7 2)<br />
&* (14)<br />
LOAD INTEGER 1 (14 1)<br />
&+ (15)<br />
(0)RETURN (15)~[[7]]<br />
</pre><br />
<br />
<br />
You can see the step-by-step execution of the program starting with the line "LOAD INTEGER 3". After each operation is performed, the trace shows the contents of the stack in parentheses. After the last operation, you can see that the stack contains the number 15, as it should. In the square brackets at the end of the trace you see that the DSA performed a total of 7 operations.<br />
<br />
Would you believe that I have provided a sample dungeon with this DSA in it that you can play with? Well, I have and you can find it [[here]]]. I will not be doing much of this in future lessons. I will print the code and you will have to put it into your own dungeon if you want to try it out.<br />
<br />
<br />
=== FAQ ===<br />
<br />
;Q - "We turn on tracing (...)". But there are different tracing options to choose from the menu. Timer Trace, AttackTrace Function, Trace Monster AI, Trace Graphic Trace, and finally DSA Trace. I chose Timing Trace. It works best. What are the other Trace Options for? Did I choose the correct Trace for DSA's?<br />
:A - The 'Timer Trace' shows the creation and processing of every timer message (Set, Clear, or Toggle). So that would be sufficient to see the timer message delivered to your DSA and any timer messages created by your DSA. But it would not show the internal operation of the DSA. In our example, we can actually see the operation of each word that is executed by the DSA and that was accomplished by turning on the "DSA Trace". The DSA Trace is treated as an addition to the Timer Trace, so in order to see the DSA Trace, you must also enable the Timer Trace.<br />
<br />
[[Category:CSBwin|Lesson 1]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_Lesson_2&diff=694CSBwin/DSA Lesson 22009-01-06T16:31:21Z<p>WikiSysop: CSBwin/DSA Lesson 2 moved to CSBwin/DSA/Lesson 2</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/Lesson 2]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/Lesson_2&diff=693CSBwin/DSA/Lesson 22009-01-06T16:31:21Z<p>WikiSysop: CSBwin/DSA Lesson 2 moved to CSBwin/DSA/Lesson 2</p>
<hr />
<div>== State Machines ==<br />
<br />
A DSA was originally designed primarily as a [[http://en.wikipedia.org/wiki/Finite state machine|State Machine]] and that is still how it works to a large extent. Therefore, you must understand what a State Machine is before you can use the DSA to your best advantage.<br />
<br />
A State machine is a machine with one or more states. More than one state is generally more useful than one state. But DSAs very commonly have but one state. A Door in the dungeon has about three states - namely, Closed, Open, or Bashed. A door is a fine example of a state machine. It has these three states and it receives 'messages' that cause it to change from one state to another. So let us describe this state machine using state machine theory. I start with a table and I will tell you what it means in a moment.<br />
<br />
{| border="3"<br />
|+ A Door State Machine<br />
! !! Open Message !! Close Message !! Toggle Message !! Chop<br />
|-<br />
! Closed<br />
| Open || Closed || Open || Bashed<br />
|-<br />
! Open<br />
| Open || Closed || Closed || Open<br />
|-<br />
! Bashed<br />
| Bashed || Bashed || Bashed || Bashed<br />
|}<br />
<br />
Along the left side are listed the possible states of the door - Closed, Open, or Bashed. Along the top are the four possible messages that can be sent to the door. The interior cells of the table tell how the door reacts (that is, changes its state) to each of the four possible messages. Notice that it reacts differently depending on its 'STATE'. This is the essence of a state machine. It remembers something about its past by changing state in response to messages and reacts differently to a message depending on what has happened to it in the past. See if the table makes sense to you.<br />
<br />
A Dungeon Master Counter is also a state machine with this table:<br />
{| border="3"<br />
|+ Counter State Machine<br />
! !! Increment !! Decrement<br />
|-<br />
|'''0'''||0||0<br />
|-<br />
|'''1'''||2||0<br />
|-<br />
|'''2'''||3||1<br />
|-<br />
|'''3'''||4||2<br />
|-<br />
|'''4'''||5||3<br />
|-<br />
|'''5'''||6||4<br />
|-<br />
|'''6'''||7||5<br />
|-<br />
|'''7'''||8||6<br />
|-<br />
|'''8'''||9||7<br />
|-<br />
|'''9'''||10||8<br />
|-<br />
|'''10'''||11||9<br />
|-<br />
|'''11'''||12||10<br />
|-<br />
|'''12'''||13||11<br />
|-<br />
|'''13'''||14||12<br />
|-<br />
|'''14'''||15||13<br />
|-<br />
|'''15'''||15||14<br />
|}<br />
<br />
You will see that there are some special cases. State 15 cannot be incremented to state 16. In fact there is no state 16. State 0 cannot be decremented to state -1 because there is no state -1. Stranger yet is the fact that state 0 cannot be incremented to state 1!!!! When you get to state 0, you are stuck there. But our point in drawing this table is to demonstrate that a counter is a 'State Machine'. A DSA is a state machine, too.<br />
<br />
== The DSA State machine table. ==<br />
<br />
{| border="3"<br />
|+ DSA<br />
! !!S0<br>Set North!!C0<br>Clear North!!T0<br>Toggle North!!S1<br>Set East!!C1<br>Clear East!!T1<br>Toggle East!!S2<br>Set South!!C2<br>Clear South!!T2<br>Toggle South!!S3<br>Set West!!C3<br>Clear West!!T3<br>Toggle West<br />
|-<br />
|'''0'''|| || || ||<br />
|-<br />
|'''1'''|| || || ||<br />
|-<br />
|'''2'''|| || || ||<br />
|-<br />
|'''Etc'''|| || || ||<br />
|}<br />
<br />
It looks a bit empty. But YOU can write whatever you like in the empty spaces by putting a number into the corresponding cells in the DSA editor. You can make this state machine do what you want it to do. If you want a counter very much like the standard counter but which can be incremented from the Zero state, then you simply write the proper number into the cells.<br />
<br />
You see that the DSA can receive twelve different messages (Actually, there is a provision for receiving an unlimited number of different message but it has never been used and is untested). The twelve messages are S0, C0, ... T3. And their longhand names are also listed. The message names may seem strange. We had to call them something. There is a reason for the names. We won't try to explain them until we get to the lesson on sending/receiving messages.<br />
<br />
Let us make a DSA that will detect when the player has pressed three buttons in a particular sequence. There are puzzles in Dungeon Master that require particular buttons to be pressed but not in a particular sequence. The exit from Dungeon Master's "Choose Your Fate" level requires you to open several doors in a particular sequence, but that can hardly be classified as a 'Sequential Puzzle'. We are going to require that the player presses buttons A, B, and C in that order and that any mistakes will require him to start over again with button A. Here is the table :<br />
<br />
{| border="3"<br />
|+ Puzzle<br />
! !!Button A!!Button B!!Button C<br />
|-<br />
|'''0'''||1||0||0<br />
|-<br />
|'''1'''||0||2||0<br />
|-<br />
|'''2'''||0||0||3<br />
|-<br />
|'''3'''||3||3||3<br />
|}<br />
<br />
Examine the table until you understand how it works. Button A gets you to state 1. The only way to get to state 2 is to start in state 1 and press button B. Pressing any incorrect button takes you back to state 0 where you must start over by pressing button A. And so on. If you ever get to state 3 then you are successful and you stay in state 3 no matter what you do. You are done. You may say that getting to state 3 is not exactly what you had in mind. That what you really wanted to do was to open PitE. You may also complain that nobody has told you how we are to send a 'Button A' message to the DSA. First things first. You need to understand the state machine before you can worry about such details. The next lesson will attempt to answer these complaints.<br />
<br />
[[Category:CSBwin|Lesson 2]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_Lesson_3&diff=692CSBwin/DSA Lesson 32009-01-06T16:31:11Z<p>WikiSysop: CSBwin/DSA Lesson 3 moved to CSBwin/DSA/Lesson 3</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/Lesson 3]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/Lesson_3&diff=691CSBwin/DSA/Lesson 32009-01-06T16:31:11Z<p>WikiSysop: CSBwin/DSA Lesson 3 moved to CSBwin/DSA/Lesson 3</p>
<hr />
<div>=== Messages: To and Fro/Set and Clear/Now and Later ===<br />
<br />
Almost everything that happens in Dungeon Master happens as a result of a message. When you press a button on the wall, a message is sent. Perhaps to a Door. Perhaps to a Pit. Perhaps to a DSA. If a Door opens, it is because it has received a message. If a creature moves, it is because it has received a message (Creatures send messages to themselves as reminders to move again at a later time!). Most Actuators can either receive messages or send messages and many can do both. DSAs are no exception as they can receive, respond to, and send messages.<br />
<br />
==== Message properties ====<br />
<br />
#Message Type. This is complicated. There are messages to cause monsters to move about. There are messages to cause light spells to wear off. There are messages to re-enable monster generators. But for our purposes there is only one message type (a small fabrication). We will be talking about messages sent from Actuators like pushbuttons, pressure pads, DSAs, Counters, etc. to other Actuators, Doors, Teleporters, Pits, etc.<br />
#Time of delivery. This is the time the message should be delivered to the target. In the editor, this is always specified as a 'Delay', the amount of time between the creation of the message and the delivery of the message.<br />
#Action. This can be 0, 1, or 2. This number is interpreted by the object that receives the message. A door interprets it as 0 = Open, 1 = Close, and 2 = Change. An AND/OR actuator interprest this as Set, Clear, or Toggle.<br />
#Target location. The location consists of<br />
**The level<br />
**The x and y coordinate of the cell on the level<br />
**The position. A number from 0 to 3. This number is interpreted by the 'postman' who delivers the message or by the object that receives the message.<br />
<br />
Let us talk about these properties a bit more.<br />
<br />
==== Time of Delivery ====<br />
<br />
Time is kept in units of about 1/6th second. The message has a 24-bit number saying at what time the message is to be delivered. The time can be any time up to 16,777,215. This is about 776 hours. If the player plays longer than this, then things will most certainly go to Hell in a handbasket. When you edit an Actuator that sends a message, you will find a field called 'Delay'. When the Actuator creates and sends a message, the 'Delay' is added to the current time to produce a time-of-delivery. Unfortunately, this field can usually contain only small numbers. In fact, this delay is generally limited to values of zero to fifteen. When DSAs create messages, this delay can be a very large number. So one reason to use a DSA might be as a 'relay' to provide very long delays.<br />
<br />
==== Target Location ====<br />
<br />
Most Actuators cannot send messages to levels other than the level on which they themselves are located. A DSA can send a message to any level. So another reason to use a DSA might be as a relay to get messages across level boundaries. When you edit an Actuator like a pushbutton there is generally a 'Target' box with 'column', 'row', 'position', and a 'Browse' button. The column is the x-coordinate, the row is the y-coordinate, and the position is selectable from 'North', South', 'East' and 'West'. In some cases, these direction names make sense because the message will be sent only to actuators located in the corresponding side of the cell at the given column and row. In other cases, this position parameter is interpreted as a number from zero to three, respectively. A DSA interprets this 'position', along with the 'action' as a message name. There are three different actions and four different 'positions' and so there are altogether twelve different message names :<br />
{| border="3"<br />
|+ DSA Message Names<br />
! !!Set!!Clear!!Toggle<br />
|-<br />
|'''0=North'''||S0||C0||T0<br />
|-<br />
|'''1=East'''||S1||C1||T1<br />
|-<br />
|'''2=South'''||S2||C2||T2<br />
|-<br />
|'''3=West'''||S3||C3||T3<br />
|}<br />
<br />
Along the top of the table are the possible 'actions' and along the side are the four possible 'positions' and the interior cells of the table give the name of the message as interpreted by a DSA. These names are the names of the messages that you see along the top of the DSA State Table described in [[CSBwin/DSA Lesson 2|Lesson 2]].<br />
<br />
Here is an example of a 'Target Editor' taken from the 'Edit Pressurepad' dialog : [[image:DSATargetEditor.gif]]<br />
<br />
When the party steps on this Pressurepad, a message it will go to the same level as the Pressurepad, to the cell at x=4 and y=12, with position 'south', and with Action = Set. If there is a DSA located in that cell, it will interpret this as a message named 'S2', as you can see by looking into the table above ("DSA Message Names") in the column 'Set' and the row '2=South'. The DSA will then execute whatever code has been placed in its 'S2' row for its current state.<br />
<br />
So now you know how to send a message to a DSA and how the DSA interprets the message. In our next [[lesson]]] we will tell you how you can tell a DSA to SEND a message. To anywhere and after an arbitrary delay.<br />
<br />
<br />
[[Category:CSBwin|Lesson 3]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_Lesson_4&diff=690CSBwin/DSA Lesson 42009-01-06T16:31:02Z<p>WikiSysop: CSBwin/DSA Lesson 4 moved to CSBwin/DSA/Lesson 4</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/Lesson 4]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/Lesson_4&diff=689CSBwin/DSA/Lesson 42009-01-06T16:31:02Z<p>WikiSysop: CSBwin/DSA Lesson 4 moved to CSBwin/DSA/Lesson 4</p>
<hr />
<div>=== A DSA Can Speak -or- Sending Messages from a DSA ===<br />
<br />
; One of the most important 'Words' that you must conquer in the DSA language is the 'Standard Message' word. Here is the entry describing it from the DSA Editor Help :<br />
<pre><br />
standard Message<br />
[<next state>]M[<delay>]<message type>[<target>]<br />
</pre><br />
<br />
This word consists of several parts, to be discussed later. Some of the parts are enclosed in broken brackets. For example, 'delay' is enclosed in broken brackets. Like this: "<delay>". This means that you are going to have to interpret the word 'delay' and write something appropriate in its place. You are NOT going to write "delay" but, in this case, a number. Some of the parts are enclosed in square brackets. For example, <delay> is enclosed in square brackets. The square brackets indicate that this part of the word is optional. You do not write the square brackets. They are there to indicate optional parameters. All optional parameters have (reasonable?) default values.<br />
<br />
==== Parts and parameters of the Message Word. ====<br />
<br />
Where do we start? Let us start with the 'M'. That's easy. It is not in broken brackets so you must write 'M'. It is not in square brackets so it is not optional. It is the word's name and identifies this word as a 'Standard Message' word. It means that we are going to prepare a message and send it off to some part of the dungeon.<br />
-----<br />
<pre>[<delay>]</pre> - If you look at the DSA Editor Help very closely you will see that "<delay>" is defined up near the top of the help text. Here is what it says:<br><br />
<br />
<pre><br />
<delay> default is 0<br />
<integer><br />
X means use first actuator parameter<br />
Y means use second actuator parameter<br />
</pre><br />
<br />
This part of the word specifies how long it will take for the message to be delivered. The units of time are about one-sixth second. You can write very large numbers if you wish. The default value is zero, in which case the message will be delivered before the game clock is again incremented. But the Help file says that <delay> can also be replaced with the letter 'X' or 'Y',<br />
in which case an actuator parameter is used to specify the delay. In our next lesson we will use this feature.<br />
-----<br />
<pre>[<message type>]</pre> - Again, look at the Help file to see how <message type> is defined. Here is what it says:<br />
<br />
<pre><br />
<message type> default is S<br />
N means do nothing<br />
S Set<br />
C Clear<br />
T Toggle<br />
</pre><br />
<br />
You will recognize this from our previous lesson as the 'Action' to be taken by the message's recipient. The Default is 'Set' and there is an additional possiblity of 'N' which means to do nothing! I don't know why I did that. At any rate, if you send a 'S' (or Set) message to a door, it will open. And so on and so forth.<br />
-----<br />
~<pre>[<target>]</pre> - One more time -- look at the help file to discover the syntax of this parameter. It says:<br />
<br />
<pre><br />
<target> default is A<br />
A means use first actuator parameter<br />
B means use second actuator parameter<br />
* means use <location> from stack<br />
pos:2; level:6; x:5; y:5<br />
<absolute location><br />
</pre><br />
<br />
This is difficult stuff. The easy cases are the 'A' and 'B' cases. When you put a DSA into the dungeon, you can define two parameters. Here is an example of the dialog that 'plants' a DSA : [[Image:DSALesson4DSA.gif]]<br />
<br />
You see the two boxes labeled "Parameter A" and "Parameter B". Both these parameters are simply 18-bit numbers. Nothing more and nothing less. The first is set to 'Integer' and the second to 'Target'. Those labels (Integer and Target) are ignored at runtime. They only affect how you enter the number and how the editor displays the DSA in the 'Map View' of the editor. If the parameter is a 'Target', then the editor can display the target arrows on the map, otherwise it ignores the parameter when drawing the map. This gets rid of a lot of arrows pointing to 0(0,0), for example.<br />
<br />
In the example, I have set the target of parameter B to level 3, column 12, row 5, position south. Parmeter A is set to precisely the same number but it is displayed as an integer. '''TIP ALERT''' You can use this dialog box as an easy way to convert integers to/from dungeon locations. Enter a 'Target', click the 'Integer' button, and read the integer that results. And vise versa. For the curious among you, the format of the integer is given in the help file entry (see above) as "pos:2; level:6; x:5; y:5", which means that the 18 bits are allocated from most to least significant as 2 bits for position, 6 bits for level, etc. In a binary number it would look like 'PPLLLLLLXXXXXYYYYY". Another way of doing the conversion (if you prefer decimal numbers) is to evaluate the expression:<br />
<pre><br />
65536 ''' P + 1024 ''' L + 32 * Y + X<br />
</pre><br />
So now that we have defined Parameter B as a target, we can use that Parameter to send a message like this:<br />
<pre><br />
MSB<br />
</pre><br />
We have omitted several, optional, parts of the word. When it is executed, it will send a 'Set' message (the 'S') to level 3, column 12, row 5, position 2 (the 'B'). If there is a door at that location, the door will open. If there is an AND/OR actuator at that location, bit 2 will be set. So that ends the lesson of sending messages using the DSA's parameters as target designators.<br />
<br />
A second way of designating a target for a message is to specify an absolute location within the word itself. Again, the help file is valuable because it defines the syntax of <absolute location>:<br />
<br />
<pre><br />
<absolute location> default is current cell<br />
<level>(column,row)~[[<position>]]<br />
default position is 0<br />
</pre><br />
<br />
For example, whe could have sent the message to the target designated by Parameter B like this:<br><br />
<br />
<pre><br />
MS3(12,5)S<br />
</pre><br />
<br />
Notice that the <position> is defined (See the Help again!) as a character 'N', 'E', 'S', or 'W', indicating 0, 1, 2, or 3 or the positions North, East, South, or West. The interpretaton of this is dependent on the recipient of the message. '''WARNING''' Designating a Target using this <absolute location> syntax buries the target information in the code of the DSA in a way that the Map Editor cannot see it. So you will get no help at the Map Editor level when you want to see what cells in the dungeon target a Pit, for example. It is '''MUCH''' better practice to use parameters to designate targets.<br />
<br />
The last (and potentially very valuable for experts) way of designating a target is by placing an absolute location on the Stack and specifying the target as '*':<br><br />
<pre><br />
MS*<br />
</pre><br />
<br />
The number on the stack is computed as in the Parameter B description above. Again, the Map Editor will not be aware of this target designation. If you do this, it is probably helpful to do your computation of target location starting with one of the parameters. Something like "n cells south of Parameter A". But these are rather advanced techniques and if you understand all of this you can consider yourself an expert.<br />
<br />
--------<br />
<br />
<br />
There is another Word that can be used to override the 'Position' to which a message is sent. This allows you easily use one of the parameters (A or B) but change the position associated with that parameter. You could do the same thing by putting the Target Parameter on the Stack and then manipulating it with arithmetic, but the Override Word makes it much easier. Our first example of a real DSA in the next lesson will use this Override Word to good advantage.<br />
<br />
[[Category:CSBwin|Lesson 4]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_Lesson_5&diff=688CSBwin/DSA Lesson 52009-01-06T16:30:45Z<p>WikiSysop: CSBwin/DSA Lesson 5 moved to CSBwin/DSA/Lesson 5</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/Lesson 5]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/Lesson_5&diff=687CSBwin/DSA/Lesson 52009-01-06T16:30:45Z<p>WikiSysop: CSBwin/DSA Lesson 5 moved to CSBwin/DSA/Lesson 5</p>
<hr />
<div>=== DSA Lesson 5 - An ~InterLevel/Long Delay Relay ===<br />
<br />
The standard Actuators are not capable of sending messages between levels of the dungeon. This causes us to transport Rocks and Screamer Slices in order to push a button on level 3 which activates a teleporter on level 3 which transports a Rock to a ~PressurePad on level 4 which causes a Pit on level 4 to open. Ugly! The standard Actuators also allow for only short delays, commonly about 2-1/2 seconds. Constraining! A simple, standard DSA can be used to work around these restrictions. We will build one right here before your eyes. If you can bring yourself to understand '''HOW''' it works then you will have mastered all the basics of the DSA and will be ready to begin to learn the hundreds of details that can make a DSA do something a lot more interesting.<br />
<br />
---------------<br />
[http://www.dianneandpaul.net/CSBwin/documentation/DSAwiki/DSALesson005.zip Here is a sample dungeon with the relay in action]<br />
<br />
There are a lot of steps involved to get this DSA installed and working in a real dungeon.<br />
<br />
=== Step 1 - Write the code for the DSA ===<br />
<br />
Initiatiate the editor by clicking on the '''DSA''' control on the toolbar.<br />
<br />
[[Image:DSAEditDSAStep001.gif]]<br />
<br />
The "Select DSA" dialog will appear. Click on one of the unused DSA numbers and click on "Edit Selected DSA". If you are looking at the sample dungeon, then select the DSA numbered 000 with the description Inter-Level, Long-Delay Relay A=Target B=delay" and click on "Edit Selected DSA". Here is the contents of our example : [[Image:DSAEditDSAStep001a.gif]]<br />
<br />
What is supposed to do? We want a DSA that will relay ( or repeat ) whatever message is sent to it. We want that message to be sent to an arbitrary place on any level of the dungeon with an arbitrary delay. Our solution to this problem is a DSA that uses its parameters to specify the target and the delay. In particular, parameter A will specify the target and parameter B will specify the delay.<br />
<br />
The DSA can receive 12 different messages:<br />
*Set North -or- Set 0 -or- S0<br />
*Clear North -or- Clear 0 -or- C0<br />
* ....<br />
*Clear West -or- Clear 3 -or- C3<br />
*Toggle West -or- Toggle 3 -or- T3<br />
<br />
If a message of type "Toggle East" is received, for example, then the words on the line labeled "T1" will be executed. On that line you will find the words "OP1 MYT". Ignore the "OP1" for a moment and concentrate on the "MYT". The first letter designates the action to be performed. A quick look at the 'Help' will reveal the following:<br />
<br />
<pre><br />
standard Message<br />
[<next state>]M[<delay>]<message type>[<target>]<br />
</pre><br />
<br />
A standard message begins with an optional <next state>. The help defines <next state> as:<br><br />
<pre><br />
<next state> default is current state<br />
integer<br />
</pre><br />
<br />
Well, "MYT" clearly does not begin with an integer so this part of the word must have been omitted. The next part is the "M" which designates this as a word that sends a standard message. That is what we wanted to do, this seems reasonable. The next part of the word is the optional <delay>. The help defines <delay> as:<br><br />
<br />
<pre><br />
<delay> default is 0<br />
<integer><br />
X means use first actuator parameter<br />
Y means use second actuator parameter<br />
</pre><br />
<br />
What we see in the word is a 'Y' and therefore the delay of the message will be whatever we set the second parameter, parameter B, when we create an instance of this DSA in the dungeon. Next in the definition of a standard message word is the required <message type>. In our example, we see a 'T'. This is reasonable, too. We received a 'T1' message (toggle) and so we want to send a 'T' message. Lastly in the definition is the optional <target>. <target is defined in the help as:<br><br />
<br />
<pre><br />
<target> default is A<br />
A means use first actuator parameter<br />
B means use second actuator parameter<br />
* means use <location> from stack<br />
pos:2; level:6; x:5; y:5<br />
<absolute location><br />
</pre><br />
<br />
There is no target specified in our example so the default will be used. The default is the first parameter, parameter A. And there you have it. Every line in the DSA sends a message of the same type as it received, with the delay specified by parameter B and the target specified by parameter A.<br />
<br />
But we have a problem. Parameter A specifies a cell in the dungeon by its level, X coordinate, and Y coordinate. Parameter A also specifies the position within that cell (0, 1, 2, 3 or North, East, South, West). But the messages we receive do not all have the same position. We need to override the position specified by parameter A, depending on the position specified in the message we received. That is the purpose of the 'OP' word that preceeds each 'Standard Message' word. The help defines this as:<br><br />
<br />
<pre><br />
Override<br />
[<next state>]O<what>[<integer>]<br />
<what> P override position on next command<br />
</pre><br />
<br />
On our case we specified the <what> portion of the word as 'P' (Actually the only option right now) which means to override the position specified in the next word encountered. The next word is the 'Standard Message' word, so the 'OP1' will cause that message to have a position of 1, which is the same as the position in the message we received. As you see, each line of the DSA overrides the position with the same position as the message received so that the message we send will be an exact duplicate of the message we received except for the target and the delay.<br />
<br />
=== Step 2 - List the DSA for use on a level ===<br />
<br />
Each level of the dungeon has a list of up to 32 DSAs that can be used on that level. This is similar to the list of Wall Decorations that can be used on a level. From the Map Editor you select menu "Edit / Level Info". Select the level in the upper left of the "Edit Level Information" dialog and click on the "Edit DSA List" button. The 32 DSAs that are allowed on that level are listed. Select one of the empty selections and click on the "Replace Selected DSA button". The "Select DSA" dialog will appear with a list of the 256 possible DSAs. Select the one you want to make available on the level (in this case the "Inter-Level Long-Delay") and press the OK button. You will return to the "Edit DSA List for Level" dialog and you will see that the DSA has been added to the list of allowed DSAs for the level. Press "Exit".<br />
<br />
=== Step 3 - Plant an instance of our DSA in the dungeon. ===<br />
<br />
Putting a DSA in the dungeon on any particular level is exactly analogous to putting any other Actuator in the dungeon. You right-click on a cell and click "New" for one of the allowed positions within that cell. You select the "Actuator" radio button and choose "Designer-Specified Actuator" (DSA) from the drop-down list of possible Actuator types and press "OK". The "Edit DSA Actuator" dialog will appear.<br />
<br />
The "DSA Type" field will contain the name of the first DSA type allowed on the level. You can press "Select New DSA Type" if you would like to put a different kind of DSA in the cell.<br />
<br />
Parameter A is going to be the target of our "Message Repeater" and so it is best to select "Target" rather than "Integer" for parameter A. This actually makes no difference except to help you as you edit the dungeon. Then we press "Browse" for Parameter A and locate the cell to which our messages will be sent. Exactly like any other Actuator except that now we can send the message to any level of the dungeon. We can also choose a 'Position' to which the messages will be sent but, as we learned in Step 1 of this lesson, the position specified by Parameter A will be overridden when the DSA is executed.<br />
<br />
Parameter B is going to be the delay. Again, it will be helpful to you to properly designate Parameter B as an 'Integer' so that the editor will not try to interpret it as a target and so that you will not have to enter the delay as if it were a target. Enter the delay in the "value" box.<br />
<br />
The 'State' box contains the initial state of the DSA. Make sure it is zero for our example (When we wrote the DSA, we put all the instructions in state 0).<br />
<br />
Press OK. Press OK. And you are back to the map editor with a new DSA in your dungeon. Any messages you send to that DSA will be forwarded (repeated - relayed) to a different place in the dungeon with a different delay.<br />
<br />
This concludes Lesson 005. If you downloaded the example, you can run it, fetch and eat the apple, and see our DSA in action.<br />
<br />
=== FAQ ===<br />
;Q - The "DSA Type" field will contain the name of the first DSA type '''allowed* on the level<br />
:A It is probably worth mentioning again that you have to add DSA's to the level.<br />
: Otherwise you cannot select any to place in the dungeon<br />
<br />
<br />
;Q - What do you mean when you say that "The messages we receive do not all have the same position"?<br />
:A DSA receives all messages targeted to a dungeon cell regardless of the DSA's position within the cell or the 'position' indicated by the message. We can receive twelve different messages. For example, we could receive a (Toggle,East) message or we could receive a (Toggle,South) message or ten other messages. 'East' and 'South' are different positions. (Toggle,East) and (Toggle,South) are examples of two messages that we can receive that do not have the same position.<br />
<br />
<br />
;Q - What happens with (Toggle, East) and (Toggle, South) when it reaches the DSA in our example without the OP?<br />
:A - It sends the position of Parameter A (e.g. North.) because you did not 'override' that position with the 'OP' word.<br />
<br />
<br />
;Q - But where would the Toggle, Clear, Set come from? There is no info in Parameter A. it would either lack the Toggle or the south. There is only one North and no Set, Clear or Toggle anywhere to be found. Is that part missing or does it come from the original signal from the actuator?<br />
:A - The message sent to the DSA has a position. The position is 0, 1, 2, or 3. (or North, East, South, West). The position in that message to the DSA determines which line of code is executed in the DSA. For example, a (Clear, West) message will cause the line labeled C3 to be executed. That line of code creates a duplicate message by specifying a message type of 'Clear' (the letter 'C' in 'MYC') and by specifying a position of 'West' (the digit '3' in the 'OP3' word). So the message that is sent is a (Clear, West) message, exactly like the message received.<br />
<br />
<br />
;Q - It does not matter for a pit to receive a (Toggle, East) or a (Toggle, South) message. So why worry about it?<br />
:A - We could make a simpler DSA if we KNEW that the target did not care about the position. But some targets DO care. Then we would have to write two DSAs....one for targets that care and one for targets that don't care. I think it is easier to write one DSA rather than two. But you are right. The sample dungeon would have worked with a simpler DSA. An example where the position is important will come in a future lesson.<br />
<br />
There is currently no info here on the wiki to see what results the different messages would have on a door or a pit?<br />
I know there is some on dianne and paul net<br />
In the future we should add basic things, how doors react to messages to the wiki as well, a short reference page,<br />
probably to print or so...(Adamo, do you read this?)<br />
Thanks for the patience so far<br />
<br />
;Q - two things that were new to me- "when we create an instance of this DSA in the dungeon". In the above download example are 2 different cells with the same DSA.(instances) This I did not expect. I was convinced we have merely "one" DSA for a task, not that we add it just like apples to the dungeon. but it makes sense. ====<br />
:A - A DSA is an Actuator just as Counter is an Actuator. A Counter is an Actuator that counts. Certainly, you might expect a dungeon to have more than one Counter. But a Counter can only count to 15. You could make a DSA that counts very big numbers. It is certainly possible that, like counters, you might want to do this in more than one place in the dungeon.<br />
<br />
;Q - this is the second point- We create an instance of the DSA at the cell that contains e.g. the pushbutton. But not necessarily - I guess to keep things tidy - it is in the same cell. We only need one instance at each level? Could be that the messages get mixed up in the queue, so not sure if it would be good practice to have as many instances of this DSA as there are interlevel messages..<br />
:A - Our sample DSA forwards messages to the place specified by Parameter A. Let us assume that an instance of the DSA has Parameter A pointing to a door on another level. Any messages sent to that instance of the DSA will be sent to that same door. If you want to send a message to a different door, perhaps on a different level, then you will need a different Parameter A. That means you will need another instance of the DSA.<br />
<br />
[[Category:CSBwin|Lesson 5]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA_Lesson_6&diff=686CSBwin/DSA Lesson 62009-01-06T16:30:29Z<p>WikiSysop: CSBwin/DSA Lesson 6 moved to CSBwin/DSA/Lesson 6</p>
<hr />
<div>#REDIRECT [[CSBwin/DSA/Lesson 6]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/DSA/Lesson_6&diff=685CSBwin/DSA/Lesson 62009-01-06T16:30:29Z<p>WikiSysop: CSBwin/DSA Lesson 6 moved to CSBwin/DSA/Lesson 6</p>
<hr />
<div>=== DSA Lesson 6 - Building a Torch ===<br />
<br />
We want the player to be able to make a Torch out of a Stick and some Ashes. The player will see a Grate in the wall. If he places both a Stick and some Ashes in the grate, a Torch will appear in his hand. If he attempts to place two Sticks in the Grate, the second one will not be accepted. Likewise for two Ashes. The player can make an infinite number of Torches so long as he keeps supplying Sticks and Ashes. We are going to accomplish this with a DSA.<br />
<br />
First of all we draw a state diagram. This is an essential step for any complex machine. If you have a state-brain, then you might skip this step for a simple case like this. But the diagram makes the whole process easier because it makes the labels easy to remember and the flow-control more obvious. Here is our diagram : [[Image:DSALesson006.gif]]<br />
<br />
Each of the machine's states is represented by a circle with the number of the state enclosed. We are going to have three states in our machine: 0, 1, and 2. We could have added some words to indicate what each of these states represents, but it is pretty obvious : *0 - Nothing has been put into the Grate<br />
*1 - Some Ashes have been added to the Grate<br />
*2 - A stick has been placed in the Grate<br />
<br />
Each state has arrows emanating from it to show how that state reacts to messages that it receives. For example, state 0 responds to two different messages, namely (Set, North) and (Clear, North). In shorthand these are called S0 and C0.<br />
<br />
The actions we perform are represented by rectangles with people-readable words that give some indication of what should happen. Each of these rectangles is labeled with the state and row in the DSA which will accomplish the action.<br />
<br />
And, very importantly, the arrows point to the new state of the machine after each type of message is processed.<br />
<br />
It should be pretty obvious how this all works. We start at state 0. If the player puts in a Stick, the machine moves to state 2. At state 2, the machine refuses any additional Sticks and we stay in state 2, but if the player adds a Stick, then a Torch is placed in his hand and the machine returns to state 0 awaiting the player to build another Torch.<br />
<br />
The only problem is that we don't have any idea how to do the things we say (in the rectangles) that we want to do! How do we put a Torch in his hand? How do we give back the Stick when he attempts to put two Sticks in the Grate? Hmmmmm. Well, we study whatever documentation we can find and come upon this : http://www.dianneandpaul.net/CSBwin/documentation/DSA_Language.html<br />
<br />
On that page is the description of the word '&ADD' and the words 'To place object in cursor use location = -1'. That sounds very much like something we could use. We want to place an object in the 'cursor' (the player's hand) in place of the Stick or Ashes which he put into the Grate. We click on 'Detailed Description' and see these words : *Use the &ADD operation to duplicate an object and place it in the dungeon. You can place the object in one of the cells of the dungeon itself, on a character (in the backpack, as an item of clothing, or in a hand, etc.), on the cursor, or as a monster's possession. The location parameter determines where the object will be placed:<br />
<br />
This is beginning to sound promising. It sounds like what we need to do is to locate an object of the correct type somewhere in the dungeon (so that '&ADD' can copy it, and then do the '&ADD' itself with parameters indicating that we want the copy to be placed in the cursor. The parameters are '~PosMask', 'Location', and 'ObjectID'. It says that the '~PosMask' will be ignored in the case that we put the (copy of the) object in the cursor. So we will use zero. It says that 'Location' should be negative one to put the (copy of the) object in the cursor. So those two parameters are easy. It will look like this :<br />
<pre><br />
L0 L1 &NEG<br />
</pre><br />
<br />
Now all we need is an object to copy. How do we do that? We need three different objects: Ashes, Stick, and Torch. What we will do is put one of each of these things in a dungeon cell that cannot be reached by the player. We will put the Ashes in position 0 (North), the Stick in position 1 (East), and the Torch in position 2 (South). We will put these things in a solid wall and the DSA can 'Fetch' one of them to serve as the third parameter for the '&ADD'. But now we are stumped again, because we do not know how to 'Fetch' an object. [[Lesson 7]]] will make it clear how this is done. For now we will say that we simly fetch an object from the cell of the dungeon specified by the DSA's parameter A and at the proper position. Here is how it will look :<br />
<pre><br />
The Ashes --- L0 LA L1 L1024 F<br />
The Stick --- L0 LA L2 L32 F<br />
The Torch --- L0 LA L4 L32 F<br />
</pre><br />
<br />
So, all together, the operation will look like this (for the Ashes, Stick, and Torch) :<br />
<pre><br />
L0 L1 &NEG L0 LA L1 L1024 F &ADD<br />
L0 L1 &NEG L0 LA L2 L32 F &ADD<br />
L0 L1 &NEG L0 LA L4 L32 F &ADD<br />
</pre><br />
<br />
To review--The '&ADD' requires three parameters. The three parameters that we provide are:<br />
#L0<br />
#L1 &NEG<br />
#L0 LA L1 L1024 F<br />
<br />
Go get a working version at http://dianneandpaul.net/CSBwin/documentation/DSAwiki/Lesson006.zip<br />
<br />
=== FAQ ===<br />
<br />
I can't think of any questions. This stuff is much too easy! Maybe you have a question? Hmmmmm.<br />
<br />
[[Category:CSBwin|Lesson 6]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/CSBuid_Adding_custom_sounds&diff=684CSBwin/CSBuid Adding custom sounds2009-01-06T16:29:37Z<p>WikiSysop: CSBwin/CSBuid Adding custom sounds moved to CSBwin/CSBuild/Adding custom sounds</p>
<hr />
<div>#REDIRECT [[CSBwin/CSBuild/Adding custom sounds]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/CSBuild/Adding_custom_sounds&diff=683CSBwin/CSBuild/Adding custom sounds2009-01-06T16:29:37Z<p>WikiSysop: CSBwin/CSBuid Adding custom sounds moved to CSBwin/CSBuild/Adding custom sounds</p>
<hr />
<div>_under construction, may as always take some time... :-/_<br />
----<br />
<br />
<big>Here you will learn how a custom sound is added to your dungeon and how it can be triggered (played) using a DSA.</big><br />
<br />
Don't worry about having to use a DSA to include a custom sound to your dungeon. It's not that hard.<br />
<br />
Firstoff you'll need a sound.<br />
<br>If you have a mike and the necessary tools on your computer, it won't be much of a problem.<br />
Use (PCM) 11,025 kHz; 8 bits; Mono to record your sound and save it as a *.wav. You can also use a mobile device or Pocket PC to record speech or sounds, just don't expect it to sound all that well. With such a low sampling rate it is an art of it's own to make it sound good.<br />
<br />
You might as well steal some sounds from conflux.<br />
<br>Simply load the CSBgraphics file from Conflux and use the export function.<br />
<br />
Now let us add a sound to CSBgraphics.<br />
<br />
Start CSBgraphics and choose "I" (for import). Choose sound (*wav) and add the file to the list.<br />
Also you need to select an ID. In out example it's "65".<br />
<br />
.../picture/...<br />
<br />
Now save your "CSBgraphics.dat" to the folder containing CSBwin.<br />
<br />
Let's start CSBuilt now and add the sound to the dungeon using a DSA.<br />
<br>Take a look at the "copy/paste" section of the wiki.<br />
There you'll find the custom sound example, that is used in Conflux:<br />
<br />
<pre><br />
0S0 : G0C1 &= ?J0C3<br />
0C0 : G0C1 &!= ?J0C2 LA L0 L0 &SOUND<br />
0T0 : LB &RAND &NOT ?J0S0<br />
0C1 : L$ &LOC2ABSCOORD &DROP &ROT L0 L4 &PARTY@ L1 &@<br />
0C2 : N<br />
0T2 : &NEG<br />
0C3 : V3@ &NEG &+ &DUP L0 &< ?G0T2 &SWAP V2@ &NEG &+ &DUP L0 &< ?G0T2 &+ J0T3<br />
0T3 : LA &SWAP L0 &SOUND<br />
</pre><br />
<br />
;(Description from Zyx)<br />
:Sound is only played if the party is on same level as the DSA instance.<br />
:<br />
:SET msg: sound is played with a volume inversely proportional to distance. So you should put the DSA instance right where the origin of the sound is supposed to be, or very near.<br />
:CLOSE msg: sound is played at full volume, no matter the distance.<br />
:TOGGLE msg: sound is played with a volume inversely proportional to distance, with a random chance. B parameter is the chance not to be played.<br />
<br />
We won't need it in all of it's complexity. Just a sound that is played at 100% volume when a button/preassure pad is triggered.<br />
<br />
So for a sound played at full volume, all you would need is the part of the DSA reacting to a "close" message:<br />
<br />
<pre><br />
0C0 : G0C1 &!= ?J0C2 LA L0 L0 &SOUND<br />
0C1 : L$ &LOC2ABSCOORD &DROP &ROT L0 L4 &PARTY@ L1 &@<br />
0C2 : N<br />
0C3 : V3@ &NEG &+ &DUP L0 &< ?G0T2 &SWAP V2@ &NEG &+ &DUP L0 &< ?G0T2 &+ J0T3<br />
</pre><br />
<br />
[[Image:CSBuild_custom_sound_pic1.JPG]]<br />
<br />
Again, this is still by far more than we need.<br />
<br>For a set message a sound triggered by<br />
<br />
<pre><br />
(S0:) LA L0 L0 &SOUND<br />
</pre><br />
is much simpler.<br />
<br />
Note the parameter "A" in the first line.<br />
<br>The ID of the sound is 65, so you could as well type<br />
<pre><br />
L65 L0 L0 &SOUND<br />
</pre><br />
yielding the same result.<br />
<br />
But for more flexablility it is of course more useful to use the parameter A, so you won't have to edit the DSA itself if you want to change the ID of the sound to be played.<br />
<br />
Now all that needs to be done is adding a preasure plate, a button, or any other trigger (even another DSA?) targeting the DSA that plays the sound.<br />
<br />
You are now free to add sounds, speech, quest given verbaly, maybe even a talking sphere that guides the player throughout the dungeon.<br />
<br>This is the point to look hard for some talented artists. ;-)<br />
<br />
Have fun!<br />
<br />
[[Category:CSBwin|Adding custom sounds]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/User_Questions&diff=682CSBwin/User Questions2009-01-06T16:27:43Z<p>WikiSysop: </p>
<hr />
<div>== General ==<br />
<br />
=== DSA Editor Box ===<br />
==== What's the DSA Group ID & Master vs. Slave ====<br />
Both the numeric value and what's a slave?<br />
<br />
SHORT ANSWER: Ignore these things.<br />
<br />
LONG ANSWER: You can only send 12 different messages to a DSA. S0 S1 . . . T3. What would a person do if he wanted to force the player to press 13 switches in the proper sequence? Punt? Cry? No! The plan was that he could add 'Slave' DSA's in neighboring cells, each of which could receive 12 additional messages. In this way you could expand the number of possible messages. But I think it was never needed nor implemented. Subsequent features have made it easier to handle this problem without resorting to slave DSAs.<br />
<br />
==== What's the ''State of Machine'' push buttons? ====<br />
<br />
ANSWER: An instance of a DSA is like an instance of a switch. It is placed in one of the dungeon cells and acts like its definition. For example, you might provide a definition of a DSA that displays some text. You would plant 'instances' of that DSA at various places in the dungeon and each 'instance' would display different text, depending on its location or whatever. But there is only one 'definition'. This is analogous to a 'Coin Slot'. The definition of a coin slot provides a graphic and each instance of a coin slot opens a different door or closes a different pit or whatever.<br />
<br />
OK. A DSA is a state machine. The state must be remembered. Where shall we put the number that represents the DSAs state? The 'State of Machine' dialog provides you with a choice. You can store the machine's state 'Local' in each 'instance' of the DSA so that each instance can have a different state. The disadvantage of this is that the number must be 31 or less. I doubt anyone has found that to be a limitation because the state can be any number during execution of the DSA; it is only between executions that the limit applies. A second option is to store the state in the 'Definition' of the DSA. The downside (or, perhaps in some cases, the upside) of this is that all 'instances' of the DSA share the same state. This might be used to your advantage if you wanted a DSA that could receive more than 12 different messages. The number can be any size. The third option is to store the state in Parameter B of the instance of the DSA. This allows numbers as large as 1023 and is the same as 'Local' except that parameter B can no longer be used as a parameter. No problem. Use parameter C instead!<br />
<br />
== Memory Related ==<br />
<br />
=== Parameters ===<br />
==== What are parameters: C,D,etc? ====<br />
<br />
ANSWER: In a given cell of the dungeon you may place several DSAs. They are piled up just as several daggers might be piled up in a corner somewhere. Each DSA has two parameters named 'A' and 'B'. But each DSA can also reference the parameters of all the DSAs that are BELOW it in the pile of DSAs (or list of DSAs). The DSA directly below is referenced by specifying paramteter C and D. The DSA below that is referenced by parameter E nd F. Notice that you cannot reference the parameters of DSAs that are ABOVE, only the ones BELOW. Normally, those DSAs that are referenced as C, D, etc. are 'Do Nothing' and have no code. They are placed in the dungeon only to provide additional parameters for a DSA above them in the pile. But that is not a restriction. When a message is sent to a cell in the dungeon, each DSA in that cell will be activated in turn and any code will be executed. Assume that two DSAs are in the pile. The top DSA can reference parameters A, B, C, and D. The bottom DSA can only reference its own two parameters as A and B.<br />
<br />
=== Stack ===<br />
<br />
=== Array ===<br />
<br />
<br />
=== Global Variables ===<br />
<br />
==== How do they work? ====<br />
Global variables seem to be set up in four-banks of (up-to) 16 variables each in ''Edit/Global Info'', the ''Edit Database'' and ''Global Variables'' in the Database Type pull-down menu, thus allowing a maximum of 64 global variables. For each of the four banks you choose the number of variables.<br />
<br />
Assuming that I set each of the four to having two each:<br />
* Are the valid GV indices: 0,1, 16,17, 32,33 48,49 ?<br />
* What happens if I read/write to an invalid GV?<br />
<br />
ANSWER: It is not that complicated. There are up to 64 global variables numbered 0 through 63. The four banks of 16 are simply four 'windows' into the 64 values. You must write them in groups of 16. Any group with fewer than 16 will be ignored and no more may follow. In your example, there would be no global variables because the first group is incomplete and that will be ignored along with all the following groups.<br />
<br />
Attempting to read/write a non-existent variable ill cause an error message and, in the case of read, a result of 0xcdcdcdcd.<br />
<br />
By the way, the number 64 is EASILY increased if it would be useful. It is a totally arbitrary limit.<br />
<br />
=== Variables ===<br />
<br />
==== Q: Where are they? ====<br />
What memory does the &Vn@ and &Vn! instructions access?<br />
<br />
ANSWER: Temporary memory. Like the stack itself, these (local) variables survive only during a single execution of a DSA. References to these variable is checked. You cannot &Vn@ a variable before you &Vn! the same variable.<br />
<br />
== Filter Related ==<br />
<br />
== Instruction Related ==<br />
<br />
=== L$ ===<br />
This is stated to push the location of the current ''master cell''. What is it?<br />
<br />
ANSWER: The Master/Slave concept has never been fully implemented and there is no need to implement it. So the location of the 'Master cell' is simply the location within the dungeon where you put an instance of the DSA. If it were a 'Pit' then it would be the location of the pit. But it is a DSA so it is the location of the DSA. If the word 'Master' had not been included in the description then there would probably be no confusion.<br />
<br />
=== Case - syntax ===<br />
I'm not understanding the syntax, could someone please provide some examples?<br />
<br />
ANSWER: ??{<case><case><case>........} (n ... )<br />
<br />
The "(n ... )" part of the syntax definition says that the '??' statement needs a single number ('n') on the top of the stack and replaces it with nothing.<br />
<br />
A 'case' statement is normally used when a variable can have many values and you want something different to happen for each of those values. Let us make a particular example. Let us say that the parameter B can have three different values: 4, 12, and 7. If the value is 4 we want to jump to 6S2; if the value is 7 we want to jump to 3T1; if the value is 12 we want to jump to 3T2. If parameter B is any other value then we want to place the number 105 on the stack. Here is the code (notice that the outermost delimiters are braces, not parentheses):<br />
<br />
LB ??{(4,6S2)(7,3T1)(12,3T2)} L105<br />
<br />
=== IfElse - syntax ===<br />
I'm not understanding the syntax, could someone please provide some examples?<br />
<br />
ANSWER: IfElse ::= ?[<J|G>[<state>][<column>]][:<J|G>[<state>][<column>]]<br />
<br />
?X means do X if TOS is non-zero.<br />
<br />
?X:Y means do X if TOS is non-zero else do Y.<br />
<br />
?:Y means do Y if TOS is zero.<br />
<br />
TOS is the value on the top of the stack.<br />
<br />
X and Y can only be 'J'umps or 'G'otos.<br />
<br />
<br />
Example: ?JC0:GT1<br />
<br />
This says that if the top of the stack is non-zero then 'J'ump to line CO. If the top of the stack is zero then 'G'osub to line T1.<br />
<br />
Example: ?:J3T2<br />
<br />
This means 'J'ump to line T2 on state 3 if top of stack is zero.<br />
<br />
=== Flow Control and ''nextState'' ===<br />
The ''nextState'' modifier of an instruction is ignore for all instructions other than the first in the sequence. How does this work with the various Flow-Control instructions, say '''&J*'''. Does the DSA keep the same state it was in (assuming no '''&SETNEWSTATE''' instructions in the called routine)?<br />
<br />
ANSWER: Yes. 'Jumps' and 'GoSubs' do not alter the value of 'nextState'. Only the very first instruction executed when the DSA is activated by a message and &SETNEWSTATE can change 'nextState'.<br />
<br />
[[Category:CSBwin|User Questions]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DM_Java/Engine/Hack&diff=681DM Java/Engine/Hack2009-01-06T16:26:09Z<p>WikiSysop: </p>
<hr />
<div>Notes on the engine modification from the following threads:<br />
<br><br />
http://www.dungeon-master.com/forum/viewtopic.php?p=91719#91719<br><br />
http://www.dungeon-master.com/forum/viewtopic.php?t=27867<br />
<br />
[[Category:Dmjava|Hack]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=CSBwin/User_Questions&diff=680CSBwin/User Questions2009-01-06T16:24:30Z<p>WikiSysop: added category</p>
<hr />
<div>== General ==<br />
<br />
=== DSA Editor Box ===<br />
==== What's the DSA Group ID & Master vs. Slave ====<br />
Both the numeric value and what's a slave?<br />
<br />
SHORT ANSWER: Ignore these things.<br />
<br />
LONG ANSWER: You can only send 12 different messages to a DSA. S0 S1 . . . T3. What would a person do if he wanted to force the player to press 13 switches in the proper sequence? Punt? Cry? No! The plan was that he could add 'Slave' DSA's in neighboring cells, each of which could receive 12 additional messages. In this way you could expand the number of possible messages. But I think it was never needed nor implemented. Subsequent features have made it easier to handle this problem without resorting to slave DSAs.<br />
<br />
==== What's the ''State of Machine'' push buttons? ====<br />
<br />
ANSWER: An instance of a DSA is like an instance of a switch. It is placed in one of the dungeon cells and acts like its definition. For example, you might provide a definition of a DSA that displays some text. You would plant 'instances' of that DSA at various places in the dungeon and each 'instance' would display different text, depending on its location or whatever. But there is only one 'definition'. This is analogous to a 'Coin Slot'. The definition of a coin slot provides a graphic and each instance of a coin slot opens a different door or closes a different pit or whatever.<br />
<br />
OK. A DSA is a state machine. The state must be remembered. Where shall we put the number that represents the DSAs state? The 'State of Machine' dialog provides you with a choice. You can store the machine's state 'Local' in each 'instance' of the DSA so that each instance can have a different state. The disadvantage of this is that the number must be 31 or less. I doubt anyone has found that to be a limitation because the state can be any number during execution of the DSA; it is only between executions that the limit applies. A second option is to store the state in the 'Definition' of the DSA. The downside (or, perhaps in some cases, the upside) of this is that all 'instances' of the DSA share the same state. This might be used to your advantage if you wanted a DSA that could receive more than 12 different messages. The number can be any size. The third option is to store the state in Parameter B of the instance of the DSA. This allows numbers as large as 1023 and is the same as 'Local' except that parameter B can no longer be used as a parameter. No problem. Use parameter C instead!<br />
<br />
== Memory Related ==<br />
<br />
=== Parameters ===<br />
==== What are parameters: C,D,etc? ====<br />
<br />
ANSWER: In a given cell of the dungeon you may place several DSAs. They are piled up just as several daggers might be piled up in a corner somewhere. Each DSA has two parameters named 'A' and 'B'. But each DSA can also reference the parameters of all the DSAs that are BELOW it in the pile of DSAs (or list of DSAs). The DSA directly below is referenced by specifying paramteter C and D. The DSA below that is referenced by parameter E nd F. Notice that you cannot reference the parameters of DSAs that are ABOVE, only the ones BELOW. Normally, those DSAs that are referenced as C, D, etc. are 'Do Nothing' and have no code. They are placed in the dungeon only to provide additional parameters for a DSA above them in the pile. But that is not a restriction. When a message is sent to a cell in the dungeon, each DSA in that cell will be activated in turn and any code will be executed. Assume that two DSAs are in the pile. The top DSA can reference parameters A, B, C, and D. The bottom DSA can only reference its own two parameters as A and B.<br />
<br />
=== Stack ===<br />
<br />
=== Array ===<br />
<br />
<br />
=== Global Variables ===<br />
<br />
==== How do they work? ====<br />
Global variables seem to be set up in four-banks of (up-to) 16 variables each in ''Edit/Global Info'', the ''Edit Database'' and ''Global Variables'' in the Database Type pull-down menu, thus allowing a maximum of 64 global variables. For each of the four banks you choose the number of variables.<br />
<br />
Assuming that I set each of the four to having two each:<br />
* Are the valid GV indices: 0,1, 16,17, 32,33 48,49 ?<br />
* What happens if I read/write to an invalid GV?<br />
<br />
ANSWER: It is not that complicated. There are up to 64 global variables numbered 0 through 63. The four banks of 16 are simply four 'windows' into the 64 values. You must write them in groups of 16. Any group with fewer than 16 will be ignored and no more may follow. In your example, there would be no global variables because the first group is incomplete and that will be ignored along with all the following groups.<br />
<br />
Attempting to read/write a non-existent variable ill cause an error message and, in the case of read, a result of 0xcdcdcdcd.<br />
<br />
By the way, the number 64 is EASILY increased if it would be useful. It is a totally arbitrary limit.<br />
<br />
=== Variables ===<br />
<br />
==== Q: Where are they? ====<br />
What memory does the &Vn@ and &Vn! instructions access?<br />
<br />
ANSWER: Temporary memory. Like the stack itself, these (local) variables survive only during a single execution of a DSA. References to these variable is checked. You cannot &Vn@ a variable before you &Vn! the same variable.<br />
<br />
== Filter Related ==<br />
<br />
== Instruction Related ==<br />
<br />
=== L$ ===<br />
This is stated to push the location of the current ''master cell''. What is it?<br />
<br />
ANSWER: The Master/Slave concept has never been fully implemented and there is no need to implement it. So the location of the 'Master cell' is simply the location within the dungeon where you put an instance of the DSA. If it were a 'Pit' then it would be the location of the pit. But it is a DSA so it is the location of the DSA. If the word 'Master' had not been included in the description then there would probably be no confusion.<br />
<br />
=== Case - syntax ===<br />
I'm not understanding the syntax, could someone please provide some examples?<br />
<br />
ANSWER: ??{<case><case><case>........} (n ... )<br />
<br />
The "(n ... )" part of the syntax definition says that the '??' statement needs a single number ('n') on the top of the stack and replaces it with nothing.<br />
<br />
A 'case' statement is normally used when a variable can have many values and you want something different to happen for each of those values. Let us make a particular example. Let us say that the parameter B can have three different values: 4, 12, and 7. If the value is 4 we want to jump to 6S2; if the value is 7 we want to jump to 3T1; if the value is 12 we want to jump to 3T2. If parameter B is any other value then we want to place the number 105 on the stack. Here is the code (notice that the outermost delimiters are braces, not parentheses):<br />
<br />
LB ??{(4,6S2)(7,3T1)(12,3T2)} L105<br />
<br />
=== IfElse - syntax ===<br />
I'm not understanding the syntax, could someone please provide some examples?<br />
<br />
ANSWER: IfElse ::= ?[<J|G>[<state>][<column>]][:<J|G>[<state>][<column>]]<br />
<br />
?X means do X if TOS is non-zero.<br />
<br />
?X:Y means do X if TOS is non-zero else do Y.<br />
<br />
?:Y means do Y if TOS is zero.<br />
<br />
TOS is the value on the top of the stack.<br />
<br />
X and Y can only be 'J'umps or 'G'otos.<br />
<br />
<br />
Example: ?JC0:GT1<br />
<br />
This says that if the top of the stack is non-zero then 'J'ump to line CO. If the top of the stack is zero then 'G'osub to line T1.<br />
<br />
Example: ?:J3T2<br />
<br />
This means 'J'ump to line T2 on state 3 if top of stack is zero.<br />
<br />
=== Flow Control and ''nextState'' ===<br />
The ''nextState'' modifier of an instruction is ignore for all instructions other than the first in the sequence. How does this work with the various Flow-Control instructions, say '''&J*'''. Does the DSA keep the same state it was in (assuming no '''&SETNEWSTATE''' instructions in the called routine)?<br />
<br />
ANSWER: Yes. 'Jumps' and 'GoSubs' do not alter the value of 'nextState'. Only the very first instruction executed when the DSA is activated by a message and &SETNEWSTATE can change 'nextState'.<br />
<br />
[[Category:CSBWin|User Questions]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=DM_Java/Engine/Hack&diff=679DM Java/Engine/Hack2009-01-06T16:23:30Z<p>WikiSysop: added category</p>
<hr />
<div>Notes on the engine modification from the following threads:<br />
<br><br />
http://www.dungeon-master.com/forum/viewtopic.php?p=91719#91719<br><br />
http://www.dungeon-master.com/forum/viewtopic.php?t=27867<br />
<br />
[[Category:Dmjava|Engine Hack]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=RTC/Doors&diff=678RTC/Doors2009-01-06T16:22:09Z<p>WikiSysop: added category</p>
<hr />
<div>Doors are simply that, a door that can be triggered to open/close.<br />
<br />
In RTC, when designing a dungeon, a door must be de-activated to open and activated to close. If a door is already open, then calling de-activate further times will have no affect.<br />
<br />
<br />
Doors can also be "hacked" or "blasted" open.<br />
<br />
A door can be "hacked" open by a character, with enough strength, attacking the door. In the editor, the percentage strength vs. bash is a percentage of 255 strength. IE: if a door has 50% strength to bash, a character requires 128 strength to be able to "hack" the door open. <br />
<br />
A door can be "blasted" open by a character casting a sufficient strength fireball at the designated door.<br />
<br />
[[Category:RTC|Doors]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=Conflux/Competition&diff=336Conflux/Competition2008-08-13T12:36:24Z<p>WikiSysop: </p>
<hr />
<div>== Description ==<br />
The Conflux Dungeon gives you some special points when achieving special actions, reaching special places or getting special items.<br />
<br />
See the [http://www.dungeon-master.com/forum/viewtopic.php?t=25772 original post] in the forum to see the latest results<br />
<br />
A scroll in the hall of champions will show how many points you earned.<br />
<br />
== The Quests: ==<br />
<br />
===== 1 point: =====<br />
*for each air-rune activated scroll<br />
*for each flask<br />
*for each funereal weapon <spoiler>[[Conflux/Places/Dwarven Fortress|Dwarven Fortress]]</spoiler><br />
*Meet lich Vecna<br />
*Kill the mothers of the egg chamber<br />
*find the furs trader<br />
*get the scorching silk whip (bug warning: the scroll doesn't count the point)<br />
*enter the forges <spoiler>[[Conflux/Places/Dwarven Forge|Dwarven Forge]]</spoiler><br />
*Get the dwarven treasure<br />
*Survive the Trial<br />
*Win the circus prize 99<br />
<br />
===== 3 points: =====<br />
*For each cerberus<br />
*for each piece of the dragon armour (bug warning: the scroll doesn't count the points for some of the pieces)<br />
*get the weapon of Druafang<br />
*get the burning whip of the Balrog<br />
<br />
===== 5 points: =====<br />
*find the kitchen lab of Solune<br />
*find the cursed armoury<br />
*find the long lost wand<br />
*ransack the white chambers<br />
*get the coral poleyn<br />
*save the besieged town<br />
*Get a FIERY cerberus<br />
<br />
===== 10 points: =====<br />
*kill Xanathar<br />
*Recover the Crown of Kings from the Archmaster of Mampang.<br />
*Free the leader of the Council and kill the traitor.<br />
*Kill all the council members.<br />
<br />
===== 15 points: =====<br />
*Collect the three Relics of Power.<br />
*Find a Cure for the Curse of the Darc Armor.<br />
*Take the control over the legion of Balrogs.<br />
*Banish the Hordes of Demons from our Plane and return.<br />
<br />
<br />
== Movies ==<br />
Here is a 6-point rush 'movie' of competition entry by Antman (8 MB):<br />
<br />
http://www.dianneandpaul.net/CSBwin/Conflux_Competition/Antman_record.part1.rar<br><br />
http://www.dianneandpaul.net/CSBwin/Conflux_Competition/Antman_record.part2.rar<br />
<br />
[[Category:Conflux|Conflux/Competition]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=Conflux/Places/Dwarven_Forge&diff=335Conflux/Places/Dwarven Forge2008-08-13T12:33:59Z<p>WikiSysop: </p>
<hr />
<div>==== Description ====<br />
* This place is the central place of the [[ConfluxPlacesDwarvenfortress|Dwarven Fortress]]<br />
* Getting there gives you +1 [[Conflux/Competition|Competition]] point<br />
* [http://www.dianneandpaul.net/DMwiki/ConfluxMapViewer/mapview.php?mapid=Level04 Map]<br />
<br />
==== How to get there ====<br />
* By falling at the pit {03,27,06}<br />
<br />
<br />
==== Interests ====<br />
* All doors can be opened from here.<br />
* The pits can be closed (interest ?)<br />
* Scroll "The mightiest weapon of all"<br />
* Mace of order (Broken and Unique)<br />
* Scroll "the architect throben, was the master of plasma."<br />
* [[Conflux/Items/Sapphire|Sapphire]]<br />
* You can fix the Mace of Order (broken) and get a bonus Waraxe !<br />
* You can fix the funereal dagger, broken and unique)<br />
<br />
==== Next places ====<br />
* [[Conflux/Places/Dwarven Fortress|Dwarven Fortress]]<br />
* [[Conflux/Places/Fifth Hall|Fifth Hall]]: pits<br />
<br />
[[Category:Conflux|Dwarven Forge]]</div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=File:Zed.png&diff=324File:Zed.png2008-08-13T10:16:33Z<p>WikiSysop: </p>
<hr />
<div></div>WikiSysophttps://dmwiki.atomas.com/w/index.php?title=File:Wu.png&diff=323File:Wu.png2008-08-13T10:16:27Z<p>WikiSysop: </p>
<hr />
<div></div>WikiSysop