Built-in plugins/stubs?

Started by monkey0506, Tue 26/08/2014 15:44:38

Previous topic - Next topic

monkey0506

Right, sorry. The full plugin can still be run without Steam (although doing nothing) on compatible OSes (Windows and some versions of Linux), but if you're specifically publishing a non-Steam version it's still recommended that you use the stub instead of the full plugin. This allows the end-user to rebuild the stub for their system if the prebuilt stub (the one you would include in your distribution) does not run (e.g., versions of Linux using different core libraries, other unsupported OSes).

Radiant

Yes, but then you're assuming that players have sufficient programming skill to be able to recompile a stub from source code; I'm not sure if I'd be willing to make that assumption.

Crimson Wizard

#22
Quote from: Radiant on Sun 28/09/2014 21:39:16
Yes, but then you're assuming that players have sufficient programming skill to be able to recompile a stub from source code; I'm not sure if I'd be willing to make that assumption.
If players don't have programming skill to build and install a program from source, they probably do not use non-standard Linux.

Besides, unlike Windows, on most Linux distributives you should only run 2-3 commands from console. I believe that an installation script and/or basic readme will be sufficient.

Crimson Wizard

I made it work:
https://github.com/ivan-mogilko/ags-refactoring/tree/improve-scapimap

Explanation:
Spoiler

Quote
The stub loading routine parses the symbol definition *.stub file and registers API stubs if no plugin library was found. This allows to substitute any missing plugin with dummy symbols.

Stub file format defines the text file consisting of any number of lines. Every line declares a stub function and its return value; the return value may be either numeric value or 'nil' that defines either null-pointer or 'void', depending on how the function is used by script interpreter.
If no value is provided, 'nil' is used by default.

    function_name [numeric_literal | nil]

Numeric value is first tested as integer, then as float, therefore to force floating-point type of value one should always include the decimal separator, e.g. write "1." or "1.0" instead of just "1".
[close]

Working example:
Spoiler

Code: text

JoystickName nil
JoystickCount 0
Joystick::Open^1 nil
Joystick::Close^0 nil
Joystick::Valid^0 0
Joystick::IsButtonDown^1 0
Joystick::Click^1 nil

[close]

Can anyone suggest a game/plugin for a test?

BigMc

Cool! One of the games that one could test with is Barn Runner 5, chapter 1. It uses Kweepa's AGS_OtherRoom.dll and Scorpiorus' ags_parallax.dll both of which are not ported as far as I know.

Crimson Wizard

Quote from: BigMc on Wed 28/01/2015 00:00:37
Cool! One of the games that one could test with is Barn Runner 5, chapter 1. It uses Kweepa's AGS_OtherRoom.dll and Scorpiorus' ags_parallax.dll both of which are not ported as far as I know.
Sorry, I forgot to answer.

While it is technically possible, I do not think that it is a right thing to stub OtherRoom and parallax plugins, because this will disable their functionality. The game will load up, but gameplay may be completely broken.

The plugin stubs are meant for plugins that add optional effects, like rain/snow, Steam achievements, joystick controls, etc.

SMF spam blocked by CleanTalk