Coder Social home page Coder Social logo

rotators / sfall Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sfall-team/sfall

0.0 5.0 1.0 11.98 MB

Engine modifications for Fallout 2

Home Page: http://nma-fallout.com/threads/178390/

License: GNU General Public License v3.0

C# 1.45% HLSL 0.79% C 13.33% C++ 78.98% CSS 0.06% Shell 0.06% Python 5.32%
fallout2 sfall

sfall's Introduction

sfall

A set of engine modifications for the classic game Fallout 2 in form of a DLL, which modifies executable in memory without changing anything in EXE file itself.

Engine modifications include:

  • Better support for modern operating systems
  • Externalizing many settings like starting map and game time, skills, perks, critical hit tables, books, etc.
  • Bug fixes
  • Many additional features for users, such as item highlight button, party member control, etc.
  • Extended scripting capabilities for modders (many new opcodes to control sfall features as well as previously unavailable vanilla engine functions)

Original author: timeslip

Original description: A set of engine modifications for the classic game Fallout 2 by Interplay. Includes fixes for bugs in the original engine, allows fallout to run correctly on modern operating systems, and adds additional features for modders.

sfall's People

Contributors

burner1024 avatar cybermayck avatar fakelshub avatar ghost2238 avatar lexx2k avatar novarain avatar oppen avatar phobos2077 avatar vennor avatar vlad-saritasa avatar wipe2238 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

cybermayck

sfall's Issues

[HTTPD] "Live" pages

Allow creating file-like pages, where content is appended from external source(s), and not coming from page generator function. Intended use is to track debug messages in browser on monitor#1, while game is running fullscreen on monitor#2.

Run script function passing argument without using hookscript

For DIALOGOUT_YESNO, see e627ebe

dialog_out_ is non-blocking, so proc below will run fully and there's no way to return pressed key/button back to script at this stage

procedure test
begin
    sfall_func2("r_message_box", "question?", 0x10);
    display_msg("some spam");
end

And that makes sense - after ctrl+x game doesn't freeze after all.

Hooks added in commit should be fine; they takes care of catching user input when it finally happens, and should be ready to pass result to scripts No messing with engine code along the way, yay.
"Only" problem here is i have no idea how to call script proc with argument "out of nowhere". Hookscripts have hardly any sense here - why question in one script should be passed to other script(s)?

Instead, i wanted to use message box like that...

// TODO add Y/y/N/n
#define DIALOGOUT_YES(input) (input == 13 or input == 244) // enter || YES button
#define DIALOGOUT_NO(input)  (input == 245) // NO button
#define DIALOGOUT_ESC(input) (input == 27)

procedure callback_func(variable input)
begin
    display_msg("input = " + input);

    if(DIALOGOUT_YES(input)) then 
        display_msg("Yay!");
    else if(DIALOGOUT_NO(input)) then
        display_msg("Oh noes!");
    else if(DIALOGOUT_ESC(input)) then
        display_msg("Ugh.");
    else
        display_msg("unknown input<" + input +">" );
end

procedure show_message
begin
    sfall_func5("r_message_box", "question?", 0x10, 143, 143, "callback_func");
end

...but i'm stuck here:

// TODO how to pass dialogOutInput?
if (!dialogOutProc.empty())
sfall::RunScriptProc(dialogOutScriptProgram, dialogOutProc.c_str());

[HTTPD] Spawning thread fails on VS2017

If .dll is compiled with VS2017+v140_xp (as it should be for mod releases), attempt to spawn HTTPD thread (with std::thread()) locks the process forever for whatever reason.

If .dll is compiled with VS2019+v142 (as it is done for testing), everything seems to work fine.

This is currently veeery low priority, as HTTPD is not intended to be used by players anyway, nor worth sharing with other modders in current state. When/if it changes some day, it can be looked at again.

Voodoo improvements

  • r_write_byte(...), r_write_short(...), r_write_int(...), r_write_string(...)
    Same as vanilla functions but without current address limits; needed mostly for patching HRP.

  • r_call_offset_push(int value)
    Takes value from script and caches it in internal buffer until r_call_offset is used.
    Each call to this function adds a new value, keeping previously added intact.

  • r_call_offset(int offset)
    Takes care of passing cached values to asm and call given offset. Once it's done, internal buffer is cleared and ready to accept arguments for next function. Offset limits either removed or very relaxed.
    Function should be able to access all currently loaded libraries and support high amount of arguments.

Intended usage:

#define call_offset_v6(offset,arg1,arg2,arg3,arg4,arg5,arg6) \
               r_call_offset_push(arg1); \
               r_call_offset_push(arg2); \
               r_call_offset_push(arg3); \
               r_call_offset_push(arg4); \
               r_call_offset_push(arg5); \
               r_call_offset_push(arg6); \
               r_call_offset(offset)

#define call_offset_r6(var,offset,arg1,arg2,arg3,arg4,arg5,arg6) \
               r_call_offset_push(arg1); \
               r_call_offset_push(arg2); \
               r_call_offset_push(arg3); \
               r_call_offset_push(arg4); \
               r_call_offset_push(arg5); \
               r_call_offset_push(arg6); \
               var := r_call_offset(offset)
  • r_call_offset_cdecl(int offset)
    same as r_call_offset, but for cdecl calling convention

  • r_call_offset_stdcall(int offset)
    same as r_call_offset, but for stdcall calling convention

  • r_call_offset_fastcall(int offset)
    same as r_call_offset, but for fastcall calling convention

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.