Giter Site home page Giter Site logo

gemrb / gemrb Goto Github PK

View Code? Open in Web Editor NEW
914.0 49.0 177.0 84.44 MB

GemRB is a portable open-source implementation of Bioware’s Infinity Engine.

Home Page: https://gemrb.org

License: GNU General Public License v2.0

Shell 0.24% Python 18.93% Makefile 0.20% Java 0.07% C++ 77.85% Objective-C++ 0.22% CMake 0.96% Objective-C 0.52% C 0.80% GLSL 0.03% GDB 0.01% Roff 0.20%
c-plus-plus python isometric game-engine engine game

gemrb's Introduction

GemRB

GitHub build status AppVeyor build status Coverity Badge Quality Gate Status CII Best Practices

Introduction

GemRB (Game Engine Made with preRendered Background) is a portable open-source reimplementation of the Infinity Engine that underpinned Baldur's Gate, Icewind Dale and Planescape: Torment. It sports a cleaner design, greater extensibility and several innovations. Would you like to create a game like Baldur's Gate?

To try it out you either need some of the ORIGINAL game's data or you can get a tiny sneak peek by running the included trivial game demo.

The original game data has to be installed if you want to see anything but the included trivial demo. On non-windows systems either copy it over from a windows install, use a compatible installer, WINE or extract it manually from the CDs using the unshield tool.

Documentation can be found on the website, in gemrb/docs/ and the gemrb.6 man page.

If you want to help out, start by reading this list of options, tips and priorities.

Supported platforms

Architectures and platforms that successfully run or ran GemRB:

  • Linux x86, x86-64, ppc, mips (s390x builds, but no running info)
  • FreeBSD, OpenBSD, NetBSD
  • MS Windows
  • various Macintosh systems (even pre x86)
  • some smart phones (Symbian, Android, other Linux-based, iOS)
  • some consoles (OpenPandora, Dingoo)
  • some exotic OSes (ReactOS, SyllableOS, Haiku, AmigaOS, AmberElec, ArkOS, UnofficialOS)

If you have something to add to the list or if an entry doesn't work any more, do let us know!

Requirements

See the INSTALL file.

Contacts

There are several ways you can get in touch:

Useful links

Original engine research and data manipulation software:

  • IESDP, documentation for the Infinity Engine file formats and more
  • Near Infinity, Java viewer and editor for data files
  • DLTCEP, MS Windows viewer and editor for data files
  • iesh, IE python library and shell (for exploring data files)

Tools that can help with data installation:

  • WINE, Open Source implementation of the Windows API, useful for installing the games
  • Unshield, extractor for .CAB files created by InstallShield

gemrb's People

Contributors

anewusername avatar balrog994 avatar behoider avatar berenm avatar bernds avatar bradallred avatar bsdcode avatar burner1024 avatar caillean7 avatar chilvence avatar devurandom avatar dreamkins avatar edheldil avatar fenuks avatar fizzet avatar fuzzie avatar gtoptsid avatar kmfrick avatar kujeger avatar lynxlynxlynx avatar m7600 avatar marcelhb avatar mounirlamouri avatar northfear avatar olathuss avatar peschwa avatar rsantellan avatar tomprince avatar tomsod avatar wjp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gemrb's Issues

[bug] Baldur's gate 1 (GOG version) battle weapon effect won't play

Describe the bug
Baldur's gate 1 (GOG version) battle weapon effect won't play. I tried serveral weapon such as staff, dagger, sword, bow but no clash, bang, wiff,etc. sound effect

GemRB version: 0.85

To Reproduce
Battle with enemies.

Expected behavior
Have weapon sound effect like original.

[feature] SNDCHANN.2da handling

Description
We currently ignore this table. https://gibberlings3.github.io/iesdp/files/2da/2da_tob/sndchann.htm

