Jump to content

Modifying Combat Arts and understanding Flags - spells.txt


Recommended Posts

  • 3 months later...
  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I think that you could do something like this by adding combat arts to the creatures that are summoned which buff speed/experience/whatever. But to do that you would need to modify some other files, c

Here is a Wiki reference for the spell tokens: http://www.sacredwiki.org/index.php/Sacred_2:Tokens   I'm not sure if it's complete or not. I also made a list of my own in alphabetical order that y

It can be edited since CM Patch 1.60(where, I've rewritten it). The four tokens per CA cap remains. You have to familiarize yourself with Ollydbg 1.0.10.0 debugger basics, the Assembler code ba

Hello:bye:

I want to improve my personal inquisitor rebalance mod and maybe make it uploadable one day. I have still a lot of ideas left that I want to implement. Currently I'm try to make a new CA: a shield buff that never reloads by default and needs to be charged manually by another CA.

Failed approaches so far:

  1. giving the CAs following tokens:
    • Shield CA: entry6 = {"et_shield_reload_rel", -1000, 0, 0, 37 },
    • Charge CA: entry2 = {"et_shield_regen", 300, 10, 0, 37 },
    • Unfortunately the shield reload does not seem to accept negative numbers and gives +496640% shield regeneration instead.
  2. changing the spellClass to "cSpellSeNotschild"
  3. using et_shieldstrength_timed
  4. using et_shieldstrength_timed and et_duration_sec at a crazy high duration
  5. mixing et_shieldstrength and et_shieldstrength_timed
  6. mixing et_shieldstrength and et_shieldstrength_timed and using et_duration_sec at a crazy high duration
  7. Changing the spellClass to "cSpellSeEnergieschild" (The SpellClass of the Golems CA "boss_golem_energieschild")

But it would be soo cool if it worked. It seems like the only way to make this work is making the shield a temporary buff and I really don't want to do that. Any ideas how I can overcome this problem? I'd appreciate any help:bow:

Edited by Lindor
Some new failed ideas
  • Like! 1
Link to post

Btw when it comes to understanding flags I made a cool discovery:

There are multiple Tokens with crbonus_prone_xxx as a bonus. This bonus will grant vulnerability to a specified damage channel. Let's look at two of the tokens in spells.txt and their corresponding boni in spells.txt:

crbonus_prone_fire:

Spoiler

Bonus as defined in Blueprint.txt:

newBonus = {
--  name = "crbonus_prone_fir",
  rating = 2,
  basedonskill = "SKILL_INVALID",
  type = "BONUS_PRONETOCHANNEL",
  spez = "DMG_FIRE",
  spez2 = "",
  usagebits = 65535,
  minconstraints = {0,0,0},
  difficultyvaluerange0 = {0,1000,1000},
  difficultyvaluerange1 = {1,875,875},
  difficultyvaluerange2 = {2,750,750},
  difficultyvaluerange3 = {3,625,625},
  difficultyvaluerange4 = {4,500,500},
}
mgr.createBonus(54, newBonus);

Spoiler

The Token as defined in Spells.txt:

mgr.addTokenBonus( {"et_self_prone_fir", 54 })  -- 54 = crbonus_prone_fir

 

A Spell that uses this Token:

mgr.defineSpell( "dr_nm_rindenhaut", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_DR_RINDENHAUT_C",
    fxTypeSpell = "fx_sc_schild",
    fxTypeCastSpecial = "FX_DR_CAST_L",
    duration = 20.000000,
    animType = "ANIM_TYPE_SM18",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_RIDESM01-HORSE",
    animTypeSpecial = "ANIM_TYPE_RIDESM06-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_self_prone_fir", 200, 0, 0, 37 },
        entry1 = {"et_VWboost_rel", 100, 100, 0, 41 },
        entry2 = {"et_life_regen", 15, 15, 0, 41 },
        entry3 = {"et_base_armor_phy", 150, 100, 0, 41 },
        entry4 = {"et_base_armor_poi", 100, 70, 0, 41 },
        entry5 = {"et_armor_any_rel", 200, 50, 1, 41 },
        entry6 = {"et_VWboost_rel", 200, 50, 2, 41 },
        entry7 = {"et_chance_reflect_CC", 300, 8, 3, 41 },
        entry8 = {"et_chance_evade", 200, 2, 4, 41 },
        entry9 = {"et_life_regen", 15, 15, 5, 41 },
        entry10 = {"et_regThisBuff", 200, 2, 6, 8 },
    },
    fightDistance = 0.000000,
    aspect = "EA_DR_NATUREMAGIC",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 400,
    cost_base = 400,
    focus_skill_name = "skill_DR_naturemagic_focus",
    lore_skill_name = "skill_DR_naturemagic_lore",
    spellClass = "cSpellDrRindenhaut",
    spellcontroltype = "eCAtype_t_buff",
    sorting_rank = 5,
})

