khelban12 Posted August 3, 2016 Share Posted August 3, 2016 Greetings once more. I thought instead of flooding the forum by opening a new thread every now and then, to make a thread that has all my questions here. I had a surgery and didn't have much time to play bg2 but now that i found some time, i have more questions 1) Has anyone noticed weird behavior with container bags and shops ? When i click on the bag of holding while in my inventory, i can open it fine and see what items it contains. However, when am in the "shop screen", i cannot open it so i can sell the things it contains. I have a quite modded installation but i removed the mods and tried without them and i get the same behavior. Also i tried older gemrb released up to 0.8.0 i think and i still cannot open the bag. This only happens when i am in a shop. Does anyone else have this behavior or i have messed something up in my case ? 2) HP calculation of PC/NPCs. Some months ago, i noticed that my character had very few HP. I finished the whole Irenicus Dungeon and didn't notice it at first but when i loaded a save game in the vanilla engine all the characters had way more HPs. So again, i tried to find what function is responsible for this and tracked it to the following code: hptm.load(tm->QueryField(classname, "HP"), true); if (hptm) { int tmphp = 0; int rollscolumn = hptm->GetColumnIndex("ROLLS"); while (atoi(hptm->QueryField(tmphp, rollscolumn))) tmphp++; buffer.appendFormatted("HPROLLMAXLVL: %d", tmphp); if (tmphp) maxLevelForHpRoll[tmpindex] = tmphp; } So, it queries classes.2da for the proper "HP" table (hprog, hpwiz, etc), opens it and while the ROLLS column does not have a 0 value, it increments the tmphp variable. So the character gets bonus HP for every level that he rolls dice. This works fine. There is a BG2 Tweaks component though that changes the HP calculation to give creatures maximum HP and does it by multiplying SIDES * ROLLS and putting that to the modifier and then putting 0 to ROLLS. So, instead of getting 2*3+0 that is 1D6, you are getting 2*0+6. GemRB has a "Maximum HP" setting ofcourse but i installed the component so that it wmùÓs in the vanilla engine. All this time, i had modified gemrb to use the "MODIFIER" column instead of the "ROLLS" column and check for when the modifier changed and this worked fine. However, the Tweaks Anthology (which replaces BG2 Tweaks) has an extra component which can give Maximum HP only in Level 1. This breaks both the original GemRB code and mine. So back to the drawing board. I don't know if it is the proper solution but the only one i could think of, is no to use such a "calculating" code but to use the "hardcoded" level values. Mages/Thieves get Constitution bonus up until L10 and everyone else up until L9. I inserted another column to bg2/classes.2da and modified the code to read the level from there. I didn't tested it thoroughly but with minimal testing in BG2, it works fine and i get the same HP as before. I guess classes.2da from other games must be modified in the same way. diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 1ce2baf..3898b78 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -2175,15 +2175,10 @@ static void InitActorTables() buffer.appendFormatted("Classis: %d ", classis); levelslots[tmpindex][classis] = IE_LEVEL; //get the last level when we can roll for HP - hptm.load(tm->QueryField(classname, "HP"), true); - if (hptm) { - int tmphp = 0; - int rollscolumn = hptm->GetColumnIndex("ROLLS"); - while (atoi(hptm->QueryField(tmphp, rollscolumn))) - tmphp++; - buffer.appendFormatted("HPROLLMAXLVL: %d", tmphp); - if (tmphp) maxLevelForHpRoll[tmpindex] = tmphp; - } + int tmphp = 0; + tmphp = atoi(tm->QueryField(classname, "CONBONLVL")); + buffer.appendFormatted("HPROLLMAXLVL: %d", tmphp); + if (tmphp) maxLevelForHpRoll[tmpindex] = tmphp; } Log(DEBUG, "Actor", buffer); continue; @@ -2228,16 +2223,10 @@ static void InitActorTables() if (!foundwarrior) { foundwarrior = (classis==ISFIGHTER||classis==ISRANGER||classis==ISPALADIN|| classis==ISBARBARIAN); - hptm.load(tm->QueryField(currentname, "HP"), true); - if (hptm) { - int tmphp = 0; - int rollscolumn = hptm->GetColumnIndex("ROLLS"); - while (atoi(hptm->QueryField(tmphp, rollscolumn))) - tmphp++; - //make sure we at least set the first class - if ((tmphp>maxLevelForHpRoll[tmpindex])||foundwarrior||numfound==0) - maxLevelForHpRoll[tmpindex]=tmphp; - } + int tmphp = 0; + tmphp = atoi(tm->QueryField(classname, "CONBONLVL")); + if ((tmphp>maxLevelForHpRoll[tmpindex])||foundwarrior||numfound==0) + maxLevelForHpRoll[tmpindex]=tmphp; } } diff --git a/gemrb/unhardcoded/bg2/classes.2da b/gemrb/unhardcoded/bg2/classes.2da index 32e62fa..804237f 100644 --- a/gemrb/unhardcoded/bg2/classes.2da +++ b/gemrb/unhardcoded/bg2/classes.2da @@ -1,24 +1,24 @@ 2DA V1.0 * - NAME_REF DESC_REF CAP_REF SAVE MULTI ID HP USABILITY MC_WAS_ID HUMAN ELF HALF_ELF DWARF HALFLING GNOME HALFORC -FIGHTER 7201 9556 1076 SAVEWAR 0 2 HPWAR 0x800 0x0008 1 1 1 1 1 1 1 -RANGER 7200 9557 1077 SAVEWAR 0 12 HPWAR 0x200000 0x0100 1 1 1 0 0 0 0 -PALADIN 7217 9558 1078 SAVEWAR 0 6 HPWAR 0x100000 -1 1 0 1 0 0 0 0 -CLERIC 7204 9559 1079 SAVEPRS 0 3 HPPRS 128 0x0020 1 1 1 1 1 1 1 -DRUID 7210 9560 1080 SAVEPRS 0 11 HPPRS 0x40000000 0x0080 1 1 1 1 0 0 0 -MAGE 7203 9563 1081 SAVEWIZ 0 1 HPWIZ 0x40000 0x0010 1 1 1 0 0 2 0 -THIEF 7202 9561 1082 SAVEROG 0 4 HPROG 0x400000 0x0040 1 1 1 1 1 1 1 -BARD 7206 9562 1083 SAVEROG 0 5 HPROG 64 -1 1 1 1 1 1 1 1 -FIGHTER_THIEF 7205 9572 1052 * 10 9 * 0x20000 -1 0 1 1 1 1 1 1 -FIGHTER_CLERIC 7211 9573 1053 * 6 8 * 0x4000 -1 0 1 1 1 1 1 1 -FIGHTER_MAGE 7213 9574 1056 * 3 7 * 0x2000 -1 0 1 1 0 0 2 0 -MAGE_THIEF 7216 9575 1057 * 9 13 * 0x80000 -1 0 1 1 0 0 2 0 -CLERIC_MAGE 7207 9577 1058 * 5 14 * 256 -1 0 1 1 0 0 2 0 -CLERIC_THIEF 7209 9578 1065 * 12 15 * 512 -1 0 1 1 1 1 1 1 -FIGHTER_DRUID 7212 9579 1066 * 1026 16 * 0x1000 -1 0 1 1 0 0 0 0 -CLERIC_RANGER 7208 9580 1073 * 2052 18 * 1024 -1 0 1 1 0 0 0 0 -FIGHTER_MAGE_THIEF 7215 9576 1074 * 11 10 * 0x10000 -1 0 1 1 0 0 0 0 -FIGHTER_MAGE_CLERIC 7214 9581 1075 * 7 17 * 0x8000 -1 0 1 1 0 0 0 0 -SORCERER 45849 45866 45856 SAVEWIZ 0 19 HPWIZ 0x40000 -1 1 1 1 0 0 0 0 -MONK 45851 45867 45858 SAVEMONK 0 20 HPMONK 0x20000000 -1 1 0 0 0 0 0 0 -BARBARIAN 45855 45869 45859 SAVEWAR 0 2 HPBARB 0 -1 1 1 1 1 1 1 1 + NAME_REF DESC_REF CAP_REF SAVE MULTI ID HP CONBONLVL USABILITY MC_WAS_ID HUMAN ELF HALF_ELF DWARF HALFLING GNOME HALFORC +FIGHTER 7201 9556 1076 SAVEWAR 0 2 HPWAR 9 0x800 0x0008 1 1 1 1 1 1 1 +RANGER 7200 9557 1077 SAVEWAR 0 12 HPWAR 9 0x200000 0x0100 1 1 1 0 0 0 0 +PALADIN 7217 9558 1078 SAVEWAR 0 6 HPWAR 9 0x100000 -1 1 0 1 0 0 0 0 +CLERIC 7204 9559 1079 SAVEPRS 0 3 HPPRS 9 128 0x0020 1 1 1 1 1 1 1 +DRUID 7210 9560 1080 SAVEPRS 0 11 HPPRS 9 0x40000000 0x0080 1 1 1 1 0 0 0 +MAGE 7203 9563 1081 SAVEWIZ 0 1 HPWIZ 10 0x40000 0x0010 1 1 1 0 0 2 0 +THIEF 7202 9561 1082 SAVEROG 0 4 HPROG 10 0x400000 0x0040 1 1 1 1 1 1 1 +BARD 7206 9562 1083 SAVEROG 0 5 HPROG 10 64 -1 1 1 1 1 1 1 1 +FIGHTER_THIEF 7205 9572 1052 * 10 9 * 9 0x20000 -1 0 1 1 1 1 1 1 +FIGHTER_CLERIC 7211 9573 1053 * 6 8 * 9 0x4000 -1 0 1 1 1 1 1 1 +FIGHTER_MAGE 7213 9574 1056 * 3 7 * 9 0x2000 -1 0 1 1 0 0 2 0 +MAGE_THIEF 7216 9575 1057 * 9 13 * 10 0x80000 -1 0 1 1 0 0 2 0 +CLERIC_MAGE 7207 9577 1058 * 5 14 * 9 256 -1 0 1 1 0 0 2 0 +CLERIC_THIEF 7209 9578 1065 * 12 15 * 9 512 -1 0 1 1 1 1 1 1 +FIGHTER_DRUID 7212 9579 1066 * 1026 16 * 9 0x1000 -1 0 1 1 0 0 0 0 +CLERIC_RANGER 7208 9580 1073 * 2052 18 * 9 1024 -1 0 1 1 0 0 0 0 +FIGHTER_MAGE_THIEF 7215 9576 1074 * 11 10 * 9 0x10000 -1 0 1 1 0 0 0 0 +FIGHTER_MAGE_CLERIC 7214 9581 1075 * 7 17 * 9 0x8000 -1 0 1 1 0 0 0 0 +SORCERER 45849 45866 45856 SAVEWIZ 0 19 HPWIZ 10 0x40000 -1 1 1 1 0 0 0 0 +MONK 45851 45867 45858 SAVEMONK 0 20 HPMONK 9 0x20000000 -1 1 0 0 0 0 0 0 +BARBARIAN 45855 45869 45859 SAVEWAR 0 2 HPBARB 9 0 -1 1 1 1 1 1 1 1 What are your thoughts about this ? Is this acceptable code ? Is there a better solution than this ? It isn't worth it to change at all since GemRB has its own Maximum Hp Setting ? Edit: 3) NPC Level NPCs have many creature files with different levels. When you meet one, you get the appropriate version for your level. This is also the case for Jaheira and Minsc in the Starting Dungeon. When you create a rogue PC, the starting XP of 89000 results in a L8 character. The vanilla engine gives you a L8-L7 Jaheira with 81000*2 XP and a L8 Minsc with 161000 XP. However, GemRB gives you the lower creature files that you get with a normal L7 PC. I tracked it down to the CheckForReplacementActor in Game.cpp. The code in question was changed by the following commit: commit 66124ed39297424cf7561f2fe249a52f78b66e80 Author: Jaka Kranjc <lynxlupodian@users.sourceforge.net> AuthorDate: Mon Apr 23 19:33:59 2012 +0200 Commit: Jaka Kranjc <lynxlupodian@users.sourceforge.net> CommitDate: Mon Apr 23 19:33:59 2012 +0200 the npclevel 2da does not contain replacement for high levels diff --git a/gemrb/core/Game.cpp b/gemrb/core/Game.cpp index 018b7a2..80c6321 100644 --- a/gemrb/core/Game.cpp +++ b/gemrb/core/Game.cpp @@ -876,7 +876,12 @@ bool Game::CheckForReplacementActor(int i) { std::vector<std::vector<char *> >::iterator it; for (it = npclevels.begin(); it != npclevels.end(); it++) { if (!stricmp((*it)[0], act->GetScriptName()) && (level > 2)) { - strncpy(newcre, (*it)[level-2], sizeof(ieResRef)); + // the tables have entries only up to level 24 + ieDword safeLevel = npclevels[0].size() - 1; + if (level < safeLevel) { + safeLevel = level; + } + strncpy(newcre, (*it)[safeLevel-2], sizeof(ieResRef)); break; } } Should that -1 be there when safeLevel is already decremented by 2 ? diff --git a/gemrb/core/Game.cpp b/gemrb/core/Game.cpp index a333e9b..bd2fd42 100644 --- a/gemrb/core/Game.cpp +++ b/gemrb/core/Game.cpp @@ -972,7 +972,7 @@ bool Game::CheckForReplacementActor(int i) for (it = npclevels.begin(); it != npclevels.end(); it++) { if (!stricmp((*it)[0], act->GetScriptName()) && (level > 2)) { // the tables have entries only up to level 24 - ieDword safeLevel = npclevels[0].size() - 1; + ieDword safeLevel = npclevels[0].size(); if (level < safeLevel) { safeLevel = level; } I removed the decrement and now i get the proper NPCs in all cases but as always i only tested it minimally and only in BG2. Thank you for your time. Link to comment
lynx Posted August 3, 2016 Share Posted August 3, 2016 It's actually better to have separate threads, so the info is easier to search for and linked to. 1. I'm pretty sure we just don't have support for nested shops yet (a single CurrentStore marker). Inventory bags are technically stores too. 2. Yeah, it looks good. The values for other games would be the same, only perhaps pst needs different (iwd2 doesn't use this). Our extend2da.py doesn't know about insertion at col index or rearrangement, but maybe NI does (only checked DLTCEP). The annoying thing is that we can't get rid of maxLevelForHpRoll and just use the table values for all, since it also dictates for how long the constitution bonus to hp should be applied (which you noticed too). Link to comment
khelban12 Posted August 3, 2016 Author Share Posted August 3, 2016 It's actually better to have separate threads, so the info is easier to search for and linked to.Ok, i will use separate threads then. 1. I'm pretty sure we just don't have support for nested shops yet (a single CurrentStore marker). Inventory bags are technically stores too.That is why it didn't work then Thank you for clarifying it to me. I didn't know that. 2. Yeah, it looks good. The values for other games would be the same, only perhaps pst needs different (iwd2 doesn't use this). Our extend2da.py doesn't know about insertion at col index or rearrangement, but maybe NI does (only checked DLTCEP).Nice, i didn't know about extend2da.py. I did it from vim's block mode where you can easily delete/insert columns in cases like this. Do you have any thoughts about the -1 decrement in 3 ? Thanks again. Link to comment
lynx Posted August 3, 2016 Share Posted August 3, 2016 I didn't see #3 before. It looks like you're correct. The -1 is there due to the first element being the row name, but since the columns start at two, it should also have a +1, effectively zero. Nice catch! Link to comment
khelban12 Posted August 17, 2016 Author Share Posted August 17, 2016 I compiled the latest (0163d5ed commit) gemrb to start a new playthrough and i thought to mention some modifications i do locally in case anyone likes them (besides those that i have already mentioned in older posts). 1) Fix for Reform party window Regardless of how many NPCs are in the party, the reform window always shows an extra border at the far right of the screen. I tracked it down to the function GetPortraitButtonPairs which is correctly called with ExtraSlots=1, but contains the code min(oldSlotCount, MAX_PARTY_SIZE) = min(6 + 1, 6) so the ExtraSlots being 1 is not taken into account. I changed the code from min() to max() and it works but it looks wrong to me to change the logic of the code. Maybe some other steps need to be taken. Works fine in my case but not recommended. diff --git a/gemrb/GUIScripts/GUICommonWindows.py b/gemrb/GUIScripts/GUICommonWindows.py index 84b279b..dc5a9c8 100644 --- a/gemrb/GUIScripts/GUICommonWindows.py +++ b/gemrb/GUIScripts/GUICommonWindows.py @@ -1384,7 +1384,7 @@ def GetPortraitButtonPairs (Window, ExtraSlots=0, Mode="vertical"): pairs = {} oldSlotCount = 6 + ExtraSlots - for i in range(min(oldSlotCount, MAX_PARTY_SIZE)): # the default chu/game limit or less + for i in range(max(oldSlotCount, MAX_PARTY_SIZE)): # the default chu/game limit or less pairs[i] = Window.GetControl (i) # nothing left to do 2) Character Creation screen shows the total number of points rolled and also doesn't allow rolls less than 75 like the vanilla engine. I used the label just left to the remaining points (it used to just say Abilities) to print the total number of points. diff --git a/gemrb/GUIScripts/bg2/GUICG4.py b/gemrb/GUIScripts/bg2/GUICG4.py index 6d1ae42..188c29b 100644 --- a/gemrb/GUIScripts/bg2/GUICG4.py +++ b/gemrb/GUIScripts/bg2/GUICG4.py @@ -91,22 +91,28 @@ def RollPress(): else: e = 0 GemRB.SetVar("StrExtra", e) - for i in range(6): - dice = 3 - size = 5 - CalcLimits(i) - v = GemRB.Roll(dice, size, Add+3) - if v<Minimum: - v = Minimum - if v>Maximum: - v = Maximum - GemRB.SetVar("Ability "+str(i), v ) - Label = AbilityWindow.GetControl(0x10000003+i) - if i==0 and v==18 and HasStrExtra: - Label.SetText("18/"+str(e) ) - else: - Label.SetText(str(v) ) - Label.SetUseRGB(1) + Total = 0 + while (Total < 75): + Total = 0 + for i in range(6): + dice = 3 + size = 5 + CalcLimits(i) + v = GemRB.Roll(dice, size, Add+3) + if v<Minimum: + v = Minimum + if v>Maximum: + v = Maximum + GemRB.SetVar("Ability "+str(i), v ) + Total += v + Label = AbilityWindow.GetControl(0x10000003+i) + if i==0 and v==18 and HasStrExtra: + Label.SetText("18/"+str(e) ) + else: + Label.SetText(str(v) ) + Label.SetUseRGB(1) + SumLabel = AbilityWindow.GetControl(0x10000000) + SumLabel.SetText("Total: "+str(Total) ) return def OnLoad(): 3) Modify the Trap finding code. Controversial change significantly modifying the Trap behavior but i think that it is correct. GemRB divides that Find Traps skill by 2 and then makes a roll with that (rolls from 1 to FT/2). Then it adds this roll to the second half of the skill and if it is larger than the trap difficulty, then the trap is disabled. If not, then the trap is triggered. I guess it does that to have an element of randomness in the trap process (i tracked the code back to 2003 but it doesn't document the decision). However, i do not think the vanilla engine behaves in the same way. I noticed this difference the first time i used gemrb because i triggered some traps in the Irenicus Dungeon when i never had in the vanilla engine. I do not have any proof of this (maybe Avenger or someone else with access to the EE code can shed a light how traps work) but i think the vanilla engine behaves without rolling dice. When your Find Traps skill is larger than the trap difficulty, you disarm it every single time. Also, when you do not disarm it, it is not automatically triggered unless you move into it. I tested this in Ellesime's room in the Irenicus Dungeon. I had a character try to disarm a trap and fail over 50-60 times and it was never triggered (i remember in the past triggering some traps so maybe there is a 1% fail like in pickpocketing and hiding in shadows). So i modified the code to a) not roll at all but use the whole skill without dividing it, b) not trigger the trap when fail to disarm. diff --git a/gemrb/core/Scriptable/Door.cpp b/gemrb/core/Scriptable/Door.cpp index 182645e..08b3ffe 100644 --- a/gemrb/core/Scriptable/Door.cpp +++ b/gemrb/core/Scriptable/Door.cpp @@ -351,9 +351,6 @@ void Highlightable::TryDisarm(Actor *actor) if (skill == 0) { // a trained skill trapDC = 100; } - } else { - roll = core->Roll(1, skill/2, 0); - skill /= 2; } int check = skill + roll + bonus; @@ -377,7 +374,7 @@ void Highlightable::TryDisarm(Actor *actor) displaymsg->DisplayRollStringName(39266, DMC_LIGHTGREY, actor, roll, skill-bonus, bonus, trapDC); } displaymsg->DisplayConstantStringName(STR_DISARM_FAIL, DMC_LIGHTGREY, actor); - TriggerTrap(skill, actor->GetGlobalID()); + //TriggerTrap(skill, actor->GetGlobalID()); } ImmediateEvent(); } 4) Fix abilities order. Thieves have the Hide in Shadows and Thieving abilities reversed. I changed qslots to mimic the vanilla engine. diff --git a/gemrb/unhardcoded/bg2/qslots.2da b/gemrb/unhardcoded/bg2/qslots.2da index 502dae5..bdb1641 100644 --- a/gemrb/unhardcoded/bg2/qslots.2da +++ b/gemrb/unhardcoded/bg2/qslots.2da @@ -4,18 +4,18 @@ MAGE 3 4 5 2 8 9 11 12 13 FIGHTER 18 19 14 100 8 9 11 12 13 CLERIC 6 3 4 2 8 9 11 12 13 -THIEF 22 0 1 100 8 9 11 12 13 +THIEF 22 1 0 100 8 9 11 12 13 BARD 20 1 3 2 8 9 11 12 13 PALADIN 18 14 6 2 8 9 11 12 13 FIGHTER_MAGE 3 4 5 2 8 9 11 12 13 FIGHTER_CLERIC 6 3 4 2 8 9 11 12 13 -FIGHTER_THIEF 18 22 0 1 8 9 11 12 13 -FIGHTER_MAGE_THIEF 22 0 1 2 8 9 11 12 13 +FIGHTER_THIEF 18 22 1 0 8 9 11 12 13 +FIGHTER_MAGE_THIEF 22 1 0 2 8 9 11 12 13 DRUID 3 4 5 2 8 9 11 12 13 RANGER 18 14 0 2 8 9 11 12 13 -MAGE_THIEF 22 0 1 2 8 9 11 12 13 +MAGE_THIEF 22 1 0 2 8 9 11 12 13 CLERIC_MAGE 6 3 4 2 8 9 11 12 13 -CLERIC_THIEF 22 0 1 2 8 9 11 12 13 +CLERIC_THIEF 22 1 0 2 8 9 11 12 13 FIGHTER_DRUID 3 4 5 2 8 9 11 12 13 FIGHTER_MAGE_CLERIC 6 3 4 2 8 9 11 12 13 CLERIC_RANGER 6 3 4 2 8 9 11 12 13 Link to comment
lynx Posted August 17, 2016 Share Posted August 17, 2016 1. The check is there to prevent trying to access non-existent default controls. Does a MAX_PARTY_SIZE + ExtraSlots work as expected? 2. Was this always true or is only true for lower difficulties? 3. I don't know if this originated from RE or from a choice, but considering the pickpocket RE didn't show anything like this, I'd wager you're correct. The triggering bit is more complicated. Could be different amongst games, among doors/containers/infopoints and potentially another thing affected by difficulty. 4. Ripe for a pull request. Link to comment
khelban12 Posted August 17, 2016 Author Share Posted August 17, 2016 1. The check is there to prevent trying to access non-existent default controls. Does a MAX_PARTY_SIZE + ExtraSlots work as expected? for i in range(min(oldSlotCount, MAX_PARTY_SIZE + ExtraSlots)) Do you mean like the above ? If yes, then yes it works that way too since it doesn't cancel the ExtraSlots. 2. Was this always true or is only true for lower difficulties?I don't know much about this but i always remember reading in fora that you couldn't get a score lower than 75. 3. I don't know if this originated from RE or from a choice, but considering the pickpocket RE didn't show anything like this, I'd wager you're correct. The triggering bit is more complicated. Could be different amongst games, among doors/containers/infopoints and potentially another thing affected by difficulty.There were surely times i failed disarming a trap and didn't trigger it even on higher difficulty settings but until someone can verify that this is the way the engine works, then yes do not trust my word on this. I may remember wrong. 4. Ripe for a pull request. Yeah, a pull request would make it easier for you and i will also not bother the forum, but i have stopped using github (nor i considered that my suggestions were good enough to include). Link to comment
lynx Posted August 17, 2016 Share Posted August 17, 2016 1. Ok, did that. 2. Definitely something to test. With a human or something with low racial minimums and a similarly free class (vs. paladin's high requirements). I've added it to the wiki research list that nobody seems to look at. Maybe I should sticky it here. 3. Yep, just more testing required. 4. It's fine for few-liners, but how about uploading the patches to a pastebin next time? I could then apply them directly (most have a raw mode). But this one had no whacky spaces, so it applied in a here doc nicely. Thanks and don't think so badly of your work! Link to comment
Jarno Mikkola Posted August 17, 2016 Share Posted August 17, 2016 2. Definitely something to test. With a human or something with low racial minimums and a similarly free class (vs. paladin's high requirements).Nope. Fighter is far better, it's minimums are 9,3,3,3,3.... everyone else will get more or equal. Because the paladin's cha is minimum of 17, it's that at least, in the old goldbox games, you couldn't pick a class before you had the base stats, so you might not have been able to be a paladin because you lacked the points, but in BG's you choose the class first, so you will be getting the minimum requirements... and yeah, there should be the total 75 points minimum from what I have read too. Well, there's one exception, if the kit has stat penalties/bonuses, like for example the avenger, these modifiers will be added on top of the min & max. So yes, you can make a char that min & max 3's in every stat, if you really want to. Link to comment
khelban12 Posted August 18, 2016 Author Share Posted August 18, 2016 1. Ok, did that. Thank you once again. 2. Definitely something to test. With a human or something with low racial minimums and a similarly free class (vs. paladin's high requirements).I did a small test. High difficulty (though i don't think it matters), Human Fighter, 75 rolls (i got bored after that ). Results are the following: 92 (1 time), 85, 84, 82 (each 2 times), 83, 81 (each 3 times), 80 (5 times), 79, 78 (each 8 times), 77 (11 times), 76 (13 times), 75 (17 times). By the high number of 75 rolled and by the fact that nothing lower ever rolled, it seems that 75 is indeed the lower limit but my sample size isn't high enough to make a statistic conclusion. It isn't something crucial anyway, so even if gemrb doesn't match the vanilla behavior, it isn't big deal. I just mentioned it because i had done the change. I've added it to the wiki research list that nobody seems to look at. Maybe I should sticky it here.I follow the todo list and the rest of the wiki and i know you update it. I browse it from time to time to see if there is a topic i can help with but most are beyond my capabilities. 4. It's fine for few-liners, but how about uploading the patches to a pastebin next time? I could then apply them directly (most have a raw mode). But this one had no whacky spaces, so it applied in a here doc nicely. Yes, pastebin is fine. Or maybe i should just use pull requests on GH instead of making your job difficult. I stopped using GH and made Gitlab my primary hosting on principle because i didn't like some decisions GH made, but that is not your problem and you shouldn't have to copy/paste diffs from fora/pastebin just because i don't like GH. Edit: How could i forget about animation speed ? A major problem i had was about enemies walking way too fast. I tracked it down to here where the movement speed is modified from 9 to the frame count of the animation. At first i thought that it was a problem with infinity animations but i can also reproduce it with the vanilla game (i have the impression that in older gemrb versions i didn't have this problem but i tried to go back to v0.8.0 or something and still everything moves too fast). For example the goblins in the starting dungeon move twice as fast as me (from their animation frame count they get a speed of 17). Disabling this code so that everyone has a base speed of 9 seems to work ok (i ran bgmain in wine and gemrb at the same time on the same save and characters move just a tad bit faster in gemrb so maybe the vanilla engine speed is 8 instead of 9 but i have no proof of that). Link to comment
lynx Posted August 18, 2016 Share Posted August 18, 2016 2. Good enough for me. I've modified the display though, so the title is preserved and not limited to English users. Thanks! 3. I actually meant this one, though the todo also evolved into having research topics as bugs were investigated: http://www.gemrb.org/wiki/doku.php?id=developers:ietesting 4. Since you're active on the forum the combination with pastebin is ok. I guess we could also start a mirror on gitlab if you think that would be helpful. Link to comment
khelban12 Posted August 18, 2016 Author Share Posted August 18, 2016 2. Good enough for me. I've modified the display though, so the title is preserved and not limited to English users. Thanks!Yes my solution was sloppy. I just tested yours and it works perfectly. I guess we could also start a mirror on gitlab if you think that would be helpful.A new repo should be created on gitlab, all the people that contribute to gemrb should create a new account on gitlab, and everyone should change their workflow to accommodate me so that i can contribute 1 one-line fix every 3-4 months . No, that is not acceptable. You have done more than enough already. I will do my modifications on GH and issue pull requests there. Do you have any ideas about the walking speed of creatures ? Link to comment
lynx Posted August 18, 2016 Share Posted August 18, 2016 Walking speed is one of our most annoying missing data problems. They were hardcoded in the animation code in the original and nobody extracted that. And of course, they were different amongst games (obvious with boots of speed in bg1 vs bg2). It was (partly? Short list) fixed in the ee version, but that's only one engine, one game: https://lynxlynxlynx.github.io/iesdp/files/2da/2da_bgee/extspeed.htm Our fallback is 9, but we use the number of frames in the current animation cycle. A good approximation, but not good enough. Perhaps only a few animations need an override like it seems in ees, I guess that table would be an interesting start for exploration — which animation types do those inside use and what are their frame counts? Any patterns and so on. Too bad we lost all our disassembly readers, it's all just black-box poking now. Link to comment
khelban12 Posted August 18, 2016 Author Share Posted August 18, 2016 Walking speed is one of our most annoying missing data problems. They were hardcoded in the animation code in the original and nobody extracted that. And of course, they were different amongst games (obvious with boots of speed in bg1 vs bg2). It was (partly? Short list) fixed in the ee version, but that's only one engine, one game: https://lynxlynxlynx.github.io/iesdp/files/2da/2da_bgee/extspeed.htm Our fallback is 9, but we use the number of frames in the current animation cycle. A good approximation, but not good enough. Perhaps only a few animations need an override like it seems in ees, I guess that table would be an interesting start for exploration — which animation types do those inside use and what are their frame counts? Any patterns and so on. Too bad we lost all our disassembly readers, it's all just black-box poking now. After the code that uses FrameCount, i added some code using AutoTable to load extspeed.2da and overwrite IE_MOVEMENT at least for those creatures in it and although it is not optimal (it opens the file once per every creature in the area), it seems to work. Can GemRB use this extspeed table or there will be legal problems with Beamdog ? For entries not in the file, i can fire both GemRB and bgmain.exe at the same time and try to visually estimate what speed is needed for each creature but it would be hit and miss. If only Beamdog could release these kind of engine details so that disassembly of bgmain.exe and searching in the dark wouldn't be needed Link to comment
lynx Posted August 18, 2016 Share Posted August 18, 2016 We can use it, but we can't ship it without getting their explicit permission first. Did you decode the ids back to hex — if so, which class of avatars does it apply to? It looks too sparse to be affecting all player character choices. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.