Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
As I understand it, exits are hardcoded to spawn the party to the adjacent map of the exit.
It is possible to simply put an invisible teleporter (or a floor_trigger to a custom function) at the point of arrival, to have the party appear somewhere else.
It is possible to simply put an invisible teleporter (or a floor_trigger to a custom function) at the point of arrival, to have the party appear somewhere else.
Re: Ask a simple question, get a simple answer
Yeah, but it comes with a lot of drawbacks.
Lostsol provided me with his fadeout/fadein script for doors that i can use for the same purpose to make my multiportal design.
So it's solved.
Lostsol provided me with his fadeout/fadein script for doors that i can use for the same purpose to make my multiportal design.
So it's solved.
Re: Ask a simple question, get a simple answer
Where do I find the gfxIndex of log2 list (default assets)
For example if I want to know the gfxIndex number of the hardstone bracelet
edit: found it
print(spawn("tome_wisdom").item:getGfxIndex());
For example if I want to know the gfxIndex number of the hardstone bracelet
edit: found it
print(spawn("tome_wisdom").item:getGfxIndex());
Re: Ask a simple question, get a simple answer
1)How can I make monsters incorporeal so that the party can safely walk through them? Would be nice to be able create g-g-g-ghosts.
Also, why is it that the party can sometimes walk onto the tile of a monster that is placed in the editor and its "turn" and "move" components unmarked. Is it "trying" to move and the reason why the engine allows the party to move there?!
2) Is it possible to move a monster to a specific position as if it were teleported? Something along the lines of monster_1.monster:setPosition(1,2,3,4,5) or some such?! I assume correctly that this could work for all items/obstacles then?
Also, why is it that the party can sometimes walk onto the tile of a monster that is placed in the editor and its "turn" and "move" components unmarked. Is it "trying" to move and the reason why the engine allows the party to move there?!
2) Is it possible to move a monster to a specific position as if it were teleported? Something along the lines of monster_1.monster:setPosition(1,2,3,4,5) or some such?! I assume correctly that this could work for all items/obstacles then?
Re: Ask a simple question, get a simple answer
Code: Select all
zarchton_1.monster:setMonsterFlag("Collides", false)
zarchton_1.monster:setMonsterFlag("NonMaterial", true)
zarchton_1.dynamicObstacle:disable()
Same as any other object.Is it possible to move a monster to a specific position as if it were teleported? Something along the lines of monster_1.monster:setPosition(1,2,3,4,5) or some such?!
Code: Select all
zarchton_1:setPosition(15,15,2,0,1) --places zarchton_1 centered on the map, facing South.
Grimrock 2 asset_pack\assets\textures\gui\textures\
items.dds
items_2.dds
items_3.dds
Index zero starts at top left; index 12 at the top right.
Re: Ask a simple question, get a simple answer
I want to create magical staffs with secondary actions without a charge buildup so that they fire instantly when you rightclick them.
In this case I gave the staff of manar from dm pack a lightning bolt function as it looks a bit like a lightning rod.
I tried buildup = 0, but that doesn't work as it will produce a message: not enough energy, which is not the case.
I looked for the "weapon of power" in the g1 pack, it's some sort of gun that instantly fires a lightning projectile, but I can't find the object in the files to check for the code used.
In this case I gave the staff of manar from dm pack a lightning bolt function as it looks a bit like a lightning rod.
I tried buildup = 0, but that doesn't work as it will produce a message: not enough energy, which is not the case.
I looked for the "weapon of power" in the g1 pack, it's some sort of gun that instantly fires a lightning projectile, but I can't find the object in the files to check for the code used.
Code: Select all
defineObject{
name = "dm_staff_of_manar",
baseObject = "base_dm_item",
components = {
{
class = "Model",
model = "mod_assets/dmcsb_pack/models/items/dm_staff_of_manar.fbx",
},
{
class = "Item",
uiName = "Staff of Manar",
description = "An ancient magical staff.",
gfxAtlas = "mod_assets/dmcsb_pack/textures/gui/dm_icoatlas.tga",
gfxIndex = 71,
gfxIndexPowerAttack = 150,
impactSound = "impact_blunt",
weight = 2.9,
secondaryAction = "Lightning",
},
{
class = "EquipmentItem",
slot = "Weapon",
willpower = 2,
energy = 25,
},
{
class = "CastSpell",
name = "Lightning",
uiName = "Lightning Bolt",
gameEffect = "Conjures a Lightning Bolt",
cooldown = 5,
spell = "lightning_bolt",
energyCost = 25,
power = 3,
requirements = { "concentration", 1 },
},
},
}
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
This works:Pompidom wrote: ↑Fri Sep 06, 2019 11:37 am I want to create magical staffs with secondary actions without a charge buildup so that they fire instantly when you rightclick them.
In this case I gave the staff of manar from dm pack a lightning bolt function as it looks a bit like a lightning rod.
I tried buildup = 0, but that doesn't work as it will produce a message: not enough energy, which is not the case.
I looked for the "weapon of power" in the g1 pack, it's some sort of gun that instantly fires a lightning projectile, but I can't find the object in the files to check for the code used.
Code: Select all
defineObject{ name = "dm_staff_of_manar", baseObject = "base_dm_item", components = { { class = "Model", model = "mod_assets/dmcsb_pack/models/items/dm_staff_of_manar.fbx", }, { class = "Item", uiName = "Staff of Manar", description = "An ancient magical staff.", gfxAtlas = "mod_assets/dmcsb_pack/textures/gui/dm_icoatlas.tga", gfxIndex = 71, gfxIndexPowerAttack = 150, impactSound = "impact_blunt", weight = 2.9, secondaryAction = "Lightning", }, { class = "EquipmentItem", slot = "Weapon", willpower = 2, energy = 25, }, { class = "CastSpell", name = "Lightning", uiName = "Lightning Bolt", gameEffect = "Conjures a Lightning Bolt", cooldown = 5, spell = "lightning_bolt", energyCost = 25, power = 3, requirements = { "concentration", 1 }, }, }, }
buildup = 0.1
This, too:
buildup = 0.01
But this will just show "Out of energy":
buildup = 0.001
It's fast, but not immediate.
If you want truly immediate secondary actions, maybe try PartyComponent.onClickItemSlot(self, champion, container, slot, button)
Re: Ask a simple question, get a simple answer
Thanks, what would I have to use in a monster lua, though? No variation of the above seems to work.Isaac wrote: ↑Fri Sep 06, 2019 6:43 amCode: Select all
zarchton_1.monster:setMonsterFlag("Collides", false) zarchton_1.monster:setMonsterFlag("NonMaterial", true) zarchton_1.dynamicObstacle:disable()
Re: Ask a simple question, get a simple answer
If you mean in the definition... then you would put it in an onInit function, and use the self.go variable prefix.
Code: Select all
defineObject{
name = "ghost_elemental",
baseObject = "ice_guardian",
components = {
{
class = "Null",
onInit = function(self)
self.go.monster:setMonsterFlag("Collides", false)
self.go.monster:setMonsterFlag("NonMaterial", true)
self.go.dynamicObstacle:disable()
end,
}
}
}
Re: Ask a simple question, get a simple answer
Would it be simple to detach elemental resistances from their corresponding stats?
+2 elemental resistance for each point of strength/vitality/dexterity/willpower for example leads quickly to 100% resists in my mod.
I know Magic of grimrock toned it down by 1 % increase for each stat. That should be acceptable as well.
+2 elemental resistance for each point of strength/vitality/dexterity/willpower for example leads quickly to 100% resists in my mod.
I know Magic of grimrock toned it down by 1 % increase for each stat. That should be acceptable as well.