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!

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

Postby Skuggasveinn » Wed Feb 25, 2015 1:32 pm

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 assets on Nexus like the Town Tileset, Water Fountains, Extra Lanters Pack, Yuleland, Secret Doors Extra, Flooded Dungeon and Skeletons Impaled pack.
User avatar
Skuggasveinn
 
Posts: 517
Joined: Wed Sep 26, 2012 5:28 pm

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

Postby Ciccipicci » Wed Feb 25, 2015 1:45 pm

Petri I think you 3 ideas are very useful. Any way to have a "mine_underwater" tile?
User avatar
Ciccipicci
 
Posts: 154
Joined: Mon Oct 08, 2012 12:55 am

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

Postby petri » Wed Feb 25, 2015 1:54 pm

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
petri
 
Posts: 1888
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

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

Postby JohnWordsworth » Wed Feb 25, 2015 2:02 pm

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
JohnWordsworth
 
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom

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

Postby Ciccipicci » Wed Feb 25, 2015 2:03 pm

Well... I'm a noob in scripting and definition XD
User avatar
Ciccipicci
 
Posts: 154
Joined: Mon Oct 08, 2012 12:55 am

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

Postby petri » Wed Feb 25, 2015 2:08 pm

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
petri
 
Posts: 1888
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

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

Postby THOM » Wed Feb 25, 2015 2:08 pm

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
THOM
 
Posts: 887
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne

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

Postby JohnWordsworth » Wed Feb 25, 2015 2:15 pm

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: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom

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

Postby JohnWordsworth » Wed Feb 25, 2015 2:20 pm

@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
JohnWordsworth
 
Posts: 1387
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom

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

Postby petri » Wed Feb 25, 2015 2:33 pm

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
User avatar
petri
 
Posts: 1888
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

PreviousNext

Return to Mod Creation

Who is online

Users browsing this forum: Google [Bot] and 2 guests