function tutorial_clickbubble( name, bubbleId )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutbubble1_alt" ) ) ;
	setTutMinSize( 250, 120 ) ;
	setAllowBubbleClick( bubbleId ) ;
	setTutInvisibleCircle( ) ; -- so that we'll position it position by bubble, but don't circle bubble
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_clickbubbleoption( name, bubbleId )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutbubbleoption1" ) ) ;
	setTutMinSize( 250, 120 ) ;
	setAllowBubbleClick( bubbleId ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_levelup( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutlevelup1" ) ) ;
	setTutMinSize( 250, 220 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 10, 165 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_levelupb( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutlevelup2" ) ) ;
	setTutMinSize( 250, 220 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 280, 223, 518, 295 ) ;
	tutManualPlacement( 10, 165 ) ;
	--tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutlevelup3" ) ) ;
	setTutMinSize( 250, 250 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 280, 318, 516, 348 ) ;
	tutManualPlacement( 10, 165 ) ;
	--tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	if ( getBoolean( "gunsAvailable" ) ) then
		addDialogue( ) ;
		setTutText( getString( "tutlevelup4" ) ) ;
		setTutMinSize( 250, 250 ) ;
		setTutHasOkButton( true ) ;
		setCustomCircle( 280, 368, 516, 398 ) ;
		tutManualPlacement( 10, 215 ) ;
		--tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
	end
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_multimarker( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutmultimarker1" ) ) ;
	setTutMinSize( 250, 220 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 540, 370 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_horsequality( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "horsedealer_tut1" ) ) ;
	setTutMinSize( 300, 170 ) ;
	setTutHasOkButton( true ) ;
	--tutAutoPlacement( ) ;
	tutManualPlacement( 250, 20 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_fullinventoryingame( name, par1 )
	freezeGame( ) ;
	tutorial_fullinventory( name, par1, 235, 20, 250, 20 ) ;
	unfreezeGame( ) ;
end

function tutorial_fullinventoryininventory( name, par1 )
	tutorial_fullinventory( name, par1, 235, 200, 250, 200 ) ;
end

function tutorial_fullinventory( name, par1, place1x, place1y, place2x, place2y )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutsellitems1" ) ) ;
	setTutMinSize( 330, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( place1x, place1y ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;

	addDialogue( ) ;
	setTutText( getString( "tutsellitems2" ) ) ;
	setTutMinSize( 300, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( place2x, place2y ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_sellitemskey( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutsellitemskey" ) ) ;
	setTutMinSize( 330, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 235, 200 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_buyitems( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutbuyitems1" ) ) ;
	setTutMinSize( 300, 150 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 250, 60 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;

	addDialogue( ) ;
	setTutText( getString( "tutbuyitems2" ) ) ;
	setTutMinSize( 300, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 250, 35 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_shouldexplore( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	-- tell player that they are free to explore (don't have to follow yellow footprints)
	
	addDialogue( ) ;
	setTutText( getString( "tutshouldexplore1" ) ) ;
	setTutMinSize( 350, 230 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 225, 185 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	addDialogue( ) ;
	setTutText( getString( "tutshouldexplore2" ) ) ;
	setTutMinSize( 300, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 250, 200 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;

	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_followpath( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt2tut1" ) ) ;
	setTutMinSize( 300, 175 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_movement1( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt2tut2" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowWalkToAnyPoint( ) ;
	tutManualPlacement( 275, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_goinside( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt2tut3" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowDoorClick( "dartelderhouseout" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_talktocharacter( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt2tut4" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowCharacterClick( "father" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_gooutside( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt2tut5" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowDoorClick( "dartelderhousein" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_attackenemy( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt4d9" ) ) ;
	setTutMinSize( 300, 100 ) ;
	setAllowCharacterClick( gTutAttackEnemyName ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_playerhealthbar( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt4d11" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 10, 20, 210, 39 ) ;
	setCircleOpenCorner( "bottomright" ) ;
	setCircleColour( "bright" ) ;
	--tutManualPlacement( 5, 50 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	local enemyX = 0 ;
	local enemyY = 0 ;
	enemyX, enemyY = getCharacterPos( gTutAttackEnemyName ) ;
	local enemyHealthX1 = enemyX - 50 ;
	local enemyHealthX2 = enemyX + 50 ;
	local enemyHealthY1 = enemyY - 70 ;
	local enemyHealthY2 = enemyY - 60 ;
	
	addDialogue( ) ;
	setTutText( getString( "mt4d12" ) ) ;
	setTutMinSize( 300, 170 ) ;
	setTutHasOkButton( true ) ;
	setCustomSpriteCircle( enemyHealthX1, enemyHealthY1, enemyHealthX2, enemyHealthY2 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
		
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_fight1repeatclick( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt4d12_5" ) ) ;
	setTutMinSize( 300, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 250, 200 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_useointment( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	
	if ( par1 == 1 ) then
		-- first ointment tutorial
		setTutText( getString( "mt4d13" ) ) ;
	elseif ( par1 == 2 ) then
		-- second ointment tutorial
		setTutText( getString( "mt4d13_5" ) ) ;
	end
	setTutMinSize( 350, 180 ) ;
	setAllowButton( "ointment" ) ;
	setCircleOpenCorner( "bottomright" ) ;
	setCircleColour( "bright" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_useointmentnohealth( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	freezeGame( ) ;
		
	addDialogue( ) ;
	setTutText( getString( "ointmentnohealth" ) ) ;
	setTutMinSize( 350, 180 ) ;
	setAllowButton( "ointment" ) ;
	setCircleOpenCorner( "bottomright" ) ;
	setCircleColour( "bright" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	unfreezeGame( ) ;
				
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_searchbarrel( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	setTutText( getString( "mt5d1" ) ) ;
	setTutMinSize( 300, 160 ) ;
	setAllowClickObjectClick( par1 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_pickupointment( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	setTutText( getString( "mt5d2" ) ) ;
	setTutMinSize( 300, 160 ) ;
	setAllowPickUpClick( "tut_barrel_ointment" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_searchchest( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	setTutText( getString( "mt6d1" ) ) ;
	setTutMinSize( 300, 170 ) ;
	setAllowClickObjectClick( par1 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_inventory( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt6d3" ) ) ;
	setTutMinSize( 300, 150 ) ;
	setAllowButton( "inventory" ) ;
	tutManualPlacement( 10, 390 ) ;
	--tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt6d4" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 20 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt6d5" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 500, 110, 745, 310 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	-- find some gloves that aren't equipped
	local glovesX, glovesY = getIndexOfItemType( "gloves_poor_1" ) ;
	if ( not ( glovesX == -1 ) and not ( glovesY == -1 ) ) then
		addDialogue( ) ;
		setTutText( getString( "mt6d6" ) ) ;
		setTutMinSize( 220, 200 ) ;
		setAllowInvItemClick( glovesX, glovesY ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
		
		addDialogue( ) ;
		setTutText( getString( "mt6d7" ) ) ;
		setTutMinSize( 350, 200 ) ;
		setTutHasOkButton( true ) ;
		setCustomCircle( 500, 110, 745, 310 ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
		
		addDialogue( ) ;
		setTutText( getString( "mt6d8" ) ) ;
		setTutMinSize( 220, 100 ) ;
		setAllowButton( "equipbutton" ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
		
		local glovesPosX, glovesPosY = getInventoryItemPos( glovesX, glovesY ) ;
		local eX1 = glovesPosX + 15 ;
		local eY1 = glovesPosY + 15 ;
		local eX2 = eX1 + 17 ;
		local eY2 = eY1 + 17 ;
		addDialogue( ) ;
		setTutText( getString( "mt6d9" ) ) ;
		setTutMinSize( 300, 160 ) ;
		setTutHasOkButton( true ) ;
		setCustomCircle( eX1, eY1, eX2, eY2 ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
		
		addDialogue( ) ;
		setTutText( getString( "mt6d10" ) ) ;
		setTutMinSize( 200, 100 ) ;
		setAllowButton( "inventoryok" ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
	end
	
		
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_monksuperlunge1( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt7d6_5" ) ) ;
	setTutMinSize( 375, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_monksuperlunge2( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt7d6_6" ) ) ;
	setTutMinSize( 300, 100 ) ;
	setAllowCharacterClick( gTutAttackEnemyName ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
		
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_monksuperlunge3( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt7d6_7" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_worldmap( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "mt7d10" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowButton( "map" ) ;
	--tutAutoPlacement( ) ;
	tutManualPlacement( 10, 430 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mt7d10_5" ) ) ;
	setTutMinSize( 250, 220 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 540, 370 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_superlunge1( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mp11tut1" ) ) ;
	setTutMinSize( 375, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_superlunge2( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mp11tut2" ) ) ;
	setTutMinSize( 300, 100 ) ;
	setAllowCharacterClick( gTutAttackEnemyName ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
		
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_superlunge3( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mp11tut3" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_bernrepeatclick( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mp11tut4" ) ) ;
	setTutMinSize( 300, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 250, 200 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_bernperspagain( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "mp11tut5" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 225, 200 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end


function tutorial_firearm( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now

	loadRanged( ) ;
	
	-- select gun
	if ( not isRangedSelected( ) ) then
		addDialogue( ) ;
		setTutText( getString( "mp18d4" ) ) ;
		setTutMinSize( 350, 200 ) ;
		setAllowButton( "ranged" ) ;
		setCustomCircle( 705, 554, 792, 585 ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
	else
		addDialogue( ) ;
		setTutText( getString( "mp18d3" ) ) ;
		setTutMinSize( 350, 200 ) ;
		setTutHasOkButton( true ) ;
		setCustomCircle( 705, 554, 792, 585 ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
	end	

	-- fire gun
	addDialogue( ) ;
	setTutText( getString( "mp18d5" ) ) ;
	setTutMinSize( 300, 100 ) ;
	setAllowCharacterClick( gTutAttackEnemyName ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;

	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_reloadfirearm( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now

	-- explain to player that gun needs to reload
	addDialogue( ) ;
	setTutText( getString( "mp18d6" ) ) ;
	setTutMinSize( 350, 200 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 745, 554, 792, 585 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
		
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_sidequestachieve( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "sidequestexplanation1" ) ) ;
	setTutMinSize( 350, 240 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 436, 215, 719, 350 ) ;
	--tutManualPlacement( 10, 165 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;

	if ( getUpsellSecondGame( ) ) then
		addDialogue( ) ;
		setTutText( getString( "sidequestexplanation2" ) ) ;
		setTutMinSize( 350, 240 ) ;
		setTutHasOkButton( true ) ;
		setCustomCircle( 436, 215, 719, 350 ) ;
		--tutManualPlacement( 10, 165 ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
	end
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_beatgameachieve( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "beatgameexplanation" ) ) ;
	setTutMinSize( 350, 240 ) ;
	setTutHasOkButton( true ) ;
	setCustomCircle( 668, 281, 722, 347 ) ;
	--tutManualPlacement( 10, 165 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_choosepart2tut( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	local width = 400 ;
	local height = 200 ;
		
	addDialogue( ) ;
	setTutText( getString( "choosepart2tut_1" ) ) ;
	setTutMinSize( width, height ) ;
	setTutHasYesNoButton( true ) ;
	tutManualPlacement( ( 800 - width ) / 2, ( 600 - height ) / 2 ) ;
	waitForDidTutorialAllowedAction( ) ;
	local yesClicked = tutGetYesClicked( ) ;
	gChoosePart2TutYes = yesClicked ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_followpathpart2( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "followpathpart2" ) ) ;
	setTutMinSize( 300, 175 ) ;
	setTutHasOkButton( true ) ;
	tutManualPlacement( 220, 320 ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_stcloudgodownstairs( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "godownstairs" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowDoorClick( "stcloudhouseaup" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_stcloudgooutside( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "gooutdoor" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowDoorClick( "stcloudhouseain" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_talktostcloudcharacter( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "clicktotalk" ) ) ;
	setTutMinSize( 250, 100 ) ;
	setAllowCharacterClick( "stcloudman2" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_stcloudclickbubbleoption1( name, bubbleId )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "stcloudtutbubbleoption1" ) ) ;
	setTutMinSize( 250, 120 ) ;
	setAllowBubbleClick( bubbleId ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_stcloudclickbubbleoption2( name, bubbleId )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	addDialogue( ) ;
	setTutText( getString( "stcloudtutbubbleoption2" ) ) ;
	setTutMinSize( 250, 120 ) ;
	setAllowBubbleClick( bubbleId ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_searchcrate( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	setTutText( getString( "tut1_searchcrate" ) ) ;
	setTutMinSize( 300, 160 ) ;
	setAllowClickObjectClick( par1 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_cratepickupointment( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	setTutText( getString( "mt5d2" ) ) ;
	setTutMinSize( 300, 160 ) ;
	setAllowPickUpClick( "tut_crate_ointment_1" ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_searchbarrel_tut1( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
		
	addDialogue( ) ;
	setTutText( getString( "tut1_searchbarrel" ) ) ;
	setTutMinSize( 300, 170 ) ;
	setAllowClickObjectClick( par1 ) ;
	tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
			
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end

function tutorial_inventorypistol( name, par1 )
	DEBUG_OUTPUT( "tutorial " .. name .. " started" ) ;
	
	setStateMessageIdle( "dartagnan" ) ; -- stop from doing whatever we are doing right now
	
	addDialogue( ) ;
	setTutText( getString( "tut1_pistolequip1" ) ) ;
	setTutMinSize( 300, 150 ) ;
	setAllowButton( "inventory" ) ;
	tutManualPlacement( 10, 390 ) ;
	--tutAutoPlacement( ) ;
	waitForDidTutorialAllowedAction( ) ;
	removeDialogue( ) ;
	
	-- find some gloves that aren't equipped
	local pistolX, pistolY = getIndexOfItemType( "pistol_wheellock_1" ) ;
	if ( not ( pistolX == -1 ) and not ( pistolY == -1 ) ) then
		addDialogue( ) ;
		setTutText( getString( "tut1_pistolequip2" ) ) ;
		setTutMinSize( 220, 200 ) ;
		setAllowInvItemClick( pistolX, pistolY ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
				
		addDialogue( ) ;
		setTutText( getString( "tut1_pistolequip3" ) ) ;
		setTutMinSize( 220, 100 ) ;
		setAllowButton( "equipbutton" ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
			
		addDialogue( ) ;
		setTutText( getString( "tut1_pistolequip4" ) ) ;
		setTutMinSize( 200, 100 ) ;
		setAllowButton( "inventoryok" ) ;
		tutAutoPlacement( ) ;
		waitForDidTutorialAllowedAction( ) ;
		removeDialogue( ) ;
	end
	
		
	DEBUG_OUTPUT( "tutorial " .. name .. " done" ) ;
end