Jump to content

Sacred 2 blueprint.txt function overhaul


Recommended Posts

Sacred 2 blueprint.txt function overhaul

View File

Sacred 2 Blueprint.txt Function Overhaul

 

Features:

  • All items sorted into one separate file for each item 'class' to increase overview
  • Automated bonusgroup generation for items with non-fixed boni
  • Automated bonus color generation from bonus tier
  • No more bonus IDs/bonusgroup IDs. Instead, boni and single-bonus-bonusgroups are called from a unique name: "prefix%type$spez$spez2$basedonskill". You know exactly what bonus/bonusgroup it is with just one look!
  • Does not change the (average) balance of your mod - just transforms it into an more overviewable and easier modifyable state
  • The most powerful file ever created: balance.lua opens up with unique and powerful ways to quickly fit the balance of your mod how you like it in one go!
  • Commentary over all scripts - everything is explained!
  • Comes with an unused/duplicated token finding tool - only works after enabling.
  • Basically never have to edit blueprint.txt again - everything can be done from the modules/modding folder!
  • Automated adjustment of creature.txt's creature bonus intensity balance according to your settings - you can do everything from inside balance.lua / bonusTypeBalance.lua !!
  • Does not adjust spells.txt balance (and won't in the future, because the balance there is somewhat hardcoded and intransparent)

 

Requirements:

Your mod needs to have included BEFORE enabling:

  •     server/blueprint.txt
  •     server/creatures.txt
  •     shared/itemtypes.txt
  •     shared/spells.txt
  •     shared/typification.txt
  •     JSGME (generic mod enabler)
  • And you must be on windows operating system!
    (For the .exes to not screw up. But after running Disable.exe, your mod is completely Vanilla-style again, ready for upload for all operating systems.)

 

Credits:

  • @Flix to answer my one million questions.
  • @dimitrius154 to answer my other million questions.
  • @Schot, @gogoblender and all other supporting members and admins of DarkMatters,org making hosting this file possible!
  • Luiz Henrique de Figueiredo, I used his srlua to compile all the standalone .exe files. VERY useful!!!

 

Discuss here:

 


 

  • Respect! 1
Link to comment
Quote
  • Added explanation to README.txt why enemies give no experience at first after enabling and why this won't be changed in future versions
  • Added instructions to README.txt how to 'fix' the enemies-give-no-experience
    Hopefully this is enough to set you up with how things work, and how you can add other balancing issue fixes like that (e.g. max life energy when mounted)

Here is a list of all boni which don't have scaling scripted upon enabling with EE:

Spoiler

BONUS_CHANNEL_CONV_TO_BEST
BONUS_PAINLIMIT
BONUS_INVALID
BONUS_DAMPING_TEAMSHARE
BONUS_TARGET_SEEKER
BONUS_DEBUFF
BONUS_MISSILE_SLOWDOWN
BONUS_LIFE_REL_MOUNTED
BONUS_SPELLDAMAGERANGE
BONUS_INVERT_ARMOR
BONUS_PLAGUE_INFECTION
BONUS_SUPERCHARGE
BONUS_CA_MULTIPLIER
BONUS_SPELLDAMAGERANGE_WITH_ESSENCE
BONUS_SPEED_LIMIT
BONUS_DOTDAMAGE
BONUS_CLOSE_BUFF
BONUS_LOWERARMOR
BONUS_SHRINKHEAD_DROPCHANCE
BONUS_CHARGE_ATTR
BONUS_PLAGUE_DOT
BONUS_SHIELD_REGENERATION
BONUS_FACTION_MODIFIER
BONUS_SELFDESTRUCT
BONUS_ENERGY_ANIHILATION
BONUS_CHANCE_MINION
BONUS_CHARGE_MORPH
BONUS_SHIELD
BONUS_CHANCE_CALL_TARGET
BONUS_LOADSINGLECHARGE
BONUS_LEVEL_ALL_CA
BONUS_DEBUFF_WITH_ESSENCE
BONUS_ENERGYLEECH_ONCE
BONUS_PLAGUE
BONUS_HURL_ENEMY
BONUS_CA_WEAPONDMG_MULTIPLIER
BONUS_NOFLEE
BONUS_INVISIBLE
BONUS_EVADE_DETECTION
BONUS_CHANCE_ROOT
BONUS_DISARM
BONUS_DROPCHANCE
BONUS_CHANCE_MINION_INFECT
BONUS_PRONETOCHANNEL
BONUS_EXPERIENCE

Some of those don't have difficultyvalueranges for a rason, some other like BONUS_EXPERIENCE or BONUS_SPELLDAMAGERANGE need balance scripting.
 

I realize that this might be a lot of unwanted work, so I will set up and share a balance script for these boni which you can use as a template. Again, there's good reason to not just extract them from blueprint.txt: The numbers can't be trusted, and I need to make sure that everyone who uses this mod is aware of that.

Link to comment
13 hours ago, Lindor said:

I realize that this might be a lot of unwanted work, so I will set up and share a balance script for these boni which you can use as a template.

As Sauron Lord of gift I have gift for u:

Spoiler
do bonusTypeBalance["BONUS_CA_WEAPONDMG_MULTIPLIER"] = {
    difficultyvaluerange0 = {0,1000,1000},
    difficultyvaluerange1 = {1,1000,1000},
    difficultyvaluerange2 = {2,1000,1000},
    difficultyvaluerange3 = {3,1000,1000},
    difficultyvaluerange4 = {4,1000,1000},
} end
do bonusTypeBalance["BONUS_DROPCHANCE"] = {
    difficultyvaluerange0 = {0,100,150},
    difficultyvaluerange1 = {1,100,200},
    difficultyvaluerange2 = {2,125,250},
    difficultyvaluerange3 = {3,150,300},
    difficultyvaluerange4 = {4,175,375},
} end
do bonusTypeBalance["BONUS_EXPERIENCE"] = {
    difficultyvaluerange0 = {0,50,5000},
    difficultyvaluerange1 = {1,70,7000},
    difficultyvaluerange2 = {2,90,9000},
    difficultyvaluerange3 = {3,110,11000},
    difficultyvaluerange4 = {4,130,13000},
} end
do bonusTypeBalance["BONUS_FACTION_MODIFIER"] = {
    difficultyvaluerange0 = {0,250,250},
    difficultyvaluerange1 = {1,250,250},
    difficultyvaluerange2 = {2,250,250},
    difficultyvaluerange3 = {3,250,250},
    difficultyvaluerange4 = {4,250,250},
} end
do bonusTypeBalance["BONUS_INVISIBLE"] = {
    difficultyvaluerange0 = {0,2500,5000},
    difficultyvaluerange1 = {1,2500,5000},
    difficultyvaluerange2 = {2,2500,5000},
    difficultyvaluerange3 = {3,2500,5000},
    difficultyvaluerange4 = {4,2500,5000},
} end
do bonusTypeBalance["BONUS_LEVEL_ALL_CA"] = {
    difficultyvaluerange0 = {0,100,4000},
    difficultyvaluerange1 = {1,125,5000},
    difficultyvaluerange2 = {2,150,6000},
    difficultyvaluerange3 = {3,175,7000},
    difficultyvaluerange4 = {4,200,8000},
} end
do bonusTypeBalance["BONUS_LIFE_REL_MOUNTED"] = {
    difficultyvaluerange0 = {0,200,400},
    difficultyvaluerange1 = {1,200,400},
    difficultyvaluerange2 = {2,200,400},
    difficultyvaluerange3 = {3,200,400},
    difficultyvaluerange4 = {4,200,400},
} end
do bonusTypeBalance["BONUS_NOFLEE"] = {
    difficultyvaluerange0 = {0,1000,1000},
    difficultyvaluerange1 = {1,1000,1000},
    difficultyvaluerange2 = {2,1000,1000},
    difficultyvaluerange3 = {3,1000,1000},
    difficultyvaluerange4 = {4,1000,1000},
} end
do bonusTypeBalance["BONUS_PRONETOCHANNEL"] = {
    difficultyvaluerange0 = {0,1000,1000},
    difficultyvaluerange1 = {1,875,875},
    difficultyvaluerange2 = {2,750,750},
    difficultyvaluerange3 = {3,625,625},
    difficultyvaluerange4 = {4,500,500},
} end
do bonusTypeBalance["BONUS_SHIELD"] = {
    difficultyvaluerange0 = {0,20,100},
    difficultyvaluerange1 = {1,30,150},
    difficultyvaluerange2 = {2,40,200},
    difficultyvaluerange3 = {3,50,250},
    difficultyvaluerange4 = {4,60,300},
} end
do bonusTypeBalance["BONUS_SHIELD_REGENERATION"] = {
    difficultyvaluerange0 = {0,200,500},
    difficultyvaluerange1 = {1,250,600},
    difficultyvaluerange2 = {2,300,700},
    difficultyvaluerange3 = {3,350,850},
    difficultyvaluerange4 = {4,400,1000},
} end
do bonusTypeBalance["BONUS_SPELLDAMAGERANGE"] = {
    difficultyvaluerange0 = {0,25,275},
    difficultyvaluerange1 = {1,27,294},
    difficultyvaluerange2 = {2,28,330},
    difficultyvaluerange3 = {3,30,370},
    difficultyvaluerange4 = {4,33,430},
} end

 

U can use this as template to insert into your BonusTypeBalance.lua and work from there.
These are the bonustyles which I think have hardcoded scaling:

Spoiler
BONUS_CA_MULTIPLIER
BONUS_CHANCE_CALL_TARGET
BONUS_CHANCE_MINION
BONUS_CHANCE_ROOT
BONUS_CHARGE_ATTR
BONUS_CHARGE_MORPH
BONUS_CLOSE_BUFF
BONUS_DAMPING_TEAMSHARE
BONUS_DISARM
BONUS_CHANNEL_CONV_TO_BEST
BONUS_DEBUFF
BONUS_DEBUFF_WITH_ESSENCE
BONUS_DOTDAMAGE
BONUS_ENERGY_ANIHILATION
BONUS_ENERGYLEECH_ONCE
BONUS_EVADE_DETECTION
BONUS_HURL_ENEMY
BONUS_INVALID
BONUS_INVERT_ARMOR
BONUS_LOADSINGLECHARGE
BONUS_LOWERARMOR
BONUS_MISSILE_SLOWDOWN
BONUS_PAINLIMIT
BONUS_PLAGUE
BONUS_PLAGUE_DOT
BONUS_PLAGUE_INFECTION
BONUS_SELFDESTRUCT
BONUS_SHRINKHEAD_DROPCHANCE
BONUS_TARGET_SEEKER
BONUS_SPEED_LIMIT
BONUS_SPELLDAMAGERANGE_WITH_ESSENCE
BONUS_SUPERCHARGE

 

Both alphabetically sorted

EDIT:

the mod game automatically detects wether something is a consumable by wether it has the word "potion" or the word "boost" in its blueprint name. This is necessary because the devs didn't give consumables boni the correc prefix, so I need to give them all "cs".

Unfortunately, the ogre knuckles created by Flix in EE are called "forge_boost_phys" and "*_unique", both having the word "boost" in it, despite not being consumables. I recommend renaming them inside modules/modding/items/pgf.lua when using this mod and, if necessary, to give the boni of those items the correct prefix, which would be "sb".

Edited by Lindor
Link to comment
On 8/2/2022 at 7:34 AM, Lindor said:

And you must be on windows operating system!

By the way in case you're worried about that line: You must be on windows operating system in order for the exes to work, but there is an exe, namely Disable.exe, which converts all scripts back into Vanilla style and removes all modules and exe files except itself and lua54.dll, making your mod ready for publish for all operating systems.

As stated in the README, Disable.exe is NOT a setback to original state. The changes coming with Enable.exe are permanent which is why you should backup your mod before enabling.

Link to comment
  • 9 months later...

Unless someone can provide a way to unwrap the utf-8 lua script off of a srlua wrapped execuable (@dimitrius154?), the source code of this massive project's exes is lost.

There's a very very thin, slight chance. Maybe a Hex-Editor or ollydbg could work. Don't know, not skilled/experienced enough yet.

Link to comment
2 hours ago, Lindor said:

unwrap the utf-8 lua script off of a srlua wrapped execuable

It takes veritable years(a good acquaitance of mine had to devote 10 years to full Diablo I source code discovery) to get it done. Very different from the pin-point changes I do.

  • Like! 1
Link to comment

Lucky news, the wrapper doesn't compile the script into bytecode, instead it just glues the whole script at the end of an interpreter's bytecode. It can be done with a simple Hex Editor and it's easy to do. A full recovery is to be expected. There can be future user friendliness updates for this modding tool.

23 hours ago, dimitrius154 said:

Very different from the pin-point changes I do

Still impressive. One day I want to accomplish the same skills. Specifically the damage calculation function fixes, the enter-dungeon-with-mount fixes, the %LL functionality change and the possibility of opening up previously weapon damage based item modifiers to spell damage from addendum all sound very appealing to me.

  • Like! 1
Link to comment
  • 8 months later...
27 minutes ago, Vishanka said:



I showed a friend this site and I can screenshot his reaction :sweating:
grafik.png.ce522527a246a389ebb440ec2ce24b39.png



As long as everyone is creating their own thing in their own little corner it will always mainly be something that you do for yourself.

lol, sorry but i yeeked at that reaction... :O ... was wondering if you saw you could change the theme at the bottom of forum? I think you can change it to default..its got no images then, and runs quicker I think :bounce: ... you'd be out of the Ancarian snow storm and into mostly pure words ...basically wont feel very darkmattersy 

:)

