Giter VIP home page Giter VIP logo

nightfall's Introduction

NightFall - (d)gamexwrapper

MOHAA/MOHSH/MOHBT (d)gamex86 wrapper based on the old MOHAA gamex86 wrapper.

NightFall serves a wrapper that compliments various aspects of MOHAA's script engine capabilities.

https://www.x-null.net/forums/forum.php

This is the best public version out there.

Questions are welcomed.

For enhancements and bug reports: submit an issue.

If you have any fixes/modifications, please submit a PR.

Downloading

You can download latest version from here.

Installation

Documentation

Building

  • Clone this repo
  • cd NightFall
  • git submodule update --init
  • Use Visual Studio 2019
  • Start VS2019 Developer PowerShell
  • cd dgamexwrapper
  • build_deps.bat all to build dependencies, you can also build specific dependencies: build_deps.bat wolfssl curl libcurl
  • Build NightFall using dgamexwrapper.sln (use any configuration other than Debug)

FAQ

  • What is currently supported ?

Currently, most reborn functions are supported, some security related additions are not implemented.

  • Will feature xxxx be implemented ?

Create an issue (feature request), I'm more than welcome to add any new features to NightFall!

Contributors

Main Developer

  • RyBack

Secondary Developers/Contributors

  • Todesengel
  • RazoRapiD
  • Ley0k
  • xNULL|James
  • DoubleKill
  • Appelpitje
  • Criminal
  • Zappa

Have fun ! ;)

nightfall's People

Contributors

mohabhassan avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nightfall's Issues

Foresight dumpuser command

The foresight dumpuser command wont output anythink in the foresight scanner. Not sure if it is me doing something wrong but with the original breakthrough it is working fine.

API Client request error

Api client cannot make a request to a ssl url.
Error: CA signer not available for verification

[Feature Request] change state files per player

So in FAKK2 there is an Actor command called statemap that allows you to set specific state files to different AI's
e.g. statemap ai/default.st

I wonder if it would be possible to add a similar command to set a state file to only one player via script.

For example

// set custom state file
local.player statemap "vehiclemod/state"
// this will change the player state files to vehiclemod/state_legs.st and vehiclemod/state_torso.st
// and just ignoring the _legs file if it doesn't exist since most if not all mods only use the torso states

// reset to default state file
local.player statemap ""
// or maybe it could be set to a single file like
local.player statemap "vehiclemod/vehicle_states.st"

No idea if it's even possible to add something like this to NightFall (or maybe OPM), but it would be really convenient to have it

Add automated E2E testing

As NF gets larger, automated E2E testing for every release/build is needed.
Currently, manually creating a test script or c++ project seems to be the best method based on my research to properly test all the features.

MOHAA Server-Side Support

Mohaa support is split into 3 sections:
-Normal NF MOHAA porting, this is done but yet untested, it seems to work.
-Support for reborn MOHAA-specific functionalities like votes.
-Reborn Security Fixes, this will be closed source and loaded to NF via some sort of plugin API.

Crash reporting

Crash reporting and automated crash dump generation is needed to ensure better stability of NF.

AA wrapper

Add an AA wrapper to the releases because I am able to build it.

crash after switching map from admin menu

There is a crash that happens when a map is changed using a custom admin menu

if the admin menu uses the additem command to change maps with a wait 1000 at the end
the server crashes 100% of the time after the map is loaded. (tested with and without mods installed)

This crash does NOT happen on reborn or vanilla servers

Steps to reproduce the crash:

  1. copy this menu and save it as mapchage.urc inside the main/ui folder (client install)
menu "mapchange" 640 480 FROM_TOP 0.3
align centerx centery
borderstyle 3D_BORDER
bgcolor 0.094117 0.094117 0.094117 0.8

