Giter Site home page Giter Site logo

fallout2-ce's Introduction

Fallout 2 Community Edition

Fallout 2 Community Edition is a fully working re-implementation of Fallout 2, with the same original gameplay, engine bugfixes, and some quality of life improvements, that works (mostly) hassle-free on multiple platforms.

Popular Fallout 2 total conversion mods are partially supported. Original versions of Nevada and Sonora (that do not rely on extended features provided by Sfall) likely work, although there is no complete walkthrough confirmation yet. Fallout 2 Restoration Project, Fallout Et Tu and Olympus 2207 are not yet supported. Other mods (particularly Resurrection and Yesterday) are not tested.

There is also Fallout Community Edition.

Installation

You must own the game to play. Purchase your copy on GOG or Steam. Download latest release or build from source. You can also check latest debug build intended for testers.

Windows

Download and copy fallout2-ce.exe to your Fallout2 folder. It serves as a drop-in replacement for fallout2.exe.

Linux

  • Use Windows installation as a base - it contains data assets needed to play. Copy Fallout2 folder somewhere, for example /home/john/Desktop/Fallout2.

  • Download and copy fallout2-ce to this folder.

  • Install SDL2:

$ sudo apt install libsdl2-2.0-0
  • Run ./fallout2-ce.

macOS

NOTE: macOS 10.11 (El Capitan) or higher is required. Runs natively on Intel-based Macs and Apple Silicon.

  • Use Windows installation as a base - it contains data assets needed to play. Copy Fallout2 folder somewhere, for example /Applications/Fallout2.

  • Alternatively you can use Fallout 2 from Macplay/The Omni Group as a base - you need to extract game assets from the original bundle. Mount CD/DMG, right click Fallout 2 -> Show Package Contents, navigate to Contents/Resources. Copy GameData folder somewhere, for example /Applications/Fallout2.

  • Download and copy fallout2-ce.app to this folder.

  • Run fallout2-ce.app.

Android

NOTE: Fallout 2 was designed with mouse in mind. There are many controls that require precise cursor positioning, which is not possible with fingers. Current control scheme resembles trackpad usage:

  • One finger moves mouse cursor around.
  • Tap one finger for left mouse click.
  • Tap two fingers for right mouse click (switches mouse cursor mode).
  • Move two fingers to scroll current view (map view, worldmap view, inventory scrollers).

NOTE: From Android standpoint release and debug builds are different apps. Both apps require their own copy of game assets and have their own savegames. This is intentional. As a gamer just stick with release version and check for updates.

  • Use Windows installation as a base - it contains data assets needed to play. Copy Fallout2 folder to your device, for example to Downloads. You need master.dat, critter.dat, patch000.dat, and data folder. Watch for file names - keep (or make) them lowercased (see Configuration).

  • Download fallout2-ce.apk and copy it to your device. Open it with file explorer, follow instructions (install from unknown source).

  • When you run the game for the first time it will immediately present file picker. Select the folder from the first step. Wait until this data is copied. A loading dialog will appear, just wait for about 30 seconds. If you're installing total conversion mod or localized version with a large number of unpacked resources in data folder it can take up to 20 minutes. Once copied, the game will start automatically.

iOS

NOTE: See Android note on controls.

  • Download fallout2-ce.ipa. Use sideloading applications (AltStore or Sideloadly) to install it to your device. Alternatively you can always build from source with your own signing certificate.

  • Run the game once. You'll see error message saying "Couldn't find/load text fonts". This step is needed for iOS to expose the game via File Sharing feature.

  • Use Finder (macOS Catalina and later) or iTunes (Windows and macOS Mojave or earlier) to copy master.dat, critter.dat, patch000.dat, and data folder to "Fallout 2" app (how-to). Watch for file names - keep (or make) them lowercased (see Configuration).

Configuration

The main configuration file is fallout2.cfg. There are several important settings you might need to adjust for your installation. Depending on your Fallout distribution main game assets master.dat, critter.dat, patch000.dat, and data folder might be either all lowercased, or all uppercased. You can either update master_dat, critter_dat, master_patches and critter_patches settings to match your file names, or rename files to match entries in your fallout2.cfg.

The sound folder (with music folder inside) might be located either in data folder, or be in the Fallout folder. Update music_path1 setting to match your hierarchy, usually it's data/sound/music/ or sound/music/. Make sure it matches your path exactly (so it might be SOUND/MUSIC/ if you've installed Fallout from CD). Music files themselves (with ACM extension) should be all uppercased, regardless of sound and music folders.

