Sunteți pe pagina 1din 20

DungeonSystem

ATabletopSimulatorModforsemirandom,portable,3Dsettingcreation
Bydig65(
http://steamcommunity.com/id/dig65/)

Introduction
TheBasics
ConnectingtheBrains
ConfiguringTileCards
BuildATile
FloorTiles(fromstandardinventory)
WallsandDecorations(fromstandardinventory)
CustomModels(fromanywhere!)
LogicBlocks
TestingYourTileCards
AnExample
8x8and4x8TileCards
ConfiguringMonster,EventandLootCardswiththeCustomModelEncoder
SpecialMonsterCardsorTiles
Trap&TreasureCards
Scenes&Usingthe3SceneBoards
DungeonSystemConfiguration&Setup
DungeonSystemparameters
Tiletypeparameters
ScriptforMonster,EventandLootDecks
UsingDungeonSysteminPractice
BringingYourSetupIntoOtherMods
AddingYourOwnCards&Decks
Wall&DecorationsandFloorTileInventory
UpdatingtheInventoryBrains
UseCases&Ideas
Credits


Introduction
DungeonSystemisaTTSmodthatallowsuserstodecoratedungeontileswithwalls,floortiles,
randomminiaturesrepresentingmonsters,events,andloot,trap&treasurecards,andvirtuallyany
othercustommodelandthensavethatsetupbyencodingitontothedungeontile.

Onceencoded,tilesandtheirassociatedcarddeckscanbeusedtospawnarichgame
environmentforboardgamesandroleplayinggames.

Dungeontilescanbegroupedintotypes(usingthe tiletype
parameter),andeachtypecanbe
configuredtodrawfrom5decks(monster,event,loot,trap&treasure)todeterminewhatis
spawnedonanyspotonthetilecardwhenitisactivated.Trap&treasurecardsarespecialcards
theyaredealtdirectlyontothetile.Finally,youcanuseInfiniteBlocks(smallblueblockswitha
nose)tospawnaspecificobjectonthetilewithnocardsinvolvedatall.

Custommodelsareassociatedwithcardsbysimplyplacingthecustommodelandthecardona
rack,selectingthecardtypeand tiletype
withlogicblocks,andpressingabutton.Thecardis
encodedandthecardandmodelarelinked,andanInfiniteBlockforthecustommodelisalso
created.Userscanpreparedecks+miniaturesofmonsters,eventsandlootveryquickly.

Dungeontilesaretypicallysquarecardsorcustomobjectsin4x4,8x8and4x8configurations,but
DungeonSystemalsoallowsyoutoconfigureothersquaregridbasedshapes.

DungeonSystemincludes4x4,8x8and4x8tileconfigurationareasaswellasaconfigurationarea
forpreparingyourmonster,eventandlootcards.Userscanpreparemanytilesanddeckswithlow
effort,andtheneitherplayontheprovidedtableorporttheirsetupintoanyothermod.

Allofthespawnedobjectshonorthe globalscalevariablesetupintheDungeonSystem
configuration.Yourenvironmentsarecompletelyscalable!

TheMiniatureGraveyardisusedfordisposingofdefeatedminiatures,retrievingtheirassociated
card,andoptionallydealingalootcardasareward.Thiscommon,butoptionalmechanicisbuiltin
toallitemssummonedbyacard.

Theresultisarobust,configurabledungeoncreationsystemthatcanbeappliedtoanyofyour
RPG,boardgameorboardgamedevelopmentneeds.


TheBasics
DungeonSystemconsistsofasetoftilecards,drawcards,andotherobjects,andthebasic
relationshipbetweenthemisimportanttounderstand:

ATileCardcanbeconfiguredtohavewalls,floorsandother3Ddecorationsandanyspotonthe
tilecardcanalsobeconfiguredtodrawaMonster,Loot,Event,TrapandTreasurecards.Event,
MonsterandLootcardsmayalsocauseacustommodeltobeplacedonthetile.Trapand
TreasureCardsareplaceddirectlyonthetile,anddonotspawnobjects.Specificcustommodels
canbecalledusingtheInfiniteBlockthatwascreatedforthatobjecttoconfigurewhereitis
placedonthetile.

Afterconfigurationandsaving,tilecards(alongwiththeirdecks)canbeportedintoanyothermod,
andtheywillspawntheirconfigurationwhenactivated.Aportable3Ddungeon!

IndependentofbeingdrawnbyaTileCard,anyMonster,EventorItemcardcanbedrawnfrom
thedeckmanually,andifconfiguredtosummonanobject,therewillbeabuttononthecard.
Pressingthatbuttonwillsummontheobject*tothecardlocation*.So,cardscansummontheir
objectsmanuallywithoutbeingcalledbyatilecard.Thisallowsforadditionalflexibilityingame
play.

TheminiaturessummonedwhenaMonster,EventorLootCardisdrawnarelinkedtothecardthat
summonedthem.AnotherfeatureofDungeonSystemistheMiniatureGraveyard,wherethe
miniaturecanbeplacedwhendefeated/used/destroyed.Whenaminiatureismovedtothe
MiniatureGraveyard,theminiaturewillbedeletedanditscardwillberetrievedtotheDefeated
MonsterCardrack,andaLootCardwillbedrawntotheLootCardrack(if 1,see
dealloot=
DungeonSystemConfiguration&Setup).


Anothercoolfeatureofthegraveyardisthatyoucanhoverinfiniteblocksoverthegraveyardto
spawntheassociatedobject(withnocarddraws)atthefootofthegrave.Aninfinitesupply!

ConnectingtheBrains
DungeonSystemuses4brainobjectstoholdallofitsscripting,makingtheDungeonSystem
highlyportableandabletoincorporatedintoanyotherTTSmod.Ifyouaregoingtoplayinsidethe
DungeonSystemmod,youllneverhavetotouchtheseparameters.Someuserswillwanttoport
theirtiles/cardstoothermods,andthisiswhenyoullneedtoconnectthebrainsasshownbelow.

The4brainsare dsbrain(themainprogram), dsconfig(


theusereditableconfiguration
parameters), dswallinv dsfloorinv
(theinventoryofbuiltinwallanddecorationobjects)and (the
inventoryofbuiltinfloortiles).Toconnectthebrainsinyourmodorsavefileandallowyour
DungeonSystemtowork,youneedtoaddthefollowingtotheGlobalScriptinyourmodorsave
file:

functiononload()
365d5e
dsbrain=getObjectFromGUID(' ')
dswallinv=getObjectFromGUID(Global.getVar('dswallinvguid'))
dsfloorinv=getObjectFromGUID(Global.getVar('dsfloorinvguid'))
dsconfig=getObjectFromGUID(Global.getVar('configguid'))
end

These4commandsconnectyourDungeonSystembrainstothecurrentmod,and theonlything
youshouldeverneedtoeditistheGUIDforthemainbrain
showninlargerunderlinedtext,above.
Notethatifyourmodalreadyhasanonload()function,youshouldjustaddthe4middlelinesof
codetotheexistingfunction.

Youmustsaveandreloadyourmodaftermakingthischangetotheglobalscript.

Alsonotethatifyouchangethebrainobjectstosomethingdifferent,theGUIDforthebrainobjects
dsbrain
willchange.YouneedtorefertotheGUIDofthemainbrainobjectinthe line.

ConfiguringTileCards
DungeonSystemcomeswith2stacksofexampletilecards( tiletype
defaultandcavern,
respectively),andanassociated5carddecksforeach.ThecardfacesarefromapopularWotC
boardgameandshouldntbeused/distributedinothermods.Theyareincludedhereasan
exampleofhowyoucancreateyourowntilesanddecks.

BuildATile
DungeonSystemisbasedona4x4,16spacetile.4x8and8x8tilecardscanalsobeconfigured.
AnyshapeoftilecardcanbeplacedonanappropriateBuildATileareaandconfigured,though
mostuserswillplacetilecardsofthesamesize/shapeastheconfigurationarea.Usingthecorrect
setupandsettings( usefloortiles= 0or1,forexample!),youcancauseevenoddshapedtilesto
spawnexactlywhatyouwant.

Ifyouareusingsomethingotherthanacard(whatTTSrecognizesasacard)asyourtilecard,you
mustnameitx(lowercasex)whileencodingitsothesystemwillknowwhattoencode.Yes,you
canhavemultipleencodetargets(multiplecardsorobjectsnamedx)ontheareaatonce.You
cannametheobjectsanythingyouwantaftertheyareencoded.

TilesareconfiguredbyusingtheBuildATileareastoplaceyourtile,floortiles,walls/decorations,
custommodels,infiniteblocksandlogicblocksasdesired.Whenyouhavethetilethewayyou
wantit,presstheENCODETILEbuttontoencodetheinformationonthetilecard.Object
position,rotation,scale,colortinting,nameanddescriptionareencoded.Forcustommodels,other
parameterslikematerialandconcave/convexarealsoencoded.Yourobjectswillspawnjustas
youconfigurethemontheBuildATilearea.ReadTestingYourTileCards,below,formoreinfoon
howtobestconfigureandtestyourtilecards.

Objectsareplacedonasnappedgrid(spaces&lines)onthetile,therefore41totalspotsare
availableforobjects(16spaces+25intersections)ona4x4tile.Floortilescanonlybeplacedon
the16spaces,notontheintersections.Allotherobjectscanbeplacedonanyspot.Afloortile
placedonthecenterintersectionofthe4x4area(any4x4areaonamultiareatile)willbeusedas
thedefaultfloortileforallfloorspacesonthattilecard.

Thereissomeallowanceforslightlyoutofplaceobjects,buttrytokeepyourobjectsonthe
spaces/intersections.Whentheyarespawned,theywillbeexactlyalignedtothespot.

Floortiles,andwalls/decorationsfromthestandardDungeonSystemlibrary,andthetilecarditself
willbeLOCKEDafterspawning.Custommodelsandobjectscausedfromcarddrawswillnotbe
locked.

TheimagebelowisascreenshotoftheBuildATileareafor4x4tiles,beforeanybuildinghas
started.Theavailablelogicblocksarebeneaththeconfigurationarea.Logicblockscanbeusedto
representmonster,event,loot,treasure,andtrapcards,specificobjects,andtosetthe
usefloortiles tiletype
and settingsforthetilecard.Floortiles,wallsanddecorations(frominventory,
orcustom)canalsobeplaced.Allalignedandcompatibleobjectswillbeencodedontothetile
cardforlaterspawning.


BuildATile:thetilecardconfigurationareaandlogicblocksbeforeanybuildinghasstarted

FloorTiles(fromstandardinventory)
Typically,ifyouregoingtoplacespecificordefaultfloortilesonyourtilecard,youwouldplace
themfirstwhendecorating.Otherobjectslikewalls/decorationsandlogicblockscanthenbe
placedontopofthefloortiles.

ChooseyourfloortilesfromtheDungeonSysteminventorybag(remember,youcansearch!).

Youcanrotatefloortiles(ifyoucangetthemtofitwhileconfiguring)andchangetheircolortint.
DungeonSystemwillrememberandrecreatetheirpositions,rotationsandcolortinting(andlock
themintoplace!)whenspawned.

Thelogicblockforusefloortiles(
seemoreonLogicBlocks,below)isusedtosettheparameterfor
thetilecard.The arameterallows3possiblevalues(0,1and2):
usefloortilesp
0=nofloortilesareeverspawned,eveniftheyareconfiguredonthetilecard
1=onlyfloortilesthatarespecifiedonthetilecardarespawned
2=all16spotshavefloortiles,usingthedefaultfloortilewheretheyarenotspecified

flift
Adjust whenusingfloortiles(seeDungeonSystemConfiguration&Setup,below).When
usefloortilesiseither1or2,theusercansetthevalueofflift
toadjusthowmuchspacetoliftthe
walls/decoobjectsabovethetabletoaccountforthefloortiles.

Asinglefloortileplacedinthemiddleintersectionofthe4x4tilecardareawillbeusedasthe
usefloortilesi
defaultfloortileinallpositionsforthistilecard(assuming snot0)

WallsandDecorations(fromstandardinventory)
WallsanddecorationscanbeplacedontheBuildATileconfigurationareafromtheDungeon
Systemdefaultinventorybags,andthoseobjectswillbelockedwhenspawned.Position,rotation,
scale,colortint,nameanddescriptionwillallbeencodedonthetilecard,andwillberecreated
whenthetilecardisactivated.

Wallsanddecorationsfromstandardinventoryarealwayslockedintoplacewhenspawnedonthe
tilecard.

CustomModels(fromanywhere!)
CustommodelsfromanyTTScompatiblesourcecanbeplacedontheBuildATileareaandthey
willbeencodedontothetilecard.Custommodelsarenotlockedwhenspawned.Themesh,
diffuse,normal,collider,materialandconvexsettingfornonstandardcustommodelswillbe
encoded,alongwiththeposition,rotation,scale,colortinting,nameanddescription..

LogicBlocks
ThelogicblocksthatareavailableinDungeonSystem:
MonsterCard(green): thisblockcancalleitherarandomdrawfromthemonsterdeck
(label=m)oraspecificmonstercardfromthedeck(label=m:xxxxxxwherexxxxxxis
theGUIDofthecard).Iftheresultingmonstercardisconfiguredwithanobject,theobject
willbespawnedatthelocationofthisblockonthetile.
EventCard(red): thisblockcancalleitherarandomdrawfromtheeventdeck(label=e)
oraspecificeventcardfromthedeck(label=e:xxxxxxwherexxxxxxistheGUIDofthe
card).Iftheresultingeventcardisconfiguredwithanobject,theobjectwillbespawnedat
thelocationofthisblockonthetile.
LootCard(white): thisblockcancalleitherarandomdrawfromthelootdeck(label=l)
oraspecificlootcardfromthedeck(label=l:xxxxxxwherexxxxxxistheGUIDofthe
card).Iftheresultinglootcardisconfiguredwithanobject,theobjectwillbespawnedatthe
locationofthisblockonthetile.
TreasureCard(yellow): thisblockcancalleitherarandomdrawfromthetreasuredeck
(label=r)oraspecifictreasurecardfromthedeck(label=r:xxxxxxwherexxxxxxisthe
GUIDofthecard).Treasurecardscannotbeconfiguredwithanobject,thecardisdealt
directlyonthetile.Typicallytrapandtreasurecardshaveidenticalbackssothattheplayers
cannotdistinguishthem.
TrapCard(orange): thisblockcancalleitherarandomdrawfromthetrapdeck(label=
t)oraspecifictrapcardfromthedeck(label=t:xxxxxxwherexxxxxxistheGUIDofthe
card).Trapcardscannotbeconfiguredwithanobject,thecardisdealtdirectlyonthetile.
Typicallytrapandtreasurecardshaveidenticalbackssothattheplayerscannotdistinguish
them.
InfiniteBlock(darkblue,withanose): thisblockwillspawnthespecificcustommodel
thatwasusedtocreateit.Theyarenamedib:xxxxxxwherexxxxxxisthenameofthe
objectthatwillbespawned.Spawningacustommodelthiswaydoesnotdrawacardfrom
anydeck.
TileType(lightblue) :thisblockcansetthe tiletypef
orthetilecard(label=tt:xxxxxx
wherexxxxxxisthe tiletype) .Thetiletypedetermineswhichsetofcarddecksthetilewill
drawfrom,andafewotherparameters(seeConfiguration,below).Theabsenceofa
tiletypeblockwillusetiletype=default
UseFloorTiles(lightblue): Thisblockcanoverridethe arameterforthetile
usefloortilesp
card.The usefloortilesp arameterallows3possiblevalues(0,1and2):
0=nofloortilesareeverspawned,eveniftheyareconfiguredonthetilecard
1=onlyfloortilesthatarespecifiedonthetilecardarespawned
2=all16spotshavefloortiles,usingthedefaultfloortilewheretheyarenot
specified
Theusefloortilesparameterhasadefaultvalueforeachtiletypethatcanbesetinthebase
configuration(seeConfiguration,below).Thislogicblockwilloverridethedefault.

TestingYourTileCards
Thebestwaytotestandadjustatilesetupis:
Placeyourinitialsetuponthetilecard(floors,walls/deco,logicblocks,etc)
PresstheENCODETILEbuttontoencodethesetupontothetile
PresstheRemoveObjectsFromTilebuttontomovethesetupobjectsoutoftheway,but
incorrectrelativepositioning(sothatyoucanselectandmovethembackontothetile
later)
Savethemod(Menu/SaveGame)
Testyourtilebypressingitsbutton(s)andobservingtheresult
EitherRewind(CtrlZ)oruseSave&Play(Host/Scripting/Save&Playbutton)toreturnto
theprevioussavepoint,eliminatingthespawnedmaterialforthetilecard
Selectandmoveyoursetupmaterialsbackontothecard,adjustasneeded,andrepeat.
Eachencodingofthecardoverwritesanypreviousencoding

AnExample
Thisseriesofpicturesandnarrativedescribehowatypicalsetupmightbedone:

Firstwesetupour4x4tilethewaywewantit.Somethingstonotefromthisoverheadview:
Wevechosenafairlynondescript4x4tilewhichisactuallyacustomobject(soweve
nameditx)asourtilecard
Weveplacedafloortilefromstandardinventoryonthemiddlespot,designatingitasthe
defaultfloortileforthewholetilecard
Weveplacedsomewallsfromstandardinventory
Weveplaced2trap(orange)and1treasure(yellow)logicblocksdesignatingwherethose
cardsshouldbedrawnandplacedonthetile
Weveplaced1monster(green),1loot(white)and1event(red)logicblocksdesignating
wheretheobjectsthatresultfromdrawingfromthosedeckswillbeplaced.Thecardswill
bedrawnbythecardracks,andtheobjectswillbeplacedontheirlocationonthetile
Weveplaced1infiniteblock(darkblue,withnose)representingacustommodelthatwill
bespawned(andnocardswillbedrawn).Inthiscase,itsaGoblinChampion!
Weveplaceda tiletype tiletype(
block(lightblue)todesignatethistileasaspecific not
default),inthiscase tt:cavern


BuildATile:a4x4tiledecoratedandconfigured

NextwepresstheENCODETILEbuttontoencodethissetupontothe4x4tile(andweseeTILE
ENCODEDinthechatwindow).ThenwepresstheRemoveObjectsFromTilebuttontomove
theobjectsoffofthe4x4tilesothatwecansavethingsandgetbacktoourtile.Noticethatthetile
staysinplaceandonlytheencodedobjectsaremoved.Afterencodingandmovingtheobjects,it
lookslikethis:


BuildATile:afterencodingthesetupandclickingRemoveObjectsFromTilebutton

Nowwesavethestateofthegame(Menu/SaveGame)andthentestourtilecardbyclickingits
buttontoactivateit.Theresultmightlooklikethepicturebelow.Inthiscase,weseeourdefault
floortileonallofthefloorspots,andweseeourGoblinChampionthatwespecificallycalledwith
aninfiniteblockintheupperleftcorner.Themonstercarddrawnseemstohavebeenalizardor
drake,andthelootcarddrawseemtohavedrawnaflaskofsomesort.Weseethetreasureand
trapcardsandwonderwhatourchancesare.Andthatpuddleofbloodonthefloorrepresentsthe
eventcardthatwasdrawn.Ohgreat,nowwhat.


BuildATile:afterspawningthistile,weseetheresults!


BuildATile:andthecarddrawarea,withourloot,eventandmonstercarddraws

Nowletsassumewewanttomakeoneadjustment,removingtheeventblock.Wecanreloadour
previoussavebyusingMenu/LoadGame,andthenselect/movealloftheobjectsbackontoour
tileforadjustmentandreencoding.Seebelow:


BuildATile:selectingandthenmovingaprevioussetupbackontothetileforadjustments

Aftermakingtheadjustment(inthiscase,removingtheeventblock)wepresstheENCODETILE
buttonagaintoencodethetile.

Thisishowatypicaltileisbuilt.Onceyougetthehangofitandgetyourfavoritematerialsout
whereyoucangettothem,youcanbuildmanyinterrelatedtilesinashorttime.

8x8and4x8TileCards
4x8and8x8tilecardscanbecreatedinDungeonSystemusingtheothertwoBuildATileareas
forthesesizes.Seethemodforexamplesofeach.Theconfigurationisbasicallythesameasfora
4x4card,butthereare2(for4x8)or4(for8x8)configsectionsforeach4x4blockonthetilecard.

NotethatitiseasiesttouseTTScustomtilesfortheselargecards,asisshownintheexamplein
theDungeonSystemmod.

ConfiguringMonster,EventandLootCardswiththeCustom
ModelEncoder
Monster,EventandLootcardscanbeconfiguredtospawnanobjectwhentheyareactivated.
Activationcanhappenwhenthecardisdrawnaspartofatilecardactivation,orwhentheuser
drawsthecardfromthedeckandthenclicksthebuttononthecarditself.Inthefirstcasethe
objectisspawnedontothetilecard,andinthesecondtheobjectisspawnedontothecarditself.

UsetheCustomModelEncoderareatoassociatecardswithacustommodel,encodethecard,
andcreateanInfiniteBlockrepresentingthecustommodel.Placethecustommodelontherack,
thecard(s)youwanttoencode(donotstackthem,theymustremainseparate),setthecardtype
andtiletype(willdefaulttomonsteranddefault,respectively)andthenpresstheENCODECARD
button.Thecardwillbeencodedwiththecustommodel,andanInfiniteBlockforthemodelwill
appear.


CustomModelEncoder:anearthelementalmodelbeingencodedontoanearthelementalcard
Notetheinfiniteblockthatwasalsocreated,ifyoujustwanttocallthemodelwithoutacarddraw

YoucanuseinfiniteblocksonBuildATiletodesignateaspecificmodelatthatlocationwithno
carddraw.Youcanalsohoveraninfiniteblockoverthegraveyardandspawntheassociated
object.Theinfiniteblockisnotdeleted,soyoucanspawnasmanytimesasyoudlike.

Monster,Event,andLootcardsmustbeputintotheirowndecksandthosedecksmustbe
associatedwitha tiletype
(seeDungeonSystemConfiguration&Setup,Tiletypeparameters).
Eachofthese3decksmustalsohaveascriptonthedeckobject(seeDungeonSystem
Configuration&Setup,ScriptforMonster,Event&LootDecks).

SpecialMonsterCardsorTiles
OtherobjecttypescanalsobesetupasMonsterCards.IntheDungeonSystemmod,youllfinda
fewexamplesofhighlevelvillainmonsterssetuponTTScustomtiles.Thistechniquecanbe
usedtointroduceahighlevelvillainbasedongameplayconditionsinsteadofjustputtingthemin
themonsterdeck.Justmanuallysummontheminiforthevillainmonstercardwhenappropriate.

Trap&TreasureCards
TrapCardsandTreasureCardsaredealtdirectlyontothetilecardasspecified,andarenot
typicallyconfiguredinanyotherway.Userscanfilltrapandtreasurecarddeckstosuitany
purpose.Theyaretypicallysetupwithidenticalbackssothatplayerscannotdistinguishbetween
themuntiltheydosomethingingame,takingarisk.

Scenes&Usingthe3SceneBoards
"Scenes"(3ofthem)canbesaved/recalledusingthesceneboardsinthebackoftheroom.A
sceneboardcangetwhat'scurrentlyonthetable(thegridportioninsidethewoodenborders)and
placeitonthesceneboard,orsendthesceneboard'scontentsontothetable.Eachofthe3scene
boardshas4buttons(seescreenshotonthismod)for"hard"get/send(thetargetisclearedbefore
movingthepieces)or"soft"get/send(thetargetisnotcleared,andthepiecesareaddedtoany
thatexistonthetarget).Thisgivesyouflexibilityinhowyouusethescenes.

Youcanusethesescenestoswitchbetweendungeonsorenvironments,ortoswitchbetween
heavyRPGstuffandwargame/fightingscenes,ormanyotherpurposes.Noneoftheobjects
disappearfromthegamewhenmovedtoascene,soyoucouldtheoreticallyfillupthegamewitha
lotofobjects,sobecarefulaboutthatIguess?

Youcanalsoportthesetablesintoyourownmodbyselecting/chestsavingthesceneboardsand
theircontrolpanels,droppingthoseintoyourmod,creatingascriptareaacrossyourentiretable
surface,andputtingtheguidofthatscriptareaintothecontrolpanelscript(s)(you'llseetheentry
atthetopofthescriptforeachcontrolpanel).Youcanuse1,2orall3sceneboardsjustbesure
togettheboardandcontrolpanelforeachoneyouwanttouse.

Yes,youcoulddosomethingsimilarwithcopy/paste,butweallknowhowinaccurateandmessy
theresultcanbe.Thisispreciselyaccurateandimmediate,andkeepsthesceneswelloutofthe
playingarea.Simplefeature,lotsofuses.

DungeonSystemConfiguration&Setup
TheDungeonSystemConfigurationbrain(theredone)iswherethecodeandconfigurationsfor
theoveralloperationarestored.Theparametersareallinausereditableformatinthe
configurationbrainscript.Thissectiondescribesthemostcommonparameters:

DungeonSystemparameters
DungeonSystemhasafewparametersthataffecthowthesystemperformsoverall:
globalscale :Changingthe globalscalep arameteradjuststheoverallscaleofthesystem.To
changethe globalscaleparameteryoumustfirstchangethevalueinthescript(tomatch
yourmodsscale)andsavethegame,thenreloadit.Allspawnedobjectshonorthe
globalscale parameter,soyourenvironmentsarecompletelyscalable!
idmode :idmodeisadebugmodethatwillusetheinventorycodeasthenameforstandard
inventoryobjects.Mostuserswillalwaysrunwith idmode= 0.
flift flift
:Adjust whenusingfloortilestoadjusthowmuchspacetoliftthewalls/decoobjects
abovethetablesurfacetoaccountforfloortiles.
LootCardRack,Graveyard&DefeatedMonsterCardRackGUIDs:DungeonSystem
includescardhandlingroutinesascardsaredealtandasminiaturesaredefeatedby
players.Thecardhandlingrelieson2singlespacecardracks(LootCardRack&Defeated
MonsterCardRack)andagraveyardobjectforplacingdefeatedminiatureson.Thesystem
isconfiguredasfollows:
Placethecardracksandthegraveyardintheordershownintheoriginalmod(Loot
Rack,Graveyard,MonsterRack)inalocationofyourchoiceoffoftheplayingtable,
spacedtoyourpreference.
Createascriptingzoneoverthegraveyardobject.Rightclickonthescriptingzone
togettheGUIDinthechatwindow
ConfigurethebrainwiththeGUIDofthegraveyardscriptingzone( graveyardguid)
,
andtheGUIDsofthecardracksifyouchangedthem,otherwiseoriginalvalues
shouldbeok( defeatedmonstercardrackguid andlootcardrackguid)
Thesystemoperatesasfollows:
Monstercardsarealwaysretrievedontopofthedefeatedmonstercardrackwhen
theassociatedminiatureishoveredoverthegraveyard.Theminiatureisdeleted
fromthegame.Alootcard(fromtheappropriatelootcarddeck)isdrawnif
dealloot=1intheconfiguration.
Lootcardsarealwaysdealtontopofthelootcardrack
Eventcardsarealwaysdealtjusttotheright(positivex)ofthedefeatedmonster
cardrack
Monstercardsarealwaysdealtjusttotherightoftheeventcardspace(whichisto
therightofthedefeatedmonstercardrack!),extendingtotherightforasmany
monstercardsasarecalledbythetile.Thismeansthatyoumayneedsome
horizontalspacetotherightofthedefeatedmonstercardracktohandleallpossible
eventandmonstercards
BuildATile&CustomObjectEncoderareaGUIDs:theseGUIDsareforthescriptingareas
thatsurroundthe4x4,8x8and4x8BuildATileareasandtheCustomModelEncoderarea.
Ifyouchangethem,youneedtochangetheseGUIDreferences

Tiletypeparameters
tiletype
Categories:DungeonSystemhas1defaultand5customcategoriesfortilecards,
calledthetiletypeparameter.Tilecardswithoutaspecific tiletypeareinthedefault
tiletype
category.Tilecardscanbegivenother tiletypes,
whichdirectsthosetilestouseadifferent
setofmonster,event,loot,treasureandtrapdecks.Throughconfigurationyoucanmixand
matchwhichdecksareusedbyeach tiletype.
tiletype
categorynames:Namethe5nondefaultcategories( ttcat1ttcat5
).Usesimple,
short,nameswithnospaces.Youwillusethesenameswhenconfiguringtilestooverride
thedefault tiletype
.
tiletype
deckGUIDs:settheGUIDsforthedecksforeachofthecategoriesthatyoulluse
UseFloorTiles:The arameterallows3possiblevalues(0,1and2).The
usefloortilesp
valuescanbesetdifferentlyforeach tiletype category
0=nofloortilesareeverspawned,eveniftheyareconfiguredonthetilecard
1=onlyfloortilesthatarespecifiedonthetilecardarespawned(nodefaulttiles)
2=all16spotshavefloortiles,usingdefaultfloortileswheretheyarenotspecified
SpecialtiletypeSubCategoryedge:Anytiletypecategorycanhaveedgetilecards
whicharecommonlyusedtocapoffortransitionbetweendungeons.Seethemodforan
exampleofcavernedgetilecards.Anyedgetypetilecardshouldusethebasetiletype
category,andaddthelettersedge.So,forinstance,edgetilecardscouldbecreatedfor
thedefaulttiletypebyusingthetiletypeofdefaultedge

ScriptforMonster,EventandLootDecks
EachofthesedeckshaveaslightlydifferentscriptthatmustexistONTHEDECKOBJECT(vs.the
scriptoneachofthecards).Whenyoucreatenewdecksofmonster,eventandlootcardsyou
mustaddthisstandardscripttothedecks.Youcancopy/pastethisfromexistingdecksinthemod.
Theyareincludedhereforreferenceandcompleteness.Theonload()functionthatshuffleseach
deckisoptional,andcanbeexcludedifyouwanttomanuallyshuffleyourowndecks:

MonsterDeckScript:
functiononload()
self.shuffle()
end

functiondealmonstercards(info)
dsconfig=getObjectFromGUID(Global.getVar('configguid'))
localparamz={}
pos=getObjectFromGUID(dsconfig.getVar('defeatedmonstercardrackguid')).getPosition()
paramz.position={(pos['x']+6)+(info[1]*3),1,pos['z']}
paramz.rotation={180,0,180}
paramz.callback='callbackMonstercard'
paramz.params={info[2],info[3],info[4]}
ifinfo[5]thenparamz.guid=info[5]end
flipcard=self.takeObject(paramz)
end

functioncallbackMonstercard(flipcard,info)
flipcard.clearButtons()
mbagguid=flipcard.getVar('mbag')
callLuaFunctionInOtherScriptWithParams(flipcard,'spawnMonster',{info[1],info[2],info[3]})
end

EventDeckScript:
functiononload()
self.shuffle()
end

functiondealeventcards(info)
dsconfig=getObjectFromGUID(Global.getVar('configguid'))
localparamz={}
pos=getObjectFromGUID(dsconfig.getVar('defeatedmonstercardrackguid')).getPosition()
paramz.position={(pos['x']+5),1,pos['z']}
paramz.rotation={180,0,180}
paramz.callback='callbackEventcard'
paramz.params={info[1],info[2],info[3]}
ifinfo[4]thenparamz.guid=info[4]end
flipcard=self.takeObject(paramz)
end

functioncallbackEventcard(flipcard,info)
flipcard.clearButtons()
callLuaFunctionInOtherScriptWithParams(flipcard,'spawnEvent',{info[1],info[2],info[3]})
end

LootDeckScript:
functiononload()
self.shuffle()
end

functiondeallootcards(info)
dsconfig=getObjectFromGUID(Global.getVar('configguid'))
localparamz={}
pos=getObjectFromGUID(dsconfig.getVar('lootcardrackguid')).getPosition()
paramz.position={pos['x'],pos['y']+0.3,pos['z']}
paramz.rotation={180,0,180}
paramz.callback='callbackLootcard'
paramz.params={info[1],info[2],info[3]}
ifinfo[4]thenparamz.guid=info[4]end
flipcard=self.takeObject(paramz)
end

functioncallbackLootcard(flipcard,info)
flipcard.clearButtons()
callLuaFunctionInOtherScriptWithParams(flipcard,'spawnLoot',{info[1],info[2],info[3]})
end

UsingDungeonSysteminPractice
Becauseofthemodularandgeneralizedapproach,DungeonSystemisaveryportableand
expandablesystem.Userswithvirtuallynoscriptingexperiencecanaddtilecards,monsters,
events,loot,trapsandtreasurewithrelativeease.Thosewithsomescriptingexperiencemay
discovernewwaystousethesystem..Moreadvancedusersmightevenmodifythecorecodeto
suittheirowngames.Inthosecases,theycanhavetheirowncustommainbrainthattheycan
deployinanymod.Someotherusersmaywanttochangeorextendthewalls/deco/floorinventory
andcreatetheirowncustominventorybrains.Othersmaywanttopullthiscodeintotheirownmod
andruninacompletelydifferentdirection.Itsallgood.

BringingYourSetupIntoOtherMods
Bringingyourtilecards,decksandthegraveyard/cardracksintoanyothermodisverysimple:
Saveyourbrains,tilecards,decksandthegraveyard/racksetuptoachestitem.Seethe
examplebelow,wheretheuserhasselectedthebrains,twosetsoftilecards(onewith
edgetiles),thetwosetsofdecksthatgowitheachsetoftilecards,andthegraveyardand
cardracks:

Selectingthesetuptosavetoachestitemsothatitcanbeimportedintoanothermod

Openthemodthatyouwanttoimportinto,andretrieveyoursetupfromthechest.Youmay
seesomeerrorsinthechatwindowandyoumayevenseetheLoadingscreengetstuck.
Dontworry,wellfixthat.
OpentheScriptingmenuandgototheGlobalscriptforthemod,andaddthelinesas
instructedinConnectingtheBrains.
Savethegame(Menu/SaveGame)andthenreloadit(Menu/LoadGame).Your
DungeonSystemsetupshouldnowwork.

AddingYourOwnCards&Decks
Itisveryeasytoaddyourowncardsandassociatedminiatures/objects.JustusetheCustom
ModelEncodertosetupyourcards(savetheinfiniteblocksifyouwantto),andthenputtheminto
monster,event,loot,treasureandtrapdecks.Thenputappropriateconfigurationscriptonthe
decksandanyindividualcardsyouchoose(seeScriptforMonster,Event&LootDecks).

Wall&DecorationsandFloorTileInventory
Youcanobviouslyputcustommodelsofanykindanywhereonthetile,butsinceonlystandard
inventoryislockedatactivation,somepeoplemaywanttoaddthingstothestandardinventory.
DungeonSystemincludesanAddToInventoryareathatallowsyoutoaddanycustommodelfloor
tilesorwalls/decotothestandardinventory.

Addingamodeltoinventoryissimple.YoucanalsohoverovertheAddToInventoryareafor
quickinstructions:
Forfloortiles,namethecustommodelf:xxxxwherexxxxistheinventorycodeyouwantthe
systemtouseforreference
Forwalls/deco,namethecustommodelw:xxxxwherexxxxistheinventorycodeyouwant
thesystemtouseforreference
Inventorycodesshouldbecharactersandnumbersonly,nospaces,nopunctuation.Itcan
beusefulifthecodesaredescriptivewhenyouresearchingabagfullofstandardinventory
objectslater
PresstheADDTOINVENTORYbuttontoaddtheobjecttothestandardinventory
Iftheinventorycodealreadyexists,thesystemwillnotifyyouinthechatwindow.
Otherwise,theitemwillbeaddedtotheappropriatestandardinventoryandyoullseethe
INVENTORYADDEDmessage
Putyourproperlynamedandnewlyinventoriedobjectinaneworexistinginventorybag
andsavethemod.Nowitcanbeusedasstandardinventoryandlockedatactivation

UpdatingtheInventoryBrains
DungeonSystemincludes2brainsthatholdtheobjectinventoryforwalls/decorations( dswallinv)

dsfloorinv
andforfloortiles( ).Bydefaulttheusershouldnothavetodoanythingfortheinventory
tobeincluded(exceptincludethesetuplinesintheglobalscript,seeConnectingtheBrains).

UseCases&Ideas
HerearesomeusecasesthatmaybehelpfulinthinkingabouthowDungeonSystemmightbe
usedforyourenjoyment:

TheDungeonMaster
DungeonSystemcouldbeusedbyDMstodrivetheonthetablecombatandexplorationportions
oftheirgames/campaigns.Preparedtiledecks(withpreparedorrandomdrawdecks)canbean
alternativetofogofwarinTTS,asthedungeoncanberevealedin4x4sections.Withrandomtile
anddrawdecks,aDMcanfindnewandcreativesituationsforplayers.Withtheabilitytocall
specificcardstoatile,theDMcancontrolthemixofrandomvs.plannedencounters.

DMsmightusethetilecardsingame,orusethecardstoprepareadungeonforfurther
modificationandlateruse.TheDMcanplacetheloot&defeatedmonsterracksandthegraveyard
behindtheirDMscreen,keepingthosecardsoutofplayersightandlettingtheobjects(andthe
DMsimagination!)doallofthetalkingonthetable.Drawdeckcardsandassociated3Dobjects
canbepreparedconsistentwiththegamesystemandsettingthattheDMisplaying,givingtheDM
aflexibletoolkitforindoorandoutdooradventures.

TheAdventurousBoardGamer
ThosewholiketotaketheirfavoritegamestothenextlevelmightbeabletouseDungeonSystem
togivetheirgamesnew3Dlife.Whilethemechanicsmaydiffer(requiringsomescriptmodification
andacustombrain),theprinciplesofDungeonSystemcouldbeappliedtoanytile/roombased
gamelikehauntedhouse,dungeoncrawl,videogametribute,andotherboardgametypes.With
somemodifications(hey,whileyoureinthere,putinthosehouserules!)userscancreatecustom
brainstodrivetheirfavoritegamesandaddnewflavortothem.

TheSoloGamer
Wanttoplayadungeoncrawlbutcantfindanycompanionsrightnow?Createsomecardsand
tiles,andbuildyourowngamethatwillkeepyouchallengedformanyhoursofgameplay.Find
yourfavoriteminis,createcardsforthem,throwtheminadeckandstartplaying.Ormaybejust
createadeckofbeautifullydecoratedtilecardsforthatnextgameofD&D.Totherightkindofuser
andgameplayer,DungeonSystemissortoflikeanfdupLegosystemwithsomerandomresults.

TheGameDeveloper
NoneofthecardorobjectassetsusedintheDungeonSystemmodorinthelibrariesaremineto
grantrightstoanyoneelse.Somearefreeandattributablefromvarioussources,andthereare
evensomecommercialboardgameassetsused asexamplesa swell.Donotuseanyofthese
assetsinthedevelopmentofanoriginalgame,ordistributetheminanyothercontext.

Havingsaidallofthat,ifyouaredevelopingamodandthinkthecodeinDungeonSystemisuseful
toyou,youarewelcometouseitandmodifyittoyourneeds.Youmustattributemyoriginalwork,
andIdloveitifyousentmeamessagesoIcanseewhatyoudid!

Credits
IwrotealloftheLuascripting.Itsallmyfault
Aspecialthankstothefollowingpeoplewhohelpedtestandprovidedfeedbackand
variousstages:gregorcarbine,Jeix,dj.krztoff,Indimeco,rolandostar,emaralha,Jonathan,
Almega
Theextrachestsoforganizedcustommodelsthatarecurrentlyinthemodarefromthe
excellentcollectionfromAlmega.Hehascompiledhisownlistofcreditsforthemodels.
Youshouldcheckforhislatestcollectionstheyareoneofthebestplacestofindthe
custommodelsyoumightwant: http://steamcommunity.com/profiles/76561198119629277
Thebrainscamefromthismod:
http://steamcommunity.com/sharedfiles/filedetails/?id=595385751
Thegraveyardobjectcomesfromthismod:
http://steamcommunity.com/sharedfiles/filedetails/?id=569008167
Almosteverysinglemini,wall,decorationandfloorobjectinthestandardinventorycame
fromVess:
http://steamcommunity.com/profiles/76561198007307508/myworkshopfiles/?appid=286160
TheexamplecardsfromtheD&DAdventureSystemgamesarefrommodsbyeugee.
http://steamcommunity.com/id/eugee

S-ar putea să vă placă și