gogo

Link to comment
25 minutes ago, gogoblender said:

was wondering if you saw you could change the theme at the bottom of forum? I think you can change it to default..its got no images then, and runs quicker I think :bounce: ... you'd be out of the Ancarian snow storm and into mostly pure words ...basically wont feel very darkmattersy 

Haha, yes, I changed it, but I was getting help from my friend and linked him to some postings that he should read as he tried to find another way to import gr2 models back into the game (without success) and he was greeted with a lot of adds and this design. There is nothing to be sorry for, but if I didn't know the page, I'd also have the feeling that when I click somewhere it might install some virus.
It's just one thing, it takes some negotiation to look through that.

I mainly find information here on darkmatters through google, reading through old postings and trying to make sense of everything that I find.

For example we could do a new official collection of tools and ways how to edit the textures like guides with images.

I use GIMP and DXT BMP, someone else might have a different way. To edit the N I need the help of my friend with some photoshop plugin and then I need to invert green in gimp. It took us hours to find out how to even work with those files.

There are some collections and guides here, but many have dead links, or require tools that you don't just get open source. All of that makes it really difficult to join in.

  • Appreciation 1
Link to comment
2 hours ago, Vishanka said:

Haha, yes, I changed it, but I was getting help from my friend and linked him to some postings that he should read as he tried to find another way to import gr2 models back into the game (without success) and he was greeted with a lot of adds and this design. There is nothing to be sorry for, but if I didn't know the page, I'd also have the feeling that when I click somewhere it might install some virus.
It's just one thing, it takes some negotiation to look through that.

