Need some advice from coding experts...

Dom Pedro II

Modder For Life
Joined
Apr 3, 2002
Messages
6,811
Location
Exit 16, New Jersey
Hey, folks,

Since the release of the NIF export for 3DS Max, I've been working on and off on units (ships and animals mostly right now) for my mod and hopefully I'll release some in the not-to-distant future. I've got the graphics... I can do that.

However, I'm still having trouble wrapping my head around the coding I'm going to need to do to get my mod up and running.

What I need to do right now is create a system that will allow me collect, process, and display information on the map. If I could actually add new attributes to map tiles, that would be the ideal, but I can work with greater restrictions.

Essentially, I need to add attributes such as:
  • rural population on non-city tiles (as opposed to the populations of the tiles with cities on them)
  • demographic information on the population in the tile
  • quantities of resources on the tile (I want to make it so that one supply of iron, etc. won't be able to accomodate construction of units throughout the empire and such)
  • I also want information on climate, and fertility, and ultimately
  • these things will be used to calculate desirability which in turn will be used to determine population growth of the rural population on the tiles.

Now, if I can add these things to the existing tile attributes, that would be ideal. However, (since I've assumed that this will not be possible), I've been considering creating arrays with the map dimensions and then filling the arrays with the information collected from the existing map data.

I would then like to be able to display that information on the screen... if I could create some kind of overlay like the grid or city radius features, that would be preferrable, but if it can only be done with a pop up window and some kind of 2D "drawn" display like the minimap, then that's alright too.

I hope some of you out there will be able to give me a push in the right direction. :)
 
I really don't see what about it would take years of experience for... I mean, what I'm essentially talking about is a series of arrays, which, on its own, is simple enough... it's hooking it up to the existing code I'm not certain about.
 
If you are quick on the uptake it won't take years. What the Lord is reffering to is the finicky nature of programs. To look at someone else's code and then be able to put in your code, with out introducing unfamiliar or subtle bugs can be difficult.

Some things to note as you start:
1) most of it isn't as hard as it looks and the rest is much worse.
2) people tend to try to do really difficult things when they start out
3) if you are begining what you want to do is take tutorials for the complete languages (python and c++) and learn how they work. Learning in parts tends to cause problems because you haven't learned the compiler errors/common mistakes yet.
4) You will need a solid design before you start. As a beginer you should try to understand the object model and your plan to change it. Trying to wing it won't help, you will spend years trying to fix it if you don't learn the languages properly.
and lastly try it and if it doesn't work start over. I have seen employers keep at a code base that should be tossed because they look at how much time they spent on it. You should only look at how much time it takes to fix. But of course time estimates are the hardest thing to come up with.

My basic advice to you is that the SDK is hot right now, if you have other stuff to do then do it (and learn python/c++) then when a good set of documentation and tools have been built up, use that to learn how to deal with the files and get exactly what you want. You should only have to wait a month and you will save more time then if you started now.

If you have to start now find the closest thing and copy it exactly. And backup after every change. The structure will be the same 99% of the time and you can hope you never hit that 1% that will make you tear your hair out.

Good Luck
 
Back
Top Bottom