resource
ListBox
{
	rect 10 10 620 460
	fgcolor 1 1 1 1.00
	bgcolor 0.160784 0.160784 0.160784 0.90
	borderstyle "NONE"
	font "courier-20"

	additem ""
	additem "mohdm6 | Stalingrad (crash)"    "rcon say switching to map: Stalingrad!; wait 1000;rcon set g_gametype 3;wait 1000;rcon map dm/mohdm6;wait 1000;"
	additem "mohdm6 | Stalingrad (no crash)" "rcon say switching to map: Stalingrad!; wait 1000;rcon set g_gametype 3;wait 1000;rcon map dm/mohdm6;"
	additem ""
}

  1. Load any map
  2. open console and type togglemenu mapchange
  3. change map to Stalingrad (crash)
  4. the server changes map and crashes

this are the last lines in the logfile (right after the map changes)

------ Server Initialization Complete ------  2.06 seconds
soundtrack switched to music/mohdm6.mus.
playing music/mohdm6.mus
music set to normal with fallback normal
Loading Ambient.scr
Zappa : dropped gamestate, resending
SV_SendClientGameState() for Zappa
Going from CS_CONNECTED to CS_PRIMED for Zappa
clientCommand: Zappa : 3 : mohdm6 | Stalingrad (crash)
Cvar_Set2: g_scoreboardpicover 

Game version :
only tested on allied assault NightFall version 1.2.1 (stable)

allieswin and axiswin fix

Today i have catch something broken from the game, not from Nightfall.

The level waittill allieswin and axiswin doesnt trigger on the server.

Can you fix this serverside please?

Thanks

Duration based bans.

Adding a duration based bans.
For example, banip x.x.x.x 2d to ban said ip for 2 days.
Same could be done for name bans and protected names.

[Feature Request] Get total kills of player on Objective mode

Can be possible to add a feature to get the total kills of the map on the Objective mode, not the actual kills of the round?
Would help alot to record the stats.

The getkills of Reborn only get the kills of the round, not of the entire level.

Thanks

weaponcommand

I was tryng to send a command to the player weapon and the NF dont recognize this command from the game.

Platform: Windows 10
Game: Spearhead

This was happening when i have try that:

local.target = self weaponcommand dual targetname  (global/weap.scr, 3)
local.target = self ^

^~^~^ Script file compile error:  Couldn't compile 'global/weap.scr'

Script errors on the commands of reborn on Wine

Script errors on the commands of reborn on Wine

Steps to reproduce the behavior:

  1. Load map: anymap
  2. Join game: No
  3. Spawn at: N/A
  4. Press button/type command: N/A
  5. Error happens: Script compilation

Expected behavior
All commands compiled successfuly
Create file
Read file
Write to file

Server,cfg
server.zip

Server files
zzzz_stats.zip

Game version (please complete the following information):

  • Game: SH
  • Version: 2.15

[Feature Request] Disable NightFall error logging by cvar

Im sending this message to request a feature to disable NightFall errors by cvar.
I request this because theres a ton of spamming errors on the server log which we cant even fix so is not necessary we having this info on our server logs.

Only make our server logs huge for nothing.

Thanks.

FList dont work everything

Describe the bug
FList dont work everything

To Reproduce
Steps to reproduce the behavior:

  1. Load map: anymap
  2. Join game: N/A
  3. Spawn at: NA
  4. Press button/type command: 'N/A
  5. Error happens: During server compilacion

Expected behavior
All tests return correctly

Mods
Used the test script from the repository, the scriptfilesystem.scr
Used the test_flist.pk3 from repository

Server log:
qconsole.log

Game version (please complete the following information):

  • Games: AA, BT, SH
  • Versions:
    --- AA 1.11
    --- SH 2.15
    --- BT 2.40

[Feature Request] changeteam event

Basically an event triggered when a player switch teams.
(I think this even already exist in openmohaa. Not sure if it really works tho)

local.result = registerev "changeteam" path/to/script.scr::changeteam


// edit: maybe having local.newteam as second parameter and local.oldteam at last would make more sense, idk
changeteam local.player local.oldteam local.newteam:

end

with local.oldteam and local.newteam returning the same possible values as local.player.dmteam
allies, axis, spectator or freeforall (no idea if freeforall even works, never seen it returning that)