Remaining TODO:

  • ARMOR #124
  • SWINGS #100
  • MONSTER also for their 2da/ini sounds (some combat sounds are also missing #148 )

RESEARCH all the mappings and implement, will fix too loud magic missile hit sound. Maybe also Saradush soldier NPCs' loud grunts.

Additional context

  • HIT_*.wav for HITS. It's also what MM uses — also modifies the volume of spell effect sounds with a target (using opcode #174)
  • SWI_*.wav for SWINGS #100 and in-CRE ATTACK soundset slot (but not 2DA attack sounds -- these are modified by MONSTER)
  • MONSTER: 2DA soundsets and NPC in-CRE soundsets (if they're hostile)
  • CHA/CAS_*.wav for CASTING
  • ARM_*.wav for ARMOR (tings and twangs as actors in armor move aroun, not inventory don/doff)
  • MISSILE ???
  • AMB_*.wav: AMBIENTL, AMBIENTN, AREA_AMB are at 100 anyway. Info from skellytz
    • AMBIENTL modifies the volume of ambients in the ARE ambients section with the looping flag.
    • AMBIENTN modifies the volume of all other ambients in the ARE ambients section.
    • AREA_AMB modifies the volume of main ambients in the ARE songs section (BG1 main ambients), as well as ambients in the ARE ambients section with both looping and ignore radius flags (BG2 main ambients).
  • WALKINGC, WALKINGM footsteps sounds (characters, monsters / pcs, npcs)

[feature] fully externalised char animations

Description
This was a big ugly mess in the originals, except for pst, which used ini files (resdata.ini + one per animation id). We should move everything over to the same system and abandon avatars.2da, unless it somehow remains relevant. EEs opted for the same thing.

The individual files can then contain all the exceptions and tweaks that are now sprinkled in CharAnimations. Several of the animation types will be obsolete, as we have a few just due to missing frames and/or orientations.

https://gibberlings3.github.io/iesdp/file_formats/ie_formats/ini_anim.htm likely includes all of the old original research for resdata.ini (recheck if we miss anything): https://www.gibberlings3.net/forums/topic/1818-resdata-info/?tab=comments

[bug] Animation ID shifts when tiefling NPC joins or NPC with different ID than it's race

Describe the bug
As soon as a tiefling NPC joins party it's Animation ID shifts to human. Same goes for any NPC with different animation ID from it's race. The animation ID will shift to its race overriding custom animation ID.

Examples:

0)

Death Knight from Durlag Tower has human race in default BGT/ BG1:EE and his animation gets swamped to human

1)

Haer'Dalis tifeling male bard animation ID 0x6001 changes to human male bard 0x6300

Fade mod NPC - tiefling female bard animation ID 0x6311 changes to human female bard 0x6310

Haer'Dalis and Fade before joing

Haer'Dalis and Fade before joing

Tieflings Fade HaerDalis after joining

Tieflings Fade HaerDalis after joining

2)

Tenya is a female human cleric NPC but has non human animation ID 0x6011 but after joining the party her animation ID changes to female human cleric 0x6010

Tenya before joining

Tenya before joining

Tenya after joining

Tenya after joinig

To Reproduce
Have Haer'Dalis join the party and see his animation ID to change to human bard.

[feature] improved pathfinding meta bug

