Jump to content

Code Questions


Recommended Posts

Hello I'm new to the site and modding Sacred 2 in general. I plan to make some personal mods. I have looked through the Diablo mod files and I believe I understand the basics but there are a few things I haven't been able to figure out. So I'm hoping that the community can give me some insight.

 

1: In spells.txt when editing a Combat Art what is the last number when it comes to tokens? I'm assuming that the last number breaks down into binary and the game has a set of rules for each digit location. I'm not 100% sure on this but it would make sense. If so, does anyone know what each digit location represents?

Example: entry0 = {"et_duration_sec", 500, 5, 0, 8 },          8=001000

 

2: In spells.txt can all tokens be used with any spellClass?

 

3: In spells.txt where does "et_double_inqui", "et_double_power", and "et_summon_shrinkminion" get their variables?

 

4: In blueprint.txt the newBonus section has difficultyvaluerange in it. I'm guessing the first number is the difficulty (Bronze, Silver, ect.). The second would be the minimum value. The third number I am assuming is the max value, but items don't have a max level. So how are how do the item modifier value get calculated?

Example: difficultyvaluerange4 = {4,50,250},

Edited by JadeRabbit
Link to comment

1. This digit affects how the spell is applied (on cast, to self, to enemies, to friends, etc.).  I don't have a definitive list and haven't had much luck experimenting except to say it should almost never be changed unless you know for a fact you're fixing a bug.

2. Sadly no. Some spellClasses simply don't support some tokens.  There's no way to really know until you try it.  Generally it will be good to pick a spellclass that has the most similar spell tokens to your custom spell.  Some are more versatile and become "go-to" spells.  For example "cSpellHeFeuerhaut" is excellent for most any kind of buff you'd want to damage or debuff enemies.

3. All spell tokens are hard-coded (in s2logic.dll I think) as well as existing in the partial list at the bottom of spells.txt and within blueprint.txt's bonuses.  Many of these hardcoded ones like those you listed don't have any editable functions/values in the scripts.

4. I don't think those are hard and fast min/max values (e.g, the bonus won't just suddenly stop increasing with level). Rather, it works as a scaling factor.

  • Thanks! 1
Link to comment

Thanks for the help Flix.

 

4: I figured it was a scaling factor I was curious if anyone knew what it was based off of. Maybe level 200 is considered max? I'm curious what level the item has to be to exceed it and if there is a cap. If the max is level 200 and the item is level 220 would the modifier stop increasing once it hit level 200?

 

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up