Lindor 435 Posted August 8, 2022 Share Posted August 8, 2022 Question pretty much in the title, how does it wok? Is it hardcoded into a hardcoded bonus ID for each stat? E.g. starting strength is given to the heroes as creature bonus with bonus ID 29, if I now change the bonus ID of that bonus to, let's say, 123 and give the hero this in creatures.txt instead, the hero doesn't increase the stat with levelup anymore (at least I think that's the reson). It might also be that it isn't dependent on the starting stat's bonus ID and there's another bonus ID which is required to not change. But I need to know, and I need to find that ID for each attribute, so pls help Link to comment
Lindor 435 Posted August 8, 2022 Author Share Posted August 8, 2022 I really think this is how it works, the scaling is hardcoded into the bonus ID. There are some NPCs which inappropriately use hero attributes, making them scale with level: Hero: hero prefix, creature ID se: 1 in: 51 sw: 93 dr: 94 he: 209 tg: 210 dm: 1949 NPC: creature ID, creature name, scaling Attribute bonus IDs 458 "Helf_Inq_inquisitor_01_elite", 29, 31, 32, 33, 35 798 "wild_HEDg_rat_brown", 31, 812 "wild_ORC_boar_black_elite", 29, 31, 877 "HU_demodrey_officer", 31, 1284 "Template_wild_rat_elite", 31, 1802 "mainq_helf_inquisitor_duell", 31, 32, 34, 1836 "Helf_wilgyrien_quest_janos_id1868", 29, 1908 "wild_bear_cr1_boss", 33, 1929 "SC_Inquisitor_clone", 29, 31, 32, 33, 34, 35 2102 "Story_Dragonmage", 29, 31, 32, 33, 34, 35 @Flix @dimitrius154If you ever wanted to make your creatures' attributes summoned by heroes scale with character level (I'm thinking alternate spells inquisitor daemon e.g.), you gotta use the appropriate bonus ID. The scaling bonus IDs are: 29 - STAT_STR 31 - STAT_DEX 32 - STAT_INT 33 - STAT_STA 34 - STAT_VIT 35 - STAT_WIL If you use any other bonus ID, it won't scale with level! Link to comment
Lindor 435 Posted August 8, 2022 Author Share Posted August 8, 2022 No it's not the bonus ID! Damnit, I need to know why the attributes stop scaling with XP when I shuffle the bonus / bonusgroup IDs! Link to comment
Lindor 435 Posted August 8, 2022 Author Share Posted August 8, 2022 I know now for sure that the scaling is not scripted into a blueprintset, blueprint or bonusgroup. It must be a bonus, and it must be one of the following bonustypes, otherwise my testing results don't make any sense: BONUS_CLOSE_BUFF BONUS_DISARM BONUS_SELFDESTRUCT BONUS_CHANCE_MINION BONUS_PAINLIMIT BONUS_PLAGUE_INFECTION BONUS_ENERGYLEECH_ONCE BONUS_EVADE_DETECTION BONUS_CHARGE_MORPH BONUS_PLAGUE_DOT BONUS_MISSILE_SLOWDOWN BONUS_PLAGUE BONUS_CHANNEL_CONV_TO_BEST BONUS_DAMPING_TEAMSHARE BONUS_CHARGE_ATTR BONUS_CHANCE_MINION_INFECT BONUS_SPELLDAMAGERANGE_WITH_ESSENCE BONUS_SHRINKHEAD_DROPCHANCE BONUS_TARGET_SEEKER BONUS_CA_MULTIPLIER BONUS_DEBUFF_WITH_ESSENCE BONUS_INVALID BONUS_CHANCE_ROOT BONUS_LOADSINGLECHARGE BONUS_DEBUFF BONUS_LOWERARMOR BONUS_SUPERCHARGE BONUS_ENERGY_ANIHILATION BONUS_CHANCE_CALL_TARGET BONUS_SPEED_LIMIT BONUS_INVERT_ARMOR BONUS_DOTDAMAGE BONUS_HURL_ENEMY none of these scream attribute, other than BONUS_CHARGE_ATTR. So I'm gonna concentrate my testings on that one. Link to comment
dimitrius154 612 Posted August 8, 2022 Share Posted August 8, 2022 14 hours ago, Lindor said: No it's not the bonus ID! Damnit, I need to know why the attributes stop scaling with XP when I shuffle the bonus / bonusgroup IDs! Actually, it is, but the progression is hardcoded. S2logic.dll offset 0x100701F4 sCreatureCalc::recalcStats. Link to comment
Lindor 435 Posted August 8, 2022 Author Share Posted August 8, 2022 1 hour ago, dimitrius154 said: Actually, it is, but the progression is hardcoded. S2logic.dll offset 0x100701F4 sCreatureCalc::recalcStats. Thing is, I still get scaling if I swap the bonus IDs of the BONUS_STATS boni. And I literally deleted the entirety of blueprint.txt except those six boni, and I still got scaling. And from the other side, my mod, which somehow breaks the scaling, still breaks it if I restore the bonus IDs of these six boni. I have very little theory left, the only thing I can think of is that the reason that my mod breaks attribute scaling is not located in Blueprint.txt neither in Creatures.txt but somewhere else. And I don't know where. 1 hour ago, dimitrius154 said: S2logic.dll offset 0x100701F4 sCreatureCalc::recalcStats. Thx! If I can't figure it out with other methods, I need to look it up. But I'm completely lost when it comes to deciphering Assembly. But I need to figure this out. Link to comment
Lindor 435 Posted August 8, 2022 Author Share Posted August 8, 2022 It doesn't make any sense. Literally. Pure EE 3.1: Does not break scaling Changed the six BONUS_STATS bonus IDs for hero stats (and of course implemented that into the creatures.txt creature boni), still didn't break scaling Changed the BONUS_STATS_REL bonus IDs, still didn't break scaling Changed the IDs of the bonusgroups which contain only the six BONUS_STATS boni for hero stats, still didn't break scaling Deleted the entirety of blueprint.txt except the six BONUS_STATS boni, still didn't break scaling My mod on top of EE: Somehow breaks scaling Restored the original bonus IDs of the six BONUS_STATS boni for hero stats (and implemented of course in creatures.txt), still breaks scaling Restored the original bonusgroup IDs which contain only these six boni, still breaks scaling Restored the original BONUS_STATS_REL bonus IDs, still breaks scaling Restored both the entirety of blueprint.txt and creatures.txt to EE, DOES NOT BREAK SCALING ANYMORE! Holy Hannah!! THIS IS ILLOGICAL, CONTRADICTORY AND PARADOXICAL INFORMATION! How the heck can I literally delete the entirety of blueprint.txt/creatures.txt except those boni and it still doesn't break scaling, meaning that IF the bug is located in here, it's these IDs, then change these IDs and it still doesn't break scaling, meaning that it's not these IDs which means the bug is not located in blueprint.txt/creatures.txt, and then restore those two files in the mod which breaks scaling, and suddenly it doesn't break it anymore, meaning the bug IS located in those two files:)! IT DOES NOT MAKE SENSE! Speaking in mathematical language: Let A be the set of content of the original blueprint.txt and creature.txt except those six boni Let B be the set of those six boni's original properties Let C be the set of content of the modified blueprint.txt and creature.txt except those six boni Let D be the set of those six boni's modified properties Let f(M) be a function of a set which decides wether the input set breaks scaling or not. f(M) is true if M doesn't break scaling and false if M does break scaling Then the test results are: f(A∪B) = true f(A∪D) = true f(B) = true f(C∪B) = false f(C∪D) = false f(D) = true Unfortunately, f(A) and f(C) are inconclusive, because if B or D aren't scripted at all, the bonus always equals 0, and everything times 0 is still 0, meaning that it's impossible to know wether the bonus is getting scaled or not. So the only way this would make sense is if the bug is somewhere in C. BUT: How can the change from A to C cause a bug, but the change from A to an empty set works fine? Link to comment
Lindor 435 Posted August 11, 2022 Author Share Posted August 11, 2022 These are my mod's original creatures.txt, blueprint.txt, typification.txt and spells.txt scripts: https://drive.google.com/file/d/1Ip0Jh5B0re4hDvtVAU2E9AYJjCUxBuV5/view?usp=sharing I know the bug must be located somewhere in the former two scripts (but you need the latter two to prevent wierd interaction). Now please, for Q's sake, @idbeholdME @Flix @dimitrius154 @Vishanka @chattius anyone who is experienced with modding and has some dree time at hand, in the name of kane, can you please help me find out why in the burning hells of the prime evils these files break attribute scaling? I can't figure it out, I want to publish the mod soon and I don't have any more video game / star trek metaphors left. Oh and better don't play temple guardian, he summons fen fires which you are lacking the itemtypes for. Link to comment
Flix 5,116 Posted August 12, 2022 Share Posted August 12, 2022 Since you ruled out a lot of stuff, it's something with the language itself then? Can you pick an attribute, use the original scripted entry, and see if it works then? newBonus = { -- name = "crbonus_attr_dex_pc", rating = 0, basedonskill = "SKILL_INVALID", type = "BONUS_STATS", spez = "STAT_DEX", spez2 = "", usagebits = 65535, minconstraints = {1,0,0}, difficultyvaluerange0 = {0,23,525}, difficultyvaluerange1 = {1,23,525}, difficultyvaluerange2 = {2,23,525}, difficultyvaluerange3 = {3,23,525}, difficultyvaluerange4 = {4,23,525}, } mgr.createBonus(31, newBonus); If so then change it line by line and see what breaks it. 1 Link to comment
Lindor 435 Posted August 12, 2022 Author Share Posted August 12, 2022 I don't know what is going on. The game is mocking me. 31 minutes ago, Flix said: Since you ruled out a lot of stuff, it's something with the language itself then? Can you pick an attribute, use the original scripted entry, and see if it works then? newBonus = { -- name = "crbonus_attr_dex_pc", rating = 0, basedonskill = "SKILL_INVALID", type = "BONUS_STATS", spez = "STAT_DEX", spez2 = "", usagebits = 65535, minconstraints = {1,0,0}, difficultyvaluerange0 = {0,23,525}, difficultyvaluerange1 = {1,23,525}, difficultyvaluerange2 = {2,23,525}, difficultyvaluerange3 = {3,23,525}, difficultyvaluerange4 = {4,23,525}, } mgr.createBonus(31, newBonus); If so then change it line by line and see what breaks it. I have done this exact thing already, first just with strength and then with all six of these, and it still broke scaling. Now because you suggested it (thank god!) I did it again, and it doesn't break scaling anymore. I have no idea what is going on, but I'm at a point where I don't care anymore anyway and be just glad that this issue is resolved. Link to comment
dimitrius154 612 Posted August 12, 2022 Share Posted August 12, 2022 @Lindor First, you need to isolate the file responsible. Replace them with the original EE and proceed with adding your edited version file-by-file and checking the ingame result. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now