#ifdef NORMAL, HARD

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
GunChleoc
Translator
Posts: 503
Joined: September 28th, 2012, 7:35 am
Contact:

Re: #ifdef NORMAL, HARD

Post by GunChleoc »

Helmet wrote: December 1st, 2020, 11:28 amPS: I'm still going to use Ravana's solution. Check-out this beautiful crystal-clear code...

Code: Select all

#ifdef EASY
			type=Naga Warrior
#endif
#ifdef NORMAL_OR_HARD
			type=Naga Sicarius
#endif
If you don't have nightmare, you can simplify this even further:

Code: Select all

#ifdef EASY
			type=Naga Warrior
#else
			type=Naga Sicarius
#endif
User avatar
Helmet
Posts: 331
Joined: December 19th, 2006, 5:28 pm
Location: Florida, USA

Re: #ifdef NORMAL, HARD

Post by Helmet »

GunChleoc wrote: December 2nd, 2020, 7:13 am If you don't have nightmare, you can simplify this even further:

Code: Select all

#ifdef EASY
			type=Naga Warrior
#else
			type=Naga Sicarius
#endif
I've done that often enough, but I don't like it. My code sometimes becomes hard for me to parse, and changing things after playtesting becomes more difficult. Look at this example and quickly determine which unit types are NORMAL...

Code: Select all

#ifdef EASY
			type=Naga Warrior
#else
			type=Naga Sicarius
#endif
#ifdef HARD
			type=Naga Ringcaster
#else
			type=Naga Dirkfang
#endif
That hurts my brain. This is much better, in my opinion. It's even 1 line shorter.

Code: Select all

#ifdef EASY
			type=Naga Warrior
			type=Naga Dirkfang
#endif
#ifdef NORMAL_OR_HARD
			type=Naga Dirkfang
			type=Naga Ringcaster
			type=Naga Sicarius
#endif
After playtesting, it would be simple to cut a line from one group and paste it in another group to see if that works better.

That was probably a bad example, but you get the idea. Anyhow, I guess my problem boils down to #else. I don't like #else.

When I'm in a restaurant and I need a spoon, I ask for a spoon. I don't ask for the utensil that is not a knife and not a fork. :lol:
User avatar
Ravana
Forum Moderator
Posts: 2482
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: #ifdef NORMAL, HARD

Post by Ravana »

Difference for these examples is that NORMAL has Ringcaster in one form but not other.
User avatar
GunChleoc
Translator
Posts: 503
Joined: September 28th, 2012, 7:35 am
Contact:

Re: #ifdef NORMAL, HARD

Post by GunChleoc »

Use my suggestion... or else! :twisted:

Of course, whatever works best for you is the way you should do it :)
User avatar
Helmet
Posts: 331
Joined: December 19th, 2006, 5:28 pm
Location: Florida, USA

Re: #ifdef NORMAL, HARD

Post by Helmet »

GunChleoc wrote: December 2nd, 2020, 4:53 pm Use my suggestion... or else! :twisted:

Of course, whatever works best for you is the way you should do it :)
Yay! :D

I simply don't want to mix-up NORMAL and HARD, etc., that's all. A good chunk of my mistakes arise from mixing things up.

For example: allow_recruit and allow_extra_recruit. Ugg.

Also: team_name and user_team_name. Uggggggg.

I learned what unrenamable did in like two seconds, and I've never make a mistake with it. Why? Because some developer didn't call it something confusing, like name2.
Post Reply