Is it possible to change the default portraits?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Is it possible to change the default portraits?

Post by fazzasx »

Hi Everyone..

I wanted to ask if its possible to change the built in default portraits to your own ones?

I want to create a mod that uses its own portraits and whilst I can use SDP to setup a default party. If I want to choose a custom party it seems I only can choose whats there by default?

Can anyone advise how to change this?

I did have a good look around google and could not see anything but I might be looking in the wrong place?

Simon
Zastaph
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Is it possible to change the default portraits?

Post by THOM »

always a good place to seach is the scripting reference:

http://www.grimrock.net/modding/scripti ... /#Champion

The command you are looking for is
:setPortrait(filename)
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
maneus
Posts: 246
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: Is it possible to change the default portraits?

Post by maneus »

Make a script in your editor on a level with code:

Code: Select all

party:getChampion(1):setPortrait("mod_assets/textures/portraits/yourfilename.tga")
party:getChampion(2):setPortrait("mod_assets/textures/portraits/yourfilename.tga")
party:getChampion(3):setPortrait("mod_assets/textures/portraits/yourfilename.tga")
party:getChampion(4):setPortrait("mod_assets/textures/portraits/yourfilename.tga")
This will replace the original portraits with your custom portraits.
Make sure that you have save the custom portraits at the same path you have stated in the script.
The portraits must have a pixel size of 128x128 and must be saved as .dds file.
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Re: Is it possible to change the default portraits?

Post by fazzasx »

Thanks for this guys,

I was asking really if its possible to have custom portraits and skills etc pre-defined before the game starts?

For example when you load LOG and you select custom dungeon, you then have the option to customise the characters. But all I can see then is the default portraits that are 'inbuilt' I would like to see if possible the ones I created?

If that's not possible, then could you theoretically start the game with one champion and somehow recruit the ones through some framework / gui mechanism or something? I saw that Back to the Dungeon, DM remake had this but the panels look very custom made to me. Having some kind of portrait area where you can pick and choose would be perfect.

If anyone knows where I can look to try this out do let me know :)

Simon
Zastaph
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Is it possible to change the default portraits?

Post by minmay »

fazzasx wrote:Thanks for this guys,

I was asking really if its possible to have custom portraits and skills etc pre-defined before the game starts?

For example when you load LOG and you select custom dungeon, you then have the option to customise the characters. But all I can see then is the default portraits that are 'inbuilt' I would like to see if possible the ones I created?
not possible
fazzasx wrote:If that's not possible, then could you theoretically start the game with one champion and somehow recruit the ones through some framework / gui mechanism or something? I saw that Back to the Dungeon, DM remake had this but the panels look very custom made to me. Having some kind of portrait area where you can pick and choose would be perfect.
Take a look at The Sunset Gate, it has something very close to what you're describing, although it's buggy (you'll want to incorporate this to prevent players from carrying over skill bonuses/traits that they shouldn't).
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
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Is it possible to change the default portraits?

Post by Dr.Disaster »

fazzasx wrote:For example when you load LOG and you select custom dungeon, you then have the option to customise the characters. But all I can see then is the default portraits that are 'inbuilt' I would like to see if possible the ones I created?
That won't work with the buildin customize GUI. Nevertheless you could make your own, similar to The Sunset Gate mod minmay mentioned.
User avatar
fazzasx
Posts: 104
Joined: Mon May 27, 2013 12:35 am

Re: Is it possible to change the default portraits?

Post by fazzasx »

Thanks all for the replies to this. I will try to package it all together and see how it goes :)
Zastaph
Post Reply