.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Space Empires V Editor 1.0 released (http://forum.shrapnelgames.com/showthread.php?t=31445)

Devnullicus October 31st, 2006 03:25 PM

Re: Space Empires V Editor 1.0 released
 
Quote:

Elsemeravin said:

I think I got it. My computer has is expecting ',' as decimal separator instead of '.' and then when your program meets a decimal number in formula it will not process correctly.

But I'm not sure if you could force the decimal separator in your code to be '.' instead of windows default one ?

Oh! Heh, fancy programming bites me in the ***, I see. I was trying to be "smart" and have the formula parser recognize regional settings. Obviously, I need to rethink that and turn that off http://forum.shrapnelgames.com/images/smilies/happy.gif

Thanks for finding this!

Elsemeravin October 31st, 2006 03:55 PM

Re: Space Empires V Editor 1.0 released
 
Quote:

Devnullicus said:
Oh! Heh, fancy programming bites me in the ***, I see. I was trying to be "smart" and have the formula parser recognize regional settings. Obviously, I need to rethink that and turn that off http://forum.shrapnelgames.com/images/smilies/happy.gif



Don't worry too much, I changed the regional setting to use '.' I should have done that long time ago already, so now it's done for good.

I think you should focus on component design first http://forum.shrapnelgames.com/images/smilies/happy.gif (and then tech areas ! with a nice tree representation) http://forum.shrapnelgames.com/image...es/biggrin.gif

skigrinder October 31st, 2006 04:22 PM

Re: Space Empires V Editor 1.0 released
 
Fyron,
Thanx for the response.
I'll take a look at the moon offset / same as idea.

The idea of creating planets in SE with 10+ moons (like those in our own solar system) has always intrigued me.

I like the idea of colonizing the moons, building cargo facilities and filling them with weapons platforms for planetary defense. However, this makes no sense if the moons are in a different sector.

An editor tool for the SEV map files (similar to DevNull's facilities editor) would be very useful as the text files are pretty complicated.

Thanx,
skigrinder

Devnullicus November 2nd, 2006 02:03 AM

Re: Space Empires V Editor 1.0 released
 
Elsemeravin: I'm trying to fix the error you (and others) have gotten with regional settings. However, I can't seem to reproduce the error on my computer. What are your regional settings (i.e. what did you change to make the problem go away, and what was the old value that was causing the problem)?

Elsemeravin November 2nd, 2006 04:21 AM

Re: Space Empires V Editor 1.0 released
 
In the national setting from configuration panel, go to customise button (right of national name), then change the decimal separator (sorry I don't remember the exact name for the english version), and change from '.' to ','.

Then apply.

Devnullicus November 2nd, 2006 05:11 AM

Re: Space Empires V Editor 1.0 released
 
ok, got it. Man, what a pain in the ***. Turns out I was correctly NOT using regional settings when parsing the formula, BUT C# was using them anyway when doing a Convert. So, it was doing very strange things with . and , characters when the regional settings were different.

The fix was to just set the app settings to en-US Number Formatting. Figuring out how to DO that, however, was a real pain in the ***. Ah well, it should work now.

Just in case any other C# programmers want to know how to force an application to use US number formatting no matter what the user's regional settings are, here's some code http://forum.shrapnelgames.com/images/smilies/happy.gif

<font class="small">Code:</font><hr /><pre>
CultureInfo currentCultureInfo = Thread.CurrentThread.CurrentCulture;
CultureInfo cultureInfo = (CultureInfo)currentCultureInfo.Clone();
NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
cultureInfo.NumberFormat = nfi;
Thread.CurrentThread.CurrentCulture = cultureInfo;
</pre><hr />

Wouldn't be nearly so annoyingly difficult to figure out if the system didn't make the original settings read-only so that I had to clone them. Sheesh.

Elsemeravin November 2nd, 2006 06:08 PM

Re: Space Empires V Editor 1.0 released
 
Now that you solved this problem what about the component editor ? http://forum.shrapnelgames.com/image...ies/stupid.gif http://forum.shrapnelgames.com/image...es/biggrin.gif

Phoenix-D November 2nd, 2006 06:12 PM

Re: Space Empires V Editor 1.0 released
 
http://www.shrapnelcommunity.com/thr...o=&amp;fpart=1

He beat you to it by about 6 minutes.. http://forum.shrapnelgames.com/images/smilies/wink.gif

Devnullicus November 2nd, 2006 06:14 PM

Re: Space Empires V Editor 1.0 released
 
HA!

Elsemeravin November 2nd, 2006 07:07 PM

Re: Space Empires V Editor 1.0 released
 
Quote:

Devnullicus said:
HA!

So next step:

"Now that the component editor is done, what about the tech tree editor ?"
http://forum.shrapnelgames.com/images/smilies/happy.gif http://forum.shrapnelgames.com/image...es/biggrin.gif


All times are GMT -4. The time now is 12:42 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.