The second configuration file is f2_res.ini. Use it to change game window size and enable/disable fullscreen mode.

[MAIN]
SCR_WIDTH=1280
SCR_HEIGHT=720
WINDOWED=1

Recommendations:

  • Desktops: Use any size you see fit.
  • Tablets: Set these values to logical resolution of your device, for example iPad Pro 11 is 1668x2388 (pixels), but it's logical resolution is 834x1194 (points).
  • Mobile phones: Set height to 480, calculate width according to your device screen (aspect) ratio, for example Samsung S21 is 20:9 device, so the width should be 480 * 20 / 9 = 1067.

In time this stuff will receive in-game interface, right now you have to do it manually.

The third configuration file is ddraw.ini (part of Sfall). There are dozens of options that adjust or override engine behaviour and gameplay mechanics. This file is intended for modders and advanced users. Currently only a small subset of these settings are actually implemented.

Contributing

Integrating Sfall goodies is the top priority. Quality of life updates are OK too. Please no large scale refactorings at this time as we need to reconcile changes from Reference Edition, which will make this process slow and error-prone. In any case open up an issue with your suggestion or to notify other people that something is being worked on.

Intergrating Sfall

There are literally hundreds if not thousands of fixes and features in sfall. I guess not all of them are needed in Community Edition, but for the sake of compatibility with big mods out there, let's integrate them all.

License

The source code is this repository is available under the Sustainable Use License.

fallout2-ce's People

Contributors

a-hurst avatar aamanpager avatar alexbatalov avatar c6-dev avatar edgarmiro avatar eirnym avatar izder456 avatar janiczek avatar jansimek avatar jmalak avatar jordancpp avatar k3tamina avatar mrcool92 avatar phobos2077 avatar roginvs avatar sonilyan avatar tomarnaez avatar wipe2238 avatar y0lo avatar yabisiktir 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fallout2-ce's Issues

Headers cleanup

One of the rules I followed during decompilation - do not hide anything from yourself. That's why all functions, variables, and typedefs are exposed in headers. In order to prepare for code modernization phase headers need to be cleaned up of everything that might be considered implementation detail to appropriate module (i.e. private). That simply means moving many things from h files into cc, making variables and functions static in the process. In the end I expect whatever is left in headers is a part of public API. Please note that due to the way this project is structured, there might be some extreme cases like editor.h which has about 2-3 public functions and everything else is private. Don't forget to about moving includes. Prefer one h-cc pair per PR as it's easier to track.


  • actions.h
  • animation.h
  • art.h
  • audio_file.h
  • audio.h
  • automap.h
  • autorun.h
  • cache.h
  • character_editor.h
  • character_selector.h
  • color.h
  • combat_ai_defs.h
  • combat_ai.h
  • combat_defs.h
  • combat.h
  • config.h
  • core.h
  • credits.h
  • critter.h
  • cycle.h
  • datafile.h
  • db.h
  • dbox.h
  • debug.h
  • dfile.h
  • dialog.h
  • dictionary.h
  • dinput.h
  • display_monitor.h
  • draw.h
  • electronic_registration.h
  • elevator.h
  • endgame.h
  • export.h
  • file_find.h
  • file_utils.h
  • font_manager.h
  • game_config.h
  • game_dialog.h
  • game_memory.h
  • game_mouse.h
  • game_movie.h
  • game_palette.h
  • game_sound.h
  • game_vars.h
  • game.h
  • geometry.h
  • graph_lib.h
  • grayscale.h
  • heap.h
  • interface.h
  • interpreter_extra.h
  • interpreter_lib.h
  • interpreter.h
  • inventory.h
  • item.h
  • light.h
  • lips.h
  • loadsave.h
  • main.h
  • map_defs.h
  • map.h
  • memory_defs.h
  • memory_manager.h
  • memory.h
  • message.h
  • mmx.h
  • mouse_manager.h
  • movie_effect.h
  • movie_lib.h
  • movie.h
  • nevs.h
  • obj_types.h
  • object.h
  • options.h
  • palette.h
  • party_member.h
  • perk_defs.h
  • perk.h
  • pipboy.h
  • proto_instance.h
  • proto_types.h
  • proto.h
  • queue.h
  • random.h
  • reaction.h
  • region.h
  • scripts.h
  • select_file_list.h
  • selfrun.h
  • skill_defs.h
  • skill.h
  • skilldex.h
  • sound_decoder.h
  • sound_effects_cache.h
  • sound_effects_list.h
  • sound.h
  • stat_defs.h
  • stat.h
  • string_parsers.h
  • text_font.h
  • text_object.h
  • tile.h
  • trait_defs.h
  • trait.h
  • trap.h
  • version.h
  • widget.h
  • win32.h
  • window_manager_private.h
  • window_manager.h
  • window.h
  • word_wrap.h
  • world_map.h
  • xfile.h