crbonus_prone_ice

Spoiler

Bonus as defined in Blueprint.txt:

newBonus = {
--  name = "crbonus_prone_ice",
  rating = 2,
  basedonskill = "SKILL_INVALID",
  type = "BONUS_PRONETOCHANNEL",
  spez = "DMG_ICE",
  spez2 = "",
  usagebits = 65535,
  minconstraints = {0,0,0},
  difficultyvaluerange0 = {0,1000,1000},
  difficultyvaluerange1 = {1,875,875},
  difficultyvaluerange2 = {2,750,750},
  difficultyvaluerange3 = {3,625,625},
  difficultyvaluerange4 = {4,500,500},
}
mgr.createBonus(56, newBonus);

Spoiler

The Token as defined in Spells.txt:

mgr.addTokenBonus( {"et_debuff_prone_ice", 56 })  -- 56 = crbonus_prone_ice

 

A Spell that uses this Token:

mgr.defineSpell( "he_st_kristallhaut", {
    eiStateName = "cSpellCast",
    fxTypeCast = "FX_HE_KRISTALLHAUT_C",
    fxTypeSpell = "FX_HE_KRISTALLHAUT",
    fxTypeCastSpecial = "FX_HE_CAST_L",
    duration = 10.000000,
    animType = "ANIM_TYPE_SM12",
    animTypeApproach = "ANIM_TYPE_INVALID",
    animTypeRide = "ANIM_TYPE_RIDESM01-HORSE",
    animTypeSpecial = "ANIM_TYPE_RIDESM03-SPECIAL",
    causesSpellDamage = 1,
    tokens = {
        entry0 = {"et_duration_sec", 600, 5, 0, 8 },
        entry1 = {"et_chance_reflect_spell", 200, 5, 0, 41 },
        entry2 = {"et_range_area", 750, 0, 0, 4 },
        entry3 = {"et_damping_ice", 200, 2, 0, 41 },
        entry4 = {"et_base_armor_phy", 250, 150, 0, 41 },
        entry5 = {"et_regAspect_storm", 400, 20, 0, 37 },
        entry6 = {"et_debuff_movespeed", 198, 2, 1, 42 },
        entry7 = {"et_chance_reflect_spell", 100, 3, 2, 41 },
        entry8 = {"et_debuff_prone_ice", 200, 5, 3, 42 },
        entry9 = {"et_spell_intensity_rel", 300, 10, 4, 5 },
        entry10 = {"et_regAspect_storm", 267, 13, 5, 37 },
        entry11 = {"et_damage_ice_rel", 500, 20, 6, 5 },
    },
    fightDistance = 0.000000,
    aspect = "EA_HE_STORM",
    cooldown = 0.000000,
    soundProfile = 0,
    cost_level = 350,
    cost_base = 350,
    focus_skill_name = "skill_HE_storm_focus",
    lore_skill_name = "skill_HE_storm_lore",
    spellClass = "cSpellHeKristallhaut",
    spellcontroltype = "eCAtype_t_buff",
    sorting_rank = 5,
})

Now it should be pretty clear why I chose these specific two Tokens: Both Boni are defined the exact same way in Blueprint.txt, but one Token is called "et_self_prone_fir" and the spell "et_debuff_prone_ice" suggesting that the one affects the character and the other one the enemies. And for fact Ancient Bark grants fire vulnerability to the caracter while Crystal Skin grants ice vulnerability to enemies with the correct mod. So where does that difference come from? Let's take a look at the entries:

  • entry0 = {"et_self_prone_fir", 200, 0, 0, 37 }
  • entry8 = {"et_debuff_prone_ice", 200, 5, 3, 42 }

Notice the difference at the flags? 37=32+4+1 while 42=32+8+2

Since 1 is most certainly the flag for being used in a damage calculation of a hit, I'm now pretty sure that either 8 or 2 means that it affects the enemies (or at least not the casting target). Since at the first post chattius said:

Quote

Flags:

1- If 1 then the modifier is used in damage calculation at a hit(?)

2

4 - mergeable with same modifiers from equip?

8 - done first at execution of combat art (before item stuff?)

16

32- 'lasting' effect on target, buff, temporary buff? Can be positive as reflect, or negative as damage over time ticks

64

128- base damage for spells?

 

The flags are just guesses right now.

I think we can now finally add flag two.:woot:

Edited by Lindor
A typo (rom instead from)
  • Like! 1
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...