Mystery Topic Revealed: Glögg Session Part 3!

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Skuggasveinn
Posts: 561
Joined: Wed Sep 26, 2012 5:28 pm

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by Skuggasveinn »

Great to see the Glögg sessions back :D

Is there a way to have cooldown on other classes like buttons, or clickable ?
The reason I ask is because making something clickable like a custom door ( https://www.youtube.com/watch?v=n-kLWXLWKfA , just shows the door, not the problem ) the player can rapidly click the door making it jump from close to open to close animation making it look weird (perhaps there is another way of preventing this that I'm not seeing atm)

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Ciccipicci
Posts: 154
Joined: Mon Oct 08, 2012 12:55 am

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by Ciccipicci »

Petri I think you 3 ideas are very useful. Any way to have a "mine_underwater" tile?
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

Ciccipicci wrote:Any way to have a "mine_underwater" tile?
Hi! This should not require adding any new features to the engine -- I think you can already do this with defineTile() ?
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by JohnWordsworth »

Re: Global Flags / GameMode additions... Great ideas. Some more...

1. Disable Party / Keyboard Input (prevent the user from moving and resting etc without having to abuse the party hooks). Basically "StartCutsceneMode" or something.
2. Disable Right Click for Viewing (as it hides the current GUI), OR allow onDrawGui during right click.
3. SetTimeScale to scale dt? (Not sure if it's useful to anyway, but I guess it might be really easy to implement?).

Will ponder for more useful ones!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Ciccipicci
Posts: 154
Joined: Mon Oct 08, 2012 12:55 am

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by Ciccipicci »

Well... I'm a noob in scripting and definition XD
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

Ooo, look what I just did :)

Code: Select all

defineObject{
	name = "party",
	baseObject = "party",
	components = {
		{
			class = "Party",
			onDrawAttackPanel = function(self, champion, g, x, y, scaleX, scaleY, translationX, translationY)
				g.scale(scaleX, scaleY)
				g.translate(translationX, translationY)
				g.color(30,200,30,150)
				local mx,my = g.inverseTransformPoint(g.mouseX, g.mouseY)
				local w,h = 30,20
				if mx >= x and my >= y and mx < x+w and my < y+h then
					g.color(200,200,200,150)
				end
				g.drawRect(x, y, w, h)
				return false
			end,
		},
	},
}
User avatar
THOM
Posts: 1266
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by THOM »

Ciccipicci wrote:Well... I'm a noob in scripting and definition XD
add to "tile" definitionfile:

Code: Select all

defineTile{
	name = "mine_floor_water",
	editorIcon = 112,
	color = {35,85,150,255},
	builder = "dungeon",
	floor = {
		"mine_floor_01", 1,
	},
	ceiling = {
		"mine_ceiling_01", 50,
		"mine_ceiling_02", 50,
	},
	wall = {
		"mine_elevation_edge", 1,
	},
	pillar = {
		"dungeon_pillar", 1,
	},
	underwater = true,
	ceilingEdgeVariations = true,
	ceilingShaft = "mine_ceiling_shaft",
	automapTile = "water",
}
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by JohnWordsworth »

Oooh, while we're talking GUI (so sorry for the scatty messages, busy at work today)...

I would love to disable pressing 1, 2 etc to toggle the Champion UI. It really messes with the Text Input in my GUI toolkit!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by JohnWordsworth »

@petri. Epic! Now I can implement this idea...
Image
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

More GUI goodies:

drawGuiItem(item, x, y)
drawGuiItem2(item, x, y, srcX, srcY, srcWidth, srcHeight, width, height)

where item can be one of the following:

Code: Select all

AbilityMinusDown
AbilityMinusHover
AbilityMinusUp
AbilityPlusDown
AbilityPlusHover
AbilityPlusUp
AccuracySymbol
AttackFrame
AttackFrameBarBackground
AttackFrameBarBackgroundShort
AttackFrameConditionRect
AttackFrameDisabled
AttackFrameEnergy
AttackFrameEnergyShort
AttackFrameHealthGreen
AttackFrameHealthGreenShort
AttackFrameHealthRed
AttackFrameHealthRedShort
AttackFrameHealthYellow
AttackFrameHealthYellowShort
AttackFrameItemSlot
AttackFramePortraitRect
AttackFrameSelected1
AttackFrameSelected2
AttackFrameShield
AttackFrameSlotSpacing
AttackFrameSpacing
AttackPowerSymbol
Background
ButtonAccept
ButtonAcceptDisabled
ButtonAcceptHover
ButtonApply
ButtonApplyHover
ButtonCancel
ButtonCancelHover
ButtonChoose
ButtonChooseDisabled
ButtonChooseHover
ButtonClear
ButtonClearDisabled
ButtonClearHover
ButtonClose
ButtonCloseHover
ButtonDefaults
ButtonDefaultsHover
ButtonImport
ButtonImportDisabled
ButtonImportHover
ButtonKeyConfig
ButtonKeyConfigHover
ButtonNo
ButtonNoHover
ButtonSave
ButtonSaveHover
ButtonYes
ButtonYesHover
ChampionConditionOverlay
CharGenBackToMenu
CharGenBackToMenuHover
CharGenNameBox
CharGenPortraitSel128
CharGenPortraitSelBig
CharGenPortraitSelSmall
CharGenSkillMinusHover
CharGenSkillMinusImage
CharGenSkillPlusHover
CharGenSkillPlusImage
CharGenSkillSlot
CharGenSkillSlotHover
CharGenStartGame
CharGenStartGameDisabled
CharGenStartGameHover
CharSheet
CheckBox
CheckBoxChecked
CheckBoxCheckedHover
CheckBoxHover
ChooseDungeonBackground
ChooseDungeonDownload
ChooseDungeonDownloadHvr
ChooseDungeonUnsubscribe
ChooseDungeonUnsubscribeHvr
ChooseDungeonWorkshop
ChooseDungeonWorkshopHvr
ChoosePortraitDialog
CloseButtonHover
ComboBox
ComboBoxHover
ConfirmDialog
ContainerChest
ContainerSack
CraftPotionPanel
DamageSplash
DialogFrameCornerBottomLeft
DialogFrameCornerBottomRight
DialogFrameCornerTopLeft
DialogFrameCornerTopRight
DialogFrameSideBottom
DialogFrameSideLeft
DialogFrameSideRight
DialogFrameSideTop
DialogShadowCornerBottomLeft
DialogShadowCornerBottomRight
DialogShadowCornerTopLeft
DialogShadowCornerTopRight
DialogShadowSideBottom
DialogShadowSideLeft
DialogShadowSideRight
DialogShadowSideTop
EnterTextDialog
EquipmentSlots
ExpBar
ExpBarFrame
FoodBarFrame
FoodBarGreen
FoodBarRed
FoodBarYellow
GameOver
HandSlot1
HandSlot2
HandSlotHighlight1
HandSlotHighlight2
HitSplash
HitSplashLarge
HitSplashSmall
Injury
InjuryHand1
InjuryHand2
InjurySmall
InstructionsAttackPanel
InventoryTab
IslandMasterSymbol
KeyBindings
MapArrowLeft
MapArrowRight
MapButtonHover
MapClose
MapToolsBackground
MapToolsCenter
MapToolsCenterHover
MapToolsClose
MapToolsCloseHover
MapToolsCross
MapToolsCrossHover
MapToolsExclamation
MapToolsExclamationHover
MapToolsLevelDivider
MapToolsLevelDown
MapToolsLevelDownHover
MapToolsLevelUp
MapToolsLevelUpHover
MapToolsQuestion
MapToolsQuestionHover
MapToolsQuil
MapToolsQuilHover
MenuButtonHover
Moon
MovementArrowDown
MovementArrows
NewGame
NextChampionHover
PackSlotBgImage
PreviousChampionHover
QuickSwapButtonDown1
QuickSwapButtonDown2
QuickSwapButtonUp1
QuickSwapButtonUp2
RandomizeButton
RandomizeButtonHover
SaveGameBackground
SaveGameDeleteButton
SaveGameDeleteHover
SaveGamePortraitFrame
SaveGameSlot
SaveGameSlotHover
SaveGameTitleLoad
SaveGameTitleSave
Settings
SkillMinusImage
SkillPlusHover
SkillPlusImage
SkillSlots
SkillSlotsHighlight
SkillTick
SkillTickUpgrade
SkillTickUpgradeSelected
SkillsTab
SkillsTabHighlight
SkillsTabHighlightSel
SleepButtonHover
Slider
SliderKnob
SliderKnobHover
SmallFoodBarFrame
SmallFoodBarGreen
SmallFoodBarRed
SmallFoodBarYellow
SpellFizzle
SpellNoEnergy
SpellPanel
SpellPanelNoButtons
SpellRuneGlow
SpellRunes
SpellRunesGlow
Star
StatisticsDialog
StatsTab
Sun
TextButton
TextButtonHover
TextButtonLong
TextButtonLongHover
TraitSlot
TraitSlotHover
TraitSlotLong
TraitSlotLongHover
TraitsTab
UnarmedAttackBearLeft
UnarmedAttackBearRight
UnarmedAttackLeft
UnarmedAttackMageLeft
UnarmedAttackMageRight
UnarmedAttackRight
Post Reply