OpenXcom Forum

Modding => Work In Progress => Topic started by: The Reaver of Darkness on September 12, 2014, 01:15:30 am

Title: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 12, 2014, 01:15:30 am
I am changing the base layout of the Lightning to allow 16 soldiers or up to 4 tanks, with 4 exits. I've got the hang of editing the map but there's some things I don't know how to do yet:

1.) I need to edit the start locations of the soldiers/tanks. It seemed as though in the How To guide for MapView, that the nodes were key to determining where the X-Com units spawn, but I don't see how. I copied the style shown in the Avenger and Skyranger maps but they don't really have much, just a single node inside the ship with no explanation as to how the rest of the units fill in, and those nodes are set to no spawn. I tried it anyway, and I got only 3 soldiers to spawn in the craft, the rest were deleted at the start of the mission. -DONE!

2.) The craft is bigger, and uses 2x2 map sections (20x20 squares) instead of the original Lightning's 2x1. So I need to make the new map sections spawn as flat land so that the Lightning doesn't clip through structures. -DONE!

3.) I'd like some tips on adding new terrain pieces. I want to make 3 more doors and ramps for the other 3 exits, and I want to replace the power source with a new 4-piece power source so that I can center it.
Title: Re: Needing a few tips for my new Lightning
Post by: Dioxine on September 12, 2014, 08:06:06 am
1. RMP's are irrelevant on XCom craft. XCom tanks & soldiers are spawned on Lighting/Skyranger floor tiles, from bottom floor to the top, in rows facing N, starting from NW corner. You can use ruleset to override this and manually enter x/y/z/facing coordinates for the soldiers.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 12, 2014, 10:00:23 am
There seems to be an already existing ruleset doing that, given that only 3 of the soldiers were able to spawn. It makes sense, as the original Lightning allows 12 soldiers to spawn inside even though it has 28 spaces, but the soldiers still spawn in a neat pattern around the center.

Any idea where I can find this file so I can edit it, and/or what lines of code to use to make a fresh new one? I can generally understand what bits of code are for when I'm familiar with the subject, but I can't write them from scratch without something similar to copy from.
Nevermind, I think I found it.

edit:
I did found it. It's in the basic ruleset under craft. Both Lightning and Avenger have custom spawn spots. I have discovered that tanks will spawn correctly if you position every 4th soldier (#1, #5, #9, etc.) on the distant corner (NW) of the 2x2 square where you wish to place the tank.

The spawn coordinates include four values:
First value: x coordinate (from east to west), starts at 0 for eastmost square
Second value: y coordinate (from north to south), starts at 0 for northmost square
Third value: z coordinate (from bottom level to top level), starts at 0 for bottom level--the default starting level is 1
Fourth value: direction the unit is facing, starts at 0 for north, each number up is a 1/8th turn clockwise:
 * 0 = north (Avenger and any unruled craft, like Skyranger)
 * 2 = east (Lightning)
 * 4 = south
 * 6 = west
Title: Re: Needing a few tips for my new Lightning
Post by: RSSwizard on September 13, 2014, 02:31:22 am
Ive always liked the idea of a 3 or 4 Story Xcom craft. So sorta like a vertical cylinder (like 4 lightning craft stacked on top). Maybe I ought to build that.
Title: Re: Needing a few tips for my new Lightning
Post by: Solarius Scorch on September 13, 2014, 10:53:32 am
Ive always liked the idea of a 3 or 4 Story Xcom craft. So sorta like a vertical cylinder (like 4 lightning craft stacked on top). Maybe I ought to build that.

Me too!

Actually, I thought about making such a Mars assault craft (and taking away from Avenger the ability to go to Mars). This would make the ship a bit more realistic, after all the soldiers must've spent days or weeks there.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 13, 2014, 01:05:35 pm
Me too!

