 |
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Hi Gary:
quote: Originally posted by Gary Thomas
It requires a lot of unnecessary code to test whether the string is a legitimate one. It requires a lot of unnecessary if then else code or search loops, rather than using polymorphism, to select the correct action.
|
Error checking of the strings for everything in the econ model requires something like 15 lines of code total. There are no search loops or other such junk needed in the code I have that I know of. The names are keys in HashTables, which makes tracking down objects fairly fast. If you get null from the HashTable then you know something doesn't match up. See paragraph below your last quote if its not clear what I mean.
quote:
I cannot see where code like:
sites = getSites("farm");
is easier to manage than:
sites = getSites(SiteType.FARM);
|
And when a scenario designer wants to add the resource 'bauxite' that we don't have, my approach works fine whereas your approach requires extra code to geterate SiteType.BAUXITE at runtime or some other hack. This counterbalances all the benfits you are espousing, and that I agree are real and significant.
quote:
The point is that the second one will not compile if SiteType.FARM doesn't exist or if it is incorrectly typed. The first will, if for example "ffarm" is typed by accident. So then I
have to write code to check to see if that has happened. This I will not do. |
You needn't do it, I've already done simple name checking and it is trivial. It returns an error message as soon as it comes across any name that doesn't match. If the "farm" sector doesn't find "farm" Resources, or "farm kapital" it squawks. It would choke on any "ffarm" resource. So although any errors are not found at compile they are apparent immediately at runtime.
Seeing as you've said Resources should go in the econ package, it'll be my problem anyway. I am Not going to refactor the whole econ package right now just for this. So how about you make it internally good your way, but make it accept the strings? That way we are set to move to the FARM method at some TBD future point. I can just do it myself and take it off your hands. But I doubt you'd like the result .
Lets just agree on something and get this going so I can kill the fake terrain .
On Mine vs GoldMine, it does occur to me that it may be worth having at least a handfull of resource general types in there explicitly. FE Mine could have a type name field that could be "gold" or "tin" or... that way we could have the Mine objects override some methods in Resource that are finetuned to mining as opposed to Resources like Farmland, or Forest that behave differently.
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Yeah, I guess returning 0 if there are no sites locally will work fine. If we can I'd like to include the "is the string a legal resource" test, but I can do that if you don't want to.
quote: I am still a little curious about how different site types do different things. Is this also specified in the scenario data?
|
Economic sectors like farming or gold mining are named with strings. Usually a square will only have the four basic sectors (Food, Resources, Production, and Services [FRPS]) plus no or one special. Sectors know by a string name what resources they use. (Production works differently, I won't get into that here). Sectors produce a good named by a string. The named goods are either fundamental units in the economic system (FRPS) or are specials that can be converted into some combination of the basic goods. But the good part about specials is if in limited supply, they turn into Many units of the basic goods.
If we don't include Bauxite in the game and someone wants to they put the info in an ini file (right now its done in static blocks, but I'll update that soon). The info describes how to:
1. set up an "Aluminum" sector that
2. uses the resource "Bauxite" (ore we can just call it "Aluminum" since that's what the output is),
3. produces the good "Aluminum",
4. has an "Aluminum kapital" infrastructure class that tells how many aluminum smelters are present, and
5. enters a bunch of parameters that determine the math of how it all works in 1-4, including the conversion between Aluminum and basic goods.
If we decide we want to go the route where Aluminum is needed to build aircraft, the system will be able to handle that too, but lets not go there right now .
|
|
|  |
 |
|
Simon Loverix
|
|
Tongeren, Belgium
Apr 2001 time: 05:15
|
|
Exactly what specials isn't that important..Tin, Salt and maybe wool or cloth are OK.
I have a paragraph on specials in the ecology version I'm working on (and which is delayed longer than I like..sorry!). I link their distribution to a few prerequisites (temperature, climate, and such) and after that it's probably best to limit them to provinces or at least continents, to avoid giving everyone the same.
(This is limited to the living resources.)
A question about production, though: while requiring specific inputs for specific products could be annoying while playing, have you considered separating just energy and resource sites? Resources have been fairly easy to attain and conserve during history, but getting energy in sizable amounts, and processing it, was problematic until the IR. Until then population was most important, but after that industrial development. In game terms, FE if you have power infra you can use energy as labor.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
I am currently busy with the game.military retailoring. The area that impact me most are some relocation problems between game.militray and game.model.military, due to other classes that reference the latter. I am slowly cleaning things up and seeing what changes are needed, so don't hurry in sending me something. I already have a mess to clean up, and will be looking into orders in particular. When I am clean enough so that econ begins being a real problem, I will ask for it and send my classes. For the moment it is too much of a mess...
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
quote: I think for one of the demos soon it would be great to have a utility that would show the player all the values for elements, and units. Its not high priority, but it would help the players get the feel for what they are using. Perhaps this is premature though, and all we need is a couple of tables we can put in the manual. What do you think? |
As a first step, I suggest we show the players the xml resource file (I would attach it here, but since my ISP went *@!# this week-end I am at work and don't have the file at hand). There are three reasons to do it:
1) It is editable by the players so they can say if they understand it (would-be modders).
2) It displays fine in IE.
3) I don't have to show you how bad I am at GUI-design.
I'll add some comments to the file, though.
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:15
|
|
I have constructed a super-simple tech tree for testing with demo 5.1. The only applications are the military units, and I added a new unit: legion. These techs all depend on Military Tactics, and some of them require Metallurgy or Warhorses.
The techs that affect the economy are simple: Production and Farming. Farming and Warhorses are both under Biology. Metallurgy is under Production. Production level 5 is also a prerequisite for trireme production.
I think we should aim for the following basic functionality:
Tech requirements and helper effects work as they should.
The player can allocate research to all techs, and the mechanics work properly.
The Production and Farming techs allow more investment in the various production categories, as well as increasing efficiency a little. The amount of money spent on these production categories determines the research put into the tech. Farming should also increase the Biology tech a little.
Military Tactics increases the power of all units. Fighting battles and moving troops increases this tech.
Warhorses affects the speed or movement range of cavalry units.
Metallurgy has a small affect on unit power, and affects the cost of the unit.
Once we test the functionality of this basic system and stamp out bugs, we can increase the complexity.
Attachment: xml file.zip
This has been downloaded 7 time(s).
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:15
|
|
quote: Military Tactics increases the power of all units. Fighting battles and moving troops increases this tech.
Warhorses affects the speed or movement range of cavalry units.
Metallurgy has a small affect on unit power, and affects the cost of the unit. |
The first one could easily be put in the code since I had already made provisions for power-enhancing techs.
Rather than movement, I'd change mobility (tactical movement). I have little clue as how to implement it fast, though.
To get more than just power increase, I need to detail the tech effects in a file, and thus add some new stuff for the parser. Currently, I thought I'd have just a required tech, and required level in each element and/or unit, and use these to tweak the attack values. I can add a list of affected properties, but that means I'd put lots of tech stuff in the military file. Note you do NOT have to rewrite things like cavalry lots of time, since I have defaults, but that could be a bit complicated. Rich, can you post these effects in a specific thread? I think it requires some design before coding (although I can get Military Tactics alone in pretty fast).
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Richard, that's a Great idea. I'm embarassed we didn't think of a small self-contained test before. (At least I didn't think of paring the 'tech tree' way down.) Laurent, I wouldn't worry if you can't do everything Richard proposes, just so long as there is some fairly strong linkage between tech and miliatary. I doubt we will get even this simple a framework into D5.1, which has fairly modest goals, and will hopefully come out in 2 weeks or so. But D5.2 should work if Gary can put together a crude tech interface and put the rest of the tech hookups in. What do you think Gary?
Last edited by Mark_Everson on 07-11-2001 at 22:53
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:15
|
|
I had a feeling the proper architecture wasn't there for different tech effects like movement versus power. Bad planning on my part. I'll post in the technology thread.
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
quote: Originally posted by Gary Thomas
I am offended. The complete tech interface has been available for about seven months (that is, the "couple of weeks" it took to get D5 going). |
I wasn't talking about a Code interface, which you have done, but a Graphical User Interface component. One that tells the player about tech levels, rates of progress, where the RPs come from, and lets the player put money into tech to affect rates of change. This is not even speced out completely, so you Can't have done it already .
I would do it myself, but you wouldn't like it and insist on redoing it, so by default its your job. The hazards of having high standards .
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:15
|
|
All we need for now is something like the econ interface where the player adjusts the RP allocation.
Here's a possibility. I hope the forums will read html form tags:
Last edited by Richard Bruns on 11-11-2001 at 19:57
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:15
|
|
Yes, tables cause spooky things to happen. Yours isn't the biggest white space I've seen.
What does the RP Allocation part mean? The RPs are tagged so they automatically go wherever they're supposed to, no? So how can the player control it, other than by 'buying' RPs with investment from the treasury? At least that is the picture I've always had.
Below is what I already put in the Tech D6 thread, but since the discussion has moved back here, I'll put it here:
What do you think is best for a simple tech GUI? I suggest:
Tells the player about tech level for each tech,
possibly rate of progress,
where the RPs come from,
and lets the player put money into tech to affect rates of change, and
Estd turns to the next few application breakthroughs (Legion etc.)
The last one is to inject a little fun factor in it.
Got any other high-level ideas or suggestions for implementations of these and/or layout?
I suspect the AI could just run on autopilot (no tech spending) for now. We may not want ancient rulers to have much luck putting money into tech, but I suggest for now we should do it (perhaps overdo it) so the player has something active they can do with the tech model.
|
|
|  |
 |
|
Richard Bruns
|
|
NC, USA
Nov 1999 time: 06:15
|
|
quote: Originally posted by Mark_Everson
Yes, tables cause spooky things to happen. Yours isn't the biggest white space I've seen. |
I seem to have fixed it. The problem came from the program automatically sticking a {br} tag in whenever you hit enter. If all the html code is on one line, it won't insert all those {br} tags.
quote:
What does the RP Allocation part mean? ... So how can the player control it, other than by 'buying' RPs with investment from the treasury?
|
quote:
We may not want ancient rulers to have much luck putting money into tech, but I suggest for now we should do it (perhaps overdo it) so the player has something active they can do with the tech model.
|
That is the allocation for the discretionary RP's. We always had planned for some RP's, like ones from a forum or library, to be used by the player for any tech.
|
|
|  |
All times are GMT. The time now is 05:15. Apolyton Time is 00:15. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|