Giter Site home page Giter Site logo

cncnet / yrpp-spawner Goto Github PK

View Code? Open in Web Editor NEW
21.0 9.0 12.0 3.11 MB

CnCNet DLL for Command and Conquer: Yuri's Revenge using Syringe

License: GNU General Public License v3.0

Batchfile 1.91% C++ 96.89% C 1.21%
modding command-and-conquer cncnet dll-injection mod redalert2 syringe yurisrevenge

yrpp-spawner's Introduction

Downloads

Building manually

  1. Install Visual Studio (2019 is recommended, 2017 is minimum) with the dependencies listed in .vsconfig (it will prompt you to install missing dependencies when you open the project, or you can run VS installer and import the config). If you prefer to use Visual Studio Code you may install VS Build Tools with the dependencies from .vsconfig instead. Not using a code editor or IDE and building via command line scripts included with the project is also an option.
  2. Clone this repo recursively via your favorite git client (that will also clone YRpp).
  3. To build the extension:
    • in Visual Studio: open the solution file in VS and build it (Debug build config is recommended);
    • in VSCode: open the project folder and hit Run Build Task... (Ctrl + Shift + B);
    • barebones: run scripts/build_debug.bat.
  4. Upon build completion the resulting cncnet5.dll and cncnet5.pdb would be placed in the subfolder identical to the name of the build config executed.

Credits

Legal and License

GPL v3

This project is an unofficial open-source community collaboration project to patch the Red Alert 2 Yuri's Revenge engine for CnCNet support & compatibility purposes.

This project has no direct affiliation with Electronic Arts Inc. Command & Conquer, Command & Conquer Red Alert 2, Command & Conquer Yuri's Revenge are registered trademarks of Electronic Arts Inc. All Rights Reserved.

yrpp-spawner's People

Contributors

belonit avatar chaserli avatar metadorius avatar starkku avatar

Stargazers

 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

yrpp-spawner's Issues

Feature request: add "CustomMissionID" for saved games

A .sav file is an OLE document that can be considered as a "dictionary". For example, the OLE key Scenario Description refers to a UTF-16 LE string corresponds to the title of a saved game file.

I am currently working on a feature to let xna-cncnet-client support loading custom missions. In order to support this feature, xna-cncnet-client must have a way to identify which mission corresponds to a saved game file, along with other restrictions to prevent user loads a different mission (to prevent potential conflicts; as supplemental files are copied by the client)

Thus, I request an addtional data field, described as below.

CustomMissionID

This value will be specified via the spawn.ini file, given when the spawner is launchered.

; Generated by DTA Client
[Settings]
Scenario=spawnmap.ini
CustomMissionID=12345678
IsSinglePlayer=Yes

CustomMissionID is an int32 integer. If this value is omitted, consider it 0.

In a .sav file, the OLE key CustomMissionID should corresponds with 4 byte-values that contains such an int32 integer in little-endian order. The number is untouched, saved as-is.

Rename of missionmd.ini file

When CustomMissionID is specified and not 0, the access of missionmd.ini shall be redirct to spawn.ini file. This enables the client automatically generates the corresponding mission info without interrupting the game.

Full example of a spawn.ini file:

; Generated by CnCNet Client

[Settings]
Scenario=Maps\CustomMissions\vnsepa.map
GameSpeed=1
Ra2Mode=False
CustomLoadScreen=Resources/l600s02.pcx
IsSinglePlayer=Yes
SidebarHack=False
Side=0
BuildOffAlly=True
DifficultyModeHuman=0
DifficultyModeComputer=2
CustomMissionID=-715243874

[Maps\CustomMissions\vnsepa.map]
Briefing=Brief:AREDDAWN
ShowBriefing=true
UIName=MAP:TITREDDAWN
LSLoadMessage=LoadMsg:AREDDAWN
LSLoadBriefing=LoadBrief:AREDDAWN
LS640BriefLocX=20
LS640BriefLocY=20
LS800BriefLocX=20
LS800BriefLocY=20
LS640BkgdName=custommission.shp
LS800BkgdName=custommission.shp
LS800BkgdPal=custommission.pal
LoadScreenText.Color=LightGrey

Saved games list filter

When CustomMissionID is specified and it is not 0, only saved game files with the same CustomMissionID shall be displayed.

Otherwise, when CustomMissionID is not specified or is 0, only saved game files without CustomMissionID or with a zero-valued CustomMissionID shall be displayed.

Reading CustomMissionID from saved game file

