How do I create a game with only one champion?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

How do I create a game with only one champion?

Post by WaspUK1966 »

I`m thinking of doing a game (sort of a survival type thing). But I only want one playable character in the game, who has some predefined skills, level etc, not a whole party of 4. How can I do this, so that when the game is loaded the player only has the one character available on the character-select screen, but can choose between male or female? Do I need to put something in the scripts/init file so that it overrides Grimrock`s default character screen? Any help greatly appreciated.
Cheers
George
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: How do I create a game with only one champion?

Post by Dr.Disaster »

If you want to play a mod with less then 4 characters you got two options:
1) use a mod like "The Characterizer" to enable/disable single characters
2) use the console to enable/disable single characters with the Champion:setEnabled() command

If you want to play the main campaign with less then 4 characters you have to resort to the console.

EDIT
Oh you ment as a mod preset! I understood you wanted to play a game with less then a full party.
Nevermind then, Sutekh gave the right answer.
Last edited by Dr.Disaster on Tue Nov 18, 2014 5:20 pm, edited 1 time in total.
User avatar
Sutekh
Posts: 126
Joined: Sun Nov 25, 2012 9:58 am
Location: UK

Re: How do I create a game with only one champion?

Post by Sutekh »

Place a script in your mod and enter the following:

Code: Select all

for i = 2,4 do
party:getChampion(i):setEnabled(false)
end
Hope this helps. ;)
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Re: How do I create a game with only one champion?

Post by WaspUK1966 »

Thanks for that. Just one problem:

If I put the script in the mod, then yes, once the game screen shows you only have one character to use. However, the shadow of the other character icons that would normally be there still show on the screen (looks rather unprofessional). Any way of getting rid of these?
Also, when you load the game for the first time, and come to the character select screen , If you stick with the default characters and just click continue, then everything is fine (apart from the bug I mentioned above). However, if you select custom characters, then the game lets you choose all 4 characters, giving them all their traits etc. It`s only when you actually enter the game you are left with just the first character (as planned). Again, not very professional. Anyway of either :
1) overriding this, so that on the character select screen you can only alter the attributes of a single character (not the other 3)?
2) Bypassing the character-select screen entirely when playing the game for the first time (ie having a predefined character already set up in a script with its own name, skills, etc) so that the player has to use this custom character in game?
Can`t figure it out.
Help always appreciated
George
minmay
Posts: 2770
Joined: Mon Sep 23, 2013 2:24 am

Re: How do I create a game with only one champion?

Post by minmay »

WaspUK1966 wrote:If I put the script in the mod, then yes, once the game screen shows you only have one character to use. However, the shadow of the other character icons that would normally be there still show on the screen (looks rather unprofessional). Any way of getting rid of these?
No.
WaspUK1966 wrote:Anyway of either :
1) overriding this, so that on the character select screen you can only alter the attributes of a single character (not the other 3)?
2) Bypassing the character-select screen entirely when playing the game for the first time (ie having a predefined character already set up in a script with its own name, skills, etc) so that the player has to use this custom character in game?
1) No.
2) No.
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.
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Re: How do I create a game with only one champion?

Post by WaspUK1966 »

Thanks for the prompt reply. Pity. I assume, then, that the character select screen is hard-coded, and unable to change? I`ll try and think of a way round it. Maybe I can have the game exported with a save game included (if poss) for the start of the level, so that the player doesn't use the character-screen at all when first playing, and just clicks "load" or something...I`ll think on that. Once again, thanks for being so helpful

George
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: How do I create a game with only one champion?

Post by Dr.Disaster »

WaspUK1966 wrote:Thanks for the prompt reply. Pity. I assume, then, that the character select screen is hard-coded, and unable to change? I`ll try and think of a way round it.
There is no need to. Just give the player a heads up in the description that your mod uses a pre-defined character and it's pointless to create characters. Then on mod start run your character script early to overrides anything a player might have entered for his party. Several mods already do this like Skugg's "The Elder of Murwynd Woods".
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Re: How do I create a game with only one champion?

Post by WaspUK1966 »

yeh, I was thinking about doing that. Basically, I`m trying to do a sequel to my game "Ogre". Ive set my script up so only one character is enabled upon start. I've even changed his name by using the setName function. But I've tried to give him other starting abilities, such as Level, Armor, Class etc using other functions such as setClass and so on, but keep getting error messages. Nothing works. Any advice on how I can code this?
George
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: How do I create a game with only one champion?

Post by Dr.Disaster »

The LoG1 modding reference is pretty precide in that part. Got some code to show what fails to work?
User avatar
WaspUK1966
Posts: 135
Joined: Sat Aug 09, 2014 9:17 am

Re: How do I create a game with only one champion?

Post by WaspUK1966 »

Thanks again. Basically, code goes something like this:

party:getChampion(1):setName("Prince Urdril")
party:getChampion(1):setSex("male")
party:getChampion(1):setClass("Fighter")
party:getChampion(1):setPortrait("assets/textures/portraits/human_male_02.tga")
for i = 2,4 do
party:getChampion(i):setEnabled(false)
end

This gives my working character a name, class, sex, portrait, and disables the other characters. But I also want him to start with modified stats/skills, such as Level, Armor etc. without the "Level UP" or other messages appearing on screen when the game first starts, e.g. "X has gained +5 health" (which is what I get when I use commands such as trainSkill to modify the abilities). Any ideas?
Thanks
George
Post Reply