Actually, I thought about making such a Mars assault craft (and taking away from Avenger the ability to go to Mars). This would make the ship a bit more realistic, after all the soldiers must've spent days or weeks there.
That's a pretty cool idea. It should have a rather high Elerium storage, and you should have to collect up a fairly large stock for the trip, something like 500 maybe. Along with this could come an advanced craft weapon that helps shoot down craft intact. In mine there is a plasma cannon with range comparable to stingrays that hits for 30 damage but is pretty rapid-firing. If you attack with the Starstreak, you can get in range quickly with your one weapon.
Title: Re: Needing a few tips for my new Lightning
Post by: Solarius Scorch on September 13, 2014, 01:48:40 pm
That's a pretty cool idea. It should have a rather high Elerium storage, and you should have to collect up a fairly large stock for the trip, something like 500 maybe.

Along with this could come an advanced craft weapon that helps shoot down craft intact. In mine there is a plasma cannon with range comparable to stingrays that hits for 30 damage but is pretty rapid-firing. If you attack with the Starstreak, you can get in range quickly with your one weapon.

I have no idea what this has to do with the new Mars lander, but it sounds like a pretty cool concept.
Title: Re: Needing a few tips for my new Lightning
Post by: ivandogovich on September 13, 2014, 06:54:40 pm
The idea of an Electro Magnetic Pulse (EMP) craft weapon for disabling UFOs is a beautiful one! :)

However, I think the current combat mechanics, wouldn't work, as damage is applied to the craft, until its forced to crash.

Sounds like to get this operational, it would require new code and a custom .exe.

Cheers, Ivan :D
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 14, 2014, 07:45:50 am
I have no idea what this has to do with the new Mars lander, but it sounds like a pretty cool concept.
If you can shoot them down intact, you can recover the Elerium-115. It is possible to get a game in which landing sites aren't very available to the player, so it wouldn't be kind to require a large stockpile of Elerium to win the game if there isn't a fallback, failsafe method of obtaining it.

The idea of an Electro Magnetic Pulse (EMP) craft weapon for disabling UFOs is a beautiful one! :)

However, I think the current combat mechanics, wouldn't work, as damage is applied to the craft, until its forced to crash.
If you shoot down a craft with cannons, it will always remain fully intact as if it had merely landed. This is due to the low amount of damage done per hit. Depending on the amount of excess damage done, the power sources either do not explode, make a standard explosion, or make a large explosion. With enough excess damage, you can destroy the craft. Weapons that hit harder have a high chance to cause excess damage to the ship. For instance, a medium or large scout shot down with stingrays will generally always have a standard explosion from the power source. In the medium scout, this levels the entire inside of the ship and occasionally a couple walls; in the large scout, the central room is blown apart along with most of the inner walls. But a large explosion will tear up the entire inside of a large scout along with some of the outer walls, and will utterly flatten a medium scout, leaving a square of rubble on the ground.

Cannons (10 damage) hit light enough to always knock down a small scout intact (though you get no Elerium). My pulse cannons hit for 20 and my plasma cannons hit for 30, considerably less than the small-scout-blasting stingrays (70). They may pop the power source a lot but should fairly often preserve them. I'll need to test how well this actually works.

I am aware that there may exist a version of X-Com in which the damage of the weapon does not affect the status of the power sources; also, there may be a bug in which if you save the game after crashing the ship and before landing at the site, then re-load before you land, apparently the game does not store the hit information in the crash file and its status will not be connected to how it was shot down. And I haven't actually done much shooting down UFOs yet in Open X-Com. I'll get back to you on how close it is to what I'm used to.

Anyone know how to take a screenshot from within Open X-Com? I have somethings to take pics of, in particular I'd like to show you guys the difference between a small or large explosion in a medium scout.
Title: Re: Needing a few tips for my new Lightning
Post by: moriarty on September 14, 2014, 12:45:00 pm
If you shoot down a craft with cannons, it will always remain fully intact as if it had merely landed. This is due to the low amount of damage done per hit. Depending on the amount of excess damage done, the power sources either do not explode, make a standard explosion, or make a large explosion.

that's actually wrong.

