Giter VIP home page Giter VIP logo

revolucas / coc-xray Goto Github PK

View Code? Open in Web Editor NEW
73.0 18.0 33.0 83.59 MB

Modified X-Ray engine for Call of Chernobyl

License: Other

C 28.89% C++ 63.13% Pascal 4.46% PHP 0.01% HTML 0.59% Perl 0.05% M4 0.03% Batchfile 0.02% Shell 0.40% Makefile 0.60% Roff 0.05% SAS 0.02% Smalltalk 0.01% Assembly 0.01% Module Management System 0.02% Objective-C 1.16% CSS 0.02% Lua 0.47% CMake 0.02% Cuda 0.05%

coc-xray's Introduction

XRAY 16 Engine Modifications

Open X-Ray Call of Chernobyl Edition


This repository contains XRAY Engine sources based on version 1.6.02 for specific use with the Call of Chernobyl modification. The original engine is used in S.T.A.L.K.E.R. Call of Pripyat game released by GSC Game World and any changes to this engine are allowed for non-commercial use only (see License.txt for details).

The goal of this project is to expand the moddability and features of the engine; Fixing issues or bugs when necessary. It is not to reshape or rebuild X-Ray using modern technology.

Build Instructions

This project is maintained under Visual Studio 2013. You need https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk You need these SDK libraries: https://drive.google.com/file/d/0B0zCaycrwhLHX09kaXdSeWNhWVE/view?usp=sharing

  1. Open Property Manager tab (View > Other Windows > Property Manager)
  2. Under User Macros, change xrSdkLibDir to point to the downloaded SDK Libraries
  3. Under User Macros, change xrGameDir to point to your desired output location for the compiled binaries
  4. After building the solution copy lua51.dll from src\3rd party\luajit-2\bin\x86 into your xrGameDir folder.
  5. If you are not using CoC, then you need the minimal changes foud in res\gamedata
  • Notes: Currently only Release/Win32 and Debug/Win32 will build
  • If you find a bug or have an enhancement request, file an Issue.
  • Please go to our Wiki pages for detailed description of changes and other useful information.

coc-xray's People

Contributors

andrew-boyarshin avatar avoitishin avatar awdavies avatar axeldominator avatar balathruin avatar casualdev242 avatar gunslingermod avatar highflex avatar loner1 avatar qweasdd136963 avatar revolucas avatar roman-n 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

Watchers

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

coc-xray's Issues

luabind/lua passing invalid params to engine functions

I need someone more experienced to fix or tell me why when passing an invalid or unexpected type to engine function, lua script just silently stops working without warning or error, making it extremely difficult to detect this kind of mistake or error.

For example, when doing something like:

db.actor:give_game_news("test_caption", "text", nil, 500, 10, 1)

If passing nil instead of a string for the third param, game will run fine, except whatever script this occurred in just stops working without warning. Is there a way to error check this?

Server Entities, M_UPDATE and Multiplayer

Multiplayer code should be eliminated and M_UPDATE message should instead have Client object change Server object directly instead of through the faulty packet messaging system. Eliminating the requirement to read Update packet from all.spawn and save would open up the possibility to modify or add new server entity classes without it being a huge hassle. It would also lessen the chances of save corruption.

Several server entity classes aren't appropriately storing data and it is lost when client object is switched offline. For example, condition does not save for anything but Weapons, even though condition is written through STATE_Write. Another example: #7

The proper way to fix this would require the ability to compile all level editor tools, which does not work in this repo. But since CoC will never work for multiplayer, the solution would be to just track and modify server entity through client object, which is what is done in script side, anyway.

DX8 (renderer_r1)

`stack trace:

0023:041E430A xrRender_R1.dll, CLightProjector::calculate(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\layers\xrrenderpc_r1\lightprojector.cpp, 182
0023:041D75D0 xrRender_R1.dll, CRender::Calculate(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\layers\xrrenderpc_r1\fstaticrender.cpp, 537
0023:0042ACE8 xrEngine.exe, IGame_Level::OnRender(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\igame_level.cpp, 167
0023:049B73A9 xrGame.dll, CLevel::OnRender(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrgame\level.cpp, 692
0023:0041109C xrEngine.exe, CRegistrator::Process(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\pure.h, 90
0023:00410872 xrEngine.exe, CRenderDevice::on_idle(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\device.cpp, 291
0023:004109EA xrEngine.exe, CRenderDevice::message_loop(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\device.cpp, 345
0023:00410B0E xrEngine.exe, CRenderDevice::Run(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\device.cpp, 395
0023:004650ED xrEngine.exe, Startup(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\x_ray.cpp, 390
0023:00465873 xrEngine.exe, WinMain_impl(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\x_ray.cpp, 889
0023:00465976 xrEngine.exe, WinMain(), e:\stalker\x-ray source\x-ray_callofchernobyl\src\xrengine\x_ray.cpp, 958
0023:0047157B xrEngine.exe, __tmainCRTStartup(), f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c, 618
0023:77367C04 KERNEL32.DLL, BaseThreadInitThunk()
0023:775BAD1F ntdll.dll, RtlInitializeExceptionChain()
0023:775BACEA ntdll.dll, RtlInitializeExceptionChain()

[error][ 87] : The parameter is incorrect.
`

