-
Posts
1,101 -
Joined
-
Last visited
-
Days Won
37
Content Type
Profiles
Forums
Downloads
Calendar
Posts posted by Lindor
-
-
type:
BONUS_SPEED
BONUS_SPEED_LIMITspez:
SPEED_ANY
SPEED_ATTACK
SPEED_ATTACK_MOUNTED
SPEED_CAST
SPEED_CAST_MOUNTED
SPEED_MAX
SPEED_WALK
SPEED_WALK_MOUNTEDSPEED_CAST_MOUNTED and SPEED_WALK_MOUNTED are not present in any game versions blueprint.txt. I got them by looking at the dll files. You can create a bonus with the SPEED_WALK_MOUNTED spez and attach it to your mount in creatures.txt to increase your mount movement speed. Or you can give yourself the bonus through other means, like e.g. armor or a skill.
I once knew the difference between BONUS_SPEED and BONUS_SPEED_LIMIT, ut I have forgotten. The latter one is e.g. what in_in_eifer uses (inquisitor's frenetic fervor).
-
I have broken parts of my arm in an accident and probably won't be as active in the next time.
-
- Popular Post
- Popular Post
8 hours ago, idbeholdME said:So it has been present in the code, but just not functioning?
I am mainly wondering about whether this is a bug fix, or a modification.
Well both.
SpoilerOn 1/29/2024 at 10:06 AM, Lindor said:There we go:
This has never been part of the game and is something completely new.
SpoilerOn 1/31/2024 at 5:36 PM, Lindor said:There you go:
Depends on your perspective. Something like this should work the way it was coded in the original game, but it didn't on PC, it only worked on console. Console and PC use sometimes different kinds of shaders so I figured I could backtrace the error, but I couldn't, there is no logical explanation up to this point why it doesn't work on PC. The game just won't accept SURFACE_FLAG_TENERGY for this itemtype no matter what you do.
So instead I was able to backtrace the exact pixel shader which is responsible for the SURFACE_FLAG_TENERGY-effect and script my own shader which applies the effect to the surface which uses the shader. It's a workaround to get the game into rendering the FX without using the flag.
Pixel Shaders take coordinates and textures as input and give you one or more rgba colors as output. Most of the time the input textures are specified in surface.txt, but sometimes, like e.g. for surface flags, it's hardcoded, so I had to guess the input textures. If you are however willing enough to experiment through all the different textures of the game to figure out exactly what textures SURFACE_FLAG_TENERGY uses (or if you're skilled enough to read it from the dll's), then there's (with one exception I'll talk about later) no difference between how it's originally suposed to work and this, so you could consider this a fix. If you just use my guessed textures, then there might be a slight difference and you could, depending on your perspective, this either consider as a mod or a fix.
There's one difference however which I allowed myself to make as I would personally consider this a 'fix': The shader I use is responding to the alpha channel. For the original surface flag, it was 'all-or-nothing', meaning that it was hardcoded that beyond a certain alpha channel threshold of the input diffuse texture, the fx would gain a fixed amount of opaqueness, ~90% I'd say, and below that threshold it would not get rendered. My effect however directly gains the opaqueness of the input diffuse texture's alpha channel. Personally I'd conider this a fix, but you could very well consider this a mod if you're absolutely purist and want to push it to the extreme.
- 1
- 1
-
On 2/13/2024 at 7:06 PM, idbeholdME said:
Yes.
I gave the Scarabs in the desert dangerclass of 9 so that they'd drop boss amounts of loot and to make them able of dropping Legendaries in the first place, gave Magisil 20000 weidghtedprob and put ZRareExpectation15 to 500 or so, which combined with Enhanced Perception made it so that every Scarab kill would roll a tier 15 item.
Result was only Magisil whenever a Legendary item dropped.
For my personal use, I manually edited the weightedprob of all tier 15 and 14 items to be much, much higher than those of tier 13 (most sets and legendaries) to ensure that when the game rolls ZRareExpectation14 or 15, it actually gives me an item of that rarity. The game rolling 15 only means that it can generate up to rarity tier 15, not that it will drop. It still determines the item to drop by the weightedprob, So even if you score ZRareExpectation15 but there is 1 Legendary and 15 normal uniques with the same weightedprob in the drop list, you still have only 1/16 chance of getting the Legendary.
I can give you my modded drop.txt if you want to see. In game, I noticed quite a bump in the drop rates of rarity tiers 14 and 15 without touching the ZRareExpectation.
Hmm. That would be a reasonable explanation why higher tier items have higher weightedprob. I guess we were wrong all along. Nice job!
- 1
-
18 minutes ago, idbeholdME said:
Strange(...)
And even just from general gameplay, I can safely say that the lower the weightedprob, the less likely the item is to drop when selecting an item from the drop list.
:
On 8/4/2022 at 2:51 AM, Flix said:Higher values make the item more rare. At least, I hope so because that's how the entire file is set up from top to bottom.
I can confirm that the entire file is structured like that. If higher values made items more likely to drop, we would see legendaries all over the place.
And:
18 minutes ago, idbeholdME said:Because I tested it, just increased the Magisil to 20000 and got only Magisils and nothing else. With PFP of course.
Maybe you simultaneously tempered with some other value like zrareexpectation or so?
On 1/26/2023 at 8:13 PM, idbeholdME said:Tested by setting the ZRareExpectation in balance.txt to 999 and then adding several zeroes to the weidghtedprob of items in a specific droplist.
Because if weightedprob really increased the drop likelihood, we're in trouble. For ages everybody thought the opposite.
-
- Popular Post
- Popular Post
Full Itemtype Tier Distribution
View File
Following the idea of this post:
I have exported a complete itemtype tier distribution for every itemtype existent, sorted by classification and weargroup.Basically it tells you what tier an item on average is that uses this itemtype.
Might be very useful when you want to create new items based on already existing itemtypes.
It's useful if you have an item tier in mind but no itemtype as well as the other way around if you have an itemtype in mind but no item tier.Exported using some lua code, not done manually. Itemtypes are based on latest EE.
Have fun
-
Submitter
-
Submitted02/13/2024
-
Category
- 2
-
... FLAG_HAS_WORLDOBJECT_RS = 16777216; FLAG_CLICKTHROUGH = 33554432; FLAG_EXCLUDEFROMNAVIGEN = 67108864; FLAG_NO_ANIM_OPTIMIZATION = 134217728; local newItemType = {} --------------------------------------------------------------------- -- Itemtypes --------------------------------------------------------------------- newItemType = { -- standard info renderfamily = "RENDERFAM_CREATURE", family = "FAMILY_CREATURE", subfamily = "SUBFAM_LIFE_HUMAN", classification = "CLF_DEFAULT", flags = "FLAG_HASHAIR + FLAG_HASBLINKANIM + FLAG_HASSOUND + FLAG_HASPREVIEWIMAGE + FLAG_NO_ANIM_OPTIMIZATION", weargroup = "WEARGROUP_SERAPHIM", -- 3d model + animation info model0Data = { name = "models/heroes/seraphim/c_sera_skin.GR2", user = "WEARGROUP_INVALID", }, -- logic bounding box logicBox = { minx=-9.623, miny=-8.72, minz=0.12, maxx=12.52, maxy=13.248, maxz=72.018, }, dangerclass = 0, } mgr.typeCreate(1, newItemType); ...
If the flags are stored as global integers, why are the flags stored in the itemtypes as Strings? Did you ever wonder that?
To me this looks like an exporting mistake.
Did someone ever try to remove the quotation marks? From this:
flags = "FLAG_HASHAIR + FLAG_HASBLINKANIM + FLAG_HASSOUND + FLAG_HASPREVIEWIMAGE + FLAG_NO_ANIM_OPTIMIZATION",
To this:
flags = FLAG_HASHAIR + FLAG_HASBLINKANIM + FLAG_HASSOUND + FLAG_HASPREVIEWIMAGE + FLAG_NO_ANIM_OPTIMIZATION,
?
What happens?
-
I have written a script that is averaging out the item tier for each jewelry itemtype so I know which itemtypes I can use when creating new jewelry of a tier.
Sorted by itemtype:
Spoilerrings:
11529: 8.0
11593: 13.5
11594: 14.0
11595: 14.0
11596: 13.0
11597: 13.0
10536: 7.6
11530: 8.0
11592: 13.0
7137: 8.8333333333333
7138: 8.6666666666667
7139: 7.8
7140: 10.0
7141: 6.25
7142: 8.0
7143: 6.25
7144: 7.6
7145: 8.8333333333333
7146: 8.6666666666667
7147: 8.7142857142857
7148: 7.6
7149: 10.222222222222
7150: 9.1428571428571
7151: 7.6
7152: 9.4285714285714
7153: 14.0
7154: 10.125
7155: 9.7142857142857
7156: 8.5
7157: 7.6
7158: 7.6
7159: 9.1428571428571
7160: 14.0
7161: 7.6
7162: 7.6
7163: 8.8333333333333
13255: 13.0
11512: 8.0
11513: 8.5
11514: 6.25
11515: 6.25
11516: 6.25
11517: 6.25
11518: 6.25
11519: 7.6
11520: 8.5
11521: 8.0
11522: 8.0
11523: 7.6
11524: 6.25
11525: 9.1666666666667
11526: 8.8333333333333
11527: 8.0
11528: 7.6
13254: 13.0amulets:
7182: 11.0
7183: 7.0
7184: 10.0
7185: 7.0
11533: 15.0
11534: 13.0
11535: 14.0
7189: 11.0
7190: 10.5
7191: 10.0
7192: 11.0
11540: 15.0
11543: 13.0
11544: 13.666666666667
11546: 13.0
11547: 13.0
11548: 13.0
11598: 13.0
7187: 10.0
7186: 12.25
10535: 13.5
7188: 11.0
7164: 4.0
11532: 15.0
7165: 8.0
7166: 9.75
7167: 11.0
7168: 8.5
7169: 9.0
7170: 6.0
7171: 7.3333333333333
7172: 10.0
7173: 8.5
7174: 10.4
7175: 11.8
7176: 7.0
7177: 10.5
7178: 11.333333333333
7179: 10.75
7180: 11.2
7181: 8.0
11539: 13.0Sorted by tier (rounded):
Spoilerrings:
0:
1:
2:
3:
4:
5:
6: 7141, 7143, 11514, 11515, 11516, 11517, 11518, 11524
7:
8: 11529, 10536, 11530, 7139, 7142, 7144, 7148, 7151, 7157, 7158, 7161, 7162, 11512, 11519, 11521, 11522, 11523, 11527, 11528
9: 7137, 7138, 7145, 7146, 7147, 7150, 7152, 7156, 7159, 7163, 11513, 11520, 11525, 11526
10: 7140, 7149, 7154, 7155
11:
12:
13: 11596, 11597, 11592, 13255, 13254
14: 11593, 11594, 11595, 7153, 7160
15:amulets:
0:
1:
2:
3:
4: 7164
5:
6: 7170
7: 7183, 7185, 7171, 7176
8: 7165, 7181
9: 7168, 7169, 7173
10: 7184, 7191, 7187, 7166, 7172, 7174
11: 7182, 7189, 7190, 7192, 7188, 7167, 7177, 7178, 7179, 7180
12: 7186, 7175
13: 11534, 11543, 11546, 11547, 11548, 11598, 11539
14: 11535, 11544, 10535
15: 11533, 11540, 11532EDIT:
I don't know if this is useful, but if we just use the items with fixed boni, uniques, sets, legendaries etc., we get the following distribution:
Spoilerrings:
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12: 7147,
13: 11592, 11596, 11597, 10536, 7140, 13254, 7144, 7148, 7149, 7150, 7151, 7156, 7157, 7158, 7159, 7161, 7162, 11513, 11519, 11520, 11523, 11528, 13255,
14: 11593, 11594, 11595, 7137, 7138, 7139, 7145, 7146, 7152, 7153, 7154, 7155, 7160, 7163, 11526,
15: 7142, 11530, 11512, 11521, 11522, 11529, 11525, 11527,amulets:
0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: 7182, 7184, 11534, 7190, 7191, 7192, 11543, 11546, 11547, 11548, 11598, 11539, 7166, 7168, 7171, 7173, 7174, 7175, 7188, 7177, 7180, 7187,
14: 11535, 11544, 7167, 7169, 10535, 7178, 7179, 7186,
15: 7165, 11532, 11533, 7189, 11540, 7172,7147 sticks out, dntknw why
EDIT2:
This is the distribution I will probably use, this time the itemtypes are sorted (ascending)
Spoilerrings:
3: 7141
6: 7143, 11514, 11515, 11516, 11517, 11518, 11524
9: 7137, 7138, 7139, 7140, 7142, 7144, 7145, 7146, 7147, 7148, 7149, 7150, 7151, 7152, 7154, 7155, 7156, 7157, 7158, 7159, 7161, 7162, 7163, 10536, 11512, 11513, 11519, 11520, 11521, 11522, 11523, 11525, 11526, 11527, 11528, 11529, 11530
12: 11592, 11596, 11597, 13254, 13255
15: 7153, 7160, 11593, 11594, 11595amulets:
3: 7164
6: 7170, 7171, 7176, 7183, 7185,
9: 7165, 7166, 7168, 7169, 7172, 7173, 7174, 7181, 7184, 7187, 7191
12: 7167, 7175, 7177, 7178, 7179, 7180, 7182, 7186, 7188, 7189, 7190, 7192, 11534, 11539, 11543, 11546, 11547, 11548, 11598
15: 10535, 11532, 11533, 11535, 11540, 11544EDIT3:
Changed my mind
Spoilerrings:
3: 7141, 7143, 11514, 11515, 11516, 11517, 11518, 11524
6: 7139, 7142, 7144, 7148, 7151, 7157, 7158, 7161, 7162, 10536, 11512, 11519, 11521, 11522, 11523, 11527, 11528, 11529, 11530
9: 7137, 7138, 7145, 7146, 7147, 7150, 7152, 7156, 7159, 7163, 11513, 11520, 11525, 11526
12: 7140, 7149, 7154, 7155, 11592, 11596, 11597, 13254, 13255
15: 7153, 7160, 11593, 11594, 11595amulets:
3: 7164
6: 7170, 7171, 7176, 7183, 7185,
9: 7165, 7166, 7168, 7169, 7172, 7173, 7174, 7181, 7184, 7187, 7191
12: 7167, 7175, 7177, 7178, 7179, 7180, 7182, 7186, 7188, 7189, 7190, 7192, 11534, 11539, 11543, 11546, 11547, 11548, 11598
15: 10535, 11532, 11533, 11535, 11540, 11544 -
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.
- 1
-
On 11/24/2022 at 12:29 AM, idbeholdME said:
Just put the weightedprob for Magisil to 20000 and literally only Magisil is dropping
It's the other way around. Higher values make the item more rare. Two items, one with weightedprob=50 and one with 150, the 50 will drop 3 times more often compared to the 150.
EDIT: also for impact:
minquality > zrareexpectation > weightedprob
So weightedprob has the least amount of impact.
Haven't figured out expecttype yet.
-
4 hours ago, Flix said:
I can write guides if I knew there was some demand. I can either do script analyses or instructions on how to complete a specific goal. I just need to know what people are interested in learning. Dumping the sum total of knowledge I've picked up would be a lot of time and effort.
Can you create https://www.sacredwiki.org/index.php/Sacred_2:drop.txt and explain your detailed knowledge?
Also https://www.sacredwiki.org/index.php/Sacred_2:Sacred_2_-_Item_Drop_Mechanics I'd bet this is pretty outdated by know. Also could be made less discussion-like and more wiki-like, more structured. But anybody can improve this once you drop.txt knowledge is there.
No need to hurry and feel free to reject.
-
2 Bug reports:
- mgr.createDroplist(1460 ...) has duplicate entry101
- German Localization uses Alternate Spells module locales in spite of the module being not active
More reports might follow
-
- Popular Post
- Popular Post
3 hours ago, Vishanka said:I cannot tell you what do to with the project, I would use it if it was baseline in the PFP, but that would either require that you release a PFP version that uses all your changes or that flix added it to it, because I always revert to the PFP 1.4 if I break something.
Do you mean my mod or this project? Because this tool, the Blueprint.txt function, most certainly works with PFP. You just need to know how to use it. A lot is explained however. Enable.exe brings PFP into the overhaul state. Then you can start modding in modules/modding and run Update.exe until you're satisfied. Once you're reade to publish, run Disable.exe. Enable.exe is a one-way-ticket, so you should do a backup before enabling.
I was wondering if there was any interest outside of the few modders remaining. I was hoping someone totally new would show up and say "hey, I'm interested". It does not seem so.
12 hours ago, Dax said:I personally think, the community needs a restart. And it is possible for sure, but it needs a lot of effort on all fronts and many ppl have to work hand
in hand. You need guys who deliver frequent updates, videos of coop sessions maybe, artwork, an active, talkative community and so on. Various users here tried to get it done alone and failed.3 hours ago, Vishanka said:So I agree a bit with Dax about a restart, maybe even activating reddit and show that "we are still there" as many people just would look there first.
I agree as well. I was trying to get more people interested into modding by developing my modding tools and wiki pages. The Reddit idea is actually really great, I support that.
There are so many issues
- The darkmatters download section is not very well structured, honestly it's a mess. Why not structure everything by dependencies? E.g. I never know where to upload my tools to. They're not CM or I&B or EE specific. The section really needs to be restructured.
- There are not many people with modding knowledge and even fewer who frequently edit the wiki
- Lacking presence in other social media, Reddit, YouTube, Facebook, Twitch etc. I know there's the wiki youtube and facebook accounts, but they're not really relevant
- No community events and if there are, nobody seems to be interested. Just look at Frank Rentmeister's Post. 10 years back I would have been heart rate levels of amazed at the opportunity to play Sacred: Underworld with an actual dev as @FrankRentmeister but now? Sacred Gold is stoneage old, unbalanced and PVP is all kinds of broken. Modding is nearly impossible without speaking assembly and having some basic knowledge of huffman coding and cryptography. I see why there's so litte interest nowadays. In order for it to become relevant again, Sacred: Gold needs to be remade from scratch so it becomes modifiable. And with a better Underworld Storyline. Underworld was a huge disappointment for me.
-
Learn from the mistakes of the german forums Sacred Legends. I don't know exactly why. But I know it's slowly dying. My Analysis would be smth like:
- The posts are irrelevant
- they can't even answer the most beginner questions ever without a 20 posts discussion about the game version.
- if you seek expertise, there is none. Well there's FooBar, but that doesn't count as this is general expertise, not Sacred 2 specific expertise.
- Seriously, some of them like the forums admin have been there for now like 20 years and they can't even answer the question why some armor has a regen penalty while some doesn't.
- Overall everybody is super strict, toxic and, well, german, when it comes to guidelines and behaviour. They're in a constant state of raised index finger. The community is the very definition of toxic positivity.
- There is no modding. There is not even a modding forum. All they're doing is hosting the files from darkmatters for download, and sometimes not even the latest. That's it.
- I don't want to be inpolite, but darkmatters is as old as Sacred. We all depend on the Admins, @gogoblender and @Schot. What happens if you want to go to your well-deserved retirement like Flix? Do you have a plan? Are there any 'heirs'?
We can learn from those mistakes. You need an active community. You need to allow disagreements. Off-Topic is fine as long as there's more main-topic than off-topic. Be structured and have expertise. Be open to new people. Don't wait three months to answer a question, even if it has been asked before. Don't make cancel culture a thing. Have many Moderators and at least two Admins.
And honestly, you're doing a great Job. But I feel like we soo reach another turning point in the darkmatters history.
Darkmatters needs to be gowing.
And one more thing. I get that the page gets financed by advertisement. What about an official DarkMatters youtube channel? What about searching for volunteers explicitly tasked on producing content and administrating the channel? I mean the wiki youtube channel has been a success in the beginning, hasn't it? Could bring some money.
I can help by increasing the overview of the wiki. That's my thing. I can also answer questions and give general modding support if I have the time and interest to do so.
But someone needs to get attention to it, why modding is so cool, why the game is still relevant, maybe make some online tutorials on how to mod and what you can achieve. Bring visions, bring interest, bring a feeling of accomplishment to the people. We need to work together to create a rich and active modding environment. Both are important, modders and non-modders, but look at sacred legends, if the modders go away, the entire community does. Modding means change, and change means life, and life is the opposite of death.
Not every problem regarding modding has been solved yet. E.g. this:
3 hours ago, Vishanka said:I'd like to do new spell fx if that's even possible, some that just look more modern and better.
Creating new surface FX is possible. but creating new spell FX? One would need to do that in the compiled source code of the game directly. Or export a lua script from the dlls like has been done with questscripts.txt. Incredibly hard task. Some more things:
- Creating new boni
- Modifying the damage calculation function
- making level trasition possible without dismounting
- Writing a Saced 2 specific GR2 Import/Export PlugIn for Blender
- recolorize fen fires
- generally reconstruct the source code from the exe and dlls, maybe in future AI can do this
- formatting the questscripts (has been partially solved by me, maybe I'll upload v2.0alpha questscripts.txt bundle)
- GUI based editors, blueprint.txt editor, FX editor, model&texture editor, bonus editor and so on...
These are so incredibly hard tasks, no wonder they haven't been solved yet. But the human lives for the challenge, the accomplishment, the honor, that's what drives us. We need more skilled people. We could design lectures, tutorials, tasks with sample solutions and an entire education system if we wanted to.
We're not a company. We don't pay people here. If we did, there would be legal issues with the company holding the Sacred 2 license. I don't know why I'm in the mood of writing so much today, but I'll stop right here before this post gets larger than the Pyramids.
- 2
-
I know that there were roughly three versions planned, v1, v2 and v3
I know that the current stage is v1 and v2 never got released.
I know that v1 had issues which I wanted to fix for v2 before making v3.
I know that I was very close at finishing v2 when I decided that it wouldn't be worth the time an I could just straightly jump to v3.
I know I have had an idea for a better lua code beautifyer for v3. I had a very specific idea and wanted to code it entirely different to what I had for v3. I just can't remember the idea anymore.
-
- Popular Post
- Popular Post
I Intro
This is by far the most advanced and massive project I ever made, not even the lua formatter for questscripts.txt comes close. I use it for my own mod which will come out someday even if it takes me another decade. But I made it before becoming a developer. It is hard to use; you have to understand what you're doing, there are some README files and documentation but for everyone besides me, it's hard to figure out what this tool even does, what the intention is in the first place.
The source code of this project has been recovered with the help of the HxD software, so there can and will be updates. But I don't know wether I will make the tool easier to use; it's hard enough to improve the functionality.
II The state of this project - what does this tool do?
This project aims at automatic bonusgroup generation for items, automatic usagebits generation and automatic ingame bonus tooltip color generation. It blows up your blueprint.txt to ~100000 lines of code which would never be humanly possible to script by hand.
All items have been sorted into different files in modules/modding/items, there are the ones with fixed boni and the ones which get their boni generated by this overhaul. Basically for every bonusgroup of every item it generates a unique bonusgroup which exactly fits the usage of the item.
One of the key functionalities of this project is to figure out the usage of the item by looking at the itemtypes of the item. If it detects certain keywords, e.g. in the GR2 model name, it knows which blueprintset this item is belonging to, e.g. the seraphim ancient set, and then automatically sorts the item into the group. Internally, the ancient set is flagged as AspectTwo, so it will generate boni which fit AspectTwo, so it generates an Itemtype-Weargroup-Relation and an Itemtype-Classification-Relation which is saved in modules/automatically_generated.
III The issues of this tool
Now the biggest issue with the mod (apart from it altering potions boni) is the sad truth that it classifies everything where it can't find any keywords for as "generic". therefore jewely e,g, only will get generic boni. And this is bad.
My workaround in the past has been to manually create jewelry in the modules/items/fixed_boni folder. But that defeats the purpose of this tool.
IV Plans for the Future
I want to fix that. I want to change it so that one can manually specify classifications in modules/automatically_generated which the tool will respect and I want to make it that every item can have multiple classifications. It will help me in the future for developing my own mod.
This is no easy task.
It might take a while given the small amount of time I have compared to a couple of years ago. Also I am thinking about my free time more, not spending everything on coding nowadays anymore. But I want to get it done. And it will get done.
What I don't know is wether I can do what I initially envisioned this project to become: A GUI-based item editor.
V My fears
Sacred 2 is old. Flix Lord of Mods has left the game. I haven't seen Dmitriy Lord of Code for months. Active modders I'm aware of include @Vishanka, @idbeholdME, @Hooyaah and myself. That's it. Who am I making this for if nobody sees/uses this? An item editor would be awesome. It would be a big help for new modders and those who want to become it. It would maybe arise attention to Sacred 2 modding. But if the game dies, who am I making this for? I don't need to simplify the usage of this tool for myself. I know how to use it. I made it.
VI The poll
So I'm specifically asking you: how much interest is there? Are you even interested in the project per se? Would you use it? Would it be worth my time simplifying this tool's usage? Or should I just focus on myself, use this tool to create my mod to be finally able to play the game the way I like and then follow Flix in making a silent fade-out? Thanks in adance and for reading through.
- 1
- 1
-
If we limit the highest exponent to 2 and say we want the function to be a fraction of two polynomials, this is the entire set of all the functions which satisfy the wanted properties:
Numerator: c * (x^2 - 2 * x^2 * y^2 + y^2) - 2 * x^2 * y^2 + x^2 * y + y^2 * x
/
Denominator: c * (x + y - x^2 * y - y^2 * x) - x^2 * y - y^2 * x - 2 * x * yThe one I posted above is for c = -1
It also works for the limit as c goes to infinity
After all this, it's funny because I still think just taking the max is best. It's the best compromise between calculation intensity and beauty. If you don't care about complexity, I think a value of c = -0.5 would probably look best.
-
On 7/23/2022 at 2:42 AM, Lindor said:
I have taken another thought on this. When balancing light_col_amb (moonlight) and light_col_diff (daylight, also magiclight/streetlight etc.) can take values between 0 and 1. We want to balance it so the result is also between 0 and 1. What I've done above is just adding them. Not a problem per se, the game automatically caps color at 1.
The plot would look like this (x and y are moon- and sunlight values):
Not the best. Might become too bright too quickliy.The intuitive solution would be to go with average instead:
The issue is: at day, moon is 0 and sun is 1 and vice versa, so we's never really get to 1.The next best solution would be to go with max of day and sun:
Not bad., but we have that wierd sharp edge. Light transition wouldn't feel smooth.Is there a function which is smooth is always x if x=y, always x if y=0 and always y if x=0? Yes there is. Some math magic including orthogonal projection later and we have this:
This is what we wanted! Formula: ((x^2)+(y^2))/(x+y)So you should use this code instead:
#ifdef PS_SPASS_LIGHTNING_NONORMAL_20 struct pixdata { float4 hposition : POSITION; float4 texcoord0 : TEXCOORD0; float4 lightDist : TEXCOORD1; float2 depthFog : TEXCOORD2; }; #define VS_OUT_hposition #define VS_OUT_lightDist #define VS_OUT_depthFog fragout2 mainPS(pixdata I, uniform sampler2D texture0, uniform sampler2D fog_texture, uniform float4 light_col_amb, uniform float4 light_col_diff, uniform float4 system_data) { fragout2 O; // get texture values s2half4 tex0 = tex2D(texture0, I.texcoord0.xy); // calc to-face-lightning float is2Lightning = step(0.2, I.lightDist.w); float lightAlpha = (light_col_amb.w * light_col_amb.w + light_col_diff.w * light_col_diff.w) / (light_col_amb.w + light_col_diff.w); float normalize = sqrt(dot(light_col_amb.xyz + light_col_diff.xyz, light_col_amb.xyz + light_col_diff.xyz)); float lengthAmb = sqrt(dot(light_col_amb.xyz, light_col_amb.xyz)); float lengthDiff = sqrt(dot(light_col_diff.xyz, light_col_diff.xyz)); float lengthFinal = (lengthAmb * lengthAmb + lengthDiff * lengthDiff) / (lengthAmb + lengthDiff); O.col[0] = float4(is2Lightning * lightAlpha * float3(1.0, 1.0, 1.0), tex0.a); O.col[1] = float4(is2Lightning * lightAlpha * (lengthFinal / normalize) * (light_col_amb.xyz + light_col_diff.xyz), 0.0); #ifdef S2_FOG // calc fog fogGlow( O.col[0].xyz, fog_texture, I.depthFog ); fogGlow( O.col[1].xyz, fog_texture, I.depthFog ); #endif return O; } #endif
It's done here for the whole vector though, and the length can be more than 1 (it can be sqrt(3)). Another option would be doing it component-wise, not for the whole vector:
#ifdef PS_SPASS_LIGHTNING_NONORMAL_20 struct pixdata { float4 hposition : POSITION; float4 texcoord0 : TEXCOORD0; float4 lightDist : TEXCOORD1; float2 depthFog : TEXCOORD2; }; #define VS_OUT_hposition #define VS_OUT_lightDist #define VS_OUT_depthFog fragout2 mainPS(pixdata I, uniform sampler2D texture0, uniform sampler2D fog_texture, uniform float4 light_col_amb, uniform float4 light_col_diff, uniform float4 system_data) { fragout2 O; // get texture values s2half4 tex0 = tex2D(texture0, I.texcoord0.xy); // calc to-face-lightning float is2Lightning = step(0.2, I.lightDist.w); float lightAlpha = (light_col_amb.w * light_col_amb.w + light_col_diff.w * light_col_diff.w) / (light_col_amb.w + light_col_diff.w); float lightRed = (light_col_amb.x * light_col_amb.x + light_col_diff.x * light_col_diff.x) / (light_col_amb.x + light_col_diff.x); float lightGreen = (light_col_amb.y * light_col_amb.y + light_col_diff.y * light_col_diff.y) / (light_col_amb.y + light_col_diff.y); float lightBlue = (light_col_amb.z * light_col_amb.z + light_col_diff.z * light_col_diff.z) / (light_col_amb.z + light_col_diff.z); O.col[0] = float4(is2Lightning * lightAlpha * float3(1.0, 1.0, 1.0), tex0.a); O.col[1] = float4(is2Lightning * lightAlpha * float3(lightRed, lightGreen, lightBlue), 0.0); #ifdef S2_FOG // calc fog fogGlow( O.col[0].xyz, fog_texture, I.depthFog ); fogGlow( O.col[1].xyz, fog_texture, I.depthFog ); #endif return O; } #endif
I think this is the better option, both aesthetics- and calculationcost-wise.
On 5/19/2023 at 11:46 PM, Lindor said:I have finally found what I was looking for and it is beautiful
f(x, y) = ((x^2)(y-1)+(y^2)(x-1))/(2xy-x-y)
Has all the properties wanted:
=> f(x, x) = x
=> f(0, y) = y
=> f(x, 0) = x
=> f(1, y) = 1
=> f(x, 1) = 1
=> f(1, 1) = 1
=> f(0, 0) = 0 (in the limit from the positive side) -
- Popular Post
- Popular Post
9 minutes ago, Vishanka said:Oh that's what you mean. Each itemtype has a material of material.txt assigned, the material e.g. specifies how it sounds if it gets hit or walked on etc. I thought you meant that. Classic misunderstanding.
For your question let me quote Flix:
On 2/20/2022 at 5:17 AM, Flix said:Each GR2 file has materials assigned to it that are named after the corresponding surface entries.
To accomplish your goal you need only make a new surface entry, name it whatever you like, and list out the textures that compose it.
Next, you edit the itemtype in question (or create a new itemtype if you want the original one intact), and then assign your new surface entry to the model. To demonstrate this we will look at an example:
name = "models/npc/wildanimals/bear/v_baer-v1@crystal.GR2", -- the base model surface0 = { mgr.surfGetID ("baer-v1_v"), mgr.surfGetID ("baer-v1-crystal-v2_v") }, -- the first listed surface entry ("baer-v1_v") is the one the model expects to find based on its materials. The second entry in this line ("baer-v1-crystal-v2_v") is the new one that overrides the base surface. surface1 = { mgr.surfGetID ("crystal_z"), mgr.surfGetID ("crystal-v2_z") }, -- the same process repeats as before, for as many surface entries as the original model expects.
If you can't figure out which surface entries the base model expects, you can quickly view the mesh's assigned materials with Granny Viewer.
It should be noted that this doesn't always work, e.g. the Fen Fires don't have their FX assigned to the model. For them it's a hardcoded link to the surface. But most of the time, you can use grannyviewer to figure out which surfaces the model expects.
- 1
- 1
-
22 minutes ago, Vishanka said:
@Lindor Actually I want to look into materials. Let's take these legs for example. How can I add two more material layers so that the thigh cotton would for example be silk and the blade on the knee metal?
The material for each itemtype is specified in iteminfo.txt. I don't know what happens if you specify multiple iteminfos for the same itemtype, but I guess that most likely the one furthest down the script will overwrite all others.
In order for there being multiple materials for an item, I think one would need multiple itemtypes for an item, like it's e.g. the case with the armored spiders. The saddle of the spider mount has a different itemtype than the body e.g., 13341=saddle, 13342=body. But I don't know wether achieving this for a blueprint.txt item is possible. E.g. "dagger_1h_normal" has multiple itemtypes, but I don't know wether, like for the spider, they all come together to create one model or the game just randomly picks one if the item drops.
-
-
On 1/31/2024 at 7:19 PM, Vishanka said:
Can you change the color of the effect, for example to red?
On 1/31/2024 at 7:59 PM, Lindor said:Ye just edit the textures.
I'm curious. Are there any interesting colors / texture combinations which you did come up during experimenting? Would love to see some more of your work
-
On 1/23/2024 at 11:26 AM, gogoblender said:
May I ask for an update, please?
- 1
-
I have created something. It's not very spectacular yet, but it's a start.
-
35 minutes ago, Vishanka said:
Can you change the color of the effect, for example to red?
Ye just edit the textures. In the surface.txt file which contains just the changes I tried to describe what each texture of the surface does, though I admit that it's a bit more complicated than I described. Just play around with it; e.g. if you swap texture1Name to "fx/te_fx.tga" you get a red-ish background.
Sacred Wiki - Latest Updates
in Sacred Wiki General Discussion
Posted
Why are there two pages for the same thing?
https://www.sacredwiki.org/index.php/Sacred_2:Seraphim_Genesis_Set
https://www.sacredwiki.org/index.php/Sacred_2:Genesis_Siderea