Jump to content
chattius

Modifying Combat Arts and understanding Flags - spells.txt

Recommended Posts

Bezlonir    47

Looking at that file, it is very interesting. I am casually putting together a list of spell tokens. I'm curious to try making spells almost from scratch. My thought now is that it would be cool to give everyone more buffs that affect friends to create some interesting synegies in group play. But being a noob to this game, I'm having too much fun playing right now to do much if any modding. I do want to try changing tangled vine to be like a bush you can hide in and get some temporary buffs. Just as a test case. But since I'm doing a video series on the game, I don't want to mess up my files.

Share this post


Link to post
Share on other sites
Flix    2,934

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 you can view here: Spell Tokens

However, that list is only the tokens that are listed at the bottom of spells.txt . Some spell tokens seem to function without being registered there (like "et_duration_sec" and a bunch of others).

 

If you want to make new spell tokens you can't simply add them to the bottom of the list. You'd have to replace existing ones in the token manager at the bottom of the file. Since many tokens are unused, this isn't a huge problem.

 

For example, this is custom token I made for the D2 mod:

mgr.addTokenBonus( {"et_provo_area", 53 }) -- 53 = crbonus_prone_poi

The name of the token can't be changed, but the number following it can be changed to a different bonus. The number '53' in this case is pointing to the bonus ID #53 as defined in blueprint.txt . "et_provo_area" originally pointed to bonus #156, which is inactive (which explains why the token isn't used). I changed the number to point to bonus #53, "crbonus_prone_poi". So now I can put the token "et_provo_area" into a spell and it will make enemies more prone to poison damage. As you probably already know, anything following a ' -- ' is a developer comment, so I just put that there to remind myself what the token is really doing.

 

I learned how to handle the scripts by downloading other mods and looking at what was changed, so that's what I recommend.

  • Like 2

Share this post


Link to post
Share on other sites
gogoblender    1,485

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 you can view here: Spell Tokens

However, that list is only the tokens that are listed at the bottom of spells.txt . Some spell tokens seem to function without being registered there (like "et_duration_sec" and a bunch of others).

 

If you want to make new spell tokens you can't simply add them to the bottom of the list. You'd have to replace existing ones in the token manager at the bottom of the file. Since many tokens are unused, this isn't a huge problem.

 

For example, this is custom token I made for the D2 mod:

mgr.addTokenBonus( {"et_provo_area", 53 }) -- 53 = crbonus_prone_poi

The name of the token can't be changed, but the number following it can be changed to a different bonus. The number '53' in this case is pointing to the bonus ID #53 as defined in blueprint.txt . "et_provo_area" originally pointed to bonus #156, which is inactive (which explains why the token isn't used). I changed the number to point to bonus #53, "crbonus_prone_poi". So now I can put the token "et_provo_area" into a spell and it will make enemies more prone to poison damage. As you probably already know, anything following a ' -- ' is a developer comment, so I just put that there to remind myself what the token is really doing.

 

I learned how to handle the scripts by downloading other mods and looking at what was changed, so that's what I recommend.

Great, lucid explanation

I can see why readers have been flocking to the D2 mod with posts like this as beacons along the way

 

:)

 

gogo

Share this post


Link to post
Share on other sites
Bezlonir    47

I've been racking my brain for about 12 hours today as I just started experimenting with modding the Shadow Warrior's Astral Lord tree. So far, I have been successful adding experience gain, visibility range, + to general skills, and walk speed to a buff. I put splash damage and life leech on the Spectral hand, which was pretty cool. I've modded Rallied Souls to last a nice, long time, and to give stronger minions. Now, what I really want to do is make it so that each minion gives you a bonus to run speed and experience gained, or some such, so that the more minions you have out the faster you go, etc. The minions don't work with "et_friendfactor", though. I can probably make it so that the more minions you have out, the stronger each minion is, as they might share buffs with each other, maybe? But I'm still puzzling over this because I want them to effect the player character.

Share this post


Link to post
Share on other sites
Dragon Brother    403

I've been racking my brain for about 12 hours today as I just started experimenting with modding the Shadow Warrior's Astral Lord tree. So far, I have been successful adding experience gain, visibility range, + to general skills, and walk speed to a buff. I put splash damage and life leech on the Spectral hand, which was pretty cool. I've modded Rallied Souls to last a nice, long time, and to give stronger minions. Now, what I really want to do is make it so that each minion gives you a bonus to run speed and experience gained, or some such, so that the more minions you have out the faster you go, etc. The minions don't work with "et_friendfactor", though. I can probably make it so that the more minions you have out, the stronger each minion is, as they might share buffs with each other, maybe? But I'm still puzzling over this because I want them to effect the player character.

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, creatures.txt perhaps. Have a read through some of what Flix has done for his mods by creating new enemies or giving them new skills as he may have given some insight there on how it's done. From off the top of my head though I would locate the creatures that are summoned in creatures.txt using the id number from spells.txt and then add the CA's you want there. I'm not sure if you will need to modify their behaviour to make sure they use the buffs though as well as attacking...

  • Like 2

Share this post


Link to post
Share on other sites
Bezlonir    47

 

I've been racking my brain for about 12 hours today as I just started experimenting with modding the Shadow Warrior's Astral Lord tree. So far, I have been successful adding experience gain, visibility range, + to general skills, and walk speed to a buff. I put splash damage and life leech on the Spectral hand, which was pretty cool. I've modded Rallied Souls to last a nice, long time, and to give stronger minions. Now, what I really want to do is make it so that each minion gives you a bonus to run speed and experience gained, or some such, so that the more minions you have out the faster you go, etc. The minions don't work with "et_friendfactor", though. I can probably make it so that the more minions you have out, the stronger each minion is, as they might share buffs with each other, maybe? But I'm still puzzling over this because I want them to effect the player character.

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, creatures.txt perhaps. Have a read through some of what Flix has done for his mods by creating new enemies or giving them new skills as he may have given some insight there on how it's done. From off the top of my head though I would locate the creatures that are summoned in creatures.txt using the id number from spells.txt and then add the Combat Arts you want there. I'm not sure if you will need to modify their behaviour to make sure they use the buffs though as well as attacking...

Ah, as soon as you said that about creatures.txt, I had an ah ha. I already know where the kohorte minion is at because I accidentally changed my little summoned soldiers to non-combat children. Unfortunately, for the rallied soul minions, I believe the game just changes their faction? Although there could be a version of every mob just for their incarnation as a minion, considering there seems to be a t-mutant version already. But I am not too sure of that.

Share this post


Link to post
Share on other sites
Bezlonir    47

I'm wondering if it has to do with faction id 56 "FACTION_GCENEMYTOPLAYER". It really frustrates me not to be able to track this down through every file.

I see:

 

newBonus = {
-- name = "bb_chance_minion",
rating = 0,
basedonskill = "SKILL_INVALID",
type = "BONUS_CHANCE_MINION",
spez = "",
spez2 = "",
usagebits = 65535,
minconstraints = {0,0,0},
difficultyvaluerange0 = {0,0,0},
difficultyvaluerange1 = {1,0,0},
difficultyvaluerange2 = {2,0,0},
difficultyvaluerange3 = {3,0,0},
difficultyvaluerange4 = {4,0,0},
}
mgr.createBonus(192, newBonus);

 

in Blueprint.txt. That is the token that raises a minion. But I know of no way to look at the actual workings of the spell.

Edited by Bezlonir

Share this post


Link to post
Share on other sites

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


×