Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Feb 2018
Location: Europe
stranger
OP Offline
stranger
Joined: Feb 2018
Location: Europe
Okey first of all, sorry for my poor grammar.

I'm a noob with Divinity Engine. I recently started my first mod, playing with stats editor, adventuring in the effect editor, scroll through root templates and so on.

I created new spells, statuses and summon skills. But still, two things have haunted my mind since one week (almost).


1) I'm trying to figure out how to put a permanent buff (like Vampire Hunger) on a character (on a summoned creature to be more specific). I do know where to write BleedingImmunity, BurnContact, Floating, blah, blah, blah. But in this case, I want my summoned demon to have a custom aura when he spawns that increase the Strength of all allies around him in a small area and act like a passsive/talent.
I managed to make the aura so... how do I put it on my demon? Does the aura is considered as a Flag too? (like BleedingImmunity?)


2) (The most frustrating one) I made Voodoo spells centered around poison, chickentouch, disease and madness statuses. I'm having trouble with madness. Let me explain:
I copied the StatusData->Status_CONSUME->MADNESS to create a new status called PSYCHOSIS (Targets are mad but get damage boost. Ignore armors). The problem is that the damage boost and the new animation (inner demon purple smoke) work fine, but the madness status is not here anymore... I also made a copy of the Stats_Madness in Stats->Potion, renamed Stats_Psychosis ofc.
I tried to put my Stats_Psychosis on the StatusData->MADNESS->StatsId WITHOUT changing the Name (not the DisplayName) of the status and everything was good. Sadly, it also changed the original Madness status, which is not the goal.
So in short, my targets hit me like a bull on steroids(intended) and are not affected by madness(not intended) IF(and only) I change the status Name.
I know that there is other posts about those "LoseControl" statuses who don't work correctly, but none of them helped me.

I would be sincerely grateful if someone could help me! It's really getting on my nerves :(

Last edited by Coco l'asticot; 13/02/18 01:28 PM.

Baguette.
Joined: Feb 2018
Location: Europe
stranger
OP Offline
stranger
Joined: Feb 2018
Location: Europe
Oops never mind, I just found out where to put a permanent status on a summon:

*SkillData->Summon->SkillProperties: (BUFF/DEBUFF name),100,-1
Ugh, That was so obvious... Silly me -_-

Welp, now I need to understand how to apply my madness status... still not working (what a surprise!).


Baguette.
Joined: Nov 2017
L
member
Offline
member
L
Joined: Nov 2017
Glad to hear you found it.
For the madness, you can add MADNESS,100,X (with X the length of your status in turns) to ExtraProperties in the Potion to which your status refers.

Joined: Feb 2018
Location: Europe
stranger
OP Offline
stranger
Joined: Feb 2018
Location: Europe
Thank you for your quick reply.

I tried to put MADNESS,100,2 under the ExtraProperties of my Stats -> Potion -> Stats_Psychosis. "Sadly", that wasn't what I wanted exactly. It does inflict Madness for 2 turns with 100% chance, but it's still the "original" madness with a saving throw.

Maybe I wasn't clear with my intentions, so let me write this again from A to Z:

- I wanted a new madness status with no saving throw for one of my new projectile source skill.
- I copied the original madness status from Shared -> StatusData -> Status_CONSUME -> MADNESS.
- I pasted it in my project with the same path (StatusData -> Status_CONSUME) and replaced the Name(MADNESS) with PSYCHOSIS.
- Then, I needed a new Stats, so I copied the original Stats_Madness from Shared -> Stats -> Potion -> Stats_Madness.
- Pasted it in my project with same path (Stats -> Potion) and replaced the Name(Stats_Madness) with Stats_Psychosis.

- In the Stats_Psychosis, i modified those columns: (DamageBoost) 20 (was empty), (CriticalChance) 10 (was empty), (StatusIcon) an icon from the base game (was the default madness status icon), (SavingThrow) None (was empty).
- I didn't touch the (Act) 1 and (Act part) 0 from the Stats_Madness i copied.