Fallout 1 compatibility?

I'm not sure how significant differences between Fallout 1 and 2 are, only creating this issue to track the amount of work needed to make this project compatible with both versions, if possible and if maintainers are interested in this?

Global refactoring

Greetings!

The code is confusing. I want to turn functions into static classes. This will break dependencies. Remove global variables. Remove extern variables. The changes will affect all code. Are you ready to accept commits?

After refactoring. Pass dependency to constructor. Opens the door to writing tests.

Android and ios ports ?

Today can play fallout 2 only through emulators on phones.
Is it possible to compile for these systems ?

Noticed Bugs (PS Vita version)

Hello everyone. I decided to make this branch, because I think it can be useful to the project as a beta testing.
I just started playing (reached Klamath) and have already discovered several bugs (I use PS Vita version 1.0.0-vita.2):

  1. Cursor behavior during combat. During a fight, if the cursor was engaged before the opponent's turn, the cursor will move until the opponent finishes his turn.
  2. The quest with Smoke (A Dog) does not work. When you reach the dog, it does not react to the player in any way. SLOT08 (Smoke Bug).zip
  3. At the first entrance to the city Klamath Sulik automatically becomes an ally. Sulik constantly runs from the building to the street. The first dialog occurs as usual, but when the dialog occurs for the second time, the dialog branches will be shown as if Sulik was already in the team. SLOT01 (Sulik Bug).zip
  4. When entering symbols (for example, when creating a character or when creating saves), the uppercase symbols does not work.

As the port progresses, I will supplement this post with new bugs discovered and thank you so much for this port, I've been waiting for it since I bought myself a PS Vita =)

Integrating HRP

  • Automap
  • Called Shot
  • Character Editor
  • Character Selector
  • Conversation
  • Credits
  • Death
  • Dialog Box
  • Elevator
  • Endgame Slideshow
  • Help
  • Indicator Bar
  • Interface Bar
  • Inventory
  • Load/Save
  • Main Menu
  • Movies
  • Options
  • Pause
  • Pipboy
  • Preferences
  • Skilldex
  • Splash
  • Worldmap

Get book from Derek (False status)

I haven't get this quest yet (you can check this by entering into a dialogue with Rebecca, asking her about new job), but it is already displayed in the status of the city as a recieved quest: SLOT04 (The Den, Rebecca's Book).zip
This happens immediately after the first completed quest from Rebecca ("Collect money from Fred").

Dialog windows "stucks" after the dialog has ended sometimes

Dialog window is not closing and is "stuck" after the dialog has ended.
Steps to reproduce:

  1. Give Algernon a piston for an upgrade
  2. After the upgrade is done end the dialog by saying "Thanks, Al"
    SLOT04.zip
    It's possible to close it by moving out of the map for example, but the person that bugged it won't initiate the dialog again.

HUD and Pre-rendered video little problems

I downloaded 1.0.0 build now and tested it on Fallout:Nevada, first i seen is pre-rendered videos doesn't scaling to fullscreen and playing in native resolution
12_07_22_23-316
And second i seen is a no borders for HUD
scr00000
BUT! That's playble, i want to try walkthrough game.

Integrating Sfall

This issue is for tracking progress for intergrating Sfall. Sfall itself is organized as a collection of modules. Some are small, focused, and will be relatively easy to implement, some are not. Bugfixes is huge. Do not work on shaders and sound stuff, these require major changes in the underlying functionality. If you want to work on any module, convert task to issue and assign yourself, so it's easy to see the module is being taken care of. If the module is big, provide it's own todo list. Prefer small, focused PRs, even if it's only one line. Keep original comment from Sfall if it makes sense. Annotate your changes with SFALL. See 7db7a9a as a super simple example.


  • Bugfixes
  • Speed patch
  • Graphics
  • Input
  • File system
  • Load order
  • Load game hook
  • Main loop hook

  • Engine tweaks
  • Books
  • Criticals
  • Elevators
  • Unarmed

  • Animations
  • Bar boxes
  • Explosions
  • #130
  • Interface
  • Worldmap
  • Tiles
  • Movies
  • Sound
  • Misc patches

  • AI
  • Damage mod
  • Burst mods

  • Inventory
  • Objects
  • Stats
  • Critter stats
  • Critter poison
  • Perks
  • Skills
  • Drugs
  • Party control
  • Combat

  • Player model
  • #38
  • Premade
  • Reputations
  • Kill counter

  • Main menu
  • Hero appearance
  • Talking heads
  • Script shaders

  • Extra save slots
  • Quest list
  • Credits
  • Console

  • Metarule extender
  • Hook scripts
  • Script extender

