Author Topic: Upgrading to the nightly  (Read 83177 times)

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: Upgrading to the nightly
« Reply #60 on: May 11, 2015, 07:58:39 pm »
What I have a problem though is this: I cant move the files of the game into another folder if I want. When it creates the save/mod files, it always creates them on a specific path. If I move the folder it cant find the mods/saves nor it creates a new path. The only way to use them is to return it to its exact same spot.This is frustrating for two reasons: I am doing the copy/paste jobs on my desktop before I move them to the right file, so it kinda forces me to do it in a specific way.

But thats not a problem, the problem is that I want to have two different instalations of the game, how do I go about changing the path/files where it will create and draw the mods and saves from?
having two different installations for the game is not hard.  just use -user, -config, and -data parameters when running the game to explicitly set which folders to use.  This is documented in the top-level README.md file for OpenXcom.  You can read it at https://github.com/SupSuper/OpenXcom if you just scroll down past the file list.  ah, here's a direct link to that spot on the page: https://github.com/SupSuper/OpenXcom#directory-locations

Offline pilot00

  • Colonel
  • ****
  • Posts: 487
  • Back in the day it was gameplay not a feature....
    • View Profile
Re: Upgrading to the nightly
« Reply #61 on: May 12, 2015, 12:37:08 am »
Did try to edit the config folder but no results. It kept ignoring me  :'(

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: Upgrading to the nightly
« Reply #62 on: May 12, 2015, 01:54:51 am »
Did try to edit the config folder but no results. It kept ignoring me  :'(
I need to add this to the README.md -- to set the config folder, the commandline param is -cfg.  that's terribly confusing.  actually, I'll see if I can just add -config as a valid variant.  for now, though, use -cfg

Offline hellrazor

  • Commander
  • *****
  • Posts: 2008
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Upgrading to the nightly
« Reply #63 on: May 12, 2015, 11:30:38 am »
On another regard.
How does the explicit new mod structure look?

At the moment i use the following structure:

