Lead Developer, Stardock Entertainment
Published on May 19, 2006 By CariElf In GalCiv Journals
I've been working on stuff for 1.2 this week as well as bug fixing and helping out with support. First, let's start out with the shiny new mods browse dialog! I don't get to post screenshots very often.

By default, the mods folder is in My Documents\My Games\GalCiv2\Mods. This folder and all its subfolders are created when GalCiv2 runs for the first time. Several versions ago, I added an option to the prefs.ini file so that modders could change the location of this folder, but we didn't have an interface for it. In the Options Menu, under Game Options, I added a control that lists the current Mods folder and a button to change it.



When you click on that button, this dialog appears:



We were going to do a regular Windows Browse dialog so that you'd have all the functionality of a normal Windows Browse dialog, but it's not fully supported by all video cards, so we decided to make our own version.

A tree dialog would have been tricky to do well, and probably would have caused performance issues. So I decided that we should just list the full path in the entry field at the top, and then just list the subfolders of the current folder. The little + button will attempt to create the directory if you edit the string at the top. The button with the up arrow takes you up to the next level. When you go up past the C drive, it will list available hard drives so that you can change the hard drive where you store your mods. There's also a button to restore the mods directory to the default. I'm getting close to finishing my guide to modding. I wrote the basic text for it and now I'm creating an html doc so that you can use the contents to skip around the doc, and it'll be easier to keep updated.

So maybe the mods dialog isn't that exciting, but I'll bet you get excited about this: I have the Auto-Focus option working. I put in code so that when the Auto Focus option is OFF, the camera will not move to center on a ship unless the ship select message has been sent by something initiated by the user. The ship is still selected, so you can hit the C key to center on it if you want to change its orders. This will also let you use the goto button to set its destination. I found this useful because I could center on a rallypoint waiting for my ships to arrive so that I could form them into fleets, and just assign ships whose destination was cancelled to be rallypoint I was watching. If I've missed the point of your grievances, I'm sure you'll let me know, but be nice about it ok? It should be possible to add a function to not auto-select ships as well, but that will take more work and it seemed to me that the major complaint was that the camera got moved all over the place.

I found a bug in the save game code that would only happen if it failed to open a shipcfg file so that it could copy it into the save game data, but I'm not sure why it would fail. Evidently, it has, because some people are getting corrupt save games. I've been suggesting that people who get this bug clear out their ships folders and design new ships but I'll see if I can find a better way to prevent it. I fixed the bug so that it shouldn't corrupt save games anymore, but if the game can't find a shipcfg file for a ship, you won't be able to build it.

I've been trying to figure out why some games suddenly don't know that they are metaverse games. I fixed a bug where CTRL+N could have started a normal game after starting a metaverse game (or a loaded game) several versions ago. I fixed a bug where the game mode was being set to 'end game mode' when the game was finished, which would cause it to fail the IsMetaverseGame check in 1.11, and that seemed to help some people. Or maybe not: it's not a consistent bug. So far I've only gotten one support e-mail about this with 1.11, but there could be other e-mails in the bug database that I haven't gotten to yet. I added code that will print messages to debug.err when the game is being saved or loaded about what kind of game it thinks it is (normal, campaign, or metaverse), so that might help me track it down. I've also added code to try and detect if it should be a metaverse game and recover if it thinks that it isn't one. I would prefer to know why it stops thinking it's a metaverse game, though!

It turns out that the AI was giving away freighters that were supposed to be on trade routes. This was causing all sorts of interesting crashes. This should be fixed in the next update.

I believe that I've also fixed a crash caused by the random event that gives you a free ranger or corvettes. There were two ship designs with the class name Ranger, which was causing one ship design to overwrite the other. I'm not sure how it was ever possible to build a ranger let alone get one in this event. To be extra sure that this random event wouldn't cause a crash, I put in checks to make sure that a valid ship was created.