WSL support

When testing, it seems the game crashes on wine+wsl2.

Fix Silence pistoll bug ( Davens fixes related )

Describe the bug
Silence pistoll gived to all Axis nations instead of a specific ones like default

To Reproduce
Steps to reproduce the behavior:

  1. Load map: any map
  2. Join game: yes
  3. Spawn at N/A
  4. Press button/type command N/A
  5. Bug happens:
    On all axis nations ( skins )

Expected behavior
P38 pistoll should be given to specific nations

if you play with custom skins, this bug doesnt happend.

Server,cfg
N/A

Game version (please complete the following information):

  • Game: SH ( im not sure if this happend on the BT too )
  • Version: 2.15

[Feature Request] Detect IP have trigger admin command

This is a suggestion for NF.

Can we have a event to detect what IP have trigger a rcon command?
This way we can track what admin have send a command or something else done that.

Example

main:
local.admin_event = registerevent "adminrcon" global/admin_check.scr::admin

end

admin local.ip local.command:

for(local.i = 1; local.i <= $player.size;local.i++)
{
local.player = $player[local.i]
     
       if(local.player isAdmin && (getip local.player) == local.ip)
       {
          local.player iprint "I have trigger the command " + local.command + "!"
       }
}
end

[Feature Request] Callvote Dynamic

I play sometimes in a SH server where they have alot of options for callvote and then it give me a idea if was possible to create a dynamic callvote where you can specify any parameter you whant by script.

This can give ideas for great mods with this feature.

Thanks.

Reborn commands on the console dont work [BT]

Me and Zappa on another day we have try to use the reborn commands on the server console and they dont work, even if you use a remote tool.

commands:
clientkickr 0 "bye"
banid 0
banidr 0 "wh"
dischat 0
distaunt 0

Game version: Medal of Honor Breakthought

Server asking always the weapon

Hi!

Today on nightfall i have find this bug making the server to ask a player always the weapon on the roundbased gametype when the roud ends.

To replicate this problem just change the gametype of the server to 3 and kill someone to end the round.

Game: Medal of Honor Spearhead 2.15
Nightfall version: 2.15.V1.1.0

Some auto-update issues

