<data>
	<canvases>
		<!-- -->
		<!-- MAIN PAGE -->
		<!-- -->
		<canvas r_name="'mainCharacterSheetCanvas'" r_template="'mainCanvasTemplate'"
						r_graphic="'rngsdk.display.CdplSpriteSimple'"
						panelInnerPixelScale="min(globalParameters.UIScale,(panelInnerScale*1.33>=1)?(floor(panelInnerScale*2.66)/2):panelInnerScale)"
						panelInnerPixelScaleBigUp="min(globalParameters.UIScale,(panelInnerScale*2>=1)?(floor(panelInnerScale*4)/2):panelInnerScale)"
						panelInnerPixelScaleNoUp="min(globalParameters.UIScale,(panelInnerScale>=1)?(floor(panelInnerScale*2)/2):panelInnerScale)"
						panelInnerScale="(globalParameters.w_stageHeight-(globalParameters.bigCSPanel?0:(90*globalParameters.UIScale)))/panelUnscaledHeight"
						panelUnscaledHeight="380"
						leftPanelUnscaledWidth="max(250, 200*max(panelInnerScale,panelInnerPixelScaleBigUp)/panelInnerScale)"
						rightPanelUnscaledWidth="250"
						selectedHero="heroes.@0"
						mainCSTooltip="''"
						comparisonTooltip1="''"
						comparisonTooltip2="''"
						tooltipIsLeft="0"
						animatedPanel="!globalParameters.r_nexus10Mode">
			<canvas r_name="'leftCSPanel'" r_template="'leftCharacterSheetPanel'" panelIsLeft="1">
				<event r_name="'currentCharacterSheet'" r_template="'mainEventTemplate'" r_eventTarget="'currentLeftCharacterSheet'" r_targetType="'attribute'">
					<effect r_name="'tooltipReset'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip='',globalHMISelection=''})"/>
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</canvas>
			<canvas r_name="'rightCSPanel'" r_template="'rightCharacterSheetPanel'" panelIsLeft="0">
				<event r_name="'currentCharacterSheet'" r_template="'mainEventTemplate'" r_eventTarget="'currentRightCharacterSheet'" r_targetType="'attribute'">
					<effect r_name="'tooltipReset'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip='',globalHMISelection=''})"/>
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</canvas>
			<canvas r_name="'topCSPanel'" r_template="'topCharacterSheetPanel'">
				<event r_name="'currentCharacterSheet'" r_template="'mainEventTemplate'" r_eventTarget="'isTopCSOpen'" r_targetType="'attribute'">
					<effect r_name="'tooltipReset'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip='',globalHMISelection=''})"/>
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</canvas>
			<canvas r_name="'Tooltip'" r_template="{'capsuleButtonTemplate','capsuleDarkTextTemplate'}"
							r_visible="mainCSTooltip!=''"
							capsuleWidth="globalParameters.w_stageWidth-(tooltipIsLeft?leftPanelUnscaledWidth:rightPanelUnscaledWidth)*panelInnerScale-20"
							capsuleHeight="min(100*globalParameters.UIScale, globalParameters.w_stageHeight*0.2)"
							rw_xPos="10+(tooltipIsLeft?(leftPanelUnscaledWidth*panelInnerScale):0)"
							rw_yPos="(globalParameters.bigCSPanel?0:(20+30*globalParameters.UIScale))+380*panelInnerScale-(10+capsuleHeight)"
							capsuleText="mainCSTooltip"
							capsuleEffect="mainCSTooltip=''"
							centeredText="0">
				<text r_name="'capsuleText'" textSize="12*globalParameters.UIScale" r_autoReduceTextSize="1"/>
				<event r_name="'mainCSTooltipChange'" r_template="'mainEventTemplate'" r_eventTarget="'mainCSTooltip'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</canvas>
			<canvas r_name="'comparisonTooltip1'" r_template="{'capsuleButtonTemplate','capsuleDarkTextTemplate'}"
							r_visible="comparisonTooltip1!=''"
							capsuleWidth="globalParameters.w_stageWidth-(tooltipIsLeft?leftPanelUnscaledWidth:rightPanelUnscaledWidth)*panelInnerScale-20"
							capsuleHeight="min(100*globalParameters.UIScale, globalParameters.w_stageHeight*0.2)"
							rw_xPos="10+(tooltipIsLeft?(leftPanelUnscaledWidth*panelInnerScale):0)"
							rw_yPos="(globalParameters.bigCSPanel?0:(20+30*globalParameters.UIScale))+380*panelInnerScale-2*(10+capsuleHeight)"
							capsuleText="comparisonTooltip1"
							capsuleEffect="comparisonTooltip1=''"
							centeredText="0">
				<text r_name="'capsuleText'" textSize="12*globalParameters.UIScale" r_autoReduceTextSize="1"/>
				<event r_name="'comparisonTooltipChange'" r_template="'mainEventTemplate'" r_eventTarget="'comparisonTooltip1'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</canvas>
			<canvas r_name="'comparisonTooltip2'" r_template="{'capsuleButtonTemplate','capsuleDarkTextTemplate'}"
							r_visible="comparisonTooltip2!=''"
							capsuleWidth="globalParameters.w_stageWidth-(tooltipIsLeft?leftPanelUnscaledWidth:rightPanelUnscaledWidth)*panelInnerScale-20"
							capsuleHeight="min(100*globalParameters.UIScale, globalParameters.w_stageHeight*0.2)"
							rw_xPos="10+(tooltipIsLeft?(leftPanelUnscaledWidth*panelInnerScale):0)"
							rw_yPos="(globalParameters.bigCSPanel?0:(20+30*globalParameters.UIScale))+380*panelInnerScale-3*(10+capsuleHeight)"
							capsuleText="comparisonTooltip2"
							capsuleEffect="comparisonTooltip2=''"
							centeredText="0">
				<text r_name="'capsuleText'" textSize="12*globalParameters.UIScale" r_autoReduceTextSize="1"/>
				<event r_name="'comparisonTooltipChange'" r_template="'mainEventTemplate'" r_eventTarget="'comparisonTooltip2'" r_targetType="'attribute'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
			</canvas>
		</canvas>
		
		<!-- -->
		<!-- GENERIC TEMPLATES -->
		<!-- -->
		<!-- SECTION TEMPLATE -->
		<canvasTemplate r_name="'simpleCharacterSheetSectionTemplate'" r_template="'mainCanvasTemplate'"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										rw_xPos="0"
										sectionHeight="panelUnscaledHeight"
										sectionWidth="leftPanelUnscaledWidth"
										r_mouseEnabled="1">
			<picture r_name="'background'" r_template="'mainPictureTemplate'" r_graphic="'CSBackground'" r_width="sectionWidth*panelInnerScale" r_height="sectionHeight*panelInnerScale"/>
		</canvasTemplate>

		<canvasTemplate r_name="'characterSheetSectionTemplate'" r_template="'simpleCharacterSheetSectionTemplate'"
										itemCount="0"
										itemSize="32">
			<canvas r_name="'panelMaskedZone'" r_template="'verticalSizedMaskedZone'"
							rw_xPos="10"
							rw_yPos="10"
							verticalShift="10*panelInnerScale"
							minimumSize="itemCount*itemSize"
							idealSize="itemCount*itemSize+(itemCount-1)*5"
							maximumSize="sectionHeight*panelInnerScale-20"
							innerWidth="(sectionWidth-20)*panelInnerScale">
				<button r_name="'downArrow'" r_scaleX="panelInnerPixelScaleNoUp" r_scaleY="panelInnerPixelScaleNoUp"/>
				<button r_name="'upArrow'" r_scaleX="panelInnerPixelScaleNoUp" r_scaleY="panelInnerPixelScaleNoUp"/>
			</canvas>
		</canvasTemplate>
		
		<!-- VALUE TEMPLATES -->
		<canvasTemplate r_name="'valueCanvasMainTemplate'" r_template="'mainCanvasTemplate'"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										valueWidth="sectionWidth-20"
										valueHeight="17*valueScale"
										valueName="''"
										valueBaseValue="selectedHero.baseValueByName(valueName)"
										valueTotalValue="round(selectedHero.valueByName(valueName))"
										valueValue="valueBaseValue+((valueBaseValue!=valueTotalValue)?(' ['+valueTotalValue+']'):''"
										r_displayName="valueName"
										valueTooltip="''"
										finalTooltip="r_displayName+' ('+valueValue+')\n'+tooltip"
										setTooltip="all({mainCSTooltip=finalTooltip,tooltipIsLeft=panelIsLeft})">
			<textTemplate r_name="'valueTextTemplate'" r_template="'mainTextFieldTemplate'" textSize="12*valueScale" r_textColor="10403071" r_width="valueWidth-4" r_height="w_textHeight+4" rw_yPos="(valueHeight-r_height)/2" />
			<button r_name="'valueButton'" r_template="'mainButtonTemplate'" r_graphic="'vwInvisibleLayer'" r_width="valueWidth" r_height="valueHeight" w_userEvent="">
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="setTooltip"/>
				<event r_name="'onMouse'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER'" r_effect="setTooltip"/>
					<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="mainCSTooltip=''"/>
				</event>
			</button>
		</canvasTemplate>
		<canvasTemplate r_name="'secondaryCanvas'" r_template="'valueCanvasMainTemplate'"
										tooltip="valueTooltip">
			<text r_name="'valueName'" r_template="'valueTextTemplate'" r_text="r_displayName"/>
			<text r_name="'valueValue'" r_template="'valueTextTemplate'" r_text="valueValue" r_align="'right'"/>
			<event r_name="'valueChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.'+valueName"/>			
		</canvasTemplate>
		<canvasTemplate r_name="'secondaryCanvas2Lines'" r_template="'valueCanvasMainTemplate'"
										r_displayName="valueName"
										tooltip="valueTooltip"
										valueWidth="sectionWidth"
										valueHeight="40"
										finalTooltip="r_displayName+'\n'+valueTooltip">
			<text r_name="'valueName'" r_template="'valueTextTemplate'" r_text="r_displayName+'\n'+valueValue" r_align="'center'" textSize="12"/>
		</canvasTemplate>
		<canvasTemplate r_name="'valueAndRaiseCanvasTemplate'" r_template="'valueCanvasMainTemplate'" rw_xPos="0" raiseCostForCanvas="0" raiseEffectTemplate="''" activeButton="selectedHero.Experience>=raiseCostForCanvas">
			<text r_name="'valueName'" r_template="'valueTextTemplate'" r_text="r_displayName" rw_xPos="(4+48)*valueScale" rw_yPos="2*valueScale" r_width="valueWidth-rw_xPos-6*valueScale"/>
			<picture r_name="'valueFrame'" r_template="'mainPictureTemplate'" r_graphic="'minicadre.png'" rw_xPos="valueWidth-w_initialWidth*valueScale" rw_yPos="2" r_scaleX="valueScale" r_scaleY="valueScale"/>
			<text r_name="'valueValue'" r_template="'valueTextTemplate'" r_text="valueValue" rw_xPos="(4+48)*valueScale" rw_yPos="2*valueScale" r_width="valueWidth-rw_xPos-6*valueScale" r_align="'right'" r_textColor="16777215"/>
			<button r_name="'autoPex'" r_template="'mainButtonTemplate'" valueAutoPex="selectedHero.valueByName(valueName+'AutoPex')" r_graphic="(valueAutoPex==1)?'auto_on.png':((valueAutoPex==0.5)?'auto_half.png':'auto_off.png')" rw_xPos="0" r_scaleX="0.5*valueScale" r_scaleY="0.5*valueScale">
				<effect r_name="'autoPex'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({selectedHero.attributeByName(valueName+'AutoPex')=((valueAutoPex==0)?1:(valueAutoPex-0.5)),mainCSTooltip=relocate(text.skillAutoPexTooltip),tooltipIsLeft=panelIsLeft})"/>
				<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				<event r_name="'onSwitch'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.'+valueName+'AutoPex'"/>			
			</button>
			<button r_name="'valueRaise'" r_template="'mainButtonTemplate'" r_graphic="activeButton?'up_on.png':'up_off.png'" rw_xPos="(2+16)*valueScale" r_scaleX="0.5*valueScale" r_scaleY="0.5*valueScale">
				<effect r_name="'nonActivation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="!activeButton" r_effect="all({mainCSTooltip=relocate(text.cannotRaiseXP),tooltipIsLeft=panelIsLeft})"/>
				<effect r_name="'valueRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="activeButton">
					<effect r_name="'valueRaise'" r_template="raiseEffectTemplate">
						<modifier r_name="'raiseCost'" r_template="'mainModifierTemplate'" r_modifierTarget="'raiseCostForCanvas'" r_modifiedValue="raiseCost"/>
					</effect>
					<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip=relocate(text.raiseSkillTooltip),tooltipIsLeft=panelIsLeft})"/>
				</effect>
				<event r_name="'experienceChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Experience'"/>			
			</button>
			<text r_name="'raiseCost'" r_template="'mainTextFieldTemplate'" rw_xPos="(2+32)*valueScale" rw_yPos="-4" textSize="8*valueScale" r_width="valueWidth-rw_xPos" r_height="w_textHeight+4" r_text="raiseCostForCanvas" r_textColor="10403071"/>
			<event r_name="'valueChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.'+valueName"/>			
		</canvasTemplate>
		<canvasTemplate r_name="'attributeCanvas'" r_template="'valueAndRaiseCanvasTemplate'"
										raiseEffectTemplate="'attributeRaise'"
										tooltip="relocate(text.tooltipAttributeCanvas)"/>
		<canvasTemplate r_name="'skillCanvas'" r_template="'valueAndRaiseCanvasTemplate'"
										raiseEffectTemplate="'skillRaise'"
										tooltip="relocate(text.tooltipSkillCanvas)"/>
		<canvasTemplate r_name="'magicAffinityCanvas'" r_template="'valueCanvasMainTemplate'"
										rw_xPos="0"
										raiseCostForCanvas="0"
										tooltip="relocate(text.tooltipMagicAffinityCanvas)"
										activeButton="selectedHero.Experience>=raiseCostForCanvas">
			<text r_name="'valueName'" r_template="'valueTextTemplate'" r_text="r_displayName" rw_xPos="(4+48)*valueScale" r_width="valueWidth-rw_xPos-6*valueScale" />
			<button r_name="'valueRaise'" r_template="'mainButtonTemplate'" r_graphic="activeButton?'up_on.png':'up_off.png'" rw_xPos="2" rw_yPos="0" r_scaleX="0.5*valueScale" r_scaleY="0.5*valueScale">
				<effect r_name="'valueRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="activeButton">
					<effect r_name="'valueRaise'" r_template="'affinityRaise'">
						<modifier r_name="'raiseCost'" r_template="'mainModifierTemplate'" r_modifierTarget="'raiseCostForCanvas'" r_modifiedValue="raiseCost"/>
					</effect>
				</effect>
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip=tooltip,tooltipIsLeft=panelIsLeft})"/>
				<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="pageName"/>
				<event r_name="'experienceChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Experience'"/>			
			</button>
			<text r_name="'raiseCost'" r_template="'mainTextFieldTemplate'" rw_xPos="(2+16)*valueScale" rw_yPos="-2" textSize="8*valueScale" r_height="w_textHeight+4" r_text="raiseCostForCanvas" r_textColor="10403071"/>
			<loop r_name="'affinityLoop'" r_loopCondition="6>iLoop" r_loopStep="all({children.@0.iLoop=iLoop,children.@0.r_name=(children.@0.r_name+iLoop),iLoop++})" iLoop="0">
				<picture r_name="'affinityPicture'" r_template="'mainPictureTemplate'"
								 iLoop="0"
								 r_graphic="affinityLinkName+((selectedHero.valueByName(valueName)>iLoop)?'_on.png':'_off.png')"
								 rw_xPos="valueWidth+10-(iLoop)*25*min(valueScale, sectionWidth/320)-25*valueScale"
								 rw_yPos="0"
								 r_scaleX="valueScale"
								 r_scaleY="valueScale"
								 r_viewIndex="(6-iLoop)"/>
			</loop>
		</canvasTemplate>
		<canvasTemplate r_name="'magicArcaneAffinityCanvas'" r_template="'magicAffinityCanvas'"
										activeButton="(selectedHero.Experience>=raiseCostForCanvas)||(selectedHero.ArcanePoint>0)">
			<button r_name="'valueRaise'">
				<effect r_name="'valueRaise'">
					<effect r_name="'valueRaise'" r_enabled="(selectedHero.ArcanePoint==0)&&(selectedHero.Experience>=raiseCost)"/>
					<effect r_name="'valueRaiseAP'" r_template="'affinityRaiseArcane'"/>
				</effect>
			</button>
			<text r_name="'raiseCost'" r_text="(selectedHero.ArcanePoint>0)?'1 AP':raiseCostForCanvas"/>
		</canvasTemplate>

		<!-- -->
		<!-- PANEL TEMPLATES -->
		<!-- -->				
		<!-- Left Panel -->
		<canvasTemplate r_name="'sideCharacterSheetPanel'" r_template="'mainCanvasTemplate'"
										pageName="r_name"
										r_graphic="'rngsdk.display.CdplSpriteSimple'"
										rw_yPos="globalParameters.bigCSPanel?0:(10+30*globalParameters.UIScale)"
										selectedHero="heroes.@0"
										rw_frameCount="-1"
										slideValue="-1"
										openFlagName="'ToBeReplaced'"
										openFlag="0">
			<event r_name="'frameCount'" r_template="'mainEventTemplate'" r_eventTarget="'rw_frameCount'" r_targetType="'attribute'">
				<effect r_name="'opening'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(rw_frameCount>=0)&&openFlag" r_effect="slideValue=-(10-min(rw_frameCount,10))/11"/>
				<effect r_name="'closing'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(rw_frameCount>=0)&&!openFlag" r_effect="slideValue=-(min(rw_frameCount,10)+1)/11"/>
				<effect r_name="'noMoreFrame'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="rw_frameCount>10" r_effect="rw_frameCount=-1"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'VeryLocalRefresh'"/>
			</event>
			<event r_name="'isCSOpen'" r_template="'mainEventTemplate'" r_eventTarget="openFlagName" r_targetType="'attribute'">
				<effect r_name="'resetFrameCount'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="rw_frameCount=((animatedPanel)?((0>rw_frameCount)?0:(11-rw_frameCount)):11)"/>
				<effect r_name="'resetTooltip'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip='',globalHMISelection=''})"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
			</event>
			<button r_name="'close'" r_template="'mainButtonTemplate'" r_graphic="'Close.png'" r_scaleX="panelInnerPixelScaleBigUp" r_scaleY="panelInnerPixelScaleBigUp" r_viewIndex="1">
				<effect r_name="'close'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="attributeByName(openFlagName)=0"/>
			</button>
			<button r_name="'sizeChanger'" r_template="'mainButtonTemplate'" r_graphic="globalParameters.bigCSPanel?'Decrease.png':'Increase.png'" r_scaleX="panelInnerPixelScaleBigUp" r_scaleY="panelInnerPixelScaleBigUp" r_viewIndex="1" rw_yPos="30*panelInnerPixelScaleBigUp">
				<effect r_name="'changeSize'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="globalParameters.bigCSPanel=!globalParameters.bigCSPanel"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="'characterSheet'"/>
				<effect r_name="'paramSave'" r_template="'mainSelfEffectTemplate'" r_type="'SaveGlobalParameters'"/>
			</button>
		</canvasTemplate>
		<canvasTemplate r_name="'leftCharacterSheetPanel'" r_template="'sideCharacterSheetPanel'"
										rw_xPos="leftPanelUnscaledWidth*panelInnerScale*slideValue"
										openFlagName="'isLeftCSOpen'"
										openFlag="isLeftCSOpen"
										valueScale="max(panelInnerScale,panelInnerPixelScaleBigUp)"
										leftSubPanel="0">
			<button r_name="'close'" r_visible="isLeftCSOpen" rw_xPos="leftPanelUnscaledWidth*panelInnerScale"/>
			<button r_name="'sizeChanger'" r_visible="isLeftCSOpen" rw_xPos="leftPanelUnscaledWidth*panelInnerScale"/>
			<canvas r_name="'Attributes'" r_template="'Attributes'"
							sectionHeight="95*valueScale/panelInnerScale"/>
			<canvas r_name="'SkillsPanel'" r_template="'SkillsPanel'"
							r_visible="leftSubPanel==0"
							sectionHeight="panelUnscaledHeight-95*valueScale/panelInnerScale"
							rw_yPos="95*valueScale"/>
			<canvas r_name="'MagicSkillsPanel'" r_template="'MagicSkillsPanel'"
							r_visible="leftSubPanel==1"
							sectionHeight="panelUnscaledHeight-95*valueScale/panelInnerScale"
							rw_yPos="95*valueScale"/>
			<buttonTemplate r_name="'subPanelSelectionTemplate'" r_template="'mainButtonTemplate'" r_visible="isLeftCSOpen" rw_xPos="leftPanelUnscaledWidth*panelInnerScale" rw_yPos="95*valueScale+(30*r_scaleY+5)*subPanelIndex" subPanelIndex="0" r_scaleX="globalParameters.UIScale*0.75" r_scaleY="globalParameters.UIScale*0.75">
				<effect r_name="'subPanel'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='CLICK'" r_effect="leftSubPanel=subPanelIndex"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="'leftCSPanel'"/>
			</buttonTemplate>
			<button r_name="'subPanel0'" r_template="'subPanelSelectionTemplate'" r_graphic="'RangedS.png'" subPanelIndex="0"/>
			<button r_name="'subPanel1'" r_template="'subPanelSelectionTemplate'" r_graphic="'MagicS.png'" subPanelIndex="1"/>
		</canvasTemplate>
		<canvasTemplate r_name="'rightCharacterSheetPanel'" r_template="'sideCharacterSheetPanel'"
										rw_xPos="globalParameters.w_stageWidth+rightPanelUnscaledWidth*(-1-slideValue)*panelInnerScale"
										openFlagName="'isRightCSOpen'"
										openFlag="isRightCSOpen"
										equipHeight="240"
										equipWidth="160"
										spellListIndex="0">
			<button r_name="'close'" r_visible="isRightCSOpen" rw_xPos="-w_initialWidth*r_scaleX"/>
			<button r_name="'sizeChanger'" r_visible="isRightCSOpen" rw_xPos="-w_initialWidth*r_scaleX"/>

			<buttonTemplate r_name="'panelSelectionTemplate'" r_template="'mainButtonTemplate'" r_visible="isRightCSOpen&&globalParameters.bigCSPanel" rw_xPos="-30*r_scaleX" rw_yPos="60*panelInnerPixelScaleBigUp+5+(30*r_scaleY+2)*buttonIndex" buttonIndex="0" r_scaleX="globalParameters.UIScale*0.75" r_scaleY="globalParameters.UIScale*0.75" panel="''">
				<effect r_name="'changePanel'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="currentRightCharacterSheet=panel"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="'rightCSPanel'"/>
			</buttonTemplate>

			<button r_name="'Inventory'" r_template="'panelSelectionTemplate'" buttonIndex="0" r_graphic="'InventoryS.png'" panel="'inventory'"/>
			<button r_name="'Class'" r_template="'panelSelectionTemplate'" buttonIndex="1" r_graphic="'ClassesS.png'" panel="'class'"/>
			
			<buttonTemplate r_name="'subPanelSelectionTemplate'" r_template="'panelSelectionTemplate'" r_visible="isRightCSOpen&&(globalParameters.bigCSPanel||(currentRightCharacterSheet=='magic'))" rw_xPos="-32*r_scaleX" buttonIndex="(globalParameters.bigCSPanel?2:0)+subPanelIndex" panel="'magic'">
				<effect r_name="'changeSchool'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="spellListIndex=subPanelIndex"/>
			</buttonTemplate>
			<button r_name="'Conjuration'" r_template="'subPanelSelectionTemplate'" subPanelIndex="0" r_graphic="'b_conjuration.png'"/>
			<button r_name="'Enchantment'" r_template="'subPanelSelectionTemplate'" subPanelIndex="1" r_graphic="'b_enchantment.png'"/>
			<button r_name="'Evocation'" r_template="'subPanelSelectionTemplate'" subPanelIndex="2" r_graphic="'b_evocation.png'"/>
			<button r_name="'Transmutation'" r_template="'subPanelSelectionTemplate'" subPanelIndex="3" r_graphic="'b_transmutation.png'"/>

			<canvas r_name="'EquipmentPanel'" r_template="'EquipmentPanel'"
							r_visible="currentRightCharacterSheet=='inventory'"
							sectionHeight="equipHeight"
							sectionWidth="equipWidth"/>
			<canvas r_name="'FixedStats'" r_template="'FixedStats'"
							r_visible="currentRightCharacterSheet=='inventory'"
							rw_xPos="equipWidth*panelInnerScale"
							sectionHeight="equipHeight"
							sectionWidth="rightPanelUnscaledWidth-equipWidth"/>
			<canvas r_name="'InventoryPanel'" r_template="'InventoryPanel'"
							r_visible="currentRightCharacterSheet=='inventory'"
							rw_yPos="equipHeight*panelInnerScale" 
							sectionHeight="panelUnscaledHeight-equipHeight"/>
			<canvas r_name="'ClassesPanel'" r_template="'ClassesPanel'" r_visible="currentRightCharacterSheet=='class'"/>
			<canvas r_name="'MagicPanel'" r_template="'MagicPanel'" r_visible="currentRightCharacterSheet=='magic'"/>
		</canvasTemplate>
		<canvasTemplate r_name="'topCharacterSheetPanel'" r_template="'sideCharacterSheetPanel'"
										rw_yPos="globalParameters.w_stageHeight*slideValue"
										openFlagName="'isTopCSOpen'"
										openFlag="isTopCSOpen">
			<button r_name="'close'" rw_xPos="globalParameters.w_stageWidth-w_initialWidth*r_scaleX" rw_yPos="10+40*r_scaleY"/>
			<canvas r_name="'combatLog'" r_template="'combatLogPageTemplate'"/>
		</canvasTemplate>

		<!-- -->
		<!-- Attributes and Skills -->
		<!-- -->
		<canvas r_name="'Attributes'" r_template="'simpleCharacterSheetSectionTemplate'"
						sectionWidth="leftPanelUnscaledWidth">
			<canvas r_name="'statsHolder'" r_template="'mainCanvasTemplate'"
							r_graphic="'rngsdk.display.CdplSpriteSimple'"
							sectionWidth="leftPanelUnscaledWidth*panelInnerScale">
				<canvas r_name="'Experience'" r_template="'secondaryCanvas'"
								rw_xPos="10"
								rw_yPos="0"
								valueWidth="sectionWidth/2-20"
								valueName="'Experience'"
								r_displayName="text.experience"
								valueValue="selectedHero.Experience"
								valueTooltip="relocate(text.experienceTooltip)"/>
				<canvas r_name="'ArcanePoint'" r_template="'secondaryCanvas'"
								valueWidth="sectionWidth/2-10"
								rw_xPos="sectionWidth/2"
								rw_yPos="0"
								valueName="'ArcanePoint'"
								r_displayName="text.arcanePoints"
								valueValue="selectedHero.ArcanePoint"
								valueTooltip="relocate(text.arcanePointsTooltip)"/>
				<canvas r_name="'Strength'" r_template="'attributeCanvas'"
								rw_xPos="10"
								rw_yPos="15*valueScale"
								valueWidth="sectionWidth-20"
								valueName="'Strength'"
								r_displayName="text.attributeStrength"
								valueTooltip="text.tooltipStrength"/>
				<canvas r_name="'Dexterity'" r_template="'attributeCanvas'"
								rw_xPos="10"
								rw_yPos="34*valueScale"
								valueWidth="sectionWidth-20"
								valueName="'Dexterity'"
								r_displayName="text.attributeDexterity"
								valueTooltip="text.tooltipDexterity"/>
				<canvas r_name="'Intelligence'" r_template="'attributeCanvas'"
								rw_xPos="10"
								rw_yPos="53*valueScale"
								valueWidth="sectionWidth-20"
								valueName="'Intelligence'"
								r_displayName="text.attributeIntelligence"
								valueTooltip="text.tooltipIntelligence"/>
				<canvas r_name="'Constitution'" r_template="'attributeCanvas'"
								rw_xPos="10"
								rw_yPos="72*valueScale"
								valueWidth="sectionWidth-20"
								valueName="'Constitution'"
								r_displayName="text.attributeConstitution"
								valueTooltip="text.tooltipConstitution"/>
			</canvas>
		</canvas>
		<canvas r_name="'SkillsPanel'" r_template="'characterSheetSectionTemplate'"
						sectionWidth="leftPanelUnscaledWidth">
			<canvas r_name="'panelMaskedZone'"
							rw_yPos="0"
							minimumSize="10+15*(0+16*valueScale)"
							idealSize="20+15*(5+16*valueScale)"
							maximumSize="sectionHeight*panelInnerScale"
							innerWidth="sectionWidth*panelInnerScale"
							r_centeredSizer="1">
				<canvas r_name="'draggedZone'">
					<canvas r_name="'sizer'"
									sectionWidth="leftPanelUnscaledWidth*panelInnerScale">
						<canvas r_name="'CloseCombat'" r_template="'skillCanvas'"
										valueName="'CloseCombat'"
										r_displayName="text.skillCloseCombat"
										valueTooltip="text.tooltipSkillCloseCombat"/>
						<canvas r_name="'Axe'" r_template="'skillCanvas'"
										valueName="'Axe'"
										r_displayName="text.skillAxe"
										valueTooltip="text.tooltipSkillAxe"/>
						<canvas r_name="'Dagger'" r_template="'skillCanvas'"
										valueName="'Dagger'"
										r_displayName="text.skillDagger"
										valueTooltip="text.tooltipSkillDagger"/>
						<canvas r_name="'Mace'" r_template="'skillCanvas'"
										valueName="'Mace'"
										r_displayName="text.skillMace"
										valueTooltip="text.tooltipSkillMace"/>
						<canvas r_name="'Polearm'" r_template="'skillCanvas'"
										valueName="'Polearm'"
										r_displayName="text.skillPolearm"
										valueTooltip="text.tooltipSkillPolearm"/>
						<canvas r_name="'Staff'" r_template="'skillCanvas'"
										valueName="'Staff'"
										r_displayName="text.skillStaff"
										valueTooltip="text.tooltipSkillStaff"/>
						<canvas r_name="'Sword'" r_template="'skillCanvas'"
										valueName="'Sword'"
										r_displayName="text.skillSword"
										valueTooltip="text.tooltipSkillSword"/>
						<picture r_name="'separator1'" r_template="'mainPictureTemplate'" r_graphic="'vwInvisibleLayer'" r_height="5*valueScale" r_width="10"/>
						<canvas r_name="'RangedCombat'" r_template="'skillCanvas'"
										valueName="'RangedCombat'"
										r_displayName="text.skillRangedCombat"
										valueTooltip="text.tooltipSkillRangedCombat"/>
						<canvas r_name="'Bow'" r_template="'skillCanvas'"
										valueName="'Bow'"
										r_displayName="text.skillBow"
										valueTooltip="text.tooltipSkillBow"/>
						<canvas r_name="'Crossbow'" r_template="'skillCanvas'"
										valueName="'Crossbow'"
										r_displayName="text.skillCrossbow"
										valueTooltip="text.tooltipSkillCrossbow"/>
						<canvas r_name="'Throw'" r_template="'skillCanvas'"
										valueName="'Throw'"
										r_displayName="text.skillThrow"
										valueTooltip="text.tooltipSkillThrow"/>
						<picture r_name="'separator2'" r_template="'mainPictureTemplate'" r_graphic="'vwInvisibleLayer'" r_height="5*valueScale" r_width="10"/>
						<canvas r_name="'Dodge'" r_template="'skillCanvas'"
										valueName="'Dodge'"
										r_displayName="text.skillDodge"
										valueTooltip="text.tooltipSkillDodge"/>
						<canvas r_name="'Shield'" r_template="'skillCanvas'"
										valueName="'Shield'"
										r_displayName="text.skillShield"
										valueTooltip="text.tooltipSkillShield"/>
						<canvas r_name="'ArmorSkill'" r_template="'skillCanvas'"
										valueName="'ArmorSkill'"
										r_displayName="text.skillArmorSkill"
										valueTooltip="text.tooltipSkillArmorSkill"/>
						<canvas r_name="'Resistance'" r_template="'skillCanvas'"
										valueName="'Resistance'"
										r_displayName="text.skillResistance"
										valueTooltip="text.tooltipSkillResistance"/>
					</canvas>
				</canvas>
			</canvas>
		</canvas>
		<canvas r_name="'MagicSkillsPanel'" r_template="'characterSheetSectionTemplate'"
						sectionWidth="leftPanelUnscaledWidth">
			<canvas r_name="'panelMaskedZone'"
							rw_yPos="0"
							minimumSize="10+11*(0+16*valueScale)"
							idealSize="20+11*(5+16*valueScale)"
							maximumSize="sectionHeight*panelInnerScale"
							innerWidth="sectionWidth*panelInnerScale"
							verticalShift="10*panelInnerScale"
							r_centeredSizer="1">
				<canvas r_name="'draggedZone'">
					<canvas r_name="'sizer'"
									sectionWidth="leftPanelUnscaledWidth*panelInnerScale">
						<canvas r_name="'Magic'" r_template="'skillCanvas'"
										valueName="'Magic'"
										r_displayName="text.skillMagic"
										valueTooltip="text.tooltipSkillMagic"/>
						<canvas r_name="'Conjuration'" r_template="'skillCanvas'"
										valueName="'Conjuration'"
										r_displayName="text.skillConjuration"
										valueTooltip="text.tooltipSkillConjuration"/>
						<canvas r_name="'Enchantment'" r_template="'skillCanvas'"
										valueName="'Enchantment'"
										r_displayName="text.skillEnchantment"
										valueTooltip="text.tooltipSkillEnchantment"/>
						<canvas r_name="'Evocation'" r_template="'skillCanvas'"
										valueName="'Evocation'"
										r_displayName="text.skillEvocation"
										valueTooltip="text.tooltipSkillEvocation"/>
						<canvas r_name="'Transmutation'" r_template="'skillCanvas'"
										valueName="'Transmutation'"
										r_displayName="text.skillTransmutation"
										valueTooltip="text.tooltipSkillTransmutation"/>
						<picture r_name="'separator'" r_template="'mainPictureTemplate'" r_graphic="'vwInvisibleLayer'" r_height="5*valueScale" r_width="10"/>
						<canvas r_name="'holyCanvas'" r_template="'magicAffinityCanvas'"
										affinityLinkName="'holy'"
										valueName="'Holy'"
										r_displayName="text.affinityHoly"
										valueTooltip="text.tooltipAffinityHoly"/>
						<canvas r_name="'deathCanvas'" r_template="'magicAffinityCanvas'"
										affinityLinkName="'death'"
										valueName="'Death'"
										r_displayName="text.affinityDeath"
										valueTooltip="text.tooltipAffinityDeath"/>
						<canvas r_name="'airCanvas'" r_template="'magicArcaneAffinityCanvas'"
										affinityLinkName="'air'"
										valueName="'Air'"
										r_displayName="text.affinityAir"
										valueTooltip="text.tooltipAffinityAir"/>
						<canvas r_name="'earthCanvas'" r_template="'magicArcaneAffinityCanvas'"
										affinityLinkName="'earth'"
										valueName="'Earth'"
										r_displayName="text.affinityEarth"
										valueTooltip="text.tooltipAffinityEarth"/>
						<canvas r_name="'fireCanvas'" r_template="'magicArcaneAffinityCanvas'"
										affinityLinkName="'fire'"
										valueName="'Fire'"
										r_displayName="text.affinityFire"
										valueTooltip="text.tooltipAffinityFire"/>
						<canvas r_name="'waterCanvas'" r_template="'magicArcaneAffinityCanvas'"
										affinityLinkName="'water'"
										valueName="'Water'"
										r_displayName="text.affinityWater"
										valueTooltip="text.tooltipAffinityWater"/>
					</canvas>
				</canvas>
			</canvas>
			<event r_name="'APChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.ArcanePoint'"/>			
		</canvas>
		
		<canvas r_name="'FixedStats'" r_template="'simpleCharacterSheetSectionTemplate'"
						sectionWidth="rightPanelUnscaledWidth">
			<canvas r_name="'statsHolder'" r_template="'mainCanvasTemplate'"
							r_graphic="'rngsdk.display.CdplSpriteSimple'"
							r_scaleX="panelInnerScale"
							r_scaleY="panelInnerScale"
							valueScale="1">
				<canvas r_name="'HitPoints'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="0"
								valueName="'hitPoints'"
								r_displayName="text.hitPointsShort"
								valueValue="selectedHero.hitPoints+' / '+selectedHero.maxHitPoints"
								valueTooltip="relocate(text.hitPointsToolip)"
								finalTooltip="text.hitPoints+'\n'+valueTooltip">
					<event r_name="'onHPRefresh'" r_template="'localRefreshOnChange'" r_eventTarget="'heroes.@0.hitPoints'"/>			
					<event r_name="'onMaxHPRefresh'" r_template="'localRefreshOnChange'" r_eventTarget="'heroes.@0.maxHitPoints'"/>			
					<event r_name="'onConstitutionRefresh'" r_template="'localRefreshOnChange'" r_eventTarget="'heroes.@0.Constitution'"/>			
				</canvas>
				<canvas r_name="'Energy'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="28"
								valueName="'fatigue'"
								r_displayName="text.fatigue"
								valueValue="selectedHero.fatigue+' / '+selectedHero.exhaustion"
								valueTooltip="relocate(text.fatigueToolip)">
					<event r_name="'onFatigueRefresh'" r_template="'localRefreshOnChange'" r_eventTarget="'heroes.@0.fatigue'"/>			
					<event r_name="'onExhaustionRefresh'" r_template="'localRefreshOnChange'" r_eventTarget="'heroes.@0.exhaustion'"/>			
				</canvas>
				<canvas r_name="'MainHand'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="61"
								valueName="''"
								r_displayName="text.attributeMainHand"
								valueValue="exists(selectedHero.mainhand)?(round(selectedHero.mainhand.weaponHitBonus)+' | '+round(selectedHero.mainhand.weaponDamage)):'-'"
								valueTooltip="relocate(text.tooltipMainHand)"/>
				<canvas r_name="'OffHand'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="89"
								valueName="''"
								r_displayName="text.attributeOffHand"
								valueValue="(exists(selectedHero.offhand)&&exists(selectedHero.offhand.action)&&selectedHero.offhand.action.r_enabled)?(round(selectedHero.offhand.weaponHitBonus)+' | '+round(selectedHero.offhand.weaponDamage)):'-'"
								valueTooltip="relocate(text.tooltipOffHand)"/>
				<canvas r_name="'Ranged'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="117"
								valueName="''"
								r_displayName="text.attributeRanged"
								valueValue="exists(selectedHero.ranged)?(round(selectedHero.ranged.weaponHitBonus)+' | '+round(selectedHero.ranged.weaponDamage)):'-'"
								valueTooltip="relocate(text.tooltipRanged)"/>
				<canvas r_name="'Defense'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="150"
								valueName="''"
								r_displayName="text.attributeDefense"
								valueValue="round(selectedHero.closeCombatDefense)+' | '+round(selectedHero.rangedDefense)+' | '+round(selectedHero.spellDefense)"
								valueTooltip="relocate(text.tooltipDefense)"/>
				<canvas r_name="'Armor'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="178"
								valueName="''"
								r_displayName="text.attributeArmor"
								valueValue="round(selectedHero.Armor)"
								valueTooltip="relocate(text.tooltipArmor)"/>
				<canvas r_name="'ResistanceAttribute'" r_template="'secondaryCanvas2Lines'"
								rw_yPos="206"
								valueName="''"
								r_displayName="text.attributeResistance"
								valueValue="round(selectedHero.PhysicalResistance)+' | '+round(selectedHero.MentalResistance)"
								valueTooltip="relocate(text.tooltipResistance)"/>
				<event r_name="'onHeroDurableEffects'" r_template="'mainEventTemplate'" r_eventTarget="'heroes.@0.effects'" r_targetType="'evaluator'">
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</event>
				<event r_name="'experienceChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Experience'"/>			
			</canvas>
		</canvas>
		
		<!-- -->
		<!-- EQUIPMENT -->
		<!-- -->
		<canvas r_name="'CSequipmentSlot'" r_template="'equipmentSlotTemplate'"
						slotName="internalSlotName"
						baseXPos="0"
						baseYPos="0"
						rw_xPos="baseXPos*panelInnerScale+(panelInnerScale-panelInnerPixelScale)*(36/2)"
						rw_yPos="baseYPos*panelInnerScale+(panelInnerScale-panelInnerPixelScale)*(36/2)"
						r_scaleX="panelInnerPixelScale"
						r_scaleY="panelInnerPixelScale">
			<slot r_name="'equipmentSlot'" setTooltip="all({mainCSTooltip=(exists(content)?(content.tooltip):''),tooltipIsLeft=panelIsLeft})">
				<event r_name="'onContent'">
					<effect r_name="'refresh'" r_refreshTarget="'characterSheet'"/>
				</event>
				<event r_name="'onEquip'" r_template="'mainEventTemplate'" r_eventTarget="'selectedHero.'+slotName" r_targetType="'evaluator'">
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="refreshSlotTarget"/>
				</event>
				<effect r_name="'tooltip'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="setTooltip"/>
				<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="'characterSheet'"/>
				<event r_name="'onMouse'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER'" r_effect="setTooltip"/>
					<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="mainCSTooltip=''"/>
					<effect r_name="'drop'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='DROP'" r_effect="all({mainCSTooltip='',comparisonTooltip1='',comparisonTooltip2=''})"/>
					<effect r_name="'doubleClick'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='DOUBLE_CLICK'" r_effect="all({mainCSTooltip='',comparisonTooltip1='',comparisonTooltip2=''})"/>
				</event>
			</slot>
		</canvas>
		<canvas r_name="'EquipmentPanel'" r_template="'simpleCharacterSheetSectionTemplate'"
						sectionWidth="rightPanelUnscaledWidth"
						r_mouseEnabled="1">
			<picture r_name="'background'" r_graphic="'playerstuff.png'"/>
			<picture r_name="'background2'" r_template="'mainPictureTemplate'" r_graphic="'EquipmentFrame'" r_width="sectionWidth*panelInnerScale" r_height="sectionHeight*panelInnerScale"/>
			<canvas r_name="'equipmentHolder'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'">
				<canvas r_name="'head'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_casque.png'" internalSlotName="'head'" baseXPos="64" baseYPos="10"/>
				<canvas r_name="'ranged'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_distance.png'" internalSlotName="'ranged'" baseXPos="20" baseYPos="35"/>
				<canvas r_name="'neck'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_amulette.png'" internalSlotName="'neck'" baseXPos="64" baseYPos="55"/>
				<canvas r_name="'back'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_cape.png'" internalSlotName="'back'" baseXPos="108" baseYPos="35"/>
				<canvas r_name="'bracers'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_bracelet.png'" internalSlotName="'bracers'" baseXPos="16" baseYPos="80"/>
				<canvas r_name="'armor'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_armure.png'" internalSlotName="'armor'" baseXPos="64" baseYPos="105"/>
				<canvas r_name="'gloves'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_gant.png'" internalSlotName="'gloves'" baseXPos="112" baseYPos="80"/>
				<canvas r_name="'mainhand'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_arme.png'" internalSlotName="'mainhand'" baseXPos="16" baseYPos="125" />
				<canvas r_name="'belt'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_ceinture.png'" internalSlotName="'belt'" baseXPos="64" baseYPos="150"/>
				<canvas r_name="'offhand'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_bouclier.png'" internalSlotName="'offhand'" baseXPos="112" baseYPos="125"/>
				<canvas r_name="'leftring'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_bague.png'" internalSlotName="'leftring'" baseXPos="20" baseYPos="170"/>
				<canvas r_name="'boots'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_bottes.png'" internalSlotName="'boots'" baseXPos="64" baseYPos="195"/>
				<canvas r_name="'rightring'" r_template="'CSequipmentSlot'" slotBackground="'playerstuff_bague.png'" internalSlotName="'rightring'" baseXPos="108" baseYPos="170"/>
			</canvas>
		</canvas>
		
		<!-- INVENTORY -->
		<canvasTemplate r_name="'CSinventorySlotTemplate'" r_template="'inventorySlotTemplate'">
			<slot r_name="'inventorySlot'"
						dropOnClick="multiDropActive"
						comparisonSlot1="null"
						comparisonSlot2="null"
						setTooltip="all({	mainCSTooltip=(exists(content)?(content.tooltip):''),
															tooltipIsLeft=panelIsLeft,
															comparisonSlot1=((exists(content)&&(content.targetSlot!=''))?(selectedHero.(attributeByName(content.targetSlot))):null),
															comparisonTooltip1=(comparisonSlot1?comparisonSlot1.tooltip:''),
															comparisonSlot2=((exists(content)&&(content.targetSlot2!=''))?(selectedHero.(attributeByName(content.targetSlot2))):null),
															comparisonTooltip2=(comparisonSlot2?comparisonSlot2.tooltip:'')})">
				<effect r_name="'tooltip'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="setTooltip"/>
				<effect r_name="'graphicRefresh'" r_refreshTarget="'characterSheet'"/>
				<event r_name="'onContent'">
					<effect r_name="'refresh'" r_refreshTarget="'characterSheet'"/>
				</event>
				<event r_name="'onMouse'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER'" r_effect="setTooltip"/>
					<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="all({mainCSTooltip='',comparisonTooltip1='',comparisonTooltip2=''})"/>
					<effect r_name="'doubleClick'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='DOUBLE_CLICK'" r_effect="all({mainCSTooltip='',comparisonTooltip1='',comparisonTooltip2=''})"/>
				</event>
			</slot>
		</canvasTemplate>
		<canvas r_name="'InventoryPanel'" r_template="'simpleCharacterSheetSectionTemplate'"
						sectionWidth="rightPanelUnscaledWidth"
						multiDropActive="0"
						bagIndex="0"
						r_mouseEnabled="1">
			<picture r_name="'background'" r_graphic="'cadre_item.png'"/>
			<picture r_name="'background2'" r_template="'mainPictureTemplate'" r_graphic="'InventoryFrame'" r_width="sectionWidth*panelInnerScale" r_height="sectionHeight*panelInnerScale"/>
			<canvas r_name="'inventoryHolder'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'">
				<event r_name="'onPageChange'" r_template="'mainEventTemplate'" r_eventTarget="'currentRightCharacterSheet'" r_targetType="'attribute'">
					<effect r_name="'noMultiDrop'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="multiDropActive=0"/>
				</event>
				<event r_name="'onClose'" r_template="'mainEventTemplate'" r_eventTarget="'isRightCSOpen'" r_targetType="'attribute'">
					<effect r_name="'noMultiDrop'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="multiDropActive=0"/>
				</event>
				<canvasTemplate r_name="'horizontalLineTemplate'" r_template="'mainCanvasTemplate'" r_graphic="'rngsdk.display.CdplSpriteSimple'"/>
				<loop r_name="'slotLoop'" r_loopCondition="8>iLoop" r_loopStep="all({children.@0.iLoop=iLoop,children.@0.r_name=(children.@0.r_name+iLoop),iLoop++})" iLoop="0">
					<canvas r_name="'row'" r_template="'horizontalLineTemplate'" iLoop="0" r_visible="floor(iLoop/4)==bagIndex">
						<canvasTemplate r_name="'slotTemplate'" r_template="'CSinventorySlotTemplate'"
														columnIndex="0"
														slotIndex="columnIndex+iLoop*6"
														rw_xPos="(5+columnIndex*33)*panelInnerScale+16*(panelInnerScale-r_scaleX)"
														rw_yPos="(5+(iLoop%4)*33)*panelInnerScale+16*(panelInnerScale-r_scaleY)"
														r_scaleX="min(panelInnerScale, panelInnerPixelScale)"
														r_scaleY="min(panelInnerScale, panelInnerPixelScale)"/>
						<canvas r_name="'slot0'" r_template="'slotTemplate'" columnIndex="0"/>
						<canvas r_name="'slot1'" r_template="'slotTemplate'" columnIndex="1"/>
						<canvas r_name="'slot2'" r_template="'slotTemplate'" columnIndex="2"/>
						<canvas r_name="'slot3'" r_template="'slotTemplate'" columnIndex="3"/>
						<canvas r_name="'slot4'" r_template="'slotTemplate'" columnIndex="4"/>
						<canvas r_name="'slot5'" r_template="'slotTemplate'" columnIndex="5"/>
					</canvas>
				</loop>
				<buttonTemplate r_name="'bagTemplate'" r_template="'stateButtonTemplate'" upGraphic="'Inventory2.png'" downGraphic="'Inventory3.png'" index="0" rw_xPos="(10+(6*33+2))*panelInnerScale+16*(panelInnerScale-panelInnerPixelScale)" rw_yPos="(5+(index*33+2))*panelInnerScale+16*(panelInnerScale-panelInnerPixelScale)" r_scaleX="panelInnerPixelScale" r_scaleY="panelInnerPixelScale">
					<event r_name="'isDown'">
						<effect r_name="'bagSelection'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='MOUSE_DOWN'" r_effect="bagIndex=index"/>
						<effect r_name="'graphicRefresh'" r_refreshTarget="'InventoryPanel'"/>
					</event>
				</buttonTemplate>
				<button r_name="'bag0'" r_template="'bagTemplate'" index="0">
					<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
						<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OVER')||(globalParameters.isMobile&&(w_userEvent=='MOUSE_DOWN'))" r_effect="all({mainCSTooltip=text.firstBagTooltip,tooltipIsLeft=panelIsLeft})"/>
						<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OUT')||(w_userEvent=='MOUSE_UP')" r_effect="mainCSTooltip=''"/>
					</event>
				</button>
				<button r_name="'bag1'" r_template="'bagTemplate'" index="1">
					<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
						<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OVER')||(globalParameters.isMobile&&(w_userEvent=='MOUSE_DOWN'))" r_effect="all({mainCSTooltip=text.secondBagTooltip,tooltipIsLeft=panelIsLeft})"/>
						<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OUT')||(w_userEvent=='MOUSE_UP')" r_effect="mainCSTooltip=''"/>
					</event>
				</button>
				<button r_name="'sortInventory'" r_template="'mainButtonTemplate'" r_graphic="'vwSortIcon'" rw_xPos="(10+(6*33+2))*panelInnerScale+16*(panelInnerScale-panelInnerPixelScale)" rw_yPos="(5+(2*33+2))*panelInnerScale+16*(panelInnerScale-panelInnerPixelScale)" r_scaleX="panelInnerPixelScale" r_scaleY="panelInnerPixelScale">
					<effect r_name="'CLICK'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='CLICK'" r_effect="selectedHero.sortInventory=1"/>
					<effect r_name="'graphicRefresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'" r_refreshTarget="'InventoryPanel'"/>
					<event r_name="'onMouseEvent'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
						<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OVER')||(globalParameters.isMobile&&(w_userEvent=='MOUSE_DOWN'))" r_effect="all({mainCSTooltip=text.sortInventoryTooltip,tooltipIsLeft=panelIsLeft})"/>
						<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OUT')||(w_userEvent=='MOUSE_UP')" r_effect="mainCSTooltip=''"/>
					</event>
				</button>
				<canvas r_name="'drop'" r_template="'dropSlot32Template'" dropOnClick="multiDropActive" rw_xPos="(10+(6*33+2))*panelInnerScale+16*(panelInnerScale-panelInnerPixelScale)" rw_yPos="(5+(3*33+2))*panelInnerScale+16*(panelInnerScale-panelInnerPixelScale)" r_scaleX="panelInnerPixelScale" r_scaleY="panelInnerPixelScale">
					<slot r_name="'dropSlot'">
						<event r_name="'onMouseEvent'">
							<effect r_name="'CLICK'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='CLICK'" r_effect="multiDropActive=0"/>
							<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OVER')||(globalParameters.isMobile&&(w_userEvent=='MOUSE_DOWN'))" r_effect="all({mainCSTooltip=text.trashBinTooltip,tooltipIsLeft=panelIsLeft})"/>
							<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="(w_userEvent=='ROLL_OUT')||(w_userEvent=='MOUSE_UP')" r_effect="mainCSTooltip=''"/>
							<effect r_name="'SpecialClick'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}"
											r_enabled="(w_userEvent=='DOUBLE_CLICK')||(w_userEvent=='RIGHT_CLICK')||(w_userEvent=='LONG_CLICK')"
											r_effect="multiDropActive=!multiDropActive"/>
						</event>
					</slot>
				</canvas>
			</canvas>
			<event r_name="'onPickup'" r_template="'mainEventTemplate'" r_eventTarget="'selectedHero.items'" r_targetType="'evaluator'">
				<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
			</event>
			<event r_name="'strengthChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Strength'"/>			
			<event r_name="'armorChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.ArmorSkill'"/>			
			<event r_name="'shieldChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Shield'"/>			
		</canvas>

		<!-- -->
		<!-- CLASSES -->
		<!-- -->
		<canvasTemplate r_name="'CSpowerSlotTemplate'" r_template="'powerSlotTemplate'"
										powerName="(length(powerList)>slotIndex)?(powerList[slotIndex].r_name):''"
										r_scaleX="panelInnerPixelScale"
										r_scaleY="panelInnerPixelScale">
			<slot r_name="'powerSlot'" setTooltip="all({mainCSTooltip=(exists(content)?(content.tooltip):''),tooltipIsLeft=panelIsLeft})">
				<effect r_name="'tooltip'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="setTooltip"/>
				<effect r_name="'graphicRefresh'" r_refreshTarget="pageName"/>
				<event r_name="'onMouse'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER'" r_effect="setTooltip"/>
					<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="mainCSTooltip=''"/>
				</event>
			</slot>
		</canvasTemplate>
		<canvasTemplate r_name="'CSbasicClassTemplate'" r_template="'basicClassTemplate'"
										pictureScale="classSlotScale">
			<button r_name="'activation'" setTooltip="all({mainCSTooltip=classTooltip,tooltipIsLeft=panelIsLeft})">
				<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({currentClass=localClassName,globalHMISelection=-1,setTooltip})"/>
				<effect r_name="'graphicRefresh'" r_refreshTarget="'ClassesPanel'"/>
				<event r_name="'onMouse'" r_template="'mainEventTemplate'" r_eventTarget="'w_userEvent'" r_targetType="'attribute'">
					<effect r_name="'rollOver'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OVER'" r_effect="setTooltip"/>
					<effect r_name="'rollOut'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="w_userEvent=='ROLL_OUT'" r_effect="mainCSTooltip=''"/>
				</event>
			</button>
			<text r_name="'className'" r_textColor="10403071" textSize="12*valueScale"/>
			<text r_name="'classLevel'" r_textColor="10403071" textSize="12*valueScale"/>
		</canvasTemplate>
		<canvas r_name="'ClassesPanel'" r_template="'characterSheetSectionTemplate'"
						sectionWidth="rightPanelUnscaledWidth"
						currentClass="currentClass=selectedHero.ClassAutoPex"
						currentClassExists="(currentClass!='')&&exists(selectedHero.packages.(attributeByName(currentClass)))"
						raiseCostForCanvas="0"
						nbPower="currentClassExists?(selectedHero.packages.(attributeByName(currentClass)).maxClassLevel):0"
						classSlotScale="specialInnerPixelScale*0.75"
						specialInnerPixelScale="min(globalParameters.UIScale,(panelInnerScale*1.1>=1)?(floor(panelInnerScale*2.2)/2):panelInnerScale)"
						valueScale="max(panelInnerScale,panelInnerPixelScaleBigUp)">
			<canvas r_name="'panelMaskedZone'"
							minimumSize="18*(5+54*classSlotScale)"
							idealSize="minimumSize"
							maximumSize="(sectionHeight-145)*panelInnerScale"
							sectionWidth="rightPanelUnscaledWidth*panelInnerScale">
				<canvas r_name="'draggedZone'">
					<canvas r_name="'sizer'">
						<canvas r_name="'Mage'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classMage"/>
						<canvas r_name="'Priest'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classPriest"/>
						<canvas r_name="'Rogue'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classRogue"/>
						<canvas r_name="'Warrior'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classWarrior"/>
						<canvas r_name="'ArcaneArcher'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classArcaneArcher"/>
						<canvas r_name="'Archer'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classArcher"/>
						<canvas r_name="'Assassin'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classAssassin"/>
						<canvas r_name="'Barbarian'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classBarbarian"/>
						<canvas r_name="'BattleMage'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classBattleMage"/>
						<canvas r_name="'Enchanter'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classEnchanter"/>
						<canvas r_name="'Inquisitor'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classInquisitor"/>
						<canvas r_name="'Knight'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classKnight"/>
						<canvas r_name="'Necromancer'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classNecromancer"/>
						<canvas r_name="'Oracle'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classOracle"/>
						<canvas r_name="'Paladin'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classPaladin"/>
						<canvas r_name="'Punisher'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classPunisher"/>
						<canvas r_name="'Ranger'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classRanger"/>
						<canvas r_name="'Summoner'" r_template="'CSbasicClassTemplate'" classDisplayName="text.classSummoner"/>
					</canvas>
				</canvas>
			</canvas>
			<!-- BUTTON --> 
			<canvas r_name="'buttonSection'" r_template="'mainCanvasTemplate'"
							r_graphic="'rngsdk.display.CdplSpriteSimple'"
							rw_yPos="(sectionHeight-130)*panelInnerScale"
							r_scaleX="panelInnerPixelScaleNoUp"
							r_scaleY="panelInnerPixelScaleNoUp">
				<button r_name="'increaseClass'" r_template="'mainButtonTemplate'"
								r_enabled="currentClassExists"
								r_graphic="activeButton?'up_on.png':'up_off.png'"
								activeButton="currentClassExists&&(selectedHero.packages.(attributeByName(currentClass)).canBeUpgrade)&&(selectedHero.Experience>=raiseCostForCanvas)"
								rw_xPos="30+2*32">
					<effect r_name="'nonActivation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_enabled="!activeButton" r_effect="all({mainCSTooltip=((selectedHero.packages.(attributeByName(currentClass)).canBeUpgrade)?relocate(text.cannotRaiseClassXP):relocate(text.cannotRaiseClassPrerequisites)),tooltipIsLeft=panelIsLeft})"/>
					<effect r_name="'valueRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="activeButton">
						<effect r_name="'valueRaise'" r_template="'classRaise'" characterClassName="currentClass">
							<modifier r_name="'raiseCost'" r_template="'mainModifierTemplate'" r_modifierTarget="'raiseCostForCanvas'" r_modifiedValue="raiseCost"/>
						</effect>
						<effect r_name="'activation'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({mainCSTooltip=relocate(text.raiseClassTooltip)+'\n'+selectedHero.packages.(attributeByName(currentClass)).tooltip,tooltipIsLeft=panelIsLeft})"/>
					</effect>
				</button>
				<text r_name="'raiseCost'" r_template="'mainTextFieldTemplate'"
							r_visible="currentClassExists"
							r_width="100"
							r_height="32"
							rw_xPos="30+3*32"
							r_text="raiseCostForCanvas"
							textSize="10"
							r_textColor="10403071"/>
				<button r_name="'autoPex'" r_template="'mainButtonTemplate'"
								r_graphicName="'autoPex'"
								r_enabled="currentClassExists"
								r_graphic="((currentClass!='')&&(selectedHero.ClassAutoPex==currentClass))?'classe_auto_on.png':'classe_auto_off.png'"
								rw_xPos="20+32"
								r_scaleX="32/40"
								r_scaleY="32/40">
					<effect r_name="'autoPex'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({(selectedHero.ClassAutoPex==currentClass)?(selectedHero.ClassAutoPex=''):(selectedHero.ClassAutoPex=currentClass),mainCSTooltip=relocate(text.classAutoPexTooltip),tooltipIsLeft=panelIsLeft})"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</button>
				<button r_name="'autoSkill'" r_template="'mainButtonTemplate'"
								r_graphicName="'autoSkill'"
								r_enabled="currentClassExists"
								r_graphic="((currentClass!='')&&(selectedHero.ClassSkillAutoPex==currentClass))?'skill_auto_on.png':'skill_auto_off.png'"
								rw_xPos="10"
								r_scaleX="32/40"
								r_scaleY="32/40">
					<effect r_name="'autoPex'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="all({(selectedHero.ClassSkillAutoPex==currentClass)?(selectedHero.ClassSkillAutoPex=''):(selectedHero.ClassSkillAutoPex=currentClass),mainCSTooltip=relocate(text.classSkillAutoPexTooltip),tooltipIsLeft=panelIsLeft})"/>
					<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
				</button>
			</canvas>
			<!-- POWER -->
			<canvas r_name="'powers'" r_template="'mainCanvasTemplate'"
							r_graphic="'rngsdk.display.CdplSpriteSimple'"
							rw_yPos="(sectionHeight-95)*panelInnerScale"
							powerList="(currentClassExists?(selectedHero.packages.(attributeByName(currentClass)).recursivePowerList):{}">
				<loop r_name="'powerLoop'" r_loopCondition="10>iLoop" r_loopStep="all({children.@0.iLoop=iLoop,children.@0.r_name=(children.@0.r_name+iLoop),iLoop++})" iLoop="0">
					<canvas r_name="'power'" r_template="'CSpowerSlotTemplate'"
									r_graphicName="r_graphicName='power'+iLoop"
									r_visible="nbPower>iLoop"
									iLoop="0"
									slotIndex="slotIndex=iLoop"
									rw_xPos="10+48*(iLoop%5)*panelInnerScale"
									rw_yPos="48*floor(iLoop/5)*panelInnerScale"
									r_scaleX="specialInnerPixelScale"
									r_scaleY="specialInnerPixelScale">
					</canvas>
				</loop>
			</canvas>
			<event r_name="'experienceChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Experience'"/>			
		</canvas>
		
		<!-- -->
		<!-- MAGIC -->
		<!-- -->
		<canvas r_name="'MagicPanel'" r_template="'characterSheetSectionTemplate'"
						sectionWidth="rightPanelUnscaledWidth"
						skillName="{'Conjuration','Enchantment','Evocation','Transmutation'}[spellListIndex]"
						itemCount="11"
						itemSize="44*panelInnerPixelScale"
						powerList="selectedHero.packages.(attributeByName(skillName+'Package')).recursivePowerList">

			<text r_name="'skillName'" r_template="'mainTextFieldTemplate'"
						r_width="sectionWidth*panelInnerScale-20"
						r_height="w_textHeight+4"
						rw_xPos="10"
						rw_yPos="10+7"
						r_text="text.(attributeByName('skill'+skillName))"
						textSize="15*panelInnerPixelScale"
						r_textColor="10403071"
						r_align="'center'"/>

			<canvas r_name="'panelMaskedZone'"
							rw_yPos="40*panelInnerScale"
							maximumSize="(sectionHeight-60)*panelInnerScale">
				<canvas r_name="'draggedZone'">
					<picture r_name="'background'" rw_xPos="-2*panelInnerScale"/>
					<canvas r_name="'sizer'">
						<loop r_name="'powerLoop'" r_loopCondition="itemCount>iLoop" r_loopStep="all({children.@0.iLoop=iLoop,children.@0.r_name=(children.@0.r_name+iLoop),iLoop++})" iLoop="0">
							<canvas r_name="'powerInfo'" r_template="'mainCanvasTemplate'"
											r_graphic="'rngsdk.display.CdplSpriteSimple'"
											iLoop="0"
											powerDisplayName="''"
											affinityList="{}">
								<canvas r_name="'power'" r_template="'CSpowerSlotTemplate'"
												powerSelectedName="('S'+(100*spellListIndex+slotIndex)"
												slotIndex="iLoop">
									<slot r_name="'powerSlot'">
										<modifier r_name="'affinityList'" r_template="'mainModifierTemplate'" r_modifierTarget="'affinityList'" r_modifiedValue="(exists(content)&&exists(content.affinityList))?(content.affinityList):{}"/>
										<modifier r_name="'powerDisplayName'" r_template="'mainModifierTemplate'" r_modifierTarget="'powerDisplayName'" r_modifiedValue="(exists(content)?(content.r_displayName):''"/>
									</slot>
								</canvas>
								<text r_name="'spellName'" r_template="'mainTextFieldTemplate'"
											r_width="innerWidth-rw_xPos-2*panelInnerScale"
											r_height="w_textHeight+4"
											rw_xPos="10+40*panelInnerPixelScale"
											rw_yPos="0"
											r_text="powerDisplayName"
											textSize="12*panelInnerPixelScale"
											r_textColor="10403071"/>
								<loop r_name="'affinityLoop'" r_loopCondition="4>jLoop" r_loopStep="all({children.@0.jLoop=jLoop,children.@0.r_name=(children.@0.r_name+jLoop),jLoop++})" jLoop="0">
									<picture r_name="'affinity'" r_template="'mainPictureTemplate'"
													 jLoop="0"
													 r_graphic="r_visible?(lower(affinityList[jLoop])+'_on.png'):''"
													 r_visible="length(affinityList)>jLoop"
													 rw_xPos="10+(40+12*jLoop)*panelInnerPixelScale"
													 rw_yPos="20*panelInnerPixelScale"
													 r_scaleX="panelInnerPixelScale"
													 r_scaleY="panelInnerPixelScale"/>
								</loop>
							</canvas>
						</loop>
					</canvas>
				</canvas>
			</canvas>
			<event r_name="'APChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.ArcanePoint'"/>			
			<event r_name="'ConjurationChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Conjuration'"/>			
			<event r_name="'EnchantmentChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Enchantment'"/>			
			<event r_name="'EvocationChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Evocation'"/>			
			<event r_name="'TransmutationChange'" r_template="'localRefreshOnChange'" r_eventTarget="'selectedHero.Transmutation'"/>			
		</canvas>
		
		<!-- -->
		<!-- COMBAT LOG -->
		<!-- -->
		<canvasTemplate r_name="'combatLogPageTemplate'" r_template="'scrollBackgroundTemplate'"
										scrollText="(length(gameParameters.combatLog)>0)?(arrayToValue($0+$1,gameParameters.combatLog)):''"
										rw_xPos="0"
										rw_yPos="10+40*globalParameters.UIScale"
										scrollWidth="globalParameters.w_stageWidth"
										scrollHeight="globalParameters.w_stageHeight-10-40*globalParameters.UIScale">
			<canvas r_name="'textZone'" shouldUpdateOnce="0">
				<canvas r_name="'draggedZone'">
					<text r_name="'scrollText'" r_wordWrap="1" textSize="6+6*globalParameters.UIScale" w_isRefreshed="0">
						<event r_name="'goingToLog'" r_template="'mainEventTemplate'" r_eventTarget="'w_isRefreshed'" r_targetType="'attribute'">
							<effect r_name="'valueRaise'" r_template="{'mainSelfEffectTemplate','multiEffect'}" r_enabled="shouldUpdateOnce">
								<effect r_name="'snap'" r_template="'mainGraphicEffectTemplate'"	r_type="'NextLastChildY'"/>
								<effect r_name="'shouldNotUpdate'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="shouldUpdateOnce=0"/>
								<effect r_name="'refresh'" r_template="'mainGraphicEffectTemplate'" r_type="'LocalRefresh'"/>
							</effect>
						</event>
					</text>
					<event r_name="'opened'" r_template="'mainEventTemplate'" r_eventTarget="'isTopCSOpen'" r_targetType="'attribute'">
						<effect r_name="'shouldUpdate'" r_template="{'mainSelfEffectTemplate','evaluationEffect'}" r_effect="shouldUpdateOnce=1"/>
					</event>
				</canvas>
			</canvas>
		</canvasTemplate>		
	</canvases>
</data>