My mod is going to start off as a single player mod (you will be able to recruit followers later ), so I want a script that removes all party members except one, in case the player forgets or just decides to use more than one.
Secondly, I have made a custom skill called 'looting' that supposedly changes the quantity and quality of the loot you receive, but I don't know how I would do this.
Thanks for any help!
How to remove party members, and how to change loot based on skill?
Re: How to remove party members, and how to change loot based on skill?
A few questions:
- How do you plan to add PCs later?
- Does your mod use GrimTK?
- How should the mod handle multiple PC?—just delete at random? Delete after the first? Store their extra PCs for later recruitment?
Re: How to remove party members, and how to change loot based on skill?
Yes.Does your mod use GrimTK?
I haven't planned it all out yet, but it will probably be a mercenary or something in a tavern, and one of the dialogue options(using GrimTK), will be to hire them for a certain amount of money, depending on there starting level. I will probably modify the toorum script from MinAssets.How do you plan to add PCs later?
I will probably add them to the party with an item that when used opens a GrimTK dialogue page with a few options, one of them being to fire them, which will remove them from the party and re-enable the model and dialogue of them back at the tavern, in case the player wants them back.How should the mod handle multiple PC?—just delete at random? Delete after the first? Store their extra PCs for later recruitment?
Sorry I don't know much about scripting at all- how would I do this?As for the loot... If you create a loot table to dynamically spawn loot, you can use the skill level to select from higher and lower quality loot. Alternatively (and I think perhaps better), you can use the skill to modify new loot when it is first picked up, or acquired. For example, if the player finds a common dagger, the dagger could be examined on the mouse cursor, or when added into inventory, then destroyed, with the improved item immediately spawned as replacement.
edit- I am also trying to make something like the ratling_warg_pair, except with a zarchton and a spider. In the game it walks around fine, but after one attack they both stop moving and don't attack, but the animation for both still plays. Is there an easy way to make this work?
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
Re: How to remove party members, and how to change loot based on skill?
In this case, I meant technically (in Lua script) how you intend to add them.Sorry I don't know much about scripting at all-
The Zarchton has a leap-attack and backward evasion, the spider doesn't. This causes a few problems; the first with the dynamicObstacle component, the second is because the two monsters can end up on separate tiles if (when) the Zarchton dodges the player—but the two would still behave like they are on the same tile.edit- I am also trying to make something like the ratling_warg_pair, except with a zarchton and a spider. In the game it walks around fine, but after one attack they both stop moving and don't attack, but the animation for both still plays. Is there an easy way to make this work?
Here is a drop-in replacement for the paired group.
Code: Select all
defineObject{
name = "paired_spider",
baseObject = "spider",
components = {
{
class = "Monster",
meshName = "spider_mesh",
hitSound = "spider_hit",
dieSound = "spider_die",
hitEffect = "hit_goo",
capsuleHeight = 0.2,
capsuleRadius = 0.8,
health = 450,
exp = 225,
traits = { "animal" },
onInit --This replaces the Zarchton's custom brain with a generic one. This prevents the leap attacks and evasion.
= function(self) for obj in self.go.map:entitiesAt(self.go.x, self.go.y) do
if obj.brain and not obj.id == self.go.id then
obj:removeComponent('brain')
obj:createComponent('MeleeBrain', 'brain')
end
end
end,
onDie -- This restores the Zarchton's custom brain once the spider dies, and there is no longer a group.
= function(self) for obj in self.go.map:entitiesAt(self.go.x, self.go.y) do
if obj and obj.name == 'zarchton' then
obj:removeComponent('brain')
obj:createComponent('ZarchtonBrain', 'brain')
end
end
end,
},
},
}
defineObject{
name = "zarchton_spider_pair",
baseObject = "base_monster_group",
components = {
{
class = "MonsterGroup",
monsterType = {"paired_spider","zarchton"},
count = 2,
},
},
}
Re: How to remove party members, and how to change loot based on skill?
Hello Ratman
I don't know if there is a way to remove party members, but you can use champion:setEnabled() function in a script to disable them. That's how I did in my last mod (with a floortrigger to the script). For instance, this disable all the champs but the first one:
Code: Select all
function disablechamps()
for i =2,4 do
party.party:getChampion(i):setEnabled(false)
end
Cheers
Khollik
Re: How to remove party members, and how to change loot based on skill?
@ Khollik: Thanks, this will also be helpful for recruiting party members, instead of creating a character I can just modify the one already there.
@ Isaac: Thanks, your version of the zarchton/spider works.
@ Isaac: Thanks, your version of the zarchton/spider works.
Like I said above, I will probably edit Minmays toorum mode.In this case, I meant technically (in Lua script) how you intend to add them.
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699