Code: [Select]
Hardmode_Expansion/MAPS
Hardmode_Expansion/ROUTES
Hardmode_Expansion/TERRAIN
Hardmode_Expansion/Ruleset/*.rul (several files, split up in sections like xcom1 ruleset -> all items are in items.rul for example)
Hardmode_Expansion/Resources/Hardmode_ExpansionBigOb/
Hardmode_Expansion/Resources/Hardmode_ExpansionHandOb/
Hardmode_Expansion/Resources/Hardmode_ExpansionFloorOb/
Hardmode_Expansion/Resources/Hardmode_Expansion/Geoscape/
Hardmode_Expansion/Resources/Hardmode_Expansion/Inventory/
Hardmode_Expansion/Resources/Hardmode_Expansion/Sounds/
Hardmode_Expansion/Resources/Hardmode_Expansion/SpriteSheet/
Hardmode_Expansion/Resources/Hardmode_Expansion/UfoPaedia/
Hardmode_Expansion/CHANGELOG.TXT
Hardmode_Expansion/INSTALL.TXT
Hardmode_Expansion/metadata.yml
Hardmode_Expansion/CREDITS.TXT
Hardmode_Expansion/README.TXT

What do i need to change to be completly on the new System?

How can i define multiple Submods?
It was possbiel before to have several ruleset files and active them one by one.
I presume i have to set them in seperate directories now.

Also some more questions:

- How can i access files directly from other Mods MAPS, ROUTES or TERRAIN directories or even sprites?
- How are spritesnumbers handled now, before, every loaded ruleset had its own range defined.
« Last Edit: May 12, 2015, 11:34:12 am by hellrazor »

Offline pilot00

  • Colonel
  • ****
  • Posts: 487
  • Back in the day it was gameplay not a feature....
    • View Profile
Re: Upgrading to the nightly
« Reply #64 on: May 12, 2015, 04:10:56 pm »
I need to add this to the README.md -- to set the config folder, the commandline param is -cfg.  that's terribly confusing.  actually, I'll see if I can just add -config as a valid variant.  for now, though, use -cfg

You got me a little bit confused :). Doesnt editing the config file it spawns at the mod/save file location what you meant? Because thats what I did but so far no candy.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Upgrading to the nightly
« Reply #65 on: May 12, 2015, 07:19:07 pm »
For the self-builders here: Is there any way, to automate the cc-make-command that way, that the CMAKE_BUILD_TYPE-variable is set to »Release« and configuration and generation is being started right away? Would help automated compilation quite a lot.

Offline abitlost

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Upgraded to nightly and game can no longer find my data (LINUX - UBUNTU)
« Reply #66 on: May 12, 2015, 11:53:39 pm »
I've been using OpenXcom (Thank you for making this BTW, fantastic!!) but seeing the announcement I thought I'd make the jump to the new nightly with changed data folder locations. Installed all the dependencies, followed the "Compiling with Make" instructions on the ufopaedia wiki, compilation went fine, etc. and copied the data over for both UFO and TFTD (my version is from the old CDs, not the Steam release) but I keep getting an error "GEODATA/PALETTES.DAT not found" when I run the binary it created in the OpenXcom/bin folder.

I've tried a few different things. The log file in the bin folder showed that it created the mods folder in my ~/.local/share/openxcom/mods That's where I first tried putting the UFO/TFTD folders.
There are also folders "common", "standard", "TFTD" and "UFO" in that same bin folder as the executable. I tried putting the data there, same problem. I tried running it with the -data option, pointing it directly to ~/.local/share/openxcom/ same issue.

I read the log in the ~/.local/share/openxcom folder. The first line after "Data search is:" shows ~/.local/share/openxcom, where I first put the data. I read the data locations article at  https://github.com/SupSuper/OpenXcom#directory-locations and that tells me the data should be in "$HOME/.local/share/openxcom" (as I understand it $XDG_DATA_HOME is not defined in Ubuntu) and it is indeed in there so feeling a little lost.

I've had a look over the forums and saw someone mention a similar problem on earlier versions (https://openxcom.org/forum/index.php/topic,3485.0.html). They found running as root solved it for them, maybe suggesting a permissions issue on folders,  but didn't make any difference to me. Case sensitivity was mentioned. Never a problem on any previous released milestones but tried it anyway, no difference.

Any help appreciated.

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
but I keep getting an error "GEODATA/PALETTES.DAT not found" when I run the binary it created in the OpenXcom/bin folder.

welcome to the forums : )  Could you post the full contents of your openxcom.log file?  You can PM it to me if you don't want to post it publicly.

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
Re: Upgrading to the nightly
« Reply #68 on: May 13, 2015, 04:26:46 am »
What do i need to change to be completly on the new System?
that structure looks good.  You could optionally move the ruleset files to the top level directory, but it's not required.

Quote
How can i define multiple Submods?
redv just asked a similar question.  see: https://openxcom.org/forum/index.php/topic,3617.msg44622.html#msg44622

Quote
- How can i access files directly from other Mods MAPS, ROUTES or TERRAIN directories or even sprites?
- How are spritesnumbers handled now, before, every loaded ruleset had its own range defined.
files that you access by name, like those in MAPS, ROUTES, and TERRAIN are just accessed by relative path like before.  you can access another mod's sprites, but you have to declare the extrasprites in one of your own ruleset files.  I touched on the sprite situation in the message linked above too.

You got me a little bit confused :). Doesnt editing the config file it spawns at the mod/save file location what you meant? Because thats what I did but so far no candy.
I might have misunderstood you -- to have a completely independent openxcom installation, you need to specify unique config, user, and data dirs.  like this:
Code: [Select]
/path/to/openxcom -cfg "/path/to/unique/config/dir" -user "/path/to/unique/user/dir" -data "/path/to/unique/data/dir"
I had thought you had tried this, but used -config instead of -cfg.  The documentation I wrote is not clear that the current code accepts -cfg but not -config.  I'm going to submit a pull request so that both forms are accepted.

Is there any way, to automate the cc-make-command that way, that the CMAKE_BUILD_TYPE-variable is set to »Release« and configuration and generation is being started right away?
from a fresh git checkout, run:
Code: [Select]
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j10
so this way, you don't need to run ccmake at all, just cmake.  you can set other vars on the initial call to cmake too.  This is the one I use to get all set up on OSX:
Code: [Select]
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/bin/openxcom.inst ..
« Last Edit: May 13, 2015, 04:47:58 am by myk002 »

Offline darkestaxe

  • Colonel
  • ****
  • Posts: 254
  • Emissary of the Brain
    • View Profile
Re: Upgrading to the nightly
« Reply #69 on: May 13, 2015, 05:03:56 am »
Here's a few ideas for implementing mod options without making it too complicated.


Mods could have an options.xml file (not required) that would look something like this:
Code: [Select]
/* Only one string */
<option "Include original grenade (don't replace)">Rulesets\KeepGrenade.rul</option>

