project-navigation
Personal tools

Author Topic: Unbuildable squares  (Read 5276 times)

Offline Quizer

  • Squad Leader
  • ****
  • Posts: 130
    • View Profile
Unbuildable squares
« on: January 20, 2013, 05:55:55 pm »
I've been looking for the parameters for those unbuildable squares, for example the ones that control their occurrence rate or their max number, or the function that creates them when you build a new base. Where are these things hidden?

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Unbuildable squares
« Reply #1 on: January 20, 2013, 06:09:50 pm »
Not sure, but they're probably not in the .ufo files if that's where you're looking. I'd guess they're in the source code, somewhere in the campaign cgame (/src/client/cgame/campaign).

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Unbuildable squares
« Reply #2 on: January 20, 2013, 06:11:48 pm »
I've been looking for the parameters for those unbuildable squares, for example the ones that control their occurrence rate or their max number, or the function that creates them when you build a new base. Where are these things hidden?

If you haven't found them, you didn't look for them. :P

They are not hidden: https://github.com/ufoai/ufoai/blob/master/src/client/cgame/campaign/cp_base.h#L52
Min and max are defined, exact number is random within the boundaries with an exception of first base which don't have them.

-geever

Offline Quizer

  • Squad Leader
  • ****
  • Posts: 130
    • View Profile
Re: Unbuildable squares
« Reply #3 on: January 20, 2013, 06:19:57 pm »
Ah, so it wouldn't be trivial to modify this stuff? Too bad... I only need any one solution that makes it possible / easier to get a clean base - I know it's possible to randomly roll up a base without any rocky squares, but the chance seems to be very, very low.

@geever: I have been looking in the .ufo files, as H-Hour assumed. So these things can't be changed via scripts yet?

Looking at that link, I see that MIN_BLOCKEDFIELDS is set to 1 - was this changed recently (as in, the last two weeks or so)? I remember getting a base without any rocky squares once or twice. I still have a savegame where I have a second clean base, and that was before I started tinkering with script files and stuff.

« Last Edit: January 20, 2013, 06:31:30 pm by Quizer »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Unbuildable squares
« Reply #4 on: January 20, 2013, 07:19:54 pm »
I only need any one solution that makes it possible / easier to get a clean base

I always wondered: why? It is a game element, like research tree or the fact your soldiers can't fly...

I know it's possible to randomly roll up a base without any rocky squares, but the chance seems to be very, very low.

Yeah, it is very low. As you see 1-4 blocked squares are placed. To have 0 you need to be very lucky as it is only possible if the location of the access lift and the only blocked square is the same, this case building overrides the block.

@geever: I have been looking in the .ufo files, as H-Hour assumed. So these things can't be changed via scripts yet?

Yep, it needs changing the source code and recompiling.

Looking at that link, I see that MIN_BLOCKEDFIELDS is set to 1 - was this changed recently (as in, the last two weeks or so)? I remember getting a base without any rocky squares once or twice. I still have a savegame where I have a second clean base, and that was before I started tinkering with script files and stuff.

No, see above.

-geever

Offline Quizer

  • Squad Leader
  • ****
  • Posts: 130
    • View Profile
Re: Unbuildable squares
« Reply #5 on: January 20, 2013, 08:15:17 pm »
I always wondered: why? It is a game element, like research tree or the fact your soldiers can't fly...
Build space is already at a premium as it is, what with workshops taking up so much room. Having more than two interceptors or a second general stores are already luxuries I can't afford, so I don't need unbuildable squares taking up more of my valuable real estate.

As the game stands, there is no possible way for soldiers to fly short of coding in jetpack armors or something like that. But having a base without rocky squares is possible, if unlikely, so I want it. I don't really mind reloading a bunch of times to get the best possible outcome, but not to the point of ridiculousness. After a solid half-hour of reload attempts didn't get me a base without rocks, I've started looking for ways to force the outcome I want.

(Don't worry too much about it - people have different playstyles and so on. My sense of perfectionism just doesn't like to have those ugly, useless squares there if they don't need to be there.)

Quote from: geever
Yeah, it is very low. As you see 1-4 blocked squares are placed. To have 0 you need to be very lucky as it is only possible if the location of the access lift and the only blocked square is the same, this case building overrides the block.
Yeah, I thought that might be the reason. If the distribution is equal, that means the chance to get a base is 1%. Pretty low, but it's nice that the chance exists (if this is by design).

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Unbuildable squares
« Reply #6 on: January 20, 2013, 09:37:37 pm »
Build space is already at a premium as it is... so I don't need unbuildable squares taking up more of my valuable real estate.

Geever was making a different point, one that is overlooked in most feature requests (and there have been several lately). You want this feature (ability to build on all squares) because it will make the game easier for you. But that doesn't make the game more fun. It just makes it easier.

Players usually want things that will help them win -- better weapons, more base space, larger squads, etc -- but the fun of the game comes from overcoming challenges. Good game mechanics typically involve simple problems with more than one way to solve them. That's why the blocked squares are there. Every base is a new challenge. Since replayability is key for us, the constant variation is important.

Offline Quizer

  • Squad Leader
  • ****
  • Posts: 130
    • View Profile
Re: Unbuildable squares
« Reply #7 on: January 20, 2013, 10:23:49 pm »
Geever was making a different point, one that is overlooked in most feature requests (and there have been several lately). You want this feature (ability to build on all squares) because it will make the game easier for you. But that doesn't make the game more fun. It just makes it easier.

Players usually want things that will help them win -- better weapons, more base space, larger squads, etc -- but the fun of the game comes from overcoming challenges. Good game mechanics typically involve simple problems with more than one way to solve them. That's why the blocked squares are there. Every base is a new challenge. Since replayability is key for us, the constant variation is important.
Don't get me wrong, challenge is important to me. I don't cheat lightly or indiscriminately - things like infinite money or hacking my soldiers' stats to something ridiculous doesn't appeal to me. But I do like to get the most out of what the game lets me do. To me, reloading my game a bunch of times to get a different base layout isn't really any different from picking the best soldiers out of the recruit list to make up my team.

But in this case, having the freedom to build my base how I want is more important to me than the extra challenge of making do with less space. I would mind the blocky squares much less if there was a base building that is just a regular square which you could build on top of them, letting you spend some time and money to get rid of them. I mind having the total square limit for my new base decreased for no good reason much more than I'd mind, say, getting 3-5 unbuildable squares in each base and having to pay 50,000 and spend 1-2 weeks clearing those spaces, though the economic cost of the latter may actually be higher than what the squares are worth in terms of gameplay benefit.

I don't mind variation, either. I'm taking care to build each base differently this time, with the entrance in a different location, so I don't have to replay the same base assault a dozen times over. But (for me at least,) it's an effort vs. reward thing. Having more space to build is literally priceless, so I'm willing to go to quite a bit of effort to secure that space. On the other hand, it's not likely I'm going to replay a mission because I'm not satisfied with the number of plasma pistol drops.

Random variation, IMO, is best used in places where the difference it makes is minor enough that it's not worth trying to force a specific outcome, or where other factors complicate things so the player is forced to compromise. The blocked squares, on the other hand, seem like a lazy mechanic to me, a cheap way to add more difficulty, but no real complexity. Fake Difficulty, to use tvtropes lingo. I'd rather find my challenge elsewhere.