I mainly find information here on darkmatters through google, reading through old postings and trying to make sense of everything that I find.

For example we could do a new official collection of tools and ways how to edit the textures like guides with images.

I use GIMP and DXT BMP, someone else might have a different way. To edit the N I need the help of my friend with some photoshop plugin and then I need to invert green in gimp. It took us hours to find out how to even work with those files.

There are some collections and guides here, but many have dead links, or require tools that you don't just get open source. All of that makes it really difficult to join in.

Lol that screenshot you took of your friend commenting on our artwork made me burst into laughter .. I’ll show schot when he finishes  work 😀

ayup

thats us :D

at least till Wintertyde is over

😍

gogo

Link to comment

Uhmm.. I have jewelry with ome bonusgroups containing all kinds of boni. I go ingame and notice that all rings the combomaster sells have the same bonus. To make matters worse, some have more boni than the blueprint has bonusgroups.

I don't know what is happening. I prepare a darkmatters post. Then I notice bonusgroups can be put on stuff through typification.txt. I thought that I had thought about this and the overhaul would redirect every existent ID to the new ID. CLF_RING has bonusgroupID = 261. ID is non existent pre-overhaul, but got taken post-overhaul. The redirection failed because of this, so all rings get a new bonusgroup.

 

Notice to anyone using this tool: check typification.txt for leftover bonusgroup IDs after enabling.

