aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Stoddard

Pages: 1 ... 30 31 [32] 33
466
XPiratez / Re: 16B Patch
« on: August 17, 2016, 10:33:24 pm »
The overabundance of money is a separate concern, and if it kills the campaign, then it is already dead, and a dozen more bases won't make it deader. I feel it should be solved not by directly limiting industry, but the market for the produce.

467
XPiratez / Re: 16B Patch
« on: August 17, 2016, 10:21:08 pm »
I think the micromanagement hell is in itself quite effective a limitation. In my current campaign, 1 research/industry base, 2 industry bases, 3 raiding bases and 1 pure outpost (radar/hangar) and I already resorted to writing inventory management tools, and that's just 7 of them.

It's that limited detection ranges and hyperaggressive retaliations require more bases overall present, and some backups 'in the pipeline', being built to replace neighbours that will fall. Nice money sink too. More than 16 though, and it'd turn into micromanagement hell of its own.

I also don't actually hit 30-40 soldier threshold, so to speak. Detachments of ~20 soldiers sit on some of the bases, but 3-5 are usually wounded, another 5 or so in reserve, and the craft carries 8-10. So I might have 30 active, 30 inactive, plus about 30 training up, any more and micromanagement bites again (and also is not needed).

So in fact I don't feel that introducing some base type subdivision is worth it. Those who overbuild will be punished as it is.


EDIT:
My perception might be biased by the geoscape work, which certainly changes the gameplay model, and in many ways I don't yet know.
But trying the patch in regular piratez, I never even considered building anything but an outpost, hangar and hyperwave detector on the extra bases. It's just not worth the hassle.

468
XPiratez / 16B Patch
« on: August 17, 2016, 12:35:44 am »
While hammering away on my Geoscape AI project I got sick of being bitten in the ass with the 8-base limitation.

The AI in the current form just doesn't forgive any interception, and if the base responsible was in detection range of faction being intercepted, and if they have particularly bitter hangover at the moment (which they usually do), and they have enough forces at the ready, there goes your base. So bases became that much more disposable. Just hope the crackdown is detected so you can cheat and transfer all the stuff away (to be fixed, so that you won't be able to do that in a couple of clicks :) ). Also I'm experimenting with reducing detection range in favor of scan frequency. This obviously raises number of bases needed.

Long story short, here's a minimal patch extending max number of bases  to 16.

After you build 9th base, the 'NEW HIDEOUT' button is replaced by the second row of bases. To build more, click on an empty base slot.

The click works before that too.
12B

I guess a ruleset setting is needed instead of hardcoded constants like 8 or 16.

I got lost in git right now, so here's the patch if anyone's interested:

Spoiler:
diff --git a/src/Basescape/BasescapeState.cpp b/src/Basescape/BasescapeState.cpp
index 76738cd..3988e12 100644
--- a/src/Basescape/BasescapeState.cpp
+++ b/src/Basescape/BasescapeState.cpp
@@ -68,7 +68,13 @@ BasescapeState::BasescapeState(Base *base, Globe *globe) : _base(base), _globe(g
        https:// Create objects
        _txtFacility = new Text(192, 9, 0, 0);
        _view = new BaseView(192, 192, 0, 8);
+       if ( _game->getSavedGame()->getBases()->size() > MiniBaseView::ROW_BASES) {
+               _mini = new MiniBaseView(128, 32, 192, 38);
+       }
+       else
+       {
        _mini = new MiniBaseView(128, 16, 192, 41);
+       }
        _edtBase = new TextEdit(this, 127, 17, 193, 0);
        _txtLocation = new Text(126, 9, 194, 16);
        _txtFunds = new Text(126, 9, 194, 24);
@@ -203,8 +209,7 @@ void BasescapeState::init()
        }
 
        _txtFunds->setText(tr("STR_FUNDS").arg(Text::formatFunding(_game->getSavedGame()->getFunds())));
-
-       _btnNewBase->setVisible(_game->getSavedGame()->getBases()->size() < MiniBaseView::MAX_BASES);
+       _btnNewBase->setVisible(_game->getSavedGame()->getBases()->size() <= MiniBaseView::ROW_BASES);
 }
 
 /**
@@ -480,7 +485,7 @@ void BasescapeState::viewMouseOut(Action *)
  * Selects a new base to display.
  * @param action Pointer to an action.
  */