Oh, and another bug fix that will be in 1.2: tiles that are partially highlighted by the starbase's circle of influence will now receive the starbase bonus. This was caused by the code that calculated the Euclidean distance (straight line distance) always rounded up for the number of tiles. This meant that a distance of 8.1 tiles got rounded up to 9, even though the tile looked like it should have gotten the starbase bonus. We talked about making it round up or down based on the percentage of colored area in the tile, but since the "half full" tiles could be argued to go either way, we decided to err on the side of generosity because that generally results in less ranting.

Anyway, have a great weekend and try not to burn down the forums. It looks it is going to be sunny and beautiful this weekend in Southeast Michigan.

Comments (Page 1)
2 Pages1 2 
on May 19, 2006

I have the Auto-Focus option working.


Fantastic.....Can't wait to download the beta.
on May 19, 2006
Agreed, the auto-focus could be a real bother when trying to get my fleets into position.

Good work.
on May 19, 2006
Sounds great, can't wait for the modding options.
on May 19, 2006
Thank you for a great game.

I don't know about other players, but it is not auto-focus that creates problems for me ... it is auto-selection of the next ship. I would like to see an option to turn auto-selection on or off which you said you could do ... please do!

Regarding bugs, I have a saved game (v1.11) that was saved at a point when the only action left was to click on the turn button which was green at the time. When I load that saved game and click on the turn button all my fleets move towards an economy starbase of mine located in the upper right corner of the map. At the point of creating that save none of my ships had any destination selected or any moves left. That is, they were not supposed to move at all in the next turn until I gave them new orders to move somewhere. In order to stop this and continue the game after reloading it I had to select each fleet one by one and right click on it's present location before clicking on the turn button. You might be tempted to think that I actually had destinations already selected for these fleets before saving, but I did not. Should I email that saved game to you?

Overall v1.11 seems to have eliminated the CTDs I was having, but I have had a problem twice where the turn button seemed to lock up. I could move around to view the map, I could select ships, I could change economy, etc. settings, but the turn button would not work. I would click on it, and nothing would happen. I had to shut the game down, restart, and reload the latest save I had in order to continue. Of course, since there was no CTD there is no debug.err file to send you.
on May 20, 2006
Disabling the auto-focus without the auto-select part doesn't really fix my problem with "auto-focus" and might make it worse. I suspect it's the same that most people who wanted the "auto-focus" disable want auto-select disable, and we just loosely used the term auto-focus as a catch-all description for the auto-focus/select behavior.

Anyway, my typical scenario:
- I click on a certain square, moving my currently selected ship to its new position.
- Expecting that I still have some movement left (or maybe just wanting to set its autopilot path for next turn), I immediately click on a nearby square to adjust the ship position *as soon as the ship completes its previous move*.
- Unfortunately, my selected ship had run out of move points, and the auto-focus/select has jumped to a new ship somewhere else. By the time I see and react to the selection/focus change, I've completed the right-click I had in progress.
- So the newly auto-focused/selected ship gets the move order intended for the old ship and moves off to some unintended spot.
-Result: With auto select and auto-focus (ie: current behavior), the screen is centered on the new ship, so unintended move order is usually nearby, so I might still have some move points left to use.
- With auto-select and without auto-focus (ie: proposed fix), the screen remains still, so my move order actually still goes to the intended square, but the ship getting the move order is potentially on the other side of the map.

So for auto-focus-disable to be useful for me, I'd like to be able to also turn off the auto-selection. (Or one unified button that does both together is fine for me).

Thanks!
on May 20, 2006
So for auto-focus-disable to be useful for me, I'd like to be able to also turn off the auto-selection. (Or one unified button that does both together is fine for me).

I second that, but maybe things will turn out better if I tried Caris new behavior (well, not Caris behavior, but the behavior of her code ).
So for now I'm happy and can't wait to try 1.2, but maybe the auto-select would need to be adressed with some later patch, we will see.

