Jump to content
XCOMUFO & Xenocide

Major Bug In Clarkwehyr Editor


Crus8r

Recommended Posts

While I was doing some testing, I ran across a serious bug in the Clark Wehyr Editor. I was running several end-of-month passes, and I noticed that after making a really minor edit to one of my bases with the editor, monthly expenses shot through the roof. I therefore did a comparison between the edited base.dat and the backup file made by the editor...

 

A little quick background on the structure of BASE.DAT...it contains a section of 36 bytes, one for each of the "squares" in the six-by-six base grid, showing what facillity is present (or 255[FF] if dirt), followed immediatly by a second section of 36 bytes which hold the value of how long until each module is completed, or 0 if it is finished and ready. Unused, or 'dirt' modules should have a value of 255[FF] in the completion section...but the editor sets them all to 0.

 

Apparently, the game has a 'hidden' maintenance cost for 'finished' dirt modules, one that doesn't add to the maintenance costs displayed by the game, but that does add to what you are charged at the end of the month...the game I was testing has four bases: the main base (not much 'dirt' left), a secondary base (about 16 'squares' used) and 2 nascent bases (mostly dirt). After discovering the bug and editing all the dirt in my bases back to 255[FF] for completion time, monthly maintenance went down over $7,000,000!!

 

Here were my monthly graphs before and after fixing the bug:

post-1758-1158724449_thumb.png

 

Crus8r

Link to comment
Share on other sites

I wonder if any of this somehow factors into the hidden costs that a lot of players have noticed in the general course of a game? I mean, players who've been playing a plain vanilla game have often mentioned that they've been paying out more than what's claimed. Could there be some way to generate these unusual dirt blocks in the normal course of the game? Something worth thinking about, I guess.

 

It's good that these errors with the editor are being noticed (like the incorrect radar construction). It helps us understand the game slightly better.

 

- NKF

Edited by NKF
Link to comment
Share on other sites

Actually, NKF, I tested a few other things when I discovered this...and if you dismantle a facility, the resulting dirt block does not get reset to 255...it stays set to 0, so its just like what happens with the editor, except its just the one block. I didn't think to check what happens when you cancel a facility that is currently under construction...dunno what happens in that case. In any case, one or two blocks like that is not that big a deal...but I had well over 75 amongst all my bases, and that added up to a higher maintenance fee than regular maintenance plus the salaries of 100 scientists, 20 engineers, 25 soldiers, 2 interceptors, and a Skyranger!

 

I was aware of the bug where radars added by the editor didn't have the proper values set, but considered that a minor bug, especially in light of the fact that the next time a module completes at that base (with the non-functioning added radar), the game will automatically update the base stats, and WILL properly set the detection values for the radars you have at that point...so that bug is not persistant (unless you never build another module in that base!). This bug, however, IS persistant...unless you ended up fully developing all the bases affected...and I usually only fully develop the main base and maybe one other (my manufacturing base).

 

This bug seems especially bad for me because I routinely use the editor to rearrange my starting base to something more defensible...which means I've been suffering from this bug in most every game I've played for years now. I knew SOMETHING was wrong with maintenance costs...and I even had suspicions that the editor was somehow responsible, but I was looking in the wrong place...it was only because I was testing end-of-month stuff that I noticed.

 

BTW, you'll get the bug even if you only use the editor to change the stores inventory without changing/adding modules...basically, anything that changes BASE.DAT...If you use the other functions of the editor (soldiers, crafts, etc.), it won't mess anything up that I'm aware of...

 

I also didn't think to test what happens if you completely dismantle a base affected by the bug and then establish a new base in that slot...dunno if it properly 'resets' the base data.

 

I dunno if the author of the editor would be willing to patch it...doesn't seem like it would be that hard to fix, and he could also fix the radar bug at the same time...I know he posted here once several years ago...

 

Crus8r

Link to comment
Share on other sites

I wonder if any of this somehow factors into the hidden costs that a lot of players have noticed in the general course of a game? I mean, players who've been playing a plain vanilla game have often mentioned that they've been paying out more than what's claimed. Could there be some way to generate these unusual dirt blocks in the normal course of the game? Something worth thinking about, I guess.

Although I've never used any editors and I only played the game last year and many years ago (in beginner difficulty :P), I would like to post a thought. I think that crus8r slightly mentioned it, but:

 

If you dismantle an existing facility, the game should convert the -tiles to dirt-ones, right? I think that smells as the maintenance bug, hiding...

 

In addition, concerning the canceling of a facility under construction, I guess that depends on the way the programmer implemented the feature: Is it considered a -tile or a "dirt"-tile which has a "property" (by "property" I mean that it is considered a dirt tile, but it will be converted into a -tile once the timer expires)? I guess that someone can only find out by experimenting.

 

Anyway, I don't know about you, but I always though that the maintenance and personel costs were way too big, either you built or not :P ^_^

Edited by kafros
Link to comment
Share on other sites

OK, I did a little more testing, and found that if you cancel a facility under construction and leave it as dirt, the game does NOT reset the completion setting...it will continue to count down, until it is 0...which leaves you with one of those 'finished' dirt modules...

 

Also, if you completely dismantle a base that has the bug, then build a new base in that slot, the game DOES reset the values...eliminating the bug, albeit at a high cost. I suppose that could be a slight comfort if the aliens destroyed a base that had 'buggy' dirt modules. :P

 

Kafros: It is definitly implemented as a <facility type "under construction">...as soon as you place a facility on the grid, the game marks that module as that type of facility, then changes the 'completion' value for that module to however many days that facility takes to build...when it counts down to zero, the facilty is finished and ready.

 

Crus8r

Edited by Crus8r
Link to comment
Share on other sites

I guess this means you now have to plan any mini bases out in advance and remember to re-use any blocks that you previously had filled with a temp module - like an intercept outpost that previously had a small radar that was upgraded to a HWD. It also means remodelling your stating base (from any config) to a sleeker configuration is probably a bad idea. Blast.

 

There's one more scenario that needs to be considered: Collapsed modules. I've a hunch that they'll behave exactly the same way as the dismantling of a running or incomplete base module.

 

- NKF

Edited by NKF
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...