Page 3 of 5

Re: Party modding ??: add skills and traits to party creatio

Posted: Mon Aug 10, 2015 10:19 am
by Falkenwrath
ok script working, but I still want the traits I add at creation to show up in the character sheet after the game starts. benefits there but its not listed.... not huge deal but it would be nice to have it on screen that you have the ability.

Re: Party modding ??: add skills and traits to party creatio

Posted: Wed Nov 04, 2015 12:42 am
by Zo Kath Ra
Isaac wrote:
akroma222 wrote:Isaac, is that a custom Naga race inventory background I see??? ;)
A quick one for the test, yes. ;)
(Both now flipped, so that bracelet/cuffs can be seen as tail accessories; and that the glove slot doesn't look crowded.)
SpoilerShow
Image
Their racial food is burrow rat shanks?

Re: Party modding ??: add skills and traits to party creatio

Posted: Wed Nov 04, 2015 12:51 am
by Isaac
Zo Kath Ra wrote:Their racial food is burrow rat shanks?
I dunno... but it could make sense; snakes do eat rats.

Re: Party modding ??: add skills and traits to party creatio

Posted: Thu Nov 05, 2015 12:30 pm
by FeMaiden
Isaac wrote:
Zo Kath Ra wrote:Their racial food is burrow rat shanks?
I dunno... but it could make sense; snakes do eat rats.
how do you add a favorite food to a custom race?

Re: Party modding ??: add skills and traits to party creatio

Posted: Thu Nov 05, 2015 10:34 pm
by minmay
you can't

Re: Party modding ??: add skills and traits to party creatio

Posted: Thu Nov 05, 2015 11:46 pm
by FeMaiden
minmay wrote:you can't
oh, I guess I misunderstood...it looked like isaac was saying he gave his "Lamia" race burrow rat shanks as a favorite food

Re: Party modding ??: add skills and traits to party creatio

Posted: Fri Nov 06, 2015 8:51 pm
by Zo Kath Ra
FeMaiden wrote:
Isaac wrote:
Zo Kath Ra wrote:Their racial food is burrow rat shanks?
I dunno... but it could make sense; snakes do eat rats.
how do you add a favorite food to a custom race?
Create a new food item that checks the consumer's race:

Code: Select all

defineObject{
    name = "racist_rat_shank",
    baseObject = "base_item",
    components = {
        {
            class = "Model",
            model = "assets/models/items/rat_shank.fbx",
        },
        {
            class = "Item",
            uiName = "Burrow Rat Shank",
            gfxIndex = 16,
            weight = 0.8,
            traits = { "consumable" },
        },
        {
            class = "UsableItem",
            nutritionValue = 200,
            onUseItem = function(self, champion)
                if (champion:getRace() == "human") then
                    champion:modifyBaseStat("strength", 1)
                    hudPrint(champion:getName() .. " gained Strength +1.")
                end
            end,
        },
    },
    tags = { "food" },
}
It should +1 a random stat, but I'm too lazy to program that right now :)
And, for each champion, you'll need to keep track of how many racist_rat_shanks he/she/it has eaten. Then you can add code that implements this:
http://steamcommunity.com/app/251730/di ... 3896360145
SpoilerShow
I Peeked at game data and can confirm all favorite treats:
Humans - None
Insectoids - Horned Fruit
Lizardman - Turtle Egg
Minotaur - None
Ratling - Cheese

Stat progression works as follows:
First 3 Favorite Treats Eaten = +1 Random Stat
Next 4 Favorite Treats Eaten = +1 Random Stat
Next 5 Favorite Treats Eaten = +1 Random Stat
Next 6 Favorite Treats Eaten = +1 Random Stat
Next 7 Favorite Treats Eaten = +1 Random Stat
Next 8 Favorite Treats Eaten = +1 Random Stat
Next 9 Favorite Treats Eaten = +1 Random Stat
Next 10 Favorite Treats Eaten = +1 Random Stat
Next 11 Favorite Treats Eaten = +1 Random Stat
Next 12 Favorite Treats Eaten = +1 Random Stat

For a maximum of +10 Random Stats at 75 Favorite Treats consumed. And of course, there isn't anywhere near enough favorite treats in the game to max out this bonus

Re: Party modding ??: add skills and traits to party creatio

Posted: Fri Nov 06, 2015 9:05 pm
by minmay
no, that isn't enough to emulate racial food
1. racial food eaten is attached to the party member even across dungeons, if you import a party to another dungeon their racial food stats don't start over
2. racial food stat gains are determined at game start so that you can't savescum them

you can of course do 2. yourself easily, but not 1. the only way to accomplish 1. would be to temporarily change the race of the character to ratling/lizardman/insectoid and force-feed them that race's racial food, then change the race back to the custom one. unfortunately, that will play the "ratling_happy" sound effect (or equivalent one for another race) when a stat is increased, so you'd need to overwrite that sound with silence, and then in both ratling AND your custom race you'd need to check the characters' stats before and after eating the food so see if they changed, in which case you play ratling_happy for the ratling and whatever sound for the custom race. THEN you would have a good emulation of the effects of racial food that I know of.

Re: Party modding ??: add skills and traits to party creatio

Posted: Fri Nov 06, 2015 9:22 pm
by FeMaiden
minmay wrote:no, that isn't enough to emulate racial food
1. racial food eaten is attached to the party member even across dungeons, if you import a party to another dungeon their racial food stats don't start over
2. racial food stat gains are determined at game start so that you can't savescum them

you can of course do 2. yourself easily, but not 1. the only way to accomplish 1. would be to temporarily change the race of the character to ratling/lizardman/insectoid and force-feed them that race's racial food, then change the race back to the custom one. unfortunately, that will play the "ratling_happy" sound effect (or equivalent one for another race) when a stat is increased, so you'd need to overwrite that sound with silence, and then in both ratling AND your custom race you'd need to check the characters' stats before and after eating the food so see if they changed, in which case you play ratling_happy for the ratling and whatever sound for the custom race. THEN you would have a good emulation of the effects of racial food that I know of.

Too much work. although it could have been fun....my mod has characters I made in it that the player has to use, and each one has a personality and they talk (emulated by using john wordsworths messageBoxes), I could have made like, one of the boys is a stoner that likes to get high on "herbs" and just totally loves mushrooms and I could make borra be his favorite food while one of the girls in the back row is a picky eater that only likes natural organic foods and complains all the time about having to eat the weird stuff around but absolutely loves pie and make the blueberry pie her "racial food"
(all these favorite foods would be hinted at through the dialogue).
but I don't think this is gonna happen lol

Re: Party modding ??: add skills and traits to party creatio

Posted: Fri Nov 06, 2015 9:29 pm
by petri
FeMaiden wrote:but I don't think this is gonna happen lol
No need to give up :) Although emulating the exact behavior of racial favorite diet is hard as pointed out by minmay, you can get a similar effect by following Zo Kath Ra's example above. Small details like this can spice up your mod.