this comes up all the time and the simple answer is "it can't work"
It's the Holy Grail of OpenXCom. Many have tried finding it, but all have failed in this quest.Any names or links to failed attempts? What made them fail? Other than the amount of work.
Any names or links to failed attempts? What made them fail? Other than the amount of work.
simply put: they both follow the same arc, instead of one being the continuation of the other.What key featues distinguish the arc? Having to start from scratch? What else?
This must rank up there with the most suggested ideas ever. :)
You'd have to drastically change the gameplay for a while, otherwise it's going to be a long 40 years before you get going again.I said above. The signal is sent right after the victory and Aquatoids start attacking within weeks.
In the original storyline, X-Com was put on hold at some point and revived out of a sudden need in 2040. I'd guess that there was a time after the first war in which X-Com became a rapidly expanding international military service which could help explain where Barracuda technology comes from, and why X-Com already had an underwater base before the attacks began.The manual says that X-COM was shoved aside and ended up becoming a salvage company searching for elerium in underwater UFO wrecks.
If you wanted to feature that story in a game, it might make more sense to be a political strategy game similar to the Caesar series in which you gradually expand through keeping your people happy and appeasing other people, and you generate wealth through economic success and trade. Maybe you'd have the explicit goal of world peace while your major duties involve keeping positive ties with major nations and using those positive ties to gain access to goods and tools that can help you appease the other nations. You'd perhaps explore applications of alien technology to help people while also trying to prevent other nations from abusing it. Various nations would fight over the remaining elerium and you'd try to keep the peace, but in your economically weak position your best bet is probably to design the technology to enable spaceflight to Mars without using it, so that the Elerium mines can be started before everybody blows each other sky high over an infantile resource grab.No time for that — underwater aliens are attacking! There may be funding drop between the victory and first attacks.
https://openxcom.org/forum/index.php/topic,3025.0.htmlThanks.
https://openxcom.org/forum/index.php/topic,1851.0.html
https://openxcom.org/forum/index.php/topic,372.0.html
By arc, i mean in both games you start with a single base with only meager facilities, a handful of untrained rookies, a minimal science and engineering staff, no access to armour or advanced equipment, and all the funding nations supporting you.Correct, this would be a game with lots of trained people (which may change if funding is cut), many research and production facilities, but weapons and equipment inadequate for underwater missions.
generally speaking by the end of the game, none of these will still hold true.
they are for all intents and purposes, the same game with a different name.Hence the desire to combine them :)
but that's just the structure of the game, the governing rules add a whole other layer of dichotomy,Then some rules need to change :) The sum game needs to combine them somehow.
for example:I never really understood why do they need deep underwater bases if their subs can fly. Let them be only on land, for example.
UFO only allows bases on land, TFTD only allows them at sea.
UFOs shot down over the ocean in UFO disappear, USOs in TFTD disallow engagement over land.Let UFOs downed in water stay there a few days, until they disappear, like any other downed UFO. Another thing that irked me from the start :)
The regions that govern scoring and the country borders are completely different between the two games.Since the second part follows right after the first, the countries are the same. Let each founding country have a big piece of sea as its territory. Guess, that would affect the 1st half of the game somewhat.
The waypoint areas for UFOs and USOs are in completely different parts of the globe.Is there a limit on numbers of waypoints? Can those sets coexist for different missions?
I said above. The signal is sent right after the victory and Aquatoids start attacking within weeks.You could make the second war pick up immediately after the end of the first, but you'd have to break canon to do so. At that point, anything goes, you can make the game any way you want, since it's not really tied to canon anymore.
You could make the second war pick up immediately after the end of the first, but you'd have to break canon to do so. At that point, anything goes, you can make the game any way you want, since it's not really tied to canon anymore.The closer to the canon this stays, the better.
If you seriously consider doing this, I suggest you start with a list of specific code changes that would be necessary for this. Then look for a coder willing to help - the viability of this depends heavily on how difficult it would be, and how vanilla-friendly.Not serious yet. But yes, the list of what the engine can and cannot do will be the start.
An order to make this idea viable I would look at a transition system,I wrote a long and detailed answer with a thorough analysis of your suggestions, which took me 5 evenings. Then it was all lost to a browser glitch :(
'What should this give you in TFTD?' and 'When do you get it?' In a story sense, UFO stuff cannot actually be directly used in TFTD, and funding status isn't going to directly change over.Yes, it can, if the pause is short enough. Funding will remain several months after the victory — global international organizations tend to be slow, especially if every representative needs to inform his superiors they need to change their budgets again :) After that funding has to be reduced somehow. I suggest a lot of cheap quickly-expiring missions, that would not drive X-COM to disbanding, but will keep the score negative. Or if the engine allows — just reduce the funding by 90% after the victory or 3 months after the victory. Or to 0 at victory and then increase it according to the month's score (but that would look to much like a game glitch) :)
TFTD was more difficult by design but we'd still need to jump start alien aggression, probably by having extra active alien missions at the start. Aliens should be more busy in the first months to match X-COM starting off with extra resources, for obvious balance reasons.Maybe. I'm thinking about high number of missions and their high variability. Don't forget that X-COM would have to rearm itself for the new environment and that would require a lot of money.
Funding:All countries are the same, but their control zones from the start include pieces of oceans. The funding was reduced after the victory, but something remains.
Bases and Base Facilities:I see no justification for floating bases. Hyperwave decoders should still work fine. (Unless the official lore says why they can't. Does it?) If not, radars would still detect USOs above water, and a single sonar wouldn't see far underwater — they'd need a network of buoys, the control centre of which may just as well be far inland. Still, there should be a range limit for the network and some inconveniently located bases would have to be relocated. This is where selling facilities or bases would be handy.
Scientists, Engineers, Skyrangers, Intercepters, etc are all rentals.You get them by paying a monthly wage/price in advance, and you get nothing for letting them go. That simple. The only question is how to add subs to the list. Right after Cydonia would be ugly. Triggered by a mission against Aquatoids or Gillmen?
Craft and HWPs:Same as anything else in the stores. Some stuff is requisitioned by the Council after the victory, the rest remains. Let's also follow the official lore that alien alloys and ellerium slowly dissolve in seawater. There'd be limitations on what can go to underwater missions, but the rest will be usable.
Redeemable Cores:Useful idea, but not here. But it gave me another idea. If all ellerium was requisitioned for expeditions to Mars, but X-COM is tasked with recovering old UFO wrecks, there may be a loophole that it can extract ellerium from any found weapons. It contradicts the short stories, though.
Soldiers: Prior soldiers would be rehire-ableGood idea. Downsize the bases, then rehire the veterans next year. Some may refuse to return. I doubt the engine can do that, can it?
E-115 would be redeemable at a 4 to 1 ratio once zyrbite research is complete.If the interplanetary search for ellerium yields something quickly enough, ellerium would become purchasable. Guess, it has to be expensive for balance reasons.
There are many approaches of how to merge the two together:
- from the simplest of just starting TFTD new game automatically after win at cydonia (which is nothing else than saving the user two or three clicks to do it manually)
- to a complete engine rewrite (and potentially completely new artwork)
First the idea needs to be formulated, then reviewed for feasibility, then compromises will inevitably be made... and then a lot of time will be required for both coding and modding.
In my humble opinion a "complete" merge is too much effort for little to no gain.
Apologies for the necropost,Not a problem here, it seems :)
how insanely great it would be if both games could be combined into a new, third game, which included both land and sea X-Com bases and alien colonies, and all the different terrains, aliens and mission types provided.Thanks for your kind words.
There are no practical limits to number of terrains. I have dozens in XCF.In the globe_XCOMFILES.rul you have several terrains for each non-negative ID except 12. How are they picked? Randomly according to weight?
I think it's also a balance issue: shoot down a UFO over the ocean, recover all tech and corpses at no risk.I want to partially destroy the equipment and eventually add sea monsters. The question is: how to kill aliens and destroy their ship?
In the globe_XCOMFILES.rul you have several terrains for each non-negative ID except 12. How are they picked? Randomly according to weight?
What is the purpose of negative IDs? Only for mission maps?
I want to partially destroy the equipment and eventually add sea monsters. The question is: how to kill aliens and destroy their ship?
But seriously, I don't understand your question. Is this about ship crashes? If yes, then it's hardcoded, sorry.Yes, when the ship crashes, all aliens die and the water slowly destroys everything of value. There should be several stages leaving less and less. Is it possible to replace a crashed UFO mission with another crashed UFO mission else when it expires? Thus leaving less and less with each iteration.
Sorry, armour transformations only work on X-Com units, not aliens.What about drowning dogs? Same problem?
- type: TEXTURE.DAT
width: 832
height: 96
subX: 32
subY: 32
files:
0: Resources/Geoscape/TEXTURES.PNG
3. Add to globe.textures section of Terrain Pack/Ruleset/Terrain_Pack_Geoscape.rul: - id: 25
terrain:
- name: OCEAN
weight: 10
4. Run the following Python script to add 18x9 "rectangles", 160x160 each:#!/usr/bin/python3
from numpy import reshape, set_printoptions, array, frombuffer, int16, concatenate
fi = '../.local/share/openxcom/mods/Terrain Pack/Resources/Geoscape/IMPROVEDGLOBE.DAT.old'
fo = '../.local/share/openxcom/mods/Terrain Pack/Resources/Geoscape/IMPROVEDGLOBE.DAT'
set_printoptions( threshold=1000000 )
bAri = open(fi,'rb').read()
ari = reshape( frombuffer( bAri, dtype=int16 ), (-1, 10) )
add = []
step = 160
for lat in range(-720, 720, step):
for lon in range(0, 2880, step):
add += [[lon % 2880, lat,
(lon+step) % 2880, lat,
(lon+step) % 2880, lat+step,
lon % 2880, lat+step, 25, 0 ]]
add = array( add, int16 )
ari = concatenate( (add, ari) )
f = open( fo, 'wb' ).write( ari.tobytes() )
from numpy import reshape, set_printoptions, array, int16, concatenate, fromfile
f1 = '../.local/share/openxcom/UFO/GEODATA/WORLD.DAT'
f2 = '../.local/share/openxcom/TFTD/GEODATA/WORLD.DAT'
fo = 'newworld.dat'
set_printoptions( threshold=1000000 )
ar1 = fromfile( f1, dtype=int16 )
ar2 = fromfile( f2, dtype=int16 )
ar1 = reshape( ar1, (-1, 10) )
ar2 = reshape( ar2, (-1, 10) )
for e in ar2:
e[8] += 13
aro = concatenate( (ar2, ar1) )
open( fo, 'wb' ).write( aro.tobytes() )
from numpy import reshape, set_printoptions, array, frombuffer, int16, concatenate, fromfile, uint8, zeros, dot, argmin
from PIL import Image
def yccs( a1 ):
return dot( array( ((0.299, 0.587, 0.114 ),
(0.168736, 0.331264, 0.5 ),
(0.5, 0.418688, 0.081312)) ), a1 )
f1 = '../.local/share/openxcom/UFO/GEOGRAPH/TEXTURE.DAT'
f2 = '../.local/share/openxcom/TFTD/GEOGRAPH/TEXTURE.DAT'
p1 = '../.local/share/openxcom/UFO/GEODATA/PALETTES.DAT'
p2 = '../.local/share/openxcom/TFTD/GEODATA/PALETTES.DAT'
fo = 'merged.png'
set_printoptions( threshold=1000000 )
ar1 = fromfile( f1, dtype=uint8 )
pal1 = fromfile( p1, dtype=uint8 )
pal1 *= 4
pic1 = Image.frombuffer( 'P', (32, 13*32*3), ar1, 'raw', 'P', 0, 1 )
pic1.putpalette(pal1[0:768])
ar2 = fromfile( f2, dtype=uint8 )
pal2 = fromfile( p2, dtype=uint8 )
pal2 *= 4
pic2 = Image.frombuffer( 'P', (32, 13*32*3), ar2, 'raw', 'P', 0, 1 )
pic2.putpalette(pal2[0:768])
cmpM = zeros( (256, 256), float )
palj1, palj2 = zeros( (256,3), float ), zeros( (256,3), float )
for c in range(0, 256):
offs = c*3
palj1[c] = yccs( pic1.getpalette()[offs:offs+3] )
palj2[c] = yccs( pic2.getpalette()[offs:offs+3] )
for c1 in range(0, 256): # 768, 3):
for c2 in range(0, 256): # 768, 3):
cmpM[c2, c1] = sum( abs( palj2[c2] - palj1[c1] ) )
newPal = zeros( 768, uint8 )
for c2 in range(0, 256):
c1 = argmin( cmpM[c2] )
newPal[c2*3:c2*3+3] = pic1.getpalette()[c1*3:c1*3+3]
pic2.putpalette(newPal)
picp = pic2.convert( mode = 'RGB' ).quantize( colors=256, palette=pic1 )
picc = Image.new( 'P', (32*13*2, 32*3) )
picc.putpalette(pal1[0:768])
for frame in range(13):
for z in range(3):
block = pic1.crop( (0, frame*32+z*32*13, 32, frame*32+32+z*32*13) )
picc.paste( block, ( frame*32, z*32 ) )
block = picp.crop( (0, frame*32+z*32*13, 32, frame*32+32+z*32*13) )
picc.paste( block, ( 32*13+frame*32, z*32 ) )
picc.show()
picc.save( fo )
Palette, original UFO used 32 values for ocean and your graphic probably not.Thanks for the link to the source.
https://www.ufopaedia.org/index.php/File:1_GeoScapePal.Png
This is hardcoded:
https://github.com/Yankes/OpenXcom/blob/OpenXcomExtended/src/Geoscape/Globe.cpp#L203
Thanks for the link to the source.Ok, I see when Warboy or SupSuper add support for TFTD they add loading of this value:
As far as I can tell, the problematic textures are shaded the same way as the land textures. Land textures seem to use colours in groups of 16. That allows simple shifting to darker shades. But the new ocean textures use mainly blue colours 80-89 and 245-251, which are shifted to 90-95 and 252-255, which are yellow. Is it possible to change this palette with a YAML file?
The code has the following constants:
Globe::OCEAN_COLOR = Palette::blockOffset(12);
Globe::COUNTRY_LABEL_COLOR = 239;
Globe::LINE_COLOR = 162;
Globe::CITY_LABEL_COLOR = 138;
Globe::BASE_LABEL_COLOR = 133;
Is Globe::OCEAN_COLOR = 12*16 = 152? Is it possible to redefine the palette for 152-183 range and use it for textures? Will it still be shaded by ocean rather than land rule? (Even if yes, it would be OK.)
Ok, I see when Warboy or SupSuper add support for TFTD they add loading of this value:Thanks. I see that it also allows changing "countryColor", "cityColor", "baseColor" and "lineColor". How is it written in the YAML file?
https://github.com/SupSuper/OpenXcom/blob/13049d617fe762b91893faaf7c14ddefa49e2f1d/src/Mod/RuleGlobe.cpp#L138
This mean if you change `oceanPalette` in `globe` then you can alter what color is used.
globe
data: path/to/new/WORLD.DAT
polygons: [...]
polylines: [...]
textures:
- id: 21
- delete: 10
countryColor: 10
cityColor: 15
baseColor: 25
lineColor: 120
oceanPalette: 180
I am very interested to see how this turns out because I want to use the results for adding land to TFTD.I can try it when I have time. This weekend, probably. Just swap "UFO" and "TFTD" in the paths for the 2nd script.
Thanks. I see that it also allows changing "countryColor", "cityColor", "baseColor" and "lineColor". How is it written in the YAML file?
globe
oceanPalette: 160
But I was asking how to change the whole Geoscape palette.I do not mess with palettes swapig I do not recall where is exacly and how loaded. This function you link aren't directly responsible for loading palettes, only for internal use to copy palettes to other surfaces.
Here is something to replace the whole GEODATA/PALETTES.DAT: https://github.com/SupSuper/OpenXcom/blob/0854dec7da01a14503f750aecaf6c624df33859a/src/Mod/Mod.cpp#L2508
Here is something to read palettes from *.rul files:
https://github.com/SupSuper/OpenXcom/blob/0854dec7da01a14503f750aecaf6c624df33859a/src/Mod/Mod.cpp#L591
https://github.com/SupSuper/OpenXcom/blob/0854dec7da01a14503f750aecaf6c624df33859a/src/Mod/Mod.cpp#L602
But what is the syntax? I can't quite figure it from the C++ code.
I can try it when I have time. This weekend, probably. Just swap "UFO" and "TFTD" in the paths for the 2nd script.
Exactly, this color can be on texture and it will be changed too. This is unused in UFO where sea ice texture have colors from ocean.
I still don't understand how exactly the shade is drawn. Does the engine check each pixel of the globe if it's in "ocean palette" and change its colour accordingly?
But I was asking how to change the whole Geoscape palette.You don't want to change the palette. You want to change all of the incorrect ocean indexes to match the correct position on the palette. If you change the palette, you might fix the ocean but you'll break the images in other parts of the game which use the same colors.
You don't want to change the palette. You want to change all of the incorrect ocean indexes to match the correct position on the palette. If you change the palette, you might fix the ocean but you'll break the images in other parts of the game which use the same colors.Moving ocean colour definitions isn't very useful if palettes don't change. Of course, changing palettes, will require changing textures accordingly, and the work amount may avalanche. I wanted to avoid that, but I already started with the 2nd script.
Geoscape palette is only used for viewing the globe.
customPalettes:
- type: PAL_GEOSCAPE_NEW
target: PAL_GEOSCAPE
file: Resources/Palettes/test.pal # JASC-PAL format, all 256 colors are mandatory
Geoscape palette is also used for anything related to geoscape:Thanks! I was asking about just that.
- dogfights
- geoscape GUIs and popups
- some Ufopedia articles
- and even some non-geoscape GUIs, for example Debriefing GUI, etc.
I would not recommend any non-cosmetic changes to geoscape palette... but if you want, you can change it completely in OXCE using custom palettes: https://openxcom.org/forum/index.php/topic,4187.msg88361.html#msg88361
Example:Code: [Select]customPalettes:
- type: PAL_GEOSCAPE_NEW
target: PAL_GEOSCAPE
file: Resources/Palettes/test.pal # JASC-PAL format, all 256 colors are mandatory
just need that bug fix :)You need to have the ocean textures from TFTD, like SupSuper has going. Then you just have to match them all up with the UFO textures so there's no holes, like he said.
The holes are caused by some shore regions using color #5. If you remap the shore regions to use color #12 instead, you would solve the issue. If you map them to closest match, it shouldn't have any terrain scars in the water--I think.It's a limitation of the globe shader. It doesn't actually check if it's shading a polygon, it just uses the color to decide if it's land (use 16-color shading) or ocean (use 32-color shading). So if polygons use ocean colors, bad stuff happens.