When loading a saved game, the spawner loads CustomMissionID based on the OLE key CustomMissionID in a .sav file. CustomMissionID will not be specified in spawn.ini in this case.

Couldn't load in Steam edition game and Syringe 0.7.3.0 yr.

RA2 has a Steam edition, and Syringe released 0.7.3.0 yr to fix a crash.
The spawner can't load in that environment.

Logs:

[22:31:25] Syringe 0.7.3.0 yr
[22:31:25] ==================

[22:31:25] WinMain: arguments = ""gamemd.exe" -win -SPAWN"
[22:31:25] WinMain: Trying to load executable file "gamemd.exe"...

[22:31:25] SyringeDebugger::RetrieveInfo: Retrieving info from the executable file...
[22:31:25] SyringeDebugger::RetrieveInfo: Executable information successfully retrieved.
[22:31:25] 	exe = gamemd.exe
[22:31:25] 	pImLoadLibrary = 0x007E1220
[22:31:25] 	pImGetProcAddress = 0x007E1250
[22:31:25] 	pcEntryPoint = 0x007CD80F
[22:31:25] 	dwExeSize = 0x0050A940
[22:31:25] 	dwExeCRC = 0xA3F19485
[22:31:25] 	dwTimestamp = 0x3BDF544E

[22:31:25] WinMain: SyringeDebugger::FindDLLs();

[22:31:25] SyringeDebugger::FindDLLs: Recognized DLL: "Ares.dll"
[22:31:25] SyringeDebugger::Handshake: Calling "Ares.dll" ...
[22:31:25] SyringeDebugger::Handshake: Answers "Found Yuri's Revenge 1.001 (Steam). Applying Ares 3.0p1." (0)
[22:31:25] SyringeDebugger::FindDLLs: Shim recognized DLL: "cncnet5.dll"
[22:31:25] SyringeDebugger::FindDLLs: Done (1461 hooks added).

[22:31:25] WinMain: SyringeDebugger::Run("-win -SPAWN");

[22:31:25] SyringeDebugger::Run: Running process to debug. cmd = "gamemd.exe -win -SPAWN"
[22:31:25] SyringeDebugger::Run: Allocating 0x580 bytes...
[22:31:25] SyringeDebugger::Run: pAlloc = 0x001C0000
[22:31:25] SyringeDebugger::Run: Writing DLL loader & caller code...
[22:31:25] SyringeDebugger::Run: pcLoadLibrary = 0x001C0000
[22:31:25] SyringeDebugger::Run: Entering debug loop...
[22:31:26] SyringeDebugger::HandleException: Finished retrieving proc addresses.
[22:31:26] SyringeDebugger::HandleException: Creating code hooks.
[22:31:31] SyringeDebugger::Run: Done with exit code 0 (0).

[22:31:31] WinMain: SyringeDebugger::Run finished.
[22:31:31] WinMain: Exiting on success.

Add optional "no in game chat" feature - $50

CnCNet/yr-patches#7

About
Some players are often trolled within in-game chat, mostly commoly in ranked matches. (Quickmatch)

As a player, I want to:

  • Have the ability to disable the chat entirely so no chat is received from any player.
  • To be notified in game when attempting to chat with it disabled, e.g. "You currently have in-game chat disabled".

Task detail:
Disabling in-game chat should be handled by the client. Spawner should read from RA2MD.ini

Gap generator bug when going from player to observer

CnCNet/yr-patches#14
There's a current bug where if you are a player, but then lose and turn into an observer, gap generators still work, instead of revealing the shroud around it.

When a player turns into an observer gap generators should not be working and we should be able to see the entire map, as how a normal observer would be able to see the whole map upon load in.

Expand Sync log Data for Troubleshooting

For ladder staff and map-makers, it would be beneficial if the sync logs contained more information to troubleshoot what has caused the reconnection errors that generated them.
Luckily, @Rampastring & XME have patched the Tiberian Sun spawner to output the necessary data and recommended that I open an issue here to get the process moving towards porting the features to Yuri's Revenge CnCNet spawner.

References to the Tiberian Sun spawner feature patches:
https://github.com/CnCNet/ts-patches/blob/master/src/log_more_oos.c

https://github.com/CnCNet/ts-patches/blob/master/src/record_rng_func.asm

RA2Mode-free build configuration

For most YR mods it's pointless to consider RA2Mode compatibility. Certain hooks can be debatable (for example #20 ). I suggest adding a build configuration that ignores everything related to RA2Mode.

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.