custom portaits in my mod
custom portaits in my mod
okay this is probably been answered before but.
if I make a mod, and at the beginning i script it to change the party into pretermined characters with specific stats and skill sets to for story reasons and then give them their own custom portraits that I made myself.
will those custom portraits be in there when i export the dungeon to steam workshop or the nexus when other people play it?
also, side question.
does the mod automatically take away all the items from an imported party or do I have to script that in?
if I make a mod, and at the beginning i script it to change the party into pretermined characters with specific stats and skill sets to for story reasons and then give them their own custom portraits that I made myself.
will those custom portraits be in there when i export the dungeon to steam workshop or the nexus when other people play it?
also, side question.
does the mod automatically take away all the items from an imported party or do I have to script that in?
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: custom portaits in my mod
They will (and need to) be in there, you just need to defined everything properly. Take a look at Germanny's tileset to see how the DM portraits got included there via "mod_assets/dmcsb_pack/scripts/hero_portraits.lua"
The "import character" funtcion in general strips all imported parties of their items. When you played a mod and the characters got items at the start they were specifically given to them by the mod maker.
The "import character" funtcion in general strips all imported parties of their items. When you played a mod and the characters got items at the start they were specifically given to them by the mod maker.
Re: custom portaits in my mod
err...those don't have anything to do with character portraitsDr.Disaster wrote:They will (and need to) be in there, you just need to defined everything properly. Take a look at Germanny's tileset to see how the DM portraits got included there via "mod_assets/dmcsb_pack/scripts/hero_portraits.lua"
they're for the pictures that you place on the walls like in this screenshot
you don't do anything special to "define" character portraits, you just pass the path of a texture to Champion:setPortrait()
as long as a file is somewhere in the mod_assets folder and ends with .dds, .lua, .model, .animation, .wav, .ogg, or .ivf, it will be exported into the .dat
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.
Re: custom portaits in my mod
aren't character portraits .tga files?minmay wrote:err...those don't have anything to do with character portraitsDr.Disaster wrote:They will (and need to) be in there, you just need to defined everything properly. Take a look at Germanny's tileset to see how the DM portraits got included there via "mod_assets/dmcsb_pack/scripts/hero_portraits.lua"
they're for the pictures that you place on the walls like in this screenshot
you don't do anything special to "define" character portraits, you just pass the path of a texture to Champion:setPortrait()
as long as a file is somewhere in the mod_assets folder and ends with .dds, .lua, .model, .animation, .wav, .ogg, or .ivf, it will be exported into the .dat
I created some custom portraits and converted them to tga files, and i can use them in my own game. but in my mod, when i redefine all the player characters, I want it to change their portraits to the ones I made and when I export the dungeon, i want the portraits to bein there for when other people play it.
I know that the normal command to set a character portrait is
Code: Select all
c:setPortrait('assets/textures/portraits/ratling_female_03.tga')
so couldn't I just go into my mod assets/textures and create a portraits folder and put the portraits in there?
so my code would look like this?
Code: Select all
c:setPortrait('mod_assets/textures/portraits/custom_laura_female_.tga')
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: custom portaits in my mod
oh should have thought about that extra usage of the DM portraits.minmay wrote:err...those don't have anything to do with character portraitsDr.Disaster wrote:They will (and need to) be in there, you just need to defined everything properly. Take a look at Germanny's tileset to see how the DM portraits got included there via "mod_assets/dmcsb_pack/scripts/hero_portraits.lua"
they're for the pictures that you place on the walls like in this screenshot
you don't do anything special to "define" character portraits, you just pass the path of a texture to Champion:setPortrait()
as long as a file is somewhere in the mod_assets folder and ends with .dds, .lua, .model, .animation, .wav, .ogg, or .ivf, it will be exported into the .dat
So placing the .tga files inside mod_assets structure and
Code: Select all
-- n has to be 1, 2, 3 or 4 to identify the champion
party:getChampion(n):setPortrait("mod_assets/textures/custom_portrait.tga")
Re: custom portaits in my mod
What I am aware you need define path to the picture file as for .tga (like "mod_assets/textures/custom_portrait.tga, which is correct) the picture itself should be actually saved in .DDS format (photoshop, Paint.Net and many other programs support this format). You can try if game will accept .tga format as well but not sure about it.FeMaiden wrote: aren't character portraits .tga files?
I dont know what you mean when you say i have to change the suffix of the portrait to either .dds, .lua, .model, .animation, .wav, .ogg, or .ivf,
edit: ok seeems 128 x 128 TGA should be fine, you need DDS for John GUI framework if you will be using it in the future.
Re: custom portaits in my mod
Drakkan wrote:What I am aware you need define path to the picture file as for .tga (like "mod_assets/textures/custom_portrait.tga, which is correct) the picture itself should be actually saved in .DDS format (photoshop, Paint.Net and many other programs support this format). You can try if game will accept .tga format as well but not sure about it.FeMaiden wrote: aren't character portraits .tga files?
I dont know what you mean when you say i have to change the suffix of the portrait to either .dds, .lua, .model, .animation, .wav, .ogg, or .ivf,
edit: ok seeems 128 x 128 TGA should be fine, you need DDS for John GUI framework if you will be using it in the future.
yes, to my understanding, I thought you were supposed to use 128x128 TGA format. which is what i have been using. and it has been working.
my question was whether or not the portraits will still remain connected to my mod after I export it.
like, if I write script in my mod to define the path to the portrait and change all the character portraits, the portrait is in my mod assets, then when somebody else plays it, the portraits will be there without them having to actually own the files?
and it's not just gonna crash them and say something like file not found?
I guess i'm making this more complicated than it has to be, again
Re: custom portaits in my mod
if you export the file, you export it with everything what is defined by you. Which means also any valid custom pictures, models, materials etc. When somebody is then playing your mod, he will have the exported file containing all these items.FeMaiden wrote: my question was whether or not the portraits will still remain connected to my mod after I export it.
like, if I write script in my mod to define the path to the portrait and change all the character portraits, the portrait is in my mod assets, then when somebody else plays it, the portraits will be there without them having to actually own the files? and it's not just gonna crash them and say something like file not found?
I guess i'm making this more complicated than it has to be, again
Re: custom portaits in my mod
okay.
just fyi, I'm not trying to start "that other" discussion here...
I'm not trying to take control away from the player.
I do not have anything against people that like to use imported characters.
however, this is more of a small side project while my bigger mod is on hold, and it is heavy on storytelling and changing the characters to a predetermined party is ncessary for my storyline.
I have seen other modders do it and i played their mods and enjoyed them.
and I took the time to make some rather off-beat custom portraits to lend more character to my mod.
just fyi, I'm not trying to start "that other" discussion here...
I'm not trying to take control away from the player.
I do not have anything against people that like to use imported characters.
however, this is more of a small side project while my bigger mod is on hold, and it is heavy on storytelling and changing the characters to a predetermined party is ncessary for my storyline.
I have seen other modders do it and i played their mods and enjoyed them.
and I took the time to make some rather off-beat custom portraits to lend more character to my mod.
Last edited by FeMaiden on Wed Oct 28, 2015 7:11 pm, edited 1 time in total.
Re: custom portaits in my mod
All of the image files ard DDS format [afaik], but for historical reasons they must be referenced as .tga in the scripts; the same holds true for custom model files. They are in AH's .model format, but in the scripts they are referenced as .fbx files.
If you are on Windows, you can use the free Paint.Net image editor to make and/or convert your TGAs to dds format. There is also a free dds format plugin for exporting from photoshop or gimp; it's from Nvidia, available on their website.
If you are on Windows, you can use the free Paint.Net image editor to make and/or convert your TGAs to dds format. There is also a free dds format plugin for exporting from photoshop or gimp; it's from Nvidia, available on their website.
Last edited by Isaac on Wed Oct 28, 2015 6:23 pm, edited 1 time in total.