OpenXcom Forum

Modding => Released Mods => Topic started by: Muukalainen on July 14, 2014, 07:19:56 pm

Title: Real Vision Mod
Post by: Muukalainen on July 14, 2014, 07:19:56 pm

https://www.openxcom.com/mod/real-vision

   Real Vision Mod for Openxcom
--------------------------------------------------------------------

This mod tries to take away gamey limits that annoyed me in the original game.

I always wanted to try how the game would play with better vision and now with Openxcom it
was relatively easy to make the changes.

--------------------------------------------------
Installation:

Make a new copy of your Openxcom. (the whole folder and rename it to something like Openxcom Real Vision.

Replace the files and use the new .exe. To avoid bugs, you should probably remove the old .exe from your new "Real Vision" game folder.

I promise no compatibility with old saved games.

----------------------------------------------------------------------
List of changes:

-Instead of 20 tiles, soldiers and aliens can now see 100 tiles away.

-Aliens can now also see you if your soldiers stand in the light, from far as 100 tiles away.

-Soldiers are no longer walking Christmas trees. No more glow. This makes it easier to hide in the dark. But the night missions are now very dark. Remember to bring those flares and I ammo, if you want to see anything.

-All units have now moddable "nightvision" stat. Defaults in the Ruleset are like in the original,
9 for xcom and 20 for aliens.

-Smoke calculations have been adjusted to work better with the new 100 tile sight range. At times the smoke can now be even more dense or light


----------------------------------------------------------

This mod was made by Muukalainen.

---------


This was my first attempt to build Windows program with c++, so I am not entirely sure if it was done right and if it works on other people's computers. If someone could try it, it would be nice.

I have no experience either with the code sharing site, but at some point I will probably try to learn that too and share the code.
Title: Re: Real Vision Mod
Post by: lordkrike on July 14, 2014, 07:34:39 pm
Looks interesting.  I don't know much C++, but I'd like to take a look.

GitHub (https://github.com/) is pretty easy to use.  If you create an account they will walk you through creating a repository, and the GitHub for Windows application is pretty easy to use.

Mmm... also, you shouldn't edit the Xcom1Ruleset.rul file directly.  Make a new .rul file and activate it in the mod section of OpenXCom's options.  It will overrule anything in Xcom1Ruleset at run time if it needs to.
Title: Re: Real Vision Mod
Post by: Muukalainen on July 14, 2014, 07:54:23 pm
Looks interesting.  I don't know much C++, but I'd like to take a look.

GitHub (https://github.com/) is pretty easy to use.  If you create an account they will walk you through creating a repository, and the GitHub for Windows application is pretty easy to use.

Mmm... also, you shouldn't edit the Xcom1Ruleset.rul file directly.  Make a new .rul file and activate it in the mod section of OpenXCom's options.  It will overrule anything in Xcom1Ruleset at run time if it needs to.

I think in this situation is was the most safe way to do it. The code might not work if the nightvision stats were not there. In this version they are as integral part of the game as any other stat.

Ofcourse everyone can now make their own ruleset files that adjust those values.

And in the installation notes I explained people to make new copy of their game.

About c++, yeah, it was real gibberish for me after doing only java programming for the last 8 years. But not too hard, and I used to make some simple games back in the Dos years with c++. The VC also felt very clumsy and inefficient compared to Netbeans.
Title: Re: Real Vision Mod
Post by: Dioxine on July 14, 2014, 08:21:55 pm
Ruleset-editable vision/night-vision ranges and unit glow (ideally armor-dependant, or even item dependant - flashlights - if possible) would be a great addition for OpenXcom in general, allowing modders to implement such ideas without having to compile a new .exe... Maybe you should contact the devs so your code would be included in the official build?
Title: Re: Real Vision Mod
Post by: niculinux on July 14, 2014, 08:36:17 pm
Thanks! But it makes sense on higher resolutions, i suppose (1024x768 and up) Well, since i'm shortsightened I'm  likely to never use it  >:( :( :'(
Title: Re: Real Vision Mod
Post by: Muukalainen on July 14, 2014, 08:48:42 pm
Ruleset-editable vision/night-vision ranges and unit glow (ideally armor-dependant, or even item dependant - flashlights - if possible) would be a great addition for OpenXcom in general, allowing modders to implement such ideas without having to compile a new .exe... Maybe you should contact the devs so your code would be included in the official build?

Yes, this would be the ideal solution for modders to have all the values adjustable on the ruleset.

But it is easier said than done. I first increased the visibility and then the smoke had no effect anymore. Make the aliens have equal vision rules and now they can see your soldiers because they glow like Christmas trees. Remove the glow and, well now the map is really dark. It would be nice to have some green or blue tinted glow that was not a real light on the los calculations. And that would be replaced if there was real light.

If the devs want to implement these mods to the game I will be happy to help. I think the problem is that it would easily have a spaghetti effect on the code, and only because we want to take the game more away from being Xcom :D

But yeah, I might update this someday and try to implement those ideas you had at least to this fork.
Title: Re: Real Vision Mod
Post by: Muukalainen on July 14, 2014, 08:50:14 pm
Thanks! But it makes sense on higher resolutions, i suppose (1024x768 and up) Well, since i'm shortsightened I'm  likely to never use it  >:( :( :'(

I am too. The solution is to wear glasses or have the monitor closer to you :)
Title: Re: Real Vision Mod
Post by: crescentmoon on July 16, 2014, 02:09:28 am
Cool mod :)
But I noticed that the inside of Alien Bases is dark now.
Is there a way to change that back?
Title: Re: Real Vision Mod
Post by: Muukalainen on July 16, 2014, 02:52:27 am
Cool mod :)
But I noticed that the inside of Alien Bases is dark now.
Is there a way to change that back?

Let's see. Yes, the bases are very dark and quite ugly.

The mod removes the glow of your soldiers, so you just have use flares and flaming ammo to light those bases.
Title: Re: Real Vision Mod
Post by: crescentmoon on July 16, 2014, 06:27:46 am
Got it. You're right, they are dark in the original.
Title: Re: Real Vision Mod
Post by: Mr. Quiet on July 21, 2014, 12:27:47 am
I just wanted to say this mod has changed the way I play X-cOm in a few ways and I'm enjoying it very much. The smoke cover is like creating a wall though, so I feel like I'm cheating when I take advantage of it, because in vanilla smoke, the aliens can still see you. Maybe you should make it so it takes a few turns for the smoke to completely come out.

I just read your answer. I really like the ideas you put out, just need more thought put into this.

@Warboy please improve the AI so they blind fire in the direction they last saw X-COM movement before fading into the darkness or into a building.
Title: Re: Real Vision Mod
Post by: Muukalainen on July 21, 2014, 09:03:33 am
I just wanted to say this mod has changed the way I play X-cOm in a few ways and I'm enjoying it very much. The smoke cover is like creating a wall though, so I feel like I'm cheating when I take advantage of it, because in vanilla smoke, the aliens can still see you. Maybe you should make it so it takes a few turns for the smoke to completely come out.

I just read your answer. I really like the ideas you put out, just need more thought put into this.

@Warboy please improve the AI so they blind fire in the direction they last saw X-COM movement before fading into the darkness or into a building.

Yeah, something must be done for the smoke or AI.

I also started today a campaign with it and I have to say that I like it :) And the smoke actually backfired on my first terror mission. I could not see couple of reapers and they got easily too close and ate some of my soldiers :D

I don't have too much experience with AI so easiest solution would probably be to make somekind of "REAL SMOKE" add-on for this.

3rd option to solve this could also be that if you don't really see the enemy, you get huge penalty on your accuracy.

I also thought about making the smoke more hazardous to be in. Meaning more stun damage than it now does.

PS:

On the generated skirmish battles there seems to be a bug with the soldiers nightvision not working. I try to fix this on the next version.
Title: Re: Real Vision Mod
Post by: aceshigh on July 22, 2014, 09:35:27 pm
Ok... so I downloaded the model and installed without checking out the instructions. I never realized it would have a .exe inside.

Anyway, I did it on my Android OpenXCom folder, which doesn´t even have a .exe inside.

And now the game is crashing.

What files can I delete, which ones should I replace?
Title: Re: Real Vision Mod
Post by: Muukalainen on July 22, 2014, 10:03:10 pm
Ok... so I downloaded the model and installed without checking out the instructions. I never realized it would have a .exe inside.

Anyway, I did it on my Android OpenXCom folder, which doesn´t even have a .exe inside.

And now the game is crashing.

What files can I delete, which ones should I replace?

Open the .zip file. You can see all the files that you did overwrite. You should be safe if you replace those back to the original ones.

Edit:

And that means the main Ruleset file. Other files are dlls and exe.

About .exe and dll files I can not say anything as I don't know anything about android. If the game does not start, then you should remove those files and put back your android files if android uses dll files.
Title: Re: Real Vision Mod
Post by: aceshigh on July 22, 2014, 10:23:05 pm
the game never failed to start. It only crashes on the Battle Scape.

anyway, I followed your instructions (actually, I arrived on the conclusion about doing that before you replied) and now the game is crashing on the "BEGIN MISSION: Yes/No" screen, which is even earlier than the loading screen (the one with a text about tactical mission, starting with "exercise caution" and only has a button to click OK)


there are no dll or exe files on the Android port. You only copy the OpenXCom Data folder to your Android and install the Android APK file. Asides the Data folder, in the root of OpenXCom folder you will only find the save files.


Do you know if Real Vision messes up with savegames?
Title: Re: Real Vision Mod
Post by: Muukalainen on July 23, 2014, 05:51:55 am
1.1 version now available.

It will fix the aliens nightvision. There was a bug that caused them to see your units from too far away because of the small glowing effect your soldiers have.

The soldier glow was slightly adjusted and also the darkness limit to see units.

This will make the night missions easier. If you enjoyed the difficulty of 1.0 version you don't have to update :)
Title: Re: Real Vision Mod
Post by: rek85 on January 30, 2016, 12:05:22 pm
linux support would be nice, or maybe sources the best. are there any shared?
Title: Re: Real Vision Mod
Post by: werbfred on July 08, 2017, 10:15:48 am
Hello,

Would it be possible to share source code ?

I would like to merge it with the latest nightly version I use.
Title: Re: Real Vision Mod
Post by: Meridian on July 08, 2017, 01:55:45 pm
Hello,
Would it be possible to share source code ?
I would like to merge it with the latest nightly version I use.

It's already merged in OXCE/OXCE+.

I DON'T recommend using it in latest nightly, it will slow the game performance down extremely.
In OXCE/OXCE+ the performance has been improved significantly, but still only up to 40 tiles without feeling performance loss (in nightly you will feel it by 25 tiles already).