/* or multi-language */
<option STR_KEEP_GRENADE>Rulesets\KeepGrenade.rul</option>

This could later be expanded to allow for things like:
Code: [Select]
<optiongroup "Hyperwave Decoder Options:">
  <option "Hyperwave Decoder doesn't add any detection">NoDetect.rul</option>
  <option "Hyperwave Decoder range is unlimited but only has 10% detection">InfiniteRange.rul</option>
  <option "Same as Vanilla"></option>
</optiongroup>

I would be in favor of the xml approach because it would be a lot easier for modders then YAML. But since OXC already uses so much YAML, another approach would be to incorporate the options into Metadata.yml. The descriptions would only be needed if there's no corresponding entries in a language file.
Code: [Select]
Options:
  -  Name: STR_KEEP_GRENADE
     Description: "Include original grenade (don't replace)"
     Ruleset: KeepGrenade.rul
OptionGroups:
  -  Name: STR_HYPERWAVE_OPTIONS
     Description: "Hyperwave Decoder Options:"
     -  Name: STR_NO_DETECT
        Description: "Hyperwave Decoder doesn't add any detection"
        Ruleset: NoDetect.rul
     -  Name: STR_INFINITE_RANGE
        Description: "Hyperwave Decoder range is unlimited but only has 10% detection"
        Ruleset: InfiniteRange.rul
     -  Name: VANILLA
        Description: "Same as Vanilla"
        Ruleset: []

My final idea would be to allow options to be externalized from metadata.yml to options.rul or options.xml, and allow the exact same code as above, but also allow things like:
Code: [Select]
facilities:
  - type: STR_HYPER_WAVE_DECODER
    hyper: STR_HYPER
    radarRange: STR_RANGE
    radarChance: STR_CHANCE
options:
  -  name: STR_HYPER
     description: "Extra Hyperwave-info in radar screens:"
     type: bool
     default: true
  -  name: STR_RANGE
     description: "Maximum Detection Range (1200 for whole globe):"
     type: int
     default: 12000
  -  name: STR_CHANCE
     description: "Percent chance of detecting an undetected UFO each scan:"
     type: int
     range:
        [0, 100]
     default: 10
or with an options.xml
Code: [Select]
<rule>
facilities:
  - type: STR_HYPER_WAVE_DECODER
    hyper: <bool STR_HYPER>true</bool>
    radarRange: <int STR_RANGE>1200</int>
    radarChance: <int STR_CHANCE min=0 max=100>10</int>
</rule>

Keep in mind that with each of these suggestions modders are still able to have optional rulesets just like before using the grenade example. As a matter of making things easier for modders I personally would greatly prefer XML because it's not evil. XML does not sneak into a persons room at night to count and judge all your whitespace chars like some kind of anal-retentive nazi. XML also doesn't take sides in the bloody line-break war. XML hasn't chosen /n as its glorious standard and doesn't execute impure (/r or /n/r) line-breaks in the name of UNIX supremacy.

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Quote
I read the log in the ~/.local/share/openxcom folder. The first line after "Data search is:" shows ~/.local/share/openxcom, where I first put the data.
Recently data structure has changed https://openxcom.org/forum/index.php/topic,3617.0.html. Try putting your data in ~/.local/share/openxcom/UFO folder. If this doesn't help, try to delete ~/.config/openxcom/options.cfg file.

Offline abitlost

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Thanks for the suggestions. My data is in ~/.local/share/openxcom/UFO but it didn't find it :( Tried deleting the ~/.config/openxcom/options.cfg and still the same.

To make sure I wasn't going crazy I tried reinstalling 1.0 through the Ubuntu repo that was set up, put the data in ~/.local/share/openxcom/data and ran first time. I then uninstalled it but using synaptic this time (mark for complete removal) to see if dug any other lingering stuff from 1.0 out. When I try my compiled version it's still throwing the same error so wondering if it's something I've done wrong there. :(

myk002, thank you :)  Here's my full openxcom.log:


