Recent Posts

Pages: [1] 2 3 ... 10
1
The Last Federation / Re: Few beginner questions
« Last post by OpT1mUs on Today at 05:02:53 PM »
Take a look at this screenshot, why are the numbers on the second one different that the ones on the first one. That is their only planet.
2
Performance-related question then. Lets say in some PerSimStep code I need access to some of the ExternalConstants data. I'd like to load all such data once at game start time. This is easy for when I am first beginning a game, but what about when someone reloads a game. In fact, lets assume that someone saved a game, fiddled with some numbers in the XML, then reloaded the game. Is there any way for my PerSimStep code to tell whether a game has just been loaded?
ExternalConstants, and all the /GameData/Configuration/ xml, is loaded when the application starts, before you see the main menu. This is partly evident in that the main menu is defined in that xml :)

It's not re-loaded when you start or load a game.

There is a development-purposes-only key combo for reloading the data mid-stream but it's been busted for months, iirc.

So you're welcome to cache it.

That said, if you're only referencing the data once per step, or a few times per step, it's not going to make a difference.

That said, good practices now help later. Normally I avoid caching things if there's any chance the cache may become incorrect later (if there's ever more than one way to answer a question, they're both wrong), but that's basically not the case here. Also, if you load the data into your own structures you can lay them out for type-safety and intellisense, etc.
3
Performance-related question then. Lets say in some PerSimStep code I need access to some of the ExternalConstants data. I'd like to load all such data once at game start time. This is easy for when I am first beginning a game, but what about when someone reloads a game. In fact, lets assume that someone saved a game, fiddled with some numbers in the XML, then reloaded the game. Is there any way for my PerSimStep code to tell whether a game has just been loaded?
4
Man, usually I do a better job of reading your initial comments than I seem to have done here... Thanks for recapitulating things for me! It makes much more sense now.
No problem :) All this is under-documented, to put it mildly.
5
The Last Federation / Re: Few beginner questions
« Last post by steelwing on Today at 12:02:19 PM »
There's a date display in the bottom panel, if that's what you're after.  When you're engaged in a dispatch mission, a timer indicates how long you've been occupied with it.  Other than that, the only "clock" I'm aware of is the timers that are shown at the very beginning indicating how long in real-time before each race becomes spacefaring.
The military strength values for each planet are relative approximations, based on their technology and numbers of ships and soldiers.  It's not always an accurate measure, but it does (mostly) work for determining how well one race is likely to do against another.
You say the numbers on the power grid are different from the numbers next to each planet?  Don't know that I've seen that before.  Do the races you see that with own multiple planets?  Or is it ALL races without regard to numbers of planets owned?
6
Man, usually I do a better job of reading your initial comments than I seem to have done here... Thanks for recapitulating things for me! It makes much more sense now.
7
Code: [Select]
(18:47:37) hostname:~/AIWar2/GameData/Configuration/ExternalConstants $ cat Nanocaust_Constants.xml
<?xml version="1.0" encoding="utf-8"?>
<root
    timeForMarkIIUpgrade="900"
    timeForMarkIIIUpgrade="7200"
    timeForFirstFrenzy="120"
    maxNanobotLifespan="500"
    minNanobotLifespan="120"
    minTimeBetweenWaves="180"
>
</root>
Try making that opening line:
<root is_partial_record="true"

Without that your file functions as a replacement for the default one (which can be useful), but with it it's just an amendment to it, which should avoid the errors you saw.

That said, if you want to be able to reference those in-game you'll need to follow the custom xml data naming pattern, like:
Code: [Select]
custom_int_nanocaust_timeForMarkIIUpgrade="900"
"custom_" is just a literal, tells it to process it as a custom field.
"int_" is the type; other valid values are bool, FInt, float, and string
"nanocaust_" is the namespace, can be whatever you want, to differentiate it from an int field some other mod names "timeForMarkIIUpgrade".