Apple Silicon Support

Howdy, I run the site Mac Source Ports and this looks like an excellent thing I could add to the site (I either make builds or point to builds of source ports for Mac, preferably with Apple Silicon support).

So first off I can tell you yes the build you've got for Intel works fine on Apple Silicon via Rosetta 2.

And since it looks like the only real dependences this has are SDL2 and lib, I'm willing to bet it works on Apple Silicon without much effort.

I may take a swing at making a Universal 2 build but since you're signing and notarizing it if you want to do it yourself I'll just link to yours.

Either way, this is outstanding work, thanks for sharing it with us.

NPCs are not turning hostile when stealing or through the dialog when the game is built with -O1 or -Og optimization levels

If the game is built with -O1 or -Og optimization levels NPCs are not turning hostile through the dialog or when you're caught stealing. No logs on this one except the usual

Dialogue Reaction: 
Said Bad

I also suspect that dialog triggers aren't working correctly too (like the ones that's triggered when you're entering the room with NPC for example).

I could reproduce on gcc 12.1.1 on Linux and 10.3 on PS Vita. I guess the compiler is optimizing some bugs away.

Investigate vcpkg to manage dependencies

All 3 major platforms now use different ways to manage dependencies (cmake's FetchContent on Windows, apt on Linux, homebrew on Mac). There is a vcpkg which can probably help to unify it, but needs some research.

macOS port

As in #17 I was able to run the game in modern macOS 12.3 in 64-bit mode. Hacks mostly, no movies, no sound, increased CPU usage and some odd scripting errors, but it works.

Karma

  • Custom frms
  • Display karma changes

iOS performance issues

Palette fading is painfully slow on both iPhone and iPad. On iPhone viewport is scaled down, which makes virtually all text an unreadable mess. Gameplay performance is very poor. On iPad viewport is scaled up, which looks better, but since there is no antialiasing, there are unexpected pixels all over the screen. Performance-wise it's playable. It's definitely not ready for prime time due to rendering issues and lack of controls.

Nautilus is unable to run the game

It thinks the binary is a shared library and suggests to open it with some other program. It does work when run from terminal. Check if -no-pie helps.

Blank map when using higher resolution than 640x480

It seems to happen only on larger maps such as arcaves.map and broken1.map and not the smaller ones such as artemple.map or desert1.map .

When loading certain maps the tileSetCenter function fails and returns -1 on the following check:

fallout2-ce/src/tile.cc

Lines 508 to 512 in 0c61f74

if (_borderInitialized) {
if (tile_x <= _tile_border || tile_x >= dword_66BBCC || tile_y <= dword_66BBC8 || tile_y >= dword_66BBD0) {
return -1;
}
}

My guess is that the code above checks whether the center tile is outside of the scroll block area.

I suspect that the bug is somewhere in the _tile_set_border function. Specifically, this part looks suspicious as the windowWidth parameter is not used anywhere:

fallout2-ce/src/tile.cc

Lines 402 to 405 in 0c61f74

void _tile_set_border(int windowWidth, int windowHeight, int hexGridWidth, int hexGridHeight)
{
int v1 = tileFromScreenXY(-320, -240, 0);
int v2 = tileFromScreenXY(-320, windowHeight + 240, 0);

Linux port

The project compiles and runs under linux after some changes and commenting out the audio code. Below is the list of functions and macros that need to be reimplemented for linux:

  • _splitpath
  • filelength
  • stricmp → alias to strcasecmp
  • strnicmp
  • strupr
  • strlwr
  • itoa
  • CopyFileA
  • timeGetTime
  • GetTickCount
  • min → macro #define MIN(a, b) (((a) < (b)) ? (a) : (b))
  • max → macro #define MAX(a, b) (((a) > (b)) ? (a) : (b))
  • _MAX_DIR → ?
  • _MAX_FNAMEFILENAME_MAX
  • _MAX_EXT → ?
  • MAX_PATHPATH_MAX

Also, what about the mutexes? I don't understand what the autorun.c/h file is for except preventing multiple instances of the game being run.

Slim Picket in Klamath (learning bug)

In the town of trappers there is such a character as Slim Pocket. For 100 (with a low reputation in Klamath) or 50 coins (with a high reputation), Slim Pocket can train a player to hunt Gekko. The bug lies in the fact that after training, the money is not received by Slim Pocket, but by the player.
This is a fairly well-known bug (in this case, it's not a port bug, it's a bug of the original game) and I thought it could fixed. If the goal of the project is to make the port match the original version of the game as much as possible, then I think that this bug can be left for authenticity and just close this issue.
Here's a save file: SLOT01.zip
I draw your attention to the fact that Slim Pocket is a rather capricious character and may not agree to teach the player the first time. You just need to ask him about it several times. Thanks.

Crash on Android when starting new game

Hey, i tested f2-ce on my phone yesterday and it crashes when i trying start new game, i can create char and i can view elder monologue, but game crashes when starts loading temple enter map.

Problem with compilation

I have a problem with compilation. I use Manjaro 64 bit.

fallout2-ce/src/audio_file.cc:95:29: error: cast from ‘FILE*’ to ‘int’ loses precision [-fpermissive]
95 | audioFile->fileHandle = (int)stream;

Debug Android .apk creates read-only folders

I was following installation instructions for Android from the readme, but it seems that the junk folders that the .apk created in com.alexbatalov.fallout2ce.debug/files are read-only, i can't delete them on PC or the device itself (it's not rooted). Trying to overwrite them with Fallout 2 data files also fails.

Segmentation fault when looking at kills tab of character sheet after killing a scorpion on Linux

I started a new game and killed a few enemies, then went poking around in the character sheet, only for it to crash, with the only message in the terminal being Segmentation fault. Repeated attempts have revealed that it only happens if I've killed at least one scorpion and open the kills tab. If I've only killed ants, then it works as intended. This happens when using data files from both the CD release and the Steam release.

No random encounters

Random encounters aren't triggering while traveling on the world map.
In the late AUG the first Frank Horrigan encounter starts up and the player receives a car after it's finished (but it's not shown on the town maps. Only on the world one)
SLOT07.zip
Game version 1.0.1
Tested on Linux x64 and Windows x64