When switching to another renderer from r1 and trying to load a game

coop support

not sure where to raise this, but it would be awesome to implement a coop game mode

Not working

In the step: 2. Under User Macros, change xrSdkLibDir to point to the downloaded SDK Libraries

Where is the xrSdkLibDir macro in Visual Studio 2017?

[Bugs] Animation

Blending is not as good as it used to be or at least is more noticeable. Animations seems to skip final frame. This appears to be the case for all animations, from creature to weapon.

[Bugs] CCar

I cannot figure out how to fix vehicle spawning. If you spawn by script, the vehicle is fine until it goes offline, the pshell/mesh xform seem to be unaligned. If you spawn through all.spawn and vehicle is not facing the exact direction it faces in Actor Editor, it will be unaligned. Which means that, if not appropriately aligned, that car will drive backwards when you accelerate forward and visa versa. This carries over to AI car, to the point were it don't work at all because ph_car.script gets stuck and stops.

I tried using correct_spawn_pos method on net spawn and net update, it doesn't seem to fix it.

List of issues and changes

Posting here if anyone wants to fix something.

  • actor bleeding can be overwritten with smaller one, should keep highest or add up with a cap f0a2cad
  • items with uses don't update their weight on load, only after opening inventory (17e45b9)
  • weapons with tri state reload can get stuck in jammed if the magazine is full (have to unload), jamming should happen after shot IMO; jam fix should require full reload (for OWR3) (FIXED: 02400c2)
  • not sure if still exists; recoil bug 1; bug 2
  • burn damage slows the actor
  • live detector selects targets ahead and behind the camera
  • bullet pass through is not enabled (3rd param in damages.ltx)
  • visible shadows disappear when using fov higher than 55
  • distant shadow bug caused by cloud shadows: https://youtu.be/H2YB0yxFFtM & https://youtu.be/Q_O5D-S0GVk; speed of these shadows is also too high, especially in stormy/windy weather
  • pause can temporarily break sounds, near anomalies for example: https://youtu.be/nbw8cCYVda4