In game you could reference that as:
Code: [Select]
int timeForMarkIIUpgrade = ExternalConstants.Instance.GetCustomData( "nanocaust" ).GetInt( "timeForMarkIIUpgrade" );
Though a better pattern is:
Code: [Select]
CustomDataSet nanocaustConstants = ExternalConstants.Instance.GetCustomData( "nanocaust" );
int timeForMarkIIUpgrade = nanocaustConstants.GetInt( "timeForMarkIIUpgrade" );

I may change the getter pattern so that you're passing in int indices (or the equivalent) most of the time, for performance reasons, but for now this is fine.
8
The Last Federation / Few beginner questions
« Last post by OpT1mUs on Today at 07:42:51 AM »
I think I remember having an ingame clock when I first started the game, other than the calendar, which made easy to track flow of time, now I don't seem to have it? Was it a tutorial feature or ?

Another thing is , I don't get the planet military strength numbers at all. What's the point of armada number if it says in its tooltip that it's not really a good show of how strong space mil is? Also why are strength numbers different on planets and in Racial Powergrid? Like, completely different.

If I think of anything else, I'll add it later, thanks.
9
Starward Rogue Alpha Discussion / Re: Augmented Alpha feedback
« Last post by Misery on Today at 04:47:22 AM »
Just a quick thing:  The update I was going to send out today will be tomorrow instead.  Everything is going along well enough, but I had a godawful allergy hell day yesterday.  Cant concentrate on much when that happens.  Anyone that's ever gone through that one probably knows exactly what I mean.  And heck if I even know what set it off.  All I ended up doing yesterday was making really awful attempts at Necrodancer over and over while trying not to go insane.

Anyway, the 8th boss is done finally. The one with the attack that was from another boss has had that changed (I really don't know how I managed to screw that one up and then not even notice it).  I have a couple of jumpscare enemies to finish here.  The misery mode stuff is separated and wont be in the update lest I break something since it's in an unfinished and jumbled state. 

And a couple of small tweaks here and there.  Plenty more tweaks will likely come later.  If any problems seem to exist with current enemies, by all means let us know. 

I'll likely add enemies at random intervals after that, and I need to make the alterations to create hard mode patterns for the new bosses (if anyone has any specific feedback on the difficulty of any of them in their current state, now's the time to point it out). Want to up the roster for the gold floors up a bit.  Things repeat a bit too much in there right now in my opinion.  Going to also start doing some rooms of my own, I never really got the chance to dive into that previously. 

On the note of rooms, if anyone wants to try their hand at making some and submitting them, by all means, go ahead.  We cant have too many rooms in a game like this.  Just be sure to test them fully before submitting.  As in, test them a whole bunch of times, not just once.
10
I hit a weird problem with custom XML data. I was trying to move some of the balance-related nanocaust settings to the external XML so it's easier to tune. I created a new xml file thusly:
Code: [Select]
(18:47:37) hostname:~/AIWar2/GameData/Configuration/ExternalConstants $ cat Nanocaust_Constants.xml
<?xml version="1.0" encoding="utf-8"?>
<root
    timeForMarkIIUpgrade="900"
    timeForMarkIIIUpgrade="7200"
    timeForFirstFrenzy="120"
    maxNanobotLifespan="500"
    minNanobotLifespan="120"
    minTimeBetweenWaves="180"
>
</root>

I haven't put anything in the C# to interact with it yet. Now when I start the game I get errors like the following in my ArcenDebugLog.txt
Code: [Select]
9/19/2017 6:43:22 PM    Errors in reading ExternalConstants
'ExternalConstants_1' has missing or empty comma-delimited list in attribute 'balance_planet_resource_multipliers'
'ExternalConstants_1' has missing or zero int in attribute 'waiting_before_wormhole_distance_gravwell_radius_ratio'
'ExternalConstants_1' has missing or zero int in attribute 'guard_goes_free_distance_to_grav_well_radius_ratio'
'ExternalConstants_1' has missing or zero int in attribute 'guard_releases_internal_ships_distance_to_grav_well_radius_ratio'

What am I doing wrong? I haven't changed the KDL_ExternalConstants.xml.
Pages: [1] 2 3 ... 10