The game is trolling me.

  • Appreciation 1
Link to comment
21 hours ago, Lindor said:

..

Stop it, all of you!
We lie to ourselfs and close our eyes in front of the reality! Here:

No. One. Cares.
Live with it!

I am sorry. I did not want to say. But all those mentioned community related failures, we all experienced more or less over the years, should have teached us some lessons. Yet, we refuse to see. Maybe because we love Sacred to the point of insanity. Listen. Stop that social media cr^p! It's just a sh*!tload of work, with no positive outcome. There are not enough people here to constantly hold up the flag for years in the social media channels. Also, check the remaining forums. Zombs, all of them! Wasted time, wasted energy.
Instead I'd suggest: Gentle cryo sleep mode and slow buildup of mods. For both games. We can discuss what can be done, got a nice and practicable idea already, work together a bit, but without pressure. If we got enough stuff for a year or so together, let's see how we pass it on to the community so that we got a constant flow of mods over a certain time. Lets monitor the outcome, then we shall decide if and how to continue. For me, it is the most reasonable aproach. I tell you: I do not want to loose any more modders. Not one. Including you!

Link to comment

As far as modding goes, there is one big hurdle for the game in my opinion. And that is the fact that there is a ton of hardcoded stuff that it nigh impossible to touch. Hidden in the .dll and .exe files, which require a very high degree of extremely specific knowledge to even attempt doing. And sadly, the answer to "Is this possible?" more often than not is "No" because of that reason. Things like:

