Quantitative Resources

Hello!

Good to see there's work progressing on this idea.
Do/would you still require help with coding?

At this point, probably not with the actual resource coding, since I've finally immersed myself in the world of the SDK. However, I still would like to retrain the AI to gather resources more aggressively, but this is beyond my ability so anyone who feels up to the task should apply. :) I will also need people to test this out and find bugs, crashes, and silly mistakes on my part to perfect it.

I appreciate everyone's contributions over the last year (yes, it has been nearly a year since this discussion started) and I hope to have a basic version out soon. I'm currently testing it in conjunction with another project I'm working on, so hopefully when I release the beta it will be relatively bug-free. I know several people wanted it for Colonization and modern scenarios, so I'm sure it will get a lot of use.
 
Hello!

Pity, I looked forward to the coding part :).
As for AI coding: I don't have extensive experience with that, but I'm a fast learner, especially since there's a few things to tweak AI-wise for my own Civ IV additions as well. Let me know if there'd be interest from your side.
 
Hey Gaius,

I would not mind testing your system once you have a beta done, I have been looking forward to this sort of Civ mod for a long time.
 
Glad to here you got the hang of the SDK Gaius. Really looking forward to seeing what you come up with. :king:
 
1. It would over-complicate the game. This game is already newcomer unfriendly enough.
2. With a turn lasting a couple years I don't know if it would be so realistic if you could "stockpile" horses or food.
3. Better alternative: let's introduce a rule one supports three; let's say that if you have 1 source of horses you may produce calvary units in three cities simultaneously max, the same for stone, iron and others.
4. Advanced technologies with railroads would give you a chance to extract resources at a higher rate, so then one supports six.
5. For :) and :health: resources it would be that the :) is delivered to 3(6)cities with the highest :mad: and :health: to 3(6) cities with highest :yuck:.
 
Hello Gaius Octavius. I've read the first page, but I can't afford to read everything else, so pardon me if you guys have already discussed what I'm saying.

First off, I'm glad someone else has had similar ideas about quantitative resources. I myself found that 1 source of anything would satisfy a world power and enable you to build say a unit that requires that resource in every city at once, very disturbing. I love your ideas of the counters, turn generation, and eventual depletion. I've been thinking of that myself.

I'm not a good coder, I know squat about Python, and I barely get enough time on a computer to look at this site or play Civ. But I have tried a few simple ideas myself. You know how mines have that small chance to create a resource? Well, I did a short XML edit and gave that ability increased to all the resource collecting improvements (and wheat for the windmill, it looks so gosh darn cool (uncool statement, I know)). It worked, and I was contemplating working that instantaneous resource creation into balanced play. Your ideas better. Much better. Please keep up the good work, and I would offer to test the beta. Let me know here, since my e-mail is a little haywire right now (When I go to check 2 days after the last time, there's 300 e-mails of spam and 4 important things. Even the spam filter doesn't completely work.
 
Hi all involved with this project. I am starting development on a full game mod and would be interested in implementing something like this in it. Just wanted to find out how development is going and if there's a beta out yet. I'll also volunteer to help out with this if there's anything fairly basic you might need done. I have basic understanding of C++ and Python, and am pretty good with the XML end.
 
1. It would over-complicate the game. This game is already newcomer unfriendly enough.

No-one is forcing you to play it :)

2. With a turn lasting a couple years I don't know if it would be so realistic if you could "stockpile" horses or food.

Yes, for the civ game, in the early turns, you are right, but for the modern era it should work quite well, and in mods that use it with weeks or months as turns (thinking WW2 mods here)


3. Better alternative: let's introduce a rule one supports three; let's say that if you have 1 source of horses you may produce calvary units in three cities simultaneously max, the same for stone, iron and others.

You still have the problem of which cities get it, and you still have the problem that three cities could mean three large productive cities or three low production cities. Plus you would need lots of tiles with the same resource to support an entire empire

4. Advanced technologies with railroads would give you a chance to extract resources at a higher rate, so then one supports six.

Agree

5. For :) and :health: resources it would be that the :) is delivered to 3(6)cities with the highest :mad: and :health: to 3(6) cities with highest :yuck

Would make sense, but may require more coding :( (unless Gaius Octavius has done it already!) But the current system works quite well anyway.

Really looking forward to this though! :goodjob:
 
No-one is forcing you to play it :) *1


You still have the problem of which cities get it, and you still have the problem that three cities could mean three large productive cities or three low production cities. Plus you would need lots of tiles with the same resource to support an entire empire *2

1. I'm not talking about myself.
2. You don't. The cities who grab the resource first, can use it. If you've already ordered i.e. to produce walls in three cities and have only one source of it no other city can get the production benefit as long as one of those cities ceases or finishes production.
 
1. It would over-complicate the game. This game is already newcomer unfriendly enough.

It may not be newbie friendly, but thankfully there are thousands of us that are not newbs.
 
I would bet that at least 90% of civ4 players are people who played a previous part of the game.
 
Hello!

I'd be interested to see what Gaius has come up with as well; I "only" added new XML tags for resources which allow to if they're restricted (metals, oil) or if they're regenerative (food), specify minimum/maximum capacity and minimum/maximum output per turn.
The actual values used for capacity/output will be assigned randomly on plot initialization and on CvPlot::doTurn(), respectively. Also on schedule is a per city and/or per player stockpile for resources intended as central storage structure for the amounts generated.