As always, great game, good work and Stardock I love you!
on May 20, 2006
Yes, the camera move is annoying, but it isnt fast enough most of the time to have you realize you just moved the wrong fleet/ship - please offer the option of no auto selection at all, would make life much easier on larger maps especially.
on May 20, 2006
Me again
Lost another 12000 divisions because of auto-select a few minutes ago, so while auto-focus is killing my nerves, auto-select kills my troops

Nevertheless, even chief programmers need some free time, so have a nice weekend and enjoy the sunshine ...
on May 20, 2006
Yes, unfortunately auto-focus is also a big part of the issues I have with the UI.

LintMan described it quite well and I would love it if you would be able to make an option for it also.

But enjoy your weekend, you can slave for us the other five days of the week.
on May 20, 2006

When playing with the internal test build (with cari's changes), i beleive it will keep the ship selected until you go and physically click on the next ship you want to move. I'm not sure about a beta version, though with the Mods stuff it'll probably be necessary, but we'll see how you guys like the current implementation of "No Auto-Focus" and see if it's what you're looking for (but FYI, it fixed all my problems with the feature).

on May 20, 2006
BB/CariElf would it be possible to change the F1 planet list slightly please so that if you have a colony ship (or any ship) currently highlighted you can right click on the planet in the planet list to send it there??

At present any decent scout ship uncovers more planets than you can keep track of and without paper and pencil it is impossible to keep track of them all (esp on gigantic maps). With this new feature you could easily keep track of things and simplify colonization as well.

Many thanks and keep up the good work.

PS Not sure about the fix as i have never really had a problem with the way the UI is now. However if you could please explain the issue people are having (in layman's terms) and what your fix will do, i would be grateful

DG
on May 20, 2006
Grrmmlll... me needs some sleep. I'm writing uncomprehensable stuff which doesn't make sense.

(Should have been auto-select instead of autofocus, or else my post above doesn't make sense...)

Ah... but alas as it sounds like this won't be a problem (if it works like BoogieBac has described, it will be perfect )


As for a beta: Yayh!

on May 20, 2006
dg: We've improved the selection code so that a ship will stay selected even if you click on a planet. So technicially, all you need to do (in your example) is select the colony ship, click on the planet from the list (which will move the camera there) and right click on the planet. THe game will now remember the last ship(s) selected and send them where you want
on May 20, 2006
I try to move my ships in stages. Here is where autofocus and autoselection kills me.

Stage I. Logistic and Strategic moves

I have my long range strategic autopilot moves that I would like to execute (massing transport ships from my secure empire interior and moving my newly built warships to the front) some of which are moving to rally points. These are moves that I can be quick with and a bit off because there is little danger of being shot at.
So my right clicking to move can be a bit sloppy.

It would be nice to enable an " move all autopilot directed ships" button or 'move all rally point directed ships " button to move all these essential but non-precise moves.


Stage II Fleet Assembly and Staging Moves

When I get a bunch of ships together in a region for a mission , I move them kinda together and then assemble them into fleets or deselect and manage the fleets and upgrade certain ships etc. This is done near my front lines but during peacetime or out of bad guy shooting range. I try to do this after my strategic moves.

This is where autofocus or auto selection starts to drive me nuts. I can usually see all the ships I want to work with on the map screen at the same time. All I want to do is click on one ship to select it, right click to select a new location once and repeat movement to use all of it movement points. I then move other ships on top of it to create a fleet.


Stage III Tactical moves.

I then want to move one ship at a time very carefully, sometimes zooming in and switching Cntrl-G to turn the grid on for my ships about to engage in combat, or to move them to just outside an enemy fleets movement range to prepare for an attack.

I am concentrating on my immediate ships in this zoomed in map. It kills me when I have an autoselected transport on the other side of the universe that I get auto focused to that demands my attention. I then have to zoom out, see where the hell it is and take care of it and go back in to my tactical focus.
on May 20, 2006
dg: We've improved... ...where you want


Thanks that is good to know. Sorry for sounding naive but i was not aware of the problem people have been reporting.
Thanks for clearing that up.
Oh and it is a good improvement

2 Pages1 2