- Removing the limitation of rarity tier 15 items (Legendaries) only dropping from enemies with dangerclass 9 and 10

- Making ranged weapons fire 2 projectiles when using the ATTACKX animation.

- Changing monster AI. Like for example, make the Garganthropod not get stuck doing the idle animation constantly when you attack him from range. Or there seem to be a ton of behaviors defined in behavior.txt which never get used/don't work etc.

- Or something as simple as knowing exactly what Enhanced Perception does at the code level. Why are there 2 values at Mastery level? Which one does what? Do they stack? The code in scripts would suggest that it only increases the rarity tiers from lootable objects etc.

 

That being said, a lot of stuff IS moddable. I'm more into the gameplay and mechanics related parts of the game. Visual modding is possible, but not really my area. I'm pretty purist when it comes to any game's visuals (rarely even play remasters/remakes for that reason) and even if I wanted to change something, my artistic aptitude is.... not good :P

Documenting at least what's possible would probably be a good idea, as most of the info is randomly scattered throughout various threads on these forums.

  • Thanks! 1
Link to comment
On 2/12/2024 at 6:24 PM, Flix said:

Sure thing, I can help with that. I'll start writing up some stuff this week and see what I can publish.

Sweet! Ben if you have issue logging into wiki for your guide please post. Brad's going through some settings and were trying to see how much functions we can get Wiki going for and were trying to balance a skating family party the same time this weekend :lol:

If anyone has challenges getting in, just tell us and we'll look at it

 

On 2/12/2024 at 7:02 PM, Lindor said:

 

The game is trolling me.

whaaaaaaaaaaaaaaaaaaaaat.... :eek: :D :eek: 

gallery_22759_1241_6924.jpg

 

Use if needed Lindor!

:superman:

gogo

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