Code: [Select]
[13-05-2015 07:47:06] [INFO] Data folder is:
[13-05-2015 07:47:06] [INFO] Data search is:
[13-05-2015 07:47:06] [INFO] - /home/mike/.local/share/openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/share/xubuntu/openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/share/xfce4/openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/local/sharehttps://openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/sharehttps://openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/share/openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/local/share/openxcom/
[13-05-2015 07:47:06] [INFO] - /usr/share/openxcom/
[13-05-2015 07:47:06] [INFO] - ./
[13-05-2015 07:47:06] [INFO] User folder is: /home/mike/.local/share/openxcom/
[13-05-2015 07:47:06] [INFO] Config folder is: /home/mike/.config/openxcom/
[13-05-2015 07:47:06] [INFO] Options loaded successfully.
[13-05-2015 07:47:06] [INFO] Scanning standard mods in 'standard'...
[13-05-2015 07:47:06] [INFO] - standard/Aliens_Pick_Up_Weapons
[13-05-2015 07:47:06] [INFO] - standard/Limit_Craft_Item_Capacities
[13-05-2015 07:47:06] [INFO] - standard/PSX_Static_Cydonia_Map
[13-05-2015 07:47:06] [INFO] - standard/UFOextender_Gun_Melee
[13-05-2015 07:47:06] [INFO] - standard/UFOextender_Psionic_Line_Of_Fire
[13-05-2015 07:47:06] [INFO] - standard/UFOextender_Starting_Avalanches
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Always_Daytime
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Always_Nighttime
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Fighter_Transports
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_High_Explosive_Damage
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Improved_Ground_Tanks
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Improved_Heavy_Laser
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_No_Psionics
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Pistol_Auto_Shot
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Skyranger_Weapon_Slot
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Starting_Defensive_Base
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Starting_Defensive_Improved_Base
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Starting_Improved_Base
[13-05-2015 07:47:06] [INFO] - standard/XcomUtil_Statstrings
[13-05-2015 07:47:06] [INFO] - standard/xcom1
[13-05-2015 07:47:06] [INFO] - standard/xcom2
[13-05-2015 07:47:06] [INFO] Scanning user mods in '/home/mike/.local/share/openxcom/mods'...
[13-05-2015 07:47:06] [ERROR] no mod masters available
[13-05-2015 07:47:06] [INFO] Mapping resource files...
[13-05-2015 07:47:06] [ERROR] cannot determine current active master
[13-05-2015 07:47:06] [INFO]   mapping resources in: common
[13-05-2015 07:47:06] [INFO] SDL initialized successfully.
[13-05-2015 07:47:06] [INFO] SDL_mixer initialized successfully.
[13-05-2015 07:47:06] [INFO] Attempting to set display to 640x400x8...
[13-05-2015 07:47:06] [INFO] Display set to 640x400x8.
[13-05-2015 07:47:06] [INFO] Loading rulesets...
[13-05-2015 07:47:06] [INFO] Rulesets loaded successfully.
[13-05-2015 07:47:06] [INFO] Loading resources...
[13-05-2015 07:47:06] [INFO] requested file not found: GEODATA/PALETTES.DAT
[13-05-2015 07:47:06] [ERROR] GEODATA/PALETTES.DAT not found
 

Offline winterheart

  • Colonel
  • ****
  • Posts: 180
  • Fellow Squaddie
    • View Profile
Re: Upgrading to the nightly
« Reply #72 on: May 13, 2015, 10:52:14 am »
For the self-builders here: Is there any way, to automate the cc-make-command that way, that the CMAKE_BUILD_TYPE-variable is set to »Release« and configuration and generation is being started right away? Would help automated compilation quite a lot.

cmake -DCMAKE_BUILD_TYPE=Release <where your sources are>
make

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: Upgrading to the nightly
« Reply #73 on: May 13, 2015, 01:28:46 pm »
Are there any folders in PATH_TO_YOUR_COMPILED_BINARY_FILE ? I run ./openxcom from there and put data files in PATH_TO_YOUR_COMPILED_BINARY_FILE/UFO directory.

Offline myk002

  • Colonel
  • ****
  • Posts: 227
    • View Profile
I followed up with abitlost over PM.  There is a bug in the "do you have UFO data installed?" routine that applies to his particular setup.  I'll submit a fix so no one else runs into this.

edit: submitted https://github.com/SupSuper/OpenXcom/pull/1019 to resolve case sensitivity issues when detecting whether the game data is installed and for allowing UFO and TFTD folders in the user dir.
« Last Edit: May 13, 2015, 06:38:55 pm by myk002 »