I'd like it to be that way, and have proposed similar mechanics, but the original game works in quite a different way: each UFO power source explodes with a 75% chance when the UFO crashes.
read this: https://www.ufopaedia.org/index.php?title=UFO_Crash_Recovery (https://www.ufopaedia.org/index.php?title=UFO_Crash_Recovery)

I am aware that there may exist a version of X-Com in which the damage of the weapon does not affect the status of the power sources; also, there may be a bug in which if you save the game after crashing the ship and before landing at the site, then re-load before you land, apparently the game does not store the hit information in the crash file and its status will not be connected to how it was shot down. And I haven't actually done much shooting down UFOs yet in Open X-Com. I'll get back to you on how close it is to what I'm used to.

what you are experiencing is called Apophenia (https://en.wikipedia.org/wiki/Apophenia). In this case, it is not at all unintentional; Julian Gollop has commented in several interviews that XCom appears a lot cleverer than it is because of the many random elements. People like to try and make sense of random events (it's how our brains work), and thus construct a lot of very complicated theories about stuff that is actually truly random.


Anyone know how to take a screenshot from within Open X-Com? I have somethings to take pics of, in particular I'd like to show you guys the difference between a small or large explosion in a medium scout.

F12 will take a screenshot in .png format and saves it in your user directory
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 15, 2014, 05:48:50 am
what you are experiencing is called Apophenia (https://en.wikipedia.org/wiki/Apophenia). In this case, it is not at all unintentional; Julian Gollop has commented in several interviews that XCom appears a lot cleverer than it is because of the many random elements. People like to try and make sense of random events (it's how our brains work), and thus construct a lot of very complicated theories about stuff that is actually truly random.
No, it's definitely correct. I've done this dozens of times and it has never failed. The odds of it being a fluke are astronomical. Dozens of crashes with cannons have all been intact; hundreds of crashes with stingrays, avalanches, and plasma cannons have never once yielded an intact power source. If there is a 25% chance of having an intact power source, then there is 1 chance in over 3 trillion that in one hundred tries, none yield a power source. And that is assuming the craft have only one power source, while plenty have more. I'm well aware of apophenia and have gone to great lengths to avoid the effect throughout my life.

If normal X-Com games are indeed as stated in the UFOPaedia, then I must be used to playing a different version. Th problem I would have with that is that I have played multiple different versions from original DOS, to Gold, to Collector's Edition and probably a bit on some others as well. I cannot say for certain that it works in TFTD because I can't seem to figure out where the Zrbite is even stored on the ship, but I know this works in UFO Defense.
Title: Re: Needing a few tips for my new Lightning
Post by: moriarty on September 15, 2014, 08:32:27 am
The observation is somewhat skewed because of larger craft (the ones you use the more powerful weapons on) having dramatically lower chances of yielding intact power sources due to proximity-effects: with multiple power sources in relative proximity, only one needs to explode to wipe out all of the elerium in the UFO.

I'm not aware of any version of XCom that features dogfight-dependent battlescape features.
Title: Re: Needing a few tips for my new Lightning
Post by: Dioxine on September 15, 2014, 08:50:01 am
I've only ever used Avalanches (then replaced by Plasma Cannons) and I've always had more Elerium than I could store... Call that a fluke too? Oh yeah and while I wasn't using cannons at all, these few (very few) times I've used Stingrays or Laser Cannons, the power sources were usually exploded. Can't tell you the version but I've ran the campaign several times from 1994 to mid-2000s.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 15, 2014, 09:38:03 am
Stingrays and laser cannons (both 70 damage) are much too powerful to soft-crash a craft. I have usually used cannons to soft-crash scouts of any size, but occasionally I'll go after a larger target. I've done it on supply ships perhaps 4-5 times in all my years of playing. Once I crashed the game doing it.

I discovered this tactic of crashing them softly because I was in a game in which I wasn't getting any craft to land in my radar range and my Elerium stocks were dwindling. I was much newer to the game, having only played for a few months probably. I had never gotten any Elerium from a crashed UFO. One day I finally did--when I used cannons. I decided to try it more, and it kept working! Suddenly, I had a solution to my Elerium shortage! Since then I have found plenty of other ways to secure the stuff, but I still use the cannon trick because it's easy. I once tried to make a system of landing at landed supply ships, stealing the Elerium and fleeing, then soft-crashing them immediately after in order to score more Elerium. It's doable but causes too much damage to your ship so it's not worth it.
Title: Re: Needing a few tips for my new Lightning
Post by: Warboy1982 on September 15, 2014, 03:02:54 pm
moriarty's right.
Title: Re: Needing a few tips for my new Lightning
Post by: Falko on September 15, 2014, 04:56:15 pm
hundreds of crashes with stingrays, avalanches, and plasma cannons have never once yielded an intact power source. If there is a 25% chance of having an intact power source, then there is 1 chance in over 3 trillion that in one hundred tries, none yield a power source.
so you are saying that every time you crashed a battleship (i assume without cannon) all four of the ufo foots were destroyed? i dont believe you.
another point aginst your idea
in the original: for a timeperiod i needed more elerium so i decided to save before landing at a grounded ufo - so after walking out of the skyranger and taking a look for 1-2 turns i could determine if the ufo was intact or not - if not i reloaded and landed again - yes it was pure savescumming but after on avarage 2-6 reloads i always got intact ufos (did not help much for ufos with the effect described by moriarty but it got my scout/battelufo with 3-4 powersource) so the damage is fully random there is no "damage"-data saved for a crashed ufo
Title: Re: Needing a few tips for my new Lightning
Post by: NoelBuddy on September 15, 2014, 05:53:46 pm
Cannons will insure that you will always have a crash site.  If you deal excessive damage during the dogfight there is a chance to destroy the UFO in the air producing no crash site. Other than that craft weapon doesn't affect crash sites.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 16, 2014, 10:57:01 am
so you are saying that every time you crashed a battleship (i assume without cannon) all four of the ufo foots were destroyed? i dont believe you.
another point aginst your idea
in the original: for a timeperiod i needed more elerium so i decided to save before landing at a grounded ufo - so after walking out of the skyranger and taking a look for 1-2 turns i could determine if the ufo was intact or not - if not i reloaded and landed again - yes it was pure savescumming but after on avarage 2-6 reloads i always got intact ufos (did not help much for ufos with the effect described by moriarty but it got my scout/battelufo with 3-4 powersource) so the damage is fully random there is no "damage"-data saved for a crashed ufo
Actually I do recall seeing plenty of non-exploded power sources in Supply Ships, Terror Ships, and Battleships. Only in Battleships did the Elerium survive, but in the others you could tell because there would be too many intact walls near it. I never saw that on a medium or large scout. Not once. The power source always blew up if shot down with stingrays or avalanches, and this is something I've done plenty of times in all versions I have played. I haven't played Open much yet though.
Title: Re: Needing a few tips for my new Lightning
Post by: moriarty on September 16, 2014, 02:01:14 pm
The only explanation I have for what you describe is that somehow your RNG was broken. That would only explain the phenomenon one-way, though... either all Power Sources would be destroyed, or all would be intact.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 16, 2014, 11:17:19 pm
Well RNGs in those days were notoriously bad. I remember for a long time having difficulty deciding how save scumming really worked. I believed for a long time that certain actions reset the number seed while actually reloading did not, but I never managed to narrow down any particular actions. All in all, I have to say that through extensive save-scumming "research", I found that the seed apparently does not reset at all but still advances 1-2 stages. Funny thing is, it'll get the same response multiple times in a row almost every time.

Anyway, yes the RNG was definitely broken but I don't believe that can account for how many times cannons brought power sources intact vs. stringrays and avalanches not doing it, with zero deviation.
Title: Re: Needing a few tips for my new Lightning
Post by: pkrcel on September 16, 2014, 11:21:52 pm
I can't help but say that none of this is factual, RNG were not THAT bad to consistently give the same result a million times on reload.

Title: Re: Needing a few tips for my new Lightning
Post by: Dioxine on September 17, 2014, 02:56:14 am
I think this could be the time to lock this thread before accussations of trolling start.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 17, 2014, 03:21:17 am
I think this could be the time to lock this thread before accussations of trolling start.
That's not very nice. I have already redacted my tip based on what I've been told. I'm trying to be civil here but some of you are attacking my points rather viciously. And now you're proposing my thread be locked? What have I done to deserve this treatment, I ask?

Howabout instead, we shift this discussion back to the topic of the thread?
Title: Re: Needing a few tips for my new Lightning
Post by: Mackus on September 17, 2014, 10:37:53 pm
I once tried editing Lighting to make it less useless. I was able to increase maximum number of Soldier per craft up to 16. Deployment looked something like this:
x- old soldier spawn point, z-new soldier spawn pown, o-not spawn point
ooozooo
ooxxxoo
oxoooxo
zxoooxz
oxoooxo
ooxxxoo
ooozooo
note that there empty tiles that soldiers can walk on inside the craft, but game refuses to spawn them on it, even if I define it to do so in ruleset.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 18, 2014, 12:39:16 am
It should work if you specify deployment coordinates, no?

Here's my 16-person 4-tank Lightning:

  - type: STR_LIGHTNING
    requires:
      - STR_NEW_FIGHTER_TRANSPORTER
    sprite: 1
    fuelMax: 30
    damageMax: 800
    speedMax: 3100
    accel: 9
    weapons: 1
    soldiers: 16
    vehicles: 4

    refuelItem: STR_ELERIUM_115
    refuelRate: 5
    score: 300
    battlescapeTerrainData:
      name: LIGHTNIN
      mapDataSets:
        - BLANKS
        - LIGHTNIN
      mapBlocks:
        - name: LIGHTNIN
          width: 20
          length: 20
    deployment:
      - [8, 6, 1, 0]
      - [9, 6, 1, 0]
      - [8, 7, 1, 0]
      - [9, 7, 1, 0]
      - [10, 8, 1, 2]
      - [11, 8, 1, 2]
      - [10, 9, 1, 2]
      - [11, 9, 1, 2]
      - [8, 10, 1, 4]
      - [9, 10, 1, 4]
      - [8, 11, 1, 4]
      - [9, 11, 1, 4]
      - [6, 8, 1, 6]
      - [7, 8, 1, 6]
      - [6, 9, 1, 6]
      - [7, 9, 1, 6]


(https://i.imgur.com/4satt1O.gif)

If you use this, just keep in mind that the deployment coordinates may be off depending where you have the lightning craft oriented. The values along the right make all of the soldiers/tanks face outward from the center at start.
Title: Re: Needing a few tips for my new Lightning
Post by: Mackus on September 18, 2014, 02:22:49 pm
It should work if you specify deployment coordinates, no?

Yup, it should. It just didn't. I wasn't editing anything other than rulesets (so no new look for lighting like you did), and if specified any deployment points other than those in my post above, game simply flat-out ignored them. "No, f*** you, I won't spawn them here".

I am surprised at new look you came up with. I though you would increase size of craft up to 8x8, rather than decrease it dwon to to 6x6. Most importantly, there is no way for more tanks than one to get back in, unless you use hovertanks.
Title: Re: Needing a few tips for my new Lightning
Post by: The Reaver of Darkness on September 21, 2014, 12:14:18 am
I'm planning on making ramps for all the other entrances once I learn how to make terrain pieces. Should be easy to draw the images.

I'm really liking the way it gets you right into the action so quickly. It can be good or bad depending how you take advantage of it. If you don't like it, there are other craft choices that have only one exit which will be clogged by the tanks if you have them. That's also a good way to start. But I like how having multiple exits can allow you to take out several enemies right off the bat and spread everyone out in the first turn.