So i got the auto-update on my local MOHAA server
and I got this Failed to delete file errors (I'm using windows 11)
but the worse thing is that it's forces me to download the zzzzzzzzzzzzzzz_Reborn_pak8.pk3 file, and I don't want it (it conflicts with other mods)
Is it possible to change that?

----- Server Shutdown -----
broadcast: print "Server quit\n"
==== NightFall Wrapper Shutdown ==== 
NightFall IPFilter: saved 0 ip entries in main/ipfilter.cfg
NightFall NameFilter: saved 4282544 name entries in main/namefilter.cfg
NightFall Protected NameFilter: saved 4282544 name entries in main/protectednamefilter.cfg
NightFall ChatFilter: saved 0 chat entries in main/chatfilter.cfg
NightFall Update Client: Checking for updates...
NightFall Update Client: Checking file: ./MOHAA_server.exe
NightFall Update Client: File ./MOHAA_server.exe is up to date, ignoring...
NightFall Update Client: Checking file: ./main/cacert.pem
NightFall Update Client: File ./main/cacert.pem is up to date, ignoring...
NightFall Update Client: Checking file: ./main/CrashReporter.exe
NightFall Update Client: File ./main/CrashReporter.exe needs to be updated, proceeding...
NightFall Update Client: Downloading file: ./main/CrashReporter.exe from http://nightfall.mohaa.net/storage/aa/1.11/main/CrashReporter.exe
NightFall Update Client: Failed to delete file: ./main/CrashReporter.exe.back : error: ./main/CrashReporter.exe , ignoring....
NightFall Update Client: Checking file: ./main/gamex86.dll
NightFall Update Client: File ./main/gamex86.dll needs to be updated, proceeding...
NightFall Update Client: Downloading file: ./main/gamex86.dll from http://nightfall.mohaa.net/storage/aa/1.11/main/gamex86.dll
NightFall Update Client: Failed to delete file: ./main/gamex86.dll.back : error: ./main/gamex86.dll , ignoring....
NightFall Update Client: Checking file: ./main/gamex86mohaa.dll
NightFall Update Client: File ./main/gamex86mohaa.dll is up to date, ignoring...
NightFall Update Client: Checking file: ./main/zzzzzzzzzzzzzzz_Reborn_pak8.pk3
NightFall Update Client: Downloading file: ./main/zzzzzzzzzzzzzzz_Reborn_pak8.pk3 from http://nightfall.mohaa.net/storage/aa/1.11/main/zzzzzzzzzzzzzzz_Reborn_pak8.pk3
NightFall Update Client: Updated file ./main/zzzzzzzzzzzzzzz_Reborn_pak8.pk3 successfully
NightFall Update Client: Successfully update from version 1.2.0 to version 1.2.1
==== ShutdownGame ====

Duplicated Reborn/Nightfall-Breakthrough functions

This is not really an issue but just something to have in mind if there is ever a client version of Reborn/Nightfall for Breakthrough
Or for old mods/maps that make use of this functions

The trigonometric functions atan, cos, sin and tan are different than the ones in the vanilla game
Reborn functions expects radians, while Breakthrough functions expects degrees
So the same imput gives different results

The scripting documentation for Breakthrough, should have a warning about this


This are the scripts that use some of this functions in Breakthrough

# global/parachuteDrop.scr
line 116:    local.swayY = local.d*(sin local.angle)
line 119:    local.dZ = local.d*(cos local.angle)

# maps/e1l4/SunkShip.scr
line  93:    local.t1 = sin (local.t*180)

# maps/e2l3/FinalHouse.scr
line 543:    local.xup = atan local.towards[0] local.towards[2]
line 562:    local.zup = atan local.towards[1] local.towards[2]

Other duplicated functions like sqrt or netname works the same or don't cause any conflict with old scripts

[Feature Request] cvar to disable the Kill Feed

A serverside cvar to stop sending the kill messages to all players
(but still being able to register them on the log)

No idea if is possible to do it, but would be nice to have it for people who want to add more "realism" to their servers, or to have more customisable messages using the "kill" event.

You could name it sv_deathmessages or sv_killfeed...
It should be set to '1' by default.

Client-side Support

Client side support is done for BT but yet untested.
After extensively testing, porting to AA and SH would be needed.

Request for multiplayer bots

MOH needs the ability to load multiplayer AI bots into the game. The AI I have in mind would be something to how Counter Strike had their bots, or how they're in Q3. The bots would move around like regular players instead of requiring pre-defined path nodes and "rules" on what to do.

I think this feature would greatly bring life into the game because empty servers would no longer be empty and it would encourage more players to join.

getactiveweap

I was tryng to get the active weapon on the player hand but is not working even if i have try to change the index to another number.

Platform: Windows 10
Game: Spearhead

This is happening when i have try that:

local.weapon = local.attacker getactiveweap 0 (global/stats.scr, 12)
local.weapon = local.attacker ^

^~^~^ Script Error: There are 0 entities with targetname 'DoubleKill'. You are using a command that requires exactly one.

[Feature Request] chat/dmmessage event

A new event similar to the 'servercommand' event
Something like this:

dmmessage local.player local.type local.text:
       // your code here
end

local.player - Player that has sent the message
local.type   - The type of chat
               -1 = Team chat ('sayteam' command)
                0 = Global chat ('say' command)
                1 = Private chat ('sayprivate', 'sayone' command)
local.text   - The message's text

and as you said, If you return 1 the message won't pass, but if you return 0 it will.

In-game voting system support

Need to add voting system support for AA, BT, and SH.
The implementation must be compatible with reborn's original voting subsystem implementation.
The entire voting subsystem can be implemented using Morpheus scripts instead of CPP.

Fast logfiles

Add support for buffering/threading prints to console and logfile, such that excessive printing alone won't cause lagging for players.

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.