Author Topic: [Documentation] Active camouflage and predator vision ;-)  (Read 48098 times)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Active camouflage and predator vision ;-)
« Reply #45 on: August 17, 2016, 10:15:38 am »
- compared to let's say mapScript or missionScript, your scripts are much more advanced... slowly approaching the status of programming language, not just script

Well, to be honest, these scripts seem harder than average programming language :) In part this is due to lack of any thorough documentation whatsoever.
An example of language that allows scripting yet is easy to handle is RPGmaker. If OXCom had such a language...

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Active camouflage and predator vision ;-)
« Reply #46 on: August 17, 2016, 11:10:07 am »
Well, to be honest, these scripts seem harder than average programming language :) In part this is due to lack of any thorough documentation whatsoever.

This.
I don't think it would eliminate the problem that Meridian described, but at least we could try.

And yes, scripting can be ignored in favour of changing the source code, but at least it doesn't involve compilation.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #47 on: August 17, 2016, 05:16:05 pm »
And yes, scripting can be ignored in favour of changing the source code, but at least it doesn't involve compilation.

That alone makes it quite a lot more shareable too. Needing people to download source code and compile it means most people won't be able to access your stuff unless you compile it for them: as shown by OXCE and OXCE+. However, "Put this mod in your mod folder" is something that the majority of people can manage. So scripts are really player friendly, but maybe not modder friendly.

It all depends on how Yankes wants to support it now. A big honking readme/man page would be a start, and a collection of all scripts used to date could be something that modders do to share experience (and hopefully Yankes can hang out and help there too).

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Active camouflage and predator vision ;-)
« Reply #48 on: August 17, 2016, 05:54:13 pm »
A big honking readme/man page would be a start, and a collection of all scripts used to date could be something that modders do to share experience (and hopefully Yankes can hang out and help there too).

Hmm.. thats a good point.

I have two mods with three scripts published so far (AltCorpse and FlappyParrot), and yup, Yankes basically had to build them for me.   

Looking at the scripts I can sort of follow the logic, but as just a modder I don't have the background to know what default values are in the code behind them... so, when I think about how to change or create a script, I can see configurable values, but not necessarily know how they should be configured.  The troubleshooting behind getting the corpses to work, made me unsure of whether some of the problems were just in how the scripts were written or if the problems were in the backend of the engine.  I know Yankes published a couple bug fix versions I think in that process....   So yeah, right now, I'm going to lean on Yankes for help with those scripts most likely, and even if I dream something up on my own, I'm probably going to run it by Yankes first to see if it passes the sanity check. 

That said, its still very early and getting good documentation published may help smart tech guys be able to under stand the scripting language and be able to implement their own scripts.  I do see the point behind Meridian's caution however, and that real life experience is nice to have as a background understanding in this.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #49 on: August 17, 2016, 08:47:27 pm »
That being said, I'd like to say more about my feelings towards your scripts:
- compared to let's say mapScript or missionScript, your scripts are much more advanced... slowly approaching the status of programming language, not just script
- they give enormous power... but I am afraid that currently you are the only one who can write them
- in my professional life, I have also created (or at least helped create) two such scripting engines for our customers, because their requirements were to be as flexible as possible and change for example some calculations on the fly without having to upgrade our software... at the end, both cases are a disaster... even though there are IT people there, nobody (and I mean nobody!) has learned the scripting language and writing of scripts ended up being our responsibility... the same may happen to you, just saying; also from time to time some individuals give it a try and most likely break it... and then they blame us that our software doesn't work... without telling us that they have changed the scripts of course.
Scripts are programing languages :) And right now I heavy limit that what scripts are capable of and when they can do it. I primary do this to made harder break everything with script misuses.

You say that new corpse graphic by Ivan is a great example... but as far as I know, you have actually written the script for Ivan, not Ivan himself. Anyone who can write that script, can also change the source code to do the same functionality, even with less code than in the script (I guess I could do the alt corpses with less than 20 lines of C++ code).
Yes, I write most of this script for him.
Before 3.0 where was build in version of alt corpse, and I deliberate remove it and replace it by scripts.
Even if only I will write new scripts I would still do it. Is more flexible and allow injecting custom logic even if is harder to use than code.


Personally, I am adding new functions only if I am convinced that they will be used by someone... that's why I mostly add stuff requested by Dioxine and Solar... because I know they would use it... and mostly ignore stuff from fantasies of other people (like Surrealistic for example... btw. I am still waiting for that alpha chryssalid mod, if you're reading this). And writing a cool scripting engine, which nobody will be able or willing to use, is a scary thought for me. And I speak from real experience.

I definitely didn't want to discourage you from any of the work you are doing now... just warning you what might happen... be prepared for it. I hope somebody will use it, it will be a huge success and I will be proven wrong.
Primary reason for scripts is to fulfill people fantasies and keep this crap far from source code :D
Something like multiple vision modes, you dislike it and don't want implements all possible versions, I fully agree. I would dislike too implementing it in source code, but as scripts? Why not? Even if results is broken and hacky from source code perspective it look same as normal functionality.