It could save Gaius (or whomever is also working on this idea) and me quite some work if we coordinated the plans for adding quantified resources.

Regards,
Fabian Aichele

*Jeckel pokes GO with a stick a few times*

Any progress...? :band:
 
There has been quite a bit of progress. If all goes well, sometime (hopefully soon) you will see examples of this in action. ;)

The only trouble I ran into has to do with the odd arrangement of resource prereqs. Apparently, you can only set a maximum of two AND requirements for a unit. Struck me as odd, but I tried to avoid that problem by making the resource check semi-independent of the bonus prereq.

What this means is that if you set a tank to require 100 oil and 100 iron, you could theoretically give it no binary resource prereq (i.e. BONUS_OIL) but give it a quantitative requirement. This is not an ideal solution but it is a temporary workaround until I get something better arranged. I tried to leave the binary reqs in so that the AI will still understand it needs to acquire more of that resource. It gives more weight to a resource if many units require it, correct?
 
If any of you have read the new Colonization preview, you might have noticed something interesting:

The land I settled was rich in sugar, and my colonist automatically began harvesting a crop for export. (Colony management is heavily automated by default, but you can micromanage each colonist’s job assignment.) In a couple of turns, I loaded a few tons of sugar into my ship’s hold and sailed back to Holland to sell it. It was a small payday, but it was enough to recruit a master scout to uncover the map around my new colony.

Fortunately, Dan Jose produced more lumber than it could use. The lumber itself was next to worthless, but I found ways to turn it to my advantage: I built a trade wagon and began running wood to Dan Francisco. This freed up the colonist who had been harvesting lumber there, so I put him to work distilling embargoed sugar into freely traded rum. The first shipment of fine colonial rum brought in a huge wad of cash, since refined goods are much more valuable than raw materials.

It seems that a quantified resource system will be in Colonization after all. :)
 
If any of you have read the new Colonization preview, you might have noticed something interesting:





It seems that a quantified resource system will be in Colonization after all. :)

It damn well better be. Col wouldn't be anything without QR. The question is, will the paid-for, commercial version that was worked on by a team of PAID programmers be $50 better then the modded QR your working on + the XML/Python/DLL BtS mod I'm working on...

Pessamisium aside, Col is a pretty simple game in concept and functions, not that different from standard Civ4, and easly doable on the Civ4 engine by a salary programming team. :)


Back on topic, if I understand you right, you added a new tag to the UnitInfos to allow the setting of a quanity of various resources. And you left the normal prereq bonus tag alone?

If that is what you are saying, then yes, that is not just a good work around, but is the correct way it should be done. If you want a swordsman that requires 100 iron they you would set that tag and also set prereq bonus tag to BONUS_IRON. This will make it easyer to let the AI know it needs iron to build the unit, but it would also leave you the option of setting a non-QR resourse, say BONUS_IRON, for a Iron Horsearcher (they don't need much iron, you just have to control a resource of it) and 100 horses (hoarses being their main requirement).
 
It damn well better be. Col wouldn't be anything without QR. The question is, will the paid-for, commercial version that was worked on by a team of PAID programmers be $50 better then the modded QR your working on + the XML/Python/DLL BtS mod I'm working on...

Pessamisium aside, Col is a pretty simple game in concept and functions, not that different from standard Civ4, and easly doable on the Civ4 engine by a salary programming team. :)

If it is not I will be [pissed]

:lol:

Back on topic, if I understand you right, you added a new tag to the UnitInfos to allow the setting of a quanity of various resources. And you left the normal prereq bonus tag alone?

If that is what you are saying, then yes, that is not just a good work around, but is the correct way it should be done. If you want a swordsman that requires 100 iron they you would set that tag and also set prereq bonus tag to BONUS_IRON. This will make it easyer to let the AI know it needs iron to build the unit, but it would also leave you the option of setting a non-QR resourse, say BONUS_IRON, for a Iron Horsearcher (they don't need much iron, you just have to control a resource of it) and 100 horses (hoarses being their main requirement).

Yes, I had thought of that too. Ideally, you would have a second tag for the resource in question though, such as:

<Type>BONUS_IRON</Type>
<Amount>100</Amount>

Which would let you define it all in one place. You could leave this at 0 to define a non-quantified resource, such as horses, which would merely require its presence but not an active stockpile. It will be nice for a future version but I have remained content with just getting the thing to work at the moment. :) (And it does.)

The reason the second way is superior is because it's easier to mod. The current way, you have to add new SDK variables and new XML tags for each quantified resource you want. This way, it would be very compact.
 
I agree, extra xml tags and what not is for a future version. Your current track seems to be the right one. But a single tag like
Code:
			<QuantReasources>
				<QuantReasource>
					<BonusType>BONUS_IRON</BonusType>
					<iAmount>100</iAmount>
				</QuantReasource>
				<QuantReasource>
					<BonusType>BONUS_STONE</BonusType>
					<iAmount>10</iAmount>
				</QuantReasource>
			</QuantReasources>
will be all you need in a UnitInfo.

You have any plans on when we can see an alpha version?
 
I can't say much for a separate alpha right now, since the first version of this mod has been specifically designed for something very, er... specific. However, the update to 3.17 has thrown me completely off schedule and it will be delayed accordingly. I might release some screenshots after I get the new patch installed and the code updated.
 
Top Bottom