The pathfinder needs to fulfil several requirements:

  • work well for long paths
  • support on-the-fly recalculation (a better path may become available)
  • support NPC bumping — ignoring neutral and friendly characters (and anyone with IE_NPCBUMP set) when checking the search map
    • and eventually pushing them away if they're in the way
  • not get all tangled up when the whole party moves or one pc temporarily blocks the path (connected to previous points)
  • consider all 16 directions, not just 8
    • the movement should follow it
  • support arbitrary waypoints (currently not exposed to the user yet #107)
  • track moving targets (eg. enemies attacking; someone wanting to start a dialog)
  • be efficient?

new:

  • work well for long paths
  • support on-the-fly recalculation (a better path may become available)
  • support NPC bumping — ignoring characters when checking the search map, until they're physically blocking you
    • and eventually pushing them away if they're in the physical way (eg. blocking a door)
  • not get all tangled up when the whole party moves or one pc temporarily blocks the path (connected to previous points)
  • consider all 16 directions, not just 8
    • the movement should follow it
  • support arbitrary waypoints
  • track moving targets (eg. enemies attacking; someone wanting to start a dialog)
  • be efficient

IsParyMember()? Then can ignore and bump anyone with GetStat(IE_EA) < EA_EVILCUTOFF.
If GetStat(IE_NPCBUMP) > 0 one can bump everyone.
Other cases can't bump anyone.
Since our search map doesn't store actor info, we need to add more bits and rethink the uses of PATH_MAP_PC/PATH_MAP_NPC/PATH_MAP_ACTOR, so we can infer more about the setter of the blocked area.

kmfrick is working on a theta* based pathfinder.

Good test cases:

  • bg1: thief maze (long narrow winding paths), firewine ruins (convoluted)
  • bg2: chateau irenicus (very long winding path: ellesime room -> cambion; close most central doors)
  • bg2: slums (many random walkers, random fly)
  • bg2: coronet: tight spaces — kitchen, stairs; seated patrons, all good for testing bumping; lehtinan vs hendak cutscene (ai movement)
  • iwd2: just getting off the main pier
  • pst: any, running (for backoff timing)
  • dragons (big circles) and size transformations: tob draconis
  • getting within operating distance for traps and containers, dialog

Enable SSL on the website & migrate

It's 2019. A free certificate can be got from Let's Encrypt. DNS or file verification. 3 month validity, so a script needs to be used to refresh the cert a few days before expiry.

EDIT: So the idea is to move to the Jekyll static site generator, since github supports it natively and have the actual site in a separate repo. We then get SSL for free for no hassle. We need to find and/or design a template (theme) and then move the actual content over.

finish subviews/* work

The branch accumulated tons of GUI, but also some unrelated work. It includes a windowing rewrite that also upgraded text handling and drawing significantly.

See the branches bugtracker (started before the main repo had this one) and the subviews label here. We could also move the old ones over and relabel them.

Stuff to reverify (merge problems):

  • n/a

Stuff to do after the merge:

  • change the github actions coverity workflow to check master again
  • remove subviews bug reporting template
  • recheck (closed) subviews-recheck bugs, since many will automatically close
  • archive subviews tag to the end of the list
  • add big demo data fetching to builder workflows
  • update NEWS

Among other things, this should fix the following reports (recheck when done):

  • desensitivize portrait dragging
  • portrait icons flicker (check in iwd1)?
  • mouse scroll scrollbar scrolling always scrolls up (general sdl2 backend bug)
  • readded textarea editing support
  • starting dialog closes all other windows and subwindows
  • pst smoothly scrolls between dialog states — doesn't instantly snap to top
  • mousewheel does not change to scroll the area that is under the cursor (visible in windows with multiple scrollbars)
  • keyboard shortcuts assignment to tooltips is missing for menu window (return to game, inventory …)

New features and fixes:

  • basic resolution independence
  • Subtitle support for BIK videos (SDL2 only probably).
  • Video playback in SDL2 is no longer a lag-fest.
  • window dragging support (also improving the PST float window)
  • tooltip artifacts are cured (very noticeable on the game options). Probably some other tooltip bugs like wrapping too.
  • improved debug console
  • movement animations are smoother

A comprehensive writeup

[bug] tob hell challenge ogre mages are invisible too much

Describe the bug
The first challenge in the pocket plane, if you're of good alignment, sees you fighting ogre mages (chevil03.cre, spawned simply by the area script of ar4500) in the second half. They turn invisible by script all the time, so they're almost impossible to kill.

They have a ring of permanent invisibility on, but also the ogmagi01.bcs has this broken block (nothing sets the timer):

IF
	!StateCheck(Myself,STATE_INVISIBLE)
	!GlobalTimerNotExpired("Invis","LOCALS")
THEN
	RESPONSE #100
		ApplySpell(Myself,WIZARD_INVISIBILITY)  // SPWI206.SPL (Invisibility)
END

Either thing by itself is problematic and together only worse. Should equipped effect application be delayed? Which of the two is the actual source of invisibility in the original?

https://youtu.be/pJJoDLfZ1gM?t=716 the original does cope with this bs.

Fog of war corner glitch

Fully visible squares with one corner neighbour invisible need alpha of the adjacent corner to the invisible square tuned down (uh, I hope it is clear what to do, look for artefacts in the fog of war edge).

unhardcode walk speeds

Only PST has walk/run speed defined in nice ini files, one per animation. EEs later adopted the same mechanism. All the other engine versions had it hardcoded in the animation code. In this case we currently default the speed to the count of frames in the first cycle of the walking animation.

Character speeds are therefore mostly too fast, especially in bg1 (also causing its boots of speed to have no effect (sets the speed to the same value, instead of using a % modifier like in bg2). Another example: the goblins in the starting dungeon move twice as fast as me (from their animation frame count they get a speed of 17).

The pathfinder upgrade #106 fixes this speed difference only for the general case.

Some excellent research, especially on page 2. Disabling this code so that everyone has a base speed of 9 seems to work ok.

The new EE table is extspeed.2da, but look up the research link for a more readable version. We need to create one for all games except PST. Perhaps it can be shared, since the bg1/bg2 speed difference is currently handled elsewhere.

A copy of the table from the post:

Anim ID      HEX         Creature              Frame Count   extspeed.2da
4096         1000        WYVERN_BIG            9             8
12288        3000        ANKHEG                21            6
25600        6400        DRIZZT                10            9
28672        7000        HALF_OGRE             10            7
28928        7100        BASILISK              13            6
28929        7101        BASILISK_GREATER      13            6
29184        7200        BEAR_BLACK            12            9
29185        7201        BEAR_BROWN            12            9
29186        7202        BEAR_CAVE             12            9
29187        7203        BEAR_POLAR            12            9
29696        7400        DOG_WILD              7             10
29697        7401        DOG_WAR               7             10
29698        7402        DOG_MOON              7             10
29952        7500        DOPPLEGANGER          10            7
29953        7501        DOPPLEGANGER_GREATER  10            7
30464        7700        GHOUL                 10            5
30465        7701        REVEANT               10            5
30466        7702        GHAST                 10            5
30720        7800        GIBBERLING            13            7
31232        7A00        SPIDER_GIANT          12            8
31233        7A01        SPIDER_HUGE           12            8
31234        7A02        SPIDER_PHASE          12            8
31235        7A03        SPIDER_SWORD          12            8
31236        7A04        SPIDER_WRAITH         12            8
31488        7B00        WOLF                  7             10
31489        7B01        WOLF_WORG             7             10
31490        7B02        WOLF_DIRE             7             10
31491        7B03        WOLF_WINTER           7             10
31492        7B04        WOLF_VAMPIRE          7             10
31493        7B05        WOLF_DREAD            7             10
31494        7B06        WOLF_SHADOW           7             10
31744        7C00        KOBOLD_XVART          8             7
31745        7C01        KOBOLD_TASLOI         10            7
32000        7D00        ZOMBIE                12            5
32512        7F00        TROLL                 10            7
32522        7F0A        GREATCAT_PANTHER      12            10
32523        7F0B        GREATCAT_LEOPARD      12            10
32525        7F0D        LICH                  20            6
32527        7F0F        TROLL_SMALL           10            7
32557        7F2D        WYVERN_FAMILIAR       10            8
32559        7F2F        SPIDER_SMALL          12            8
32768        8000        GNOLL                 14            8
33024        8100        HOBGOBLIN             14            7
33280        8200        KOBOLD                9             7
36864        9000        OGRE                  14            8
40960        A000        WYVERN                9             9
53248        D000        EAGLE                 7             10
57424        E050        LICHBLACK             18            6
57456        E070        MINOTAUR              16            8
57520        E0B0        TROLL1                18            7
58368        E400        GOBLIN_AXE            17            7
58384        E410        GOBLIN_BOW            17            7
58400        E420        GOBLINELITE_AXE       17            7
58416        E430        GOBLINELITE_BOW       16            7
58624        E500        LIZARDCASTER1         18            6
58656        E520        LIZARDGOLEM           18            6
59136        E700        OROG1                 18            7
59152        E710        OROG2                 18            7
59168        E720        OROG3                 19            7
59392        E800        ORC_MELEE1            19            7
59408        E810        ORC_RANGE2            19            7
59424        E820        ORC_MELEE3            19            7
59440        E830        ORC_RANGE4            19            7
59456        E840        ORC_SHAMAN            19            7

boots of speed: iwds sets to 13, bg1 to 11, bg2 to 200 %
character animations look the same with the same frame counts.

ar1200 (windspear) is a good test area: has too fast ankhegs together with too slow wild dogs.

[feature] Character creation - stats reroll randomization balancing

Description
Adjust stats reroll randomization to similar to original game for balancing overpower character creation.

Detail
The stats reroll is higher randomization than origin in BG1. For example, sum of stats in original game rerolls maybe around 70 to 80, higher and lower stats is harder to get (bell curve distribution) but gemrb look like randomization is greater than original. This lead to easier to create overpower character.

[bug] [bg2] [bgt] Ranged Weapons have reduced reach

Describe the bug
All ranged weapons except the long bows and crossbows have reduced range in GemRB i.e. short bows, darts, slings, thrown daggers, axes, hammers (mod), thrown spiritual hammer priest spell lvl 2 (mod), Melf's Minute Meteor ( lvl 3 spell), Melf's Explosive Meteors lvl 5 wizard spell (mod DSotSC me thinks). I prepared spreadsheat with table listing vanilla and gemrb distances for each ranged weapon.

GemRB version:

To Reproduce
You only need to install DSotSC for melf's explosives meteors and Thrown Hammers from Spellhold Studios.

Expected behavior
If you compare e.g. sling bullet thrown distance in GemRB and vanilla engine you will notice that on GemRB engine the distance is significantly reduced.

Weapon Name Vanilla Pixels GemRB Pixels Feet/Yards Range
Heavy Crossbow 430.3 430.6 100 ft
Light Crossbow 430.5 430.6 100 ft
Composite Bow 430.5 444.5 100 ft
Long Bow 430.6 430.3 100 ft
Short Composite Bow* 430.1 430.8 100 ft
Short Bow 430.0 337.2 75 ft
Sling 430.1 232.5 40 ft
Dart 249.3 92.7 15 ft
Thrown Axe 245.5 93.6 15 ft
Thrown Hammer* 245.7 89.2 15 ft
Thrown Spiritual Hammer* 249.2 84.2 15 ft
Thrown Dagger 245.3 93.6 15 ft
Melf's Minute Meteors 238.6 97.1 70 yards
Melf's Explosive Meteors* 233.1 96.7 Range: Caster Only [that's what spell description says]
Dark Bolt* 265.0 90.8 Range (feet): 1 [that's what NearInfnity effects field show]

Starred* weapons are from the mods.
Thrown Hammers mod here: http://www.shsforums.net/files/file/654-thrown-hammers/
Melf's Explosive Meteors from DSotSC v3.0 beta here: https://github.com/K4thos/DSotSC
Short Composite Bow from Rogue Rebalancing component extra equipment for thieves and bards here: http://www.shsforums.net/files/file/952-rogue-rebalancing-mod-platform-independent/
Dark Bolt - Divine Remix v8 beta https://www.gibberlings3.net/mods/kits/cleric/

[feature] missing chunking on excessive death / shattering

When an overkill occurs, a petrified or frozen enemy is damaged, the actor is gibbed. We support this, but there is no visual feedback.

Info from kjeron:

Chunking causes a permanent animation change (to EXPLODING_TORSO animation) and a (hair/skin/major/minor) color change (all to a red color). It depends on the death type.
Chunked Death and Destruction Death result in animation [0x230][EXPLODING_TORSO], and set all color indexes to 70.

The explosion is a mix of all the EXPLODING_PART animations, in relatively bipedal quantities.
I don't know exactly what generates the "explosion", but it is similar to that created by projectiles using a "Fragments Animation", like "TRAPSNAR.PRO". Change it to "EXPLODING_TORSO" and you will see a similar explosion (just with more body parts and no variety).

[0x200][EXPLODING_ARM], [0x210][EXPLODING_HEAD], [0x220][EXPLODING_FOOT], [0x230][EXPLODING_TORSO], and [0x240][EXPLODING_LEG] all use the various cycles of "SPBLOOD.BAM". Arm is cycle 1, head is cycle 2, leg is cycle 3, torso is cycle 4, leg is cycle 5.
The "explosion" is rather unique, as it actually causes the creature to "jump" in place, which can be seen if you reset the animation during the explosion.

Exploding Stone and Exploding Frozen Death result in animation [0x100][CHUNKS], and set all color indexes to 72(stone) or 71(ice). It uses "SPCHUNKS.BAM"

Chunk coloring was also supposed to be animation tied, but maybe for some other chunks (like what??) or for gibbing critters with non-default blood colors (bloodclr.2da). extanim.2da has COLOR_CHUNKS, but only one entry. Green skeletons in iwd2 Kuldahar already get recolored nicely, so it looks like there's nothing left to be done wrt colors besides handling SPCHUNKS palettes (and itself, since we now always use SPBLOOD).

Actor::ChunkActor should likely call Map::Sparkle to animate the particles, but the explosion fragment mode (or a new one) needs to be added first. See PAF_FRAGMENT and fragments in Particles.h (finish implementation) and SPARKLE_EXPLOSION, which is likely the same reason for #141 . Otherwise there is no fountain of flesh and the chunks all appear unanimated in the same spot.

some iwd2 logic: https://github.com/alexbatalov/iwd2-re/blob/main/src/CGameAnimationTypeEffect.cpp#L33
some nice examples (even bouncing): https://youtu.be/3AqKKJnGS08?si=bmYj7GFW3_85xoqE&t=312

[bug] Crash on loading AR7300 - Baldur's Gate North

Describe the bug
Applies to BGT only. I checked the area with BG1 ran on GemRB - the area AR0200 load crash free there.
BG1 - AR0200= BGT AR7300.

The game crashes during or after loading area AR7300 with leaning toward crashing more often during loading.

Crash on loading area AR7300 does not happen on vanilla engine.

The last windows build that does not crash on loading area AR7300 is gemrb-win32-ad1ea3d from 2019-02-17.

GemRB version:

To Reproduce
Steps to reproduce the behavior:

  1. Install TobEX, G3 Fixpack and BGT
  2. Start new game and generate the character
  3. MoveToArea("AR7300")
  4. Crash

[bug] Domination/Charm/Dire Charm/Feeblemindness/Panic allow player control party member by clicking on portrait

Describe the bug
BG2, BGT. Party member under the effect of the spells of Domination/Charm/Dire Charm/Feeblemindness/Panic can be controlled by clicking on the portrait.

Expected behavior
Player should not be able to click on the portrait and control those affected NPCs. However Chaos lvl 5 wizard spell, and Rigid Thinking lvl 3 priest spells works correctly and you can't gain control over your in-party NPC by clicking on its portrait.

hubelpot charmed

port to python3

python2 will get EOL-ed in 2020, so we need to move forward, to python3. Even exotic platforms have a port by now, so we can consider dropping v2 support if maintaining compatibility with both would be a hassle.

Pointless to start work before #95 is done though, since that already includes substantial changes to the GUIScripts plugin.

unhardcode casting glow (animation) offset data

Before a spell is cast, unless it has 0 casting time, we draw a casting animation (energy manifesting) in front of the caster, depending on the spell school.

It's done by Spell::AddCastingGlow invoking the CastingGlow (fx_casting_glow) effect. Which just guesses where to position the glow relative to the caster. These offsets are currently hardcoded in ypos_by_direction, xpos_by_direction and 12 as a factor of the actor personal space (circle) size.

Which means that for some sizes it can be too high/low or too close. Needs testing alongside the original with samples like halflings, dragons, balors, yuan-ti. In the best case, we find a better formula that fits everyone, in the worst, we create a new table with per-animation overrides.

Plus, should it rotate with the caster if he rotates? Check the final iwd1 fight, when Everard approaches the gate.

Externalize message colors

iwd2 for example uses gold for xp. So we need new entries in the colors.2da table of each game's unhardcoded/ folder and then use them in core (DisplayMessage). See GameData::GetColor on how to fetch the new colors from the table. The colors would replace the old DMC_BG2XPGREEN (...) defines. (done)

PST:

Dialog text color #8CA27B (currently #70FF70)
Response option color #FF2C21 (currently #FF0000)
Response number color #84C7D6 (currently #FF0000, and wrong format)
Dialog creature name color #B59E73 (currently #B9B63F)
Dialog PC name color #84C7D6 (currently #A2A0A4)
Dialog chosen response text #9CC7D6 (currently #8080FF)
gained item/xp color #C6FFC6 (currently #BCEFBC)

Journal messages. Load/Save hints. Save messages ... look at where all the DMC_ GUIColors enum constants are used.

[enhancement] Disable hostile reaction after charm

Description
BGT TWEAK mod has a nice component to disable hostile reaction after charm wears off. Unfortunately component does not work on GemRB. Maybe add it as toggleable feature in the ini file?

[enhancement] customizable weapon slot count

ToBEx has Universal Four Inventory Weapon Slots. EE has an externalised table:
https://gibberlings3.github.io/iesdp/files/2da/2da_bgee/numwslot.htm

Khelban wrote a little hack here:
https://www.gibberlings3.net/forums/topic/26535-gemrb-bg2-weapon-slots-and-other-questions/
What's missing is it working immediately and now there's no need for a game flag, but add a similar table instead — we don't need the inexistent kits and classes.

The actionbar is left untouched, so this is a relatively simple change.

[feature] add a post-startup first-run dialog window

When you run bg2 for the first time, there's a popup window with some useless text. We can reuse it to show the path to the log file and/or other useful instructions.

The window is part of the same window pack, so start by looking at Start.py / Start2.py and Near Infinity to open up the window pack CHU file. This will enable you to see the window number and control ids. Then just set it up similarly as all other windows are. Make it be shown only if the baldur.ini config "First Run" is not 2 and set it to 2 when run (GemRB.GetVar / GemRB.SetVar + GemRB.SaveConfig).

[feature] door highlights are of different color

Description
We currently highlight doors with the same color as containers. TAB was used in some games for this highlight (we use ALT for everything).

The color was light purple (red in iwd2), not the container blue. We need to externalize these colors into a table and then use that in core. This has been done — the table is colors.2da and one can use gamedata->GetColor("color-row-name") to get a specific entry.

And PST is just annoying, but this can be ignored for now:

Highlighting of containers, doors etc. in PS:T was done differently

  • no edge line
  • instead of almost opaque polygon drawn over it, in PS:T the object changes hue from whitish to cyanish, as if the red channel was set to 0 or something like that. Possibly it's done by calculating pixel lightness in HLS space and then mapping it to cyan gradient or st. like that.

[bug] [minor] Improve Wander Around AI for NPCs

Describe the bug
BG2, BGT. Mostly nameless NPCs such as; Commoners, Guards, Peasants, and Beggers who have move around AI stick to the north of the map too often.

GemRB version:

To Reproduce
Go to Beregost leave your party standing in one place for a long time. No easy way to reproduce the bug fast. Loading same area multiple times may also reproduce the broken wander around AI.

Expected behavior
NPCs should not wander off so far from their original location. Take a look at the Begger in Nashkel. He should be circling around Belching Dragon Inn and not north of the Helm's Temple.

nashkel beggar north
npcs like to wander off to the most northern part of the area

improve footstep sounds

We have them implemented and most of the data in (it varies per terrain type). We need to add any missing data for all games in pathfind.2da (by memory most are copies of the bg2 one).

And it doesn't sound as smooth as the original, at least in bgs. Perhaps this will go away with the pathfinder rewrite #106 .

This is a short overview on how it works. ToBeX externalized the sounds to aniwksnd.2da, similar to us, but maybe its code is also worthy a peek.

WED files have a MovementType field, but I haven't checked if it was used in the data. Even if it is, it could be completely unrelated to this issue.

[bug] Some Feedback and Sound options don't save and don't work

Setting them on won't enable those options. Also when you load a savegame or quit and start the game again those options will be marked off.

Feedback options:
-Actions
-Selection Text
-Combat Information
-State Changes
-Misc

Feedback To Hit Rolls works correctly.

Sound option:
-Battle Cries

This is probably related to NPCs constantly repeating battle cries I mentioned before.

feedback options
Sound option

At first I thought it was 1PP GUI mod messing with those options but I checked on BG2 with TobEX and BG2Fixpack and replicated the same results.

[bug] Spells using Angle for Area of Effect don't hit targets

BG2. Such spells e.g. Cone of Cold or Burning Hands don't hit the target in their cone, if you target them directly. When working correctly both spells get larger angle/range as levels of the caster increases.

Spell aim and fire

Ready to fire

Fired

Cold Cone Spell Description

Cold Cone Description

Imoen's targets should have taken damage from the spell. Imoen is level 9 mage. Level 10 mage casts cold cone 10 feet in diameter and 50 feet long. 5 feet long and 1 feet in diameter per level of the caster.

[feature] IE_AMBI_LOOPING is not implemented

We have the define, but we don't use it. Normal area ambients loop anyway, as something is setting AL_LOOPING via GEM_SND_LOOPING or interval/period variance of 0 has the same effect as looping or something else altogether.

[feature] IA/1pp related problems

Previously on...

Issues:

  • some have pink shadows akin to #123. TODO: make a list
  • some are discoloured, but that also happens for some without any mods. Check the ones mentioned in the post. The giant clearly has more animations than we handle, that's why they needed to use a 3-letter prefix. A new animation type is needed (base is 9/IE_ANI_TWO_FILES_3 in iwd2). Maybe that would fix the coloring issues. He used type==9 for both the giant and the osyluth. For the wyvern he used type==11. RECHECK that this is still a problem, since we had palette synchronization fixes for multipart animations since this was reported.
  • some files have non-ascii names? #47 this will be fixed with the next IA release (says Gwendolyne)

Somewhat helpful chart:
https://gwendolynefreddy.github.io/docs/spellholdstudios/ia_animations_ref_chart.html

[feature] armor twang sounds

One of the missing things to finish #89 are the armor sounds:

ARMOR - ARM_XX sounds (tings and twangs as actors in armor move around)

Open questions:

  • how often do they get played? (continuously while moving, maybe on a timer, randomly ... )
  • which sounds go with which armor (likely armor/item types)
    • are there several sounds per type?

The mapping should then be put into a 2da and the core should then use it to play the sounds.

Anyone that wants to help with this research: run the original games, equip random armors and have a single character walk around in them.

[feature] Favorite Spell - No Information || Time Spent with Party - Incorrect Value

Description
Favorite Spell doesn't not get updated in the NPC record card - information is missing. Number of days and hours a NPC spent with party is incorrect. It displays the current in-game day and hour you playing.

Time Spent with Party applies to all classes
Favorite Spell applies to all spell casting classes.

Screenshots

no fav spell sorcerer

no fav spell cleric

no fave spell bard

no fav spell bard

no fav spell fightercleric

no fav spell thief mage

Sorry for dark looking screenshots I played with dimmed screen when making those pics.

[bug] party leave dialog triggers too often

Describe the bug
When a party member gets imprisonment and maybe petrification, others get a chance to react. It's all scripted. We also kick them out of the party, but that can trigger the wrong dialog from the leaver while they shouldn't be talking at all.

GemRB version: git

To Reproduce

  • kick out yoshimo and ask him to wait there ... can't get rid of him

[feature] rndbase bitmap based combat timing

Description
the original used several bitmaps to decide when attacks happen, when to animate what and so on. Should also fix arrows sometimes appearing behind the shooter (APR > 1).

Should also fix animation speed, which should slow down for slowed actors and speed up for hasted ones.

In EEs it's also possible to override the bitmaps per animation type:
https://forums.beamdog.com/discussion/77548/attacks-per-round-round-base-file-association-info-dump

At least bg1&iwd2 also have rbzomb{1,2}.
Look at m_combatRounds in iwd2-re: https://github.com/search?q=repo%3Aalexbatalov%2Fiwd2-re+m_combatRounds&type=code

[enhancement] externalize mage chargen known spell progression

The heuristic we use for the amount of learnable spells in chargen is slightly wrong. These are the spells that you get into your mage spellbook as a starting gift. We need to create splsrckn.2da like tables for wizards&bards, filled for all levels; mxspl*.2da is not helpful there. And then remove the +1 general bonus in LUSpellSelection.py.

A discussion was had here:
https://www.gibberlings3.net/forums/topic/28127-character-levels-up-to-25m-xp-on-bg2-tutorial/?tab=comments#comment-245081

The amount of spells you can memorize after you start the game is the same for both gemrb and the vanilla engine and is exactly what the mxsplwiz file says. The number of "known spells" you get to choose during character generation is different though. GemRB gives you mxsplwiz+1 spells while i believe the vanilla engine gives a fixed amount of spells regardless of what mxsplwiz says.

I changed mxsplwiz to give only 1 spell for every level and to give 8 spells. In both cases, during character generation, i got to choose "7 6 5 5 4 4 3 2 2" for "known spells".

Bards also get a fixed number regardless of mxsplbrd which is "6 5 4 4 3 3 2 1 1" so one less than a mage (without modifying mxsplbrd, they only go up to level 6 of course).

bg1 and iwd1 can use the same table, so just put it to unhardcoded/shared/.

Zelazko's results match:
TOB

Fighter-Mage-Thief (11/12/13): 7 6 5 5 4 4
Fighter-Mage (13/13): 7 6 5 5 4 4
Mage (16): 7 6 5 5 4 4 3 2
Kited Mage (Necromancer): 8 7 6 6 5 5 4 3
Bard (21): 6 5 4 4 3 3

SOA

Fighter-Mage-Thief (5/5/6): 7 6 5
Fighter-Mage (6/6): 7 6 5
Mage (7): 7 6 5 5
Kited Mage (Necromancer): 7 6 5 5
Bard (8): 6 5 4

mage lvl1: 2
bard lvl1: 0 (mx starts at level2)

So the table should have spell levels for columns and classes for rows, while we use the mxspl* to know which levels to grant — you can't learn spells you won't be able to cast yet.

[feature] movement waypoint is not bound to anything

In the original, shift+click created navigational waypoints. We already have Movable::AddWayPoint and an action is using it, but it should also be bound to the mouse — with the shift modifier. See the other similar cases in GameControl.

port GemRB_Window_SetupControls to python

GemRB_Window_SetupControls is currently a GUIScript.cpp function, but we need it to be more flexible in the similar way SetupSpellIcons was ripped out and moved into what is now Spellbook.py.

Approach: Create a SetupControls function in GUICommonWindows.py and start migrating logic from the c++ version. Perhaps new private GUIScript functions will be needed to make it possible. Change the user(s) to use the new SetupControls.

A bit of a blocker for #96 and #135 , but kinda blocked by #95 .

devas aren't blended properly

Devas, solars and planetars need some different blending to be drawn right, it looks like strong lightening and blur (top original, bottom gemrb):

Perhaps it could be achieved by hacking on a permanent fx_glow_rgb, fx_set_color_rgb_global or similar. We also have an unimplemented IE_VVC_GLOWING that might have been similar.
Reverse engineering suggests they use two more glow layers (G1 and G2 ), similarly as if they had gear equipped (eg. helmet and weapon). The weapons use the BW and S1 suffixes (eg. MSOGG2BW), but for MSOL, we definitely need to draw MSOG (currently not assigned to anything)! And the same for MASL and MASG!

The following 1PP investigation is a dead end.

1PP also changes solars, binary patching out the thick black outline, maybe more (not documented). Other than that, we already render that version correctly. Need to check how they disabled the glow first... They just redrew the bams, but that can't be it, since also the files in the original are sharp. So the binary patching took care of the glow. >:(
https://user-images.githubusercontent.com/121515/56093717-5b52c080-5ecc-11e9-9cdb-82654c94a9ab.jpg
https://user-images.githubusercontent.com/121515/56093724-6574bf00-5ecc-11e9-980e-0ace1615a654.jpg

The mod just (300_solar_fix.tph) does the patching and rewrites the files with its own from either 1pp/additions/solars/superglowy/ or 1pp/additions/solars, depending on what you chose at:

There are two choices for the appearance of weapons wielded by solars. Please pick your preference:

  1. New appearance (solid object with glow)
  2. As in BGII vanilla (blurry bright glow all over)

Perhaps useful list from Insomniator (compare IESDP explanation):

bLightSource used:
    13xx

    7F3B MSOL
    7F3C MASL
    7310 MFIE
    7311 MFIS
    7312 MFIE
    7313 MFIS
    7314 MFIE

    many effects:
    0Bxx
    0C0xx
    ....

[feature] [bg2] Missing buying sound in merchant interface

Description
Applies to Baldur's Gate 2, Baldur's Gate Trilogy. When buying a item the game will play its specific sound. Helmets, potions, weapons, misc items all have specific sounds by the category they belong to. The file name with those sounds starts with GAM_Number.WAV. We already play the sound when you play with the item in your inventory just not yet when you buy a item. When buying multiple items the sound will play for the item selected which is on the top of the list.

[feature] Guard Widget does not work

Description
Applies to BG2 and BGT. All fighting classes paladins, rangers, fighters, monks, and barbarians have access to guard widget next to the weapon slots. The feature does not work on GemRB at all. You can't use this feature to guard a NPC or mark circle of the area your NPC should guard. On vanilla engine NPC who was given order to guard circled area will attack the enemy as soon as the creature enters the circled area but not outside the circle.
guard wid

Additional context
The widget shield is gray indicating this feature is missing enhance image to see it.
gemrb guard

Vanilla circling guarding area.

baldr043

[feature] cleric/thief and cleric/ranger do not have access to the full action bar

Description
Together the two classes need more space than is available. The original mitigated this by adding one of them to the innate menu — thieving (unlock/disarm/pickpocket).

We can do the same by teaching them a real innate of our own that sets the required variables to trigger thieving and never depletes. Might be easier to hack Spellbook.SetupSpellIcons when it gets called from the UAW_INNATES handling code. Easier to keep it configurable that way too.

Will probably need SetupControls to be ported to python first instead. The two needed buttons are for modals, so they need to persist and be properly toggleable.

Of course, restore our action bar 2da, so the class gets its turn undead button back too.

Similarly, Cleric/Ranger has no access to hide in shadows/stealth.

[research] figure out if anything invasive is needed for full iwd2 scripting support

iwd2 uses quite complicated spellcasting ai. Some of the triggers have side effects. Is that the only reason why the ai currently sucks much of the time?

also currently a kuldahar cutscene breaks; even before that, the game breaks in the ice temple.

will this be just an assortment of iwd2-only fixes and addons or will it require a schism from the other engines?

[iwd2] fully customizable action bar

IWD2 had a really nice actionbar, where the user could repurpose most of the buttons as they pleased. We don't support that yet. This is blocked by #127.

Once done, it should be used for all games by default, as there's no need to have two implementations. Just make it opt-in elsewhere.

[feature] nexttriggerobject / triggeroverride support

Description
Tobex and EE addition akin to ActionOverride, just for triggers. TriggerOverride is exactly like that, but only a WeiDu shorthand, while NextTriggerObject is a trigger that affects the sender of the next trigger in its block.

Complexer mods use it and things can subtly break without.

This can all be done in ReadCondition and ReadTrigger. Also add NextTriggerObject to gemtrig.ids. In EEs it's at 0x40E0, while TobEx and us at 0x4100.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.