Here's a guide to overwrite every property of a party member that can be overwritten. Make sure to do these in the order they are listed!
1. call cleanSetClass() in this script to remove all skills and skill bonuses and reset level to 1
2. remove all traits (other than the skill traits which were already removed in step 1) with Champion:removeTrait() (“aggressive”, “agile”, “athletic”, “aura”, “cold_resistant”, “evasive”, “fire_resistant”, “fist_fighter”, “head_hunter”, “healthy”, “lightning_speed”, “natural_armor”, “poison_resistant”, “skilled”, “strong_mind”, “tough”)
3. set all stats and stat maxes with Champion:setStat() and Champion:setStatMax() (health, energy, strength, dexterity, vitality, willpower, protection, evasion, resist_shock, resist_fire, resist_cold, resist_poison, resist_shock)
4. add any traits or skills you want
(you should be able to set the name, race, portrait, and sex any time that you want)
If you want to level up the champion but don't want the level up sound to play, you can simply redefine the "level_up" sound to be silence, and define the original level_up sound with some other name and play that in the party.onLevelUp hook.
The only thing you can't overwrite is the increased movement speed that the party gets from playing in Toorum mode.
How do I create a game with only one champion?
Re: How do I create a game with only one champion?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- WaspUK1966
- Posts: 135
- Joined: Sat Aug 09, 2014 9:17 am
Re: How do I create a game with only one champion?
Very informative script. Thanks for that. However, I just need a code that sets the characters starting level and skill levels (eg Level = 6, Armours = 4 etc). Anyone got one? Also, is it possible to change the set skills for your character, such adding fire magic ability etc to a fighter (so he`s a sort of Fighter/Mage character as In some old DD games?)
Once again, thanks again for all the help (I`ll get there one day!)
George
Once again, thanks again for all the help (I`ll get there one day!)
George
Re: How do I create a game with only one champion?
Use this for skills:
The number after party:getChampion is the champion number and the number after the skill name is the skill level.
Code: Select all
party:getChampion(1):trainSkill("athletics", 7, true)
party:getChampion(1):trainSkill("axes", 6, true)
party:getChampion(2):trainSkill("athletics", 9, true)
party:getChampion(2):trainSkill("maces", 7, true)
party:getChampion(3):trainSkill("assassination", 10, true)
party:getChampion(3):trainSkill("dodge", 9, true)
party:getChampion(4):trainSkill("ice_magic", 12, true)
party:getChampion(4):trainSkill("earth_magic", 11, true)
- WaspUK1966
- Posts: 135
- Joined: Sat Aug 09, 2014 9:17 am
Re: How do I create a game with only one champion?
Thanks for your trouble. Yeah, I know that by using trainSkill I can set the different skills (ie armor, swords etc). But I want the character to have a starting Experience Level that is higher than the level 1 you get when you start a game, and I cant figure out how to increase Level() to achieve this.
Also, is it possible to mix skills from different classes, or are the classes hard-coded? I mean, can a fighter class have some Mage abilities (such as Fire Magic) added, so that he becomes a fighter/mage type character as in the old DD games?
Once again, I appreciate the great help on here.
George
Also, is it possible to mix skills from different classes, or are the classes hard-coded? I mean, can a fighter class have some Mage abilities (such as Fire Magic) added, so that he becomes a fighter/mage type character as in the old DD games?
Once again, I appreciate the great help on here.
George
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: How do I create a game with only one champion?
WaspUK1966 wrote:But I want the character to have a starting Experience Level that is higher than the level 1 you get when you start a game, and I cant figure out how to increase Level() to achieve this.
There are two ways to do this. Champion:gainExp(amount) adds a specific amount of experience and Champion:levelUp() just levels a character up by once.
LoG1 classes are hardcoded so no mage abilities for fighters.WaspUK1966 wrote:Also, is it possible to mix skills from different classes, or are the classes hard-coded? I mean, can a fighter class have some Mage abilities (such as Fire Magic) added, so that he becomes a fighter/mage type character as in the old DD games?