-void BasescapeState::miniLeftClick(Action *)
+void BasescapeState::miniLeftClick(Action *unused)
 {
        size_t base = _mini->getHoveredBase();
        if (base < _game->getSavedGame()->getBases()->size())
@@ -488,13 +493,17 @@ void BasescapeState::miniLeftClick(Action *)
                _base = _game->getSavedGame()->getBases()->at(base);
                init();
        }
+       else
+       {
+               btnNewBaseClick(unused);
+       }
 }
 
 /**
  * Opens a dialog to make the selected base your HQ.
  * @param action Pointer to an action.
  */
-void BasescapeState::miniRightClick(Action *)
+void BasescapeState::miniRightClick(Action *unused)
 {
        size_t baseIndex = _mini->getHoveredBase();
 @@ -510,6 +519,10 @@ void BasescapeState::miniRightClick(Action *)
                        _game->pushState(new ChangeHeadquartersState(_game->getSavedGame()->getBases()->at(baseIndex)));
                }
        }
+       else
+       {
+               btnNewBaseClick(unused);
+       }
 }
 
 /**
diff --git a/src/Basescape/MiniBaseView.cpp b/src/Basescape/MiniBaseView.cpp
index 0ab1e4a..973197b 100644
--- a/src/Basescape/MiniBaseView.cpp
+++ b/src/Basescape/MiniBaseView.cpp
@@ -94,18 +94,20 @@ void MiniBaseView::draw()
        Surface::draw();
        for (size_t i = 0; i < MAX_BASES; ++i)
        {
+               int cell_x = (i % ROW_BASES) * (MINI_SIZE + 2);
+               int cell_y = (i / ROW_BASES) * (MINI_SIZE + 2);
                https:// Draw base squares
                if (i == _base)
                {
                        SDL_Rect r;
-                       r.x = i * (MINI_SIZE + 2);
-                       r.y = 0;
+                       r.x = cell_x;
+                       r.y = cell_y;
                        r.w = MINI_SIZE + 2;
                        r.h = MINI_SIZE + 2;
                        drawRect(&r, 1);
                }
-               _texture->getFrame(41)->setX(i * (MINI_SIZE + 2));
-               _texture->getFrame(41)->setY(0);
+               _texture->getFrame(41)->setX(cell_x);
+               _texture->getFrame(41)->setY(cell_y);
                _texture->getFrame(41)->blit(this);
 
                https:// Draw facilities
@@ -121,8 +123,8 @@ void MiniBaseView::draw()
                                else
                                        color = _red;
 
-                               r.x = i * (MINI_SIZE + 2) + 2 + (*f)->getX() * 2;
-                               r.y = 2 + (*f)->getY() * 2;
+                               r.x = cell_x + 2 + (*f)->getX() * 2;
+                               r.y = cell_y + 2 + (*f)->getY() * 2;
                                r.w = (*f)->getRules()->getSize() * 2;
                                r.h = (*f)->getRules()->getSize() * 2;
                                drawRect(&r, color+3);
@@ -156,6 +158,7 @@ void MiniBaseView::draw()
 void MiniBaseView::mouseOver(Action *action, State *state)
 {
        _hoverBase = (int)floor(action->getRelativeXMouse() / ((MINI_SIZE + 2) * action->getXScale()));
+       _hoverBase += (int)floor(action->getRelativeYMouse() / ((MINI_SIZE + 2) * action->getYScale())) * ROW_BASES;
        InteractiveSurface::mouseOver(action, state);
 }
 
diff --git a/src/Basescape/MiniBaseView.h b/src/Basescape/MiniBaseView.h
index 9168634..0bef494 100644
--- a/src/Basescape/MiniBaseView.h
+++ b/src/Basescape/MiniBaseView.h
@@ -43,7 +43,8 @@ private:
        size_t _base, _hoverBase;
        Uint8 _red, _green;
 public:
-       static const size_t MAX_BASES = 8;
+       static const size_t MAX_BASES = 16;
+       static const size_t ROW_BASES = 8;
        https:/// Creates a new mini base view at the specified position and size.
        MiniBaseView(int width, int height, int x = 0, int y = 0);
        https:/// Cleans up the mini base view.



EDIT: yea, it doesn't show extra bases in Logs screen, I know

469
Thank you.

Here goes an example of 2D map, that's X-Piratez mod, but it should work for any mod out there.
Note that the radar circles are all of the same 800 nmi radius.

SpoilerEPSG:54003 - World Miller Cylindrical:

The modloader works, projection/renderering sort of works.

The code is at https://github.com/StoddardOXC/minicom

Next step - original mission mechanics, I don't want to dive into GL right now.

470
XPiratez / Re: Linux version?
« on: July 15, 2016, 11:40:08 pm »
Possible this: https://openxcom.org/forum/index.php/topic,4187.msg67028.html#msg67028
Couple of releases of OXCE and OXCE+ have bugged cmake script. It will be fix in next version (meanwhile you can cherry-pick this commit https://github.com/Yankes/OpenXcom/commit/19feeef6bd2a1d9868ff77ffccd03197926c6c1e to fix it).

I managed to make it work with https://github.com/MeridianOXC/OpenXcom/pull/4

Seemed faster to just patch than to search the forum. But whatever.





The archives with linux binaries now contain all data files so that there's one less step when installing from scratch (no need to download 2016-07-08-OpenXcomExPlus31-full.zip, just extract the linux archive on top of the mod).

https://lxnt.wtf/oxem/

Please ignore 'oxce3.0' in the file name, it does not mean the builds are not 3.2 or whatever latest version there is.
Instead pay attention to the date in the file name, and download the latest.

Builds commence within an hour of any updates appearing on the github.


471
XPiratez / Re: Linux version?
« on: July 15, 2016, 10:11:32 pm »
I used to be able to compile by using
Code: [Select]
make -f Makefile.simple as instructed on https://www.ufopaedia.org/index.php/Compiling_with_Make_(OpenXcom)

Did it cease to work? Any error output (simple makefiles are that much simpler to debug than CMake) ?

Because I have no problems building it that way.  In any case, it seems some dependency is missing. Could you post more output?

PS: CMake build indeed seems to be broken. Here's the fix: https://github.com/MeridianOXC/OpenXcom/pull/4

472
XPiratez / Re: Linux version?
« on: July 15, 2016, 09:57:19 pm »
Something must have gone wrong, neither folders have anything in them.

Very strange that OpenXcom/build is empty. The cmake -DCMAKE_BUILD_TYPE=Release .. command should have left at least something there. Was there any output?


Besides, my buildbots don't use Cmake, they essentially do:

Code: [Select]
cd OpenXcom/src
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make -j 8 -f Makefile.simple

The PKG_CONFIG_PATH is needed since OpenXcom doesn't work with libyaml-cpp version 0.5.2, so you need to get version 0.5.3 from https://github.com/jbeder/yaml-cpp/releases/tag/release-0.5.3, install its build dependencies - libboost-dev package, build and install it under /usr/local prefix. (And preferably also uninstall  libyaml-cpp-dev package).

Then you can run the above commands and it'll put the binary in OpenXcom/bin.




473
OXCE Suggestions DONE / Re: Multiple inventory templates
« on: July 15, 2016, 07:20:49 pm »
2. unlimited number of templates, saved on file system in the save directory (but not within the save file)... hotkeys to save/load templates... which open UI similar to save/load game

I think that would be too much code complexity wrt saves not having relevant items/armors (for the inv layout) researched. Also I know I will make a horrible mess of those saved layouts and won't ever know how I named the one I need right now. Not to mention the clicks.

So please no.

No, but it's an interesting idea.
(I probably would prefer if they didn't.)

Having thought about it I can't quite think of how it could be done acceptably UX-wise. I guess that should left for the future.

You can still easily change the armor by pressing 'A' (or 'M' ... I don't remember) and selecting from a list.

Thanks for the heads-up.

474
OXCE Suggestions DONE / Re: Multiple inventory templates
« on: July 15, 2016, 02:29:55 pm »
Do them templates include armor?

475
XPiratez / Re: Linux version?
« on: July 15, 2016, 11:23:05 am »
No precompiled binaries exist for Ubuntu 16.04 (Xenial) sadly.

Here you go https://lxnt.wtf/oxem/builds/oxce3.0-plus-proto-4009675-2016-07-14-j11-xenial-x86_64.7z while I fix the names and rest of builds.

EDIT:

Okay, fixed it all, plus fancy lister w/sort: https://lxnt.wtf/oxem/

476
XPiratez / Re: Linux version?
« on: July 14, 2016, 04:07:13 pm »
Frankly, the attempts to use standard  data/user dirs on linux ( ~/.local, etc) are a bit of a mess.

I just extract the mod somewhere, for example ~/games/oxp99,
put the UFO:EU data into ~/games/oxp99/share/openxcom/UFO,
put the latest binary somewhere like ~/games/oxp99/bin/openxcom

then use a run.sh script to launch the game:

Code: [Select]
#!/bin/sh
prefix=/home/stdrd/games/oxp99
usrPath=$prefix/user
cfgPath=$usrPath
dataPath=$prefix

bin=$prefix/bin/openxcom

$bin -user $usrPath -cfg $cfgPath -data $dataPath

setting paths explicitly saves much time and hair-pulling

also, linux binaries are available here


477
Since it's been a month already, time for an update.

I had the custom map projection working at the beginning, drawing continents, borders, cities, labels, bases, craft markers, radar ranges, missions and their areas.

Now instead I have a mod loader that correctly loads and merges the OG ruleset and all the mods enabled in the options plus loading whatever resources that might be needed for the geo/basescape. So that the whole thing would work with whatever modset one prefers.

The modloader itself might be useful for finding stupid errors and typos while modding, it has some basic consistency checks and is verbose about them. Many more can be added (I don't really know what might be useful).

Next step would be to redo the renderer to a) drop SDL_gfx in favor of GLES/GLSL (SDL_gfx is no good, I could actually see the triangles being textured at each redraw) and b) switch  between original (orthographic)  and arbitrary cylindrical (miller, mercator, whatever) projections at will. Horizontal ( logntitude-wise) scrolling worked already, it will be grandfathered in. Vertical (latitude-wise, as when one wants to take a look at the pole) scrolling in cylproj mode will be done too.

After that the whole OG mission logic will be reimplemented, to a) learn how it works down to the last detail and b) see what's the best way forward for the new AI API so that it can be turned on and off at will (depending on a mod).

Detection/Intercept UI will be reimplemented at this stage too, starting with OG's one, to see exactly how inadequate it gets given massive increase in flights detected.

It might further be necessary to do the basescape, so that the whole project gets to be a semi-playable half of a game, without the battlescape (tactical mission results decided by RNG plus maybe some function defining abstract strengths of opposing squads, taking into account terrain, races, geoscape-level morale, whatever).

If all that leads somewhere, there would be a fork of Meridian's tree with the new AI support. That's the long range goal.

These are the plans.

I'll be putting up the code on github shortly, I have to whack the SDL_gfx graphics code into shape so that it at least displays something again. Just a question of adapting the draw code to the modloader API from an ad-hoc one.


478
XPiratez / Re: Linux version?
« on: June 16, 2016, 03:57:37 pm »
Can't you run wine on Linux?

Of course I can, but what this has to do with the lack of cross-compilers targeting OSX?

479
XPiratez / Re: Linux version?
« on: June 14, 2016, 12:38:06 pm »
Unfortunately, OSX builds on my system are not possible. OSX doesn't run very well under virtualization, not to mention this doesn't fit with the licensing stuff. That's why there's a bunch of companies renting out measly mac minis for like 80 euro a month.


480
XPiratez / Re: Linux version?
« on: June 12, 2016, 08:55:18 pm »
I set up a buildbot that builds binaries on the three current ubuntu releases. Results can be had here: https://lxnt.wtf/oxem/

The bot should pick up any changes in github repo in a day or so.

Libyaml is 0.5.3 statically linked. Libsdl1.2 is pretty much the same across the releases, so the main difference would be the compilers, and gcc 5.2/5.3 spits way more warnings (than 4.8 in trusty).


Pages: 1 ... 30 31 [32] 33