other changes or stuff that should be added:

  • (Alun's idea) actor legs
  • kick sound; needs at least two, hit and miss
  • handling and recoil modifier for weapon attachments (simulate adding weight); more important due to weapon intertion
    OR
  • (Alun's idea) weight automatically changes recoil and handling (or anything else that depends on it); scale is not 1:1, should be adjustable through config
  • port g_hardcore from Oxygen
  • port 3D and secondary scope from Shoker
  • restore cut items: dosimeter (port from Oxygen?), anomaly detector, live detector (NPC counter); would help equipment progression by not having these default on and even having them tiered like artefact detectors or binoculars
  • staggering kick ability for actor (no or minimal damage); NPCs punch, you kick them in the nut!
  • upgrade support for binoculars (starts with fixed zoom and no live detector)
  • toggle for night vision scopes (including binoculars)
  • minimum zoom value for weapon/equipment with dynamic zoom 38731ae
  • movement speed modifier when aiming while crouching b170c4b
  • k_cam_dispersion recoil modifier for ammo 6346284
  • AP modifier for weapons (lower bullet speed -> less penetration) 3bc6233
  • possibility to disable actor dispersion for ammo (buckshot no longer changes spread) or PDM multis for ammo
  • broken state for weapons when they can't be used at all (maybe if jams under misfire_end_condition?); weapon explodes instead of jamming if condition is 0%
  • bullet sound configurable per ammo
  • range slider and fade for grass shadows
  • (idea) HUD customisation: enable or disable part(s) of the HUD, including NPC counter sound
  • (idea) grab and move all dynamic objects (with weight limit ofc) (Alun: This can be done in system.ltx and object\models config with correct capture settings)
  • (idea) support for multiple cloud shadow textures that changes with weather
    Full list of my brain farts: https://pastebin.com/FX5g41PA

NPCs more quiet

Hi!
I'm currently playing the CoP Anomaly mod.
I've come across some annoying behavior:
In combat, when I hide (They stop seeing me), it happens that the NPCs instantly abandon their position and start walking like zombies towards me. It's annoying, because I can hide just a few seconds and I know that in a few moments I'll have them a few meters away, being easy to eliminate them with a shotgun.
Does anyone know in which script/file, I can create a ramdom time so that the NPCs take some time to get out of their openings to me?

I've been looking all over the Internet for someone to help me change this behavior, and I haven't found anyone to help me.
Here's the git: https://github.com/mora145/Anomaly-Vanilla-Files

A screenshot: http://prntscr.com/sbo9pd

Waah! No vanilla go run :( PPPPPpppppp

stack traceback:
d:\game\gamedata\scripts_g.script:854: in function 'callstack'
d:\game\gamedata\scripts\sim_board.script:322: in function 'enter_smart'
d:\game\gamedata\scripts\smart_terrain.script:1386: in function 'call_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1408: in function 'try_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1022: in function 'update'
d:\game\gamedata\scripts\bind_smart_terrain.script:69: in function <d:\game\gamedata\scripts\bind_smart_terrain.script:66>
[C]: in function 'set_callback'
d:\game\gamedata\scripts\bind_stalker.script:144: in function <d:\game\gamedata\scripts\bind_stalker.script:124>
2
stack traceback:
d:\game\gamedata\scripts_g.script:854: in function 'callstack'
d:\game\gamedata\scripts\sim_board.script:322: in function 'enter_smart'
d:\game\gamedata\scripts\smart_terrain.script:1386: in function 'call_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1408: in function 'try_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1022: in function 'update'
d:\game\gamedata\scripts\bind_smart_terrain.script:69: in function <d:\game\gamedata\scripts\bind_smart_terrain.script:66>
[C]: in function 'set_callback'
d:\game\gamedata\scripts\bind_stalker.script:144: in function <d:\game\gamedata\scripts\bind_stalker.script:124>
2
stack traceback:
d:\game\gamedata\scripts_g.script:854: in function 'callstack'
d:\game\gamedata\scripts\sim_board.script:322: in function 'enter_smart'
d:\game\gamedata\scripts\smart_terrain.script:1386: in function 'call_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1408: in function 'try_respawn'
d:\game\gamedata\scripts\smart_terrain.script:1022: in function 'update'
d:\game\gamedata\scripts\bind_smart_terrain.script:69: in function <d:\game\gamedata\scripts\bind_smart_terrain.script:66>
[C]: in function 'set_callback'
d:\game\gamedata\scripts\bind_stalker.script:144: in function <d:\game\gamedata\scripts\bind_stalker.script:124>
! [SCRIPT ERROR]: d:\game\gamedata\scripts\smart_terrain_control.script:65: attempt to index field 'actor' (a nil value)

FATAL ERROR

[error]Expression :
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 189
[error]Description : fatal error
[error]Arguments : LUA error: d:\game\gamedata\scripts\smart_terrain_control.script:65: attempt to index field 'actor' (a nil value)

stack trace:

0023:022A394C xrCore.dll, xrDebug::fatal(), i:\coc-xray-working\src\xrcore\xrdebugnew.cpp, 411
0023:0A7333E2 xrGame.dll, CScriptEngine::lua_error(), i:\coc-xray-working\src\xrserverentities\script_engine.cpp, 189
0023:0AA9BA59 xrGame.dll, luabind::class_<CScriptXmlInit,luabind::detail::unspecified,luabind::detail::unspecified,luabind::detail::unspecified>::virtual_def<CUICheckButton * (__thiscall CScriptXmlInit::*)(char const *,CUIWindow *),luabind::detail::null_type>(), i:\coc-xray-working\src\3rd party\luabind\luabind\class.hpp, 1207

[Bugs] Some info about weapon is losing when it switches offline

Steps to reproduce:

  1. Attach to the weapon scope which has non-zero index in 'm_scopes'
  2. Drop the weapon and switch it offline by running from it
  3. Return to the weapon and take it into the hands
  4. See MAGIC: the weapon has scope of another type!

Solution:
The problem appears because CSE_ALifeItemWeapon class has no field to store scope type. Gunslinger mod uses bithacking of m_addon_flags field (writing scope index into the left 5 bits of the field in net_Destroy). This way provides best compatibility with original game, but leads to some restrictions (up to 32 types of scopes) and not fully proper.
More correct way is to extend CSE_ALifeItemWeapon with extra field and export/import data from it when the weapon spawns/destroys. The problem is that such fix could conflict with some game's or mod's content.

P.S. The same bug you could see with ammos in the mag (if the weapon has different ammo types loaded). Moreover, info about types is losing during simple game saving and loading! It allows cheating with transformation cartridges from one type to another.

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.