Master list of variables


Questions, Explanations, Howtos

User avatar

Mines Malingerer

Posts: 38

Joined: Friday, 13th April 2012, 05:35

Location: Palm Bay, Florida

Post Thursday, 21st June 2012, 17:06

Master list of variables

I know this is a bit much to ask for, but is there any chance that there is a master list of variables for this code?

For example...I see a variable called 'hurt', but is that the hurt that the character causes or receives? A master list would me determine that and with any other redundant variables that I come across without having to trace it down manually.

I would even settle for a flow chart...but who makes those anyway... not programmers. j/k

Regards,
Thurman
One out of fouw people suffews fwom Ewmuh Fudd Syndwome. Guess whaaat?

Vestibule Violator

Posts: 1567

Joined: Friday, 21st January 2011, 22:56

Post Saturday, 23rd June 2012, 08:39

Re: Master list of variables

Hahaha documentation in/of the crawl code. You are a funny man.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Saturday, 23rd June 2012, 10:40

Re: Master list of variables

Everyone knows that documenting code is useless. It's self explicit anyway.

(sarcasms)
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Mines Malingerer

Posts: 38

Joined: Friday, 13th April 2012, 05:35

Location: Palm Bay, Florida

Post Saturday, 23rd June 2012, 15:37

Re: Master list of variables

As much as I figured. It's going to be some time before I become useful with this. I am figuring out some stuff, but most is coming by making a single change, compiling, then seeing if that change did something I can notice. Then logging that change and hoping that the code doesn't change before the next pull.

I have hopes of bringing a great new feature to the game, but I want to bring it as code to the table before I go sharing what the idea is.

Anywho...thanks for the useless info. j/k

Regards,
Thurman
One out of fouw people suffews fwom Ewmuh Fudd Syndwome. Guess whaaat?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Saturday, 23rd June 2012, 18:31

Re: Master list of variables

Heh, sorry.

There has been an attempt at using doxygen to document the code. A few function and variables use doxygen style comment for self documenting, but I doubt it would be really useful to you.

Anyway, sometimes variables have a comment next to their declaration explaining their role or purpose. Otherwise, just use some tool to find declaration and occurrences of the variable to see where and how it's used. Some devs use ctags, I use eclipse, there also grep and git grep.

You can also ask in ##crawl-dev, or in the coding forum like you just did (and where I'm moving this thread btw).

Regarding coding a feature before discussing it, I can totally understand the feeling, and I did it in the past. If it can be controversial, then you take the risk that the feature will be rejected. If it's a straight interface improvement, then there's not much risk.

Have fun coding, looking forward to reviewing your work.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...
User avatar

Mines Malingerer

Posts: 38

Joined: Friday, 13th April 2012, 05:35

Location: Palm Bay, Florida

Post Sunday, 24th June 2012, 03:22

Re: Master list of variables

galehar wrote:Regarding coding a feature before discussing it, I can totally understand the feeling, and I did it in the past. If it can be controversial, then you take the risk that the feature will be rejected. If it's a straight interface improvement, then there's not much risk.


Thanks for the heads up. I see it being the before mentioned. I am looking at adding something along the lines of a Thirst factor, allowing for branches like the abyss to become more realistic, plus adding the way for additional branches like a desert scene plausible for those with the creative mindset. Depending on the climate of the branch the thirst can go up or down. This would require a Temperature variable for the climate of the branch. So Abyss gives a high thirst factor, the shoals, and the ice cave a lower one. There is already a potion of clear water, so just by increasing the frequency of that would be enough to populate areas that are barren of water. There are also the fountains that can be used as well. Spells that cause an alcohol induced behavior could as well be used to dehydrate a player, so it would open up a pilferer of other spells to be created that can cause a variant in game play with not interfering with the mission statement of DCSS.

So you can see why I would like to bring the code to the table before I even began requesting this. For some the response to accept would be based on the work load this would create. With me getting more familiar with the mechanics of Crawl, I would soon be able to supply this to keep from the decision to not do it because of the work and effort, and would give the change a better chance to be implemented based on the natural order of life in a real dungeon greater success.

What do you think?

Regards, Thurman
One out of fouw people suffews fwom Ewmuh Fudd Syndwome. Guess whaaat?

Vestibule Violator

Posts: 1567

Joined: Friday, 21st January 2011, 22:56

Post Sunday, 24th June 2012, 07:57

Re: Master list of variables

I would strongly prefer improving the clocks that already are in the game (food, piety, ood timer) to introducing another one. Also, clocks that simply kill you when they run out are problematic because crawl is a very long game, and dying because you ran out of water potions after 10 hours is just no fun. That's why the food clock is generally not threatening in crawl unless you spam ration hunger spells at everything that moves. Another thing I don't like about your suggestion is that it is yet another thing you have to do every few 100 turns. Making players drink every few 100 turns when they will realistically never run out of water is pretty pointless, plus it would be a newbie trap (like current food).

I think in a shorter game where deadly clocks can be tighter what you suggest could be quite interesting. I don't think it fits into crawl at all, though. I would prefer the piety clock to be a little tighter. It's fine that some gods don't really have a piety clock, but it could be tighter for the gods that do. AFAIK you gain piety faster at lower piety levels, so increasing piety rot (while possibly increasing piety gain a bit to compensate and keep the piety level with low turncount the same) would probably just mean slow players hang out at 5* instead of 6*. That could be pretty neat IMO, and a real incentive not to waste lots of turns on stashing and backtracking through the dungeon.
User avatar

Mines Malingerer

Posts: 38

Joined: Friday, 13th April 2012, 05:35

Location: Palm Bay, Florida

Post Tuesday, 26th June 2012, 15:39

Re: Master list of variables

minmay wrote:That doesn't serve any purpose not already served by food, just makes things more unnecessarily complicated and adds a lot of tedium.


I see. I went back over the old Atari Rogue code and various other releases and it was never implemented. I keep thinking this can turn into like a MUD environment, but then as Steven Wright once said, "You can't have everything. Where would you put it?"
One out of fouw people suffews fwom Ewmuh Fudd Syndwome. Guess whaaat?

Return to Coding

Who is online

Users browsing this forum: No registered users and 5 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.