- After that, in my PSYCHOSIS from StatusData, i modified those columns: (DisplayName) Psychosis (was |Mad|), (Description) my description (was the basic description of Madness), (Icon) the icon i used in the Stats_Psychosis (was the default madness icon), (FormatColor) brown (was white), (StatusEffect) I let the default effect for now, but it will be the effect from INNER_DEMON (so it's still RS3_FX_GP_Status_Madness_01:Dummy_StatusFX), (SavingThrow) None (was MagicArmor), (StatsId) Stats_Psychosis (was Stats_Madness of course), (StackId) Stack_Psychosis (was Stack_Madness).
- I didn't touch the (Type) CONSUME, (ForGameMaster) No, (InitiateCombat) Yes, (StatusEffect) RS3_FX_GP_Status_Madness_01:Dummy_StatusFX, (LoseControl) Yes from the copied MADNESS.

- Finally, I wrote PSYCHOSIS,100,2 under the SkillProperties of my projectile source spell that is supposed to put the status.

So when i use the skill, my targets get the status "Stats_Psychosis" with my icon (i dunno why it doesn't use the display name but whatever), get the 20% damage boost, get the 10% critical chance boost and the effect/animation of madness is activated... but they aren't mad. They can attack me and buff their team.

If I do as you said, my targets are affected by "Stats_Psychosis" with all the boosts like before and get the original status |Mad|... but it shouldn't be 2 separate status with the MagicArmor SavingThrow from the original MADNESS StatusData.

I'm not treating you like an idiot, I just want to help you see if I made a mistake somewhere.

Sorry if my explainations are messy.



Baguette.
Joined: Nov 2017
Location: Ukraine
apprentice
Offline
apprentice
Joined: Nov 2017
Location: Ukraine
The main issue with madness - it is scripted (hardcoded) status. Since it modifies AI behaviour, you cant have the full control and modify it the way you want with status entrys only.

There are alot of simillar statuses (maybe will make a full list of "pain in the a**" statuses one day), but the general recomendations are +- the same:

1)*easyUse: Do not change it, use the vanila version. Give any extra properties with additional custom statuses.
2) If you apply it with scripting - make sure there is a _Causee entry
3)*theHardWay: If you want to twek the status itself - best way would be to create a brand new status from scratch, using scripting to repeat it's functionality.
4)*theHardWay: Use search to find all refferences to status in scripts and tweak it there.


If you want to apply status without an armor check, you can use scripting. Example API (story script):

ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration, (INTEGER)_Force, (GUIDSTRING)_Source)

From wiki: "If _Force is 1, normal status immunities are ignored (e.g., a status that is normally blocked by physical armour, can be force-applied to ignore the fact that the target may have physical armour left). If it is 0, normal status immunities apply. "


Hope that helped.

Joined: Feb 2018
Location: Europe
stranger
OP Offline
stranger
Joined: Feb 2018
Location: Europe
I was afraid that it would be a scripting issue. I prefer to use the basic madness status, because I'm not an expert with scripting and it's my first mod.
I only found those entries in the Script Editor.
(Shared -> Game -> Statuses)



EVENT CharacterSetMadness
VARS
CHARACTER:_Character
LIST<STATUS>:_RemoveList
STATUS:_Result
ON
FetchCharacterApplyStatusData(_Character, MADNESS)
ACTIONS
Set(_Result,MADNESS)
ListClear(_RemoveList)
IF "c1"
CharacterHasStatus(_Character, CLEAR_MINDED)
THEN
ListAdd(_RemoveList, CLEAR_MINDED)
Set(_Result,null)
ENDIF
RETURN(_RemoveList,_Result,null)



I highly doubt that I can just replace MADNESS with PSYCHOSIS! XD
Actually, I'm glad to know how it really work, I might give it a shot someday.

Many thanks to both of you for your help! I'm already quite happy with my mod and what I have done.



Baguette.
Joined: Sep 2017
Location: Brazil
journeyman
Offline
journeyman
Joined: Sep 2017
Location: Brazil
This entry you found is on Statuses.gameScritps. This script manages the interaction between statuses, making a frozen character lose frozen and get wet when set on fire (burning), for example. It does not, however, control what the statuses do to the character. As Module 003 said, the madness status is hardcoded, so you'd need to script a behaviour of the character set on your custom status if you wanted to recreate it.

The easy way here, is to make a script that catches when the PSYCHOSIS status is applied to a character and use the function Module 003 proposed to force apply the status on the character. Here's what it would look like:

_Psychosis (Story script to catch who's target and who's the source of the effect):
Code
IF
   CharacterStatusApplied(_Target, "PSYCHOSIS", _Source)
THEN
   ApplyStatus((GUIDSTRING)_Target, "MADNESS", 2, 1, _Source);

This would force apply MADNESS to whoever had PSYCHOSIS applied, for the duration of 2 turns.


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5