This.
I don't think it would eliminate the problem that Meridian described, but at least we could try.

And yes, scripting can be ignored in favour of changing the source code, but at least it doesn't involve compilation.
Some basics are in https://github.com/Yankes/OpenXcom/blob/OpenXcomExtended/Extended.txt
List of available things is in log file with debug on. This is not close to documentation but probably enough to do some simple things.

Best would be if you say what you would want know now. Because writing full documentation will take some time to do it and I think would be better to focus on things needed right now.

Offline legionof1

  • Commander
  • *****
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #50 on: August 18, 2016, 10:52:52 am »
Well, I'm open to suggestions how to handle this invisibility un-hacking. At least the basterds will be hittable in melee, which immunity was a major pain. I still think that there should be vision mode that allows some enemies to see through smoke, else it's all too easy. Also, scanners... Detecting invisibles was their main boon. Unless I will make some truly ethereal enemies which are fully unhittable, except by explosives, and need to be first relieved of their ethereal status by a well-placed explosion...

What would be out of balance with a stargod that's visible at 1 tile? Yes you can fire from a distance once it's found but you still need to walk a gal up to it's face tanking reaction fire to do it. At present we walk around with the scanners at 7-9 tiles plotting location then saturation bomb. If anything super short-range visibility would raise casualties in exchange for reliability of killing/capture.

I don't take particularly higher casualties vs stargods compared to anything else unless I am attempting captures. All the hacked visibility does is make me use more expensive ordnance. I do lose more gals that do get shot but that's because of ghost beam power not if I can see what reaction fired or not.

A cat girl with visibility 2-3 would still be a similar threat to its present form. As is they tend to get reactioned down unless the player makes an error. And unless squadsight works on reaction fire defensive fire is actually pretty light if you need to be inside 2-3 squares. Either the gal getting charged defends herself or she dies.

In either case I only see an increase in understanding of mechanics for the player.

And if I understand the implementation correctly one could set visibility to effective 0 for a true invisible unit(barring predator vision) by setting camo to negative max view range.

Offline Surrealistik

  • Colonel
  • ****
  • Posts: 486
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #51 on: August 18, 2016, 11:15:40 am »
@legion: Exactly. That's essentially what I said.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #52 on: August 18, 2016, 11:21:02 am »
And if I understand the implementation correctly one could set visibility to effective 0 for a true invisible unit(barring predator vision) by setting camo to negative max view range.

Minimum is 1.
https://github.com/MeridianOXC/OpenXcom/blob/oxce3.0-plus-proto/src/Savegame/BattleUnit.cpp#L2810
Would there be a need for true invisible unit?

Offline legionof1

  • Commander
  • *****
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #53 on: August 18, 2016, 11:25:00 am »
1 is sufficient to my tastes. Unless one is creating a spatialy phased unit but that better stimulated with damage resistance.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Active camouflage and predator vision ;-)
« Reply #54 on: August 18, 2016, 12:04:19 pm »
I've already implemented these changes yesterday. Catgirls and Star Gods are visible from 5 tiles now (more with Assassin or Ghost armor, also hired Mercenaries can spot them better than you). No visibility hacks anymore, unless for fully phased-out units (which do not exist in-game yet).

Offline legionof1

  • Commander
  • *****
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #55 on: August 18, 2016, 12:09:55 pm »
Color me surprised then 5 is much more lenient then what I thought was fair and reasonable.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #56 on: August 18, 2016, 12:18:08 pm »
Color me surprised then 5 is much more lenient then what I thought was fair and reasonable.

I haven't met star gods yet, so can't judge on that... but for catgirls my idea would be 3-5 tiles.
Still, 5 is a good starting point, it can be adjusted after some actual game experience if needed.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Active camouflage and predator vision ;-)
« Reply #57 on: August 18, 2016, 12:38:21 pm »
Yeah, hard to say without actual experience. From my point of view, 5 tiles is much harder than LoS hack, except when breaching/fighting in buildings. With spread out formations I was able to snipe most of the Star Gods and Catgirls from a much longer range (there usually was someone situated at the right angle). Can this 5 tiles be abused by using suicide scouts? We'll see from experience.

Offline legionof1

  • Commander
  • *****
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #58 on: August 18, 2016, 02:46:03 pm »
Fired up  practice battles for some tests. And 5 is actually decent on one aspect, it keeps things sane in regards to z levels. Not much in naturally occurring terrain that encourages significant high z levels. Explosives are still a very effective choice because arcs limit squad exposure. Ghost beams are still terrifyingly accurate. Getting blasted from your own smokescreen happening rather more often now. Not catching the AI doing the spin shuffle thing makes defense a little more tense. But on the whole it feels like better game play, less adapting to bollocks.

Offline Surrealistik

  • Colonel
  • ****
  • Posts: 486
    • View Profile
Re: Active camouflage and predator vision ;-)
« Reply #59 on: August 18, 2016, 08:59:32 pm »
What legion said; our predictions were spot on.