Configurable starting map

Feature proposal to make the starting map configurable. My use case is to launch fallout directly from my map editor. Modders will find this useful for testing their maps without having to recompile fallout2-ce.

Sfall already includes this option:

[Misc]
;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
;StartingMap=

Fallout 2-CE on Debian

When I try to run fallout2-ce I get a "couldn't find/load/text fonts." I've copied the entire data folder for fallout 2 over, and I put the fallout2-ce into the fallout 2 directory. It looks like this:
/Games/fallout2/
-Data/
-sound/
-CRITTER.DAT
-fallout2-ce
-MASTER.DAT
-PATCH000.DAT

Sulik's leather jacket does not allow to save the game

Bug Replay:

  1. Exchange your armor to Sulik from your inventory (for example Leather armor Mk II)
  2. Without leaving the dialog, configure Sulik's behavior by clicking on the "Best Armor" button.
  3. You will notice that Sulik's best weapon was his Leather jacket.
  4. In the same menu, click "Barter" and you will be convinced that there is a sledgehammer in his inventory instead of an old jacket.
  5. Go back to Sulik's behavior editor and you will notice that Sulik's best weapon is a Sledgehammer and by clicking exchange you can make sure that the leather jacket is in his inventory.
  6. Through barter, take this jacket from Sulik and exit the dialogue.

While Sulik's leather jacket is in your inventory, you will not be able to save the game. When you try to throw this jacket on the ground, it just disappears.
Save file: SLOT08.zip

Awful performance on macOS

Fading in main menu screen takes about 10 seconds. Gameplay performance is also sluggish compared to Windows and virtualised Ubuntu.

Maybe add compilation guide in README.md?

Hey, i dont know how to compile any things, i tried compile fallout2-ce for android today and i fucked up, maybe you can add small guide how to compile that? That's is work of five minutes, i guess.

Backport to macOS 10.15

Right now macOS app require latest Monterey, which is somewhat limiting. It does build for Big Sur, but complains on sdl2 installed via brew. This is probably easily fixed. However it does not build for Catalina (10.15) because of std::filesystem usage.

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.