aliens

Author Topic: [Solved] Modding the sight range (OXCE)  (Read 4065 times)

Offline Dzagamaga

  • Squaddie
  • *
  • Posts: 4
    • View Profile
[Solved] Modding the sight range (OXCE)
« on: February 20, 2017, 06:48:23 pm »
Although I am sure there have been people before me asking the very same question on this very same forum, I would like to ask how can one actually mod the sight range, seeing as how there is no real way to do just that by modifying the ruleset (that is, if I'm not blind).
I am pretty that it is actually hardcoded, and if that is the case, I would also like to ask how to change it, since I remember there being a mod that did just that (Real Vision).
Thanks in advance.
« Last Edit: February 11, 2023, 04:02:01 pm by Meridian »

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Modding the sight range
« Reply #1 on: February 20, 2017, 06:52:19 pm »
Although I am sure there have been people before me asking the very same question on this very same forum, I would like to ask how can one actually mod the sight range, seeing as how there is no real way to do just that by modifying the ruleset (that is, if I'm not blind).
I am pretty that it is actually hardcoded, and if that is the case, I would also like to ask how to change it, since I remember there being a mod that did just that (Real Vision).
Thanks in advance.

This involve changing the code and creating a custom .exe.  Real Vision did just that.

This capability however, has also been integrated into the Open Xcom Extended (OXCE)  branch (and by extension Open XCom Extended Plus (OXCE+)).  With either of these engines mods can be written that set the global variable on sight distances.  XCom Files and X-PirateZ both employ this for their sight ranges, I believe.

Offline Dzagamaga

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Modding the sight range
« Reply #2 on: February 20, 2017, 06:54:17 pm »
This involve changing the code and creating a custom .exe.  Real Vision did just that.

This capability however, has also been integrated into the Open Xcom Extended (OXCE)  branch (and by extension Open XCom Extended Plus (OXCE+)).  With either of these engines mods can be written that set the global variable on sight distances.  XCom Files and X-PirateZ both employ this for their sight ranges, I believe.

Now that was quick! Thanks!

Offline Dzagamaga

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Modding the sight range
« Reply #3 on: February 20, 2017, 08:41:10 pm »
This involve changing the code and creating a custom .exe.  Real Vision did just that.

This capability however, has also been integrated into the Open Xcom Extended (OXCE)  branch (and by extension Open XCom Extended Plus (OXCE+)).  With either of these engines mods can be written that set the global variable on sight distances.  XCom Files and X-PirateZ both employ this for their sight ranges, I believe.

Sorry for bringing this up again, but now that I have OXCE (I hope) up and running, I can't actually figure out how to do this.
There's NOTHING that indicates that I can actually change it.
Getting kind of desperate at the moment.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Modding the sight range (OXCE)
« Reply #4 on: February 20, 2017, 08:50:52 pm »
In the rulesets, you just need to define maxViewDistance somewhere.  The simplest way would be to make a mod containing a .rul file with the line
Code: [Select]
maxViewDistance: x where x is the view distance you want.  This would change it for both your units and the aliens, so be careful :)

Offline Dzagamaga

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Modding the sight range (OXCE)
« Reply #5 on: February 20, 2017, 09:07:39 pm »
In the rulesets, you just need to define maxViewDistance somewhere.  The simplest way would be to make a mod containing a .rul file with the line
Code: [Select]
maxViewDistance: x where x is the view distance you want.  This would change it for both your units and the aliens, so be careful :)

Worked perfectly! Can't thank you and ivandogovich enough!