Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Ores

See

http://www.realmsbeyond.net/forums/showt...#pid589648

for how the default system of generating ores work.

Wild Game is limited to forest, which is reasonable.
Nightshade is swamp only, also reasonable. Rivers would probably make sense but that's not an option, ores are generated before rivers.
Adamantium and Crysx are Myrror only. I believe no change needed for that, either, that's one of the reasons why you would want to spend 2 picks on that retort. (Although, the advantage of having a Myrran race AND only 1 enemy wizard on your plane instead of 3 is huge, might even be too much...)
Deserts can only have gems and crystals.

While I'm mostly happy with the system, I can see a few changes being worth at least considering.
Do we want to change the distribution of ore types on Mountains or Hills?
Do we want Gems and Crystals to appear outside of deserts?
What about the reverse, putting ores in deserts?
Maybe changing the 1/7 chance of Swamp (only nightshade) into Desert (to get 1 tile deserts with gems or crystal, instead of a 1 tile swamp with Nightshade?)
Reply

Still think deserts could could a small buff. What about changing them to be something like:

A: 6/10 Gems, 3/10 quark, 1/10 mythril
M: 2/11 Gems, 4/11 quark, 2/11 crysx, 2/11 mythril, 1/11 adamantite
Reply

what about the unused ore types (lodge and one more?), can they be made work? possible would be something else for food (grain, fish, oasis, ..) or a flat production bonus, for example. an oasis could have a similar effect to a river / river mouth, if such a thing is possible.

as for existing ones, gems in mountains and ores in the desert would be realistic. part of the reason to settle otherwise subpar desert tiles at all is that they have the best bonuses tho.
along the same line, tundra should have some ores / game as its the most useless land you can have (which isnt all that realistic, and very annoying as neutrals just love to pop their cities there)
Reply

(May 30th, 2016, 08:12)Bogus Wrote: what about the unused ore types (lodge and one more?), can they be made work?

possible would be something else for food (grain, fish, ..) or a flat production bonus, for example.

Adding the effect would be easy (unless the effect is something completely different). If the game already recognizes these and displays the (currently empty in LBX) graphics for them, then nothing needs to be done there.
If it's necessary to make code to display them, that might be hard or impossible depending on space available.
Surveyor text for them will be most likely hard to add too.

I think these were meant to be not ores but stuff you build, like the stuff you can build around your cities in civ and similar games. However they most likely scrapped this concept and went with having buildings for a similar purpose (Sawmill for extra forest production bonus and Miner's Guild for extra minerals and production in general.)

I actually think the existing ores cover all kinds of resources pretty well, you can have gold, food, and power in varying amounts.
Population growth is also covered since it is entirely based on the terrain.
Production, there are only ores that speed up units, but for the rest, almost all terrain type has some sort of a production modifier in the first place (mountains being the "big" production source)

So this leaves effects that do not produce the usual resources and give other benefits instead. Adamantium and Mithril covers powering up units, and Nightshade covers city protection. Items, spells, etc are better off kept as treasure.

I don't think there is anything ores should be doing but currently aren't, but if anyone has good ideas, do tell.
I guess we could have a research producing "ore", like "Witches hut" in swamps, and a casting skill producing one in, maybe, deserts? "Ivory Tower" maybe? Or we could have "Orihalcon" that grants a bonus magical ranged attack and defense on magical units only (priests, shaman, etc) and produces power like mithril and adamant. None of these are really all that new but might be fun, especially the orihalcon.
Reply

there are some places in the code where hunters lodge is mentioned and the function that displays wild game seems to also display the lodge by default, and there is memory reserved for the image adress. just changing the picture in the lbx and making some lodges with the tweaker wasnt enough tho.
Reply

I would like to see a 'fixed production' bonus (e.g. +5) in forests, 'witches hut' is not a bad idea (+5 research?), and 'Orihalcon' sounds like a lot of fun (+1 ranged and +2 armor to range-only units, or +1 to 2 magical ranged to 'all' units)

Reply

(May 30th, 2016, 09:54)Bogus Wrote: there are some places in the code where hunters lodge is mentioned and the function that displays wild game seems to also display the lodge by default, and there is memory reserved for the image adress. just changing the picture in the lbx and making some lodges with the tweaker wasnt enough tho.

Found it. It looks like the hunter's lodge can only be displayed if the tile also has wild game.

Looking at where the data is loaded from the LBX (one of the tight spots), only lisiting where unused data is being loaded :
59h is loaded into an unused variable, it's titled "city worked area" in the LBX.
5Ah is Hunter's Lodge.

45h in the LBX is an unused slot for node auras but it's not loaded so we can't use it. It's the wrong format anyway (5 images not 1)
2Dh is the image for "No Road", the case when a road is built stand-alone not connected to anything else. Have to check in game but I think this is not used, such roads are just invisible. We might be able to use this, although fixing it to actually show the road where it should would be even better.
58h is titled "lumber camp" in the LBX and is also unused. This and hunter's lodge were meant as stuff a city can build I assume.
57h is titled "mine", see above.
4Ch is "mud" and I don't think this is in any way related to the combat one. Probably also unused. This actually opens up making Earth to Mud work as an overland spell with some effect, though doing it would be extremely hard.

This is up to 7 possible new ores so the LBX data is not going to be the bottleneck.

Now, displaying the stuff. Ores 1-9 are stored in an array and displayed that way. If we could somehow extend this array, then we have the jackpot as it means we can add new ores without needing to change the code at all.

they are in the memory like this (2 bytes each) :
Hunters Lodge
Nightshade
WildGame
Mine
Corruption
Mud
2 unused bytes, I'm assuming this is the 0th element of the ore array which is unused
Actual Ores
node auras, roads etc
Lumbering Site

Meaning if we rearrange these, we can have up to 4 new ores inside the array, but then all references to the moved stuff (Corrpution, Nightshade, Wild Game, ores) have to be moved. Fortunately all of these seem to be used exactly once.
Also moving the node aura and roads arrays allows one more but that's a bit excessive work for it.
One more is possible by not using the ore array and taking advantage of the existing unused code of Hunter's Lodge.

So up to 4-5 ores are doable without too much trouble so far.

Moving forward, surveyor.
Ores are displayed through a "switch" statement. All the branches contain some redundant code so removing the whole thing and replacing by "cmp ore,x jnz a mov ax,string1 mov bx,string2 a:" for each existing and new ore type, then moving the calls to display the strings to the end would work. This part is quite a bit of a work but not too bad. Finding enough space in the data segment to type in the string constants of the new ores is...idk, probably easy, I think I have some leftover bytes somewhere for that.

Which finally leaves us with the effect.

-additional research would be very hard to do since research related procedures most likely don't even fetch the list of tiles belonging to the city since nothing uses that information.
-additional flat production bonus is more doable, though I'm not sure what kind of "ore" would do that. I mean something like a windmill isn't a natural resource, and raw materials won't build you stuff by themselves.
-finally the orihalcon effect is reasonably doable, however it would not be a new weapon icon type as mithril and adamant, instead it has to be an icon on the unit like a buff or ability. We can use the flag for the currently unused "Giant Strength" to store this information. Effect can be anything, my current preference is +2 magical ranged (only if the unit has one) and +1 resistance (for every unit). Obviously, an alchemist's guild would be required.
Reply

To sum it up, these are the current ideas that might or might not be added :

1. Witch Hut - On swamps, +5 research
2. Orihalcon - In deserts, +2 magical ranged attack and +1 resistance to units if alchemist guild is present
3. X - +5 production, in forests. Needs a name (is there ANY natural resource that can produce buildings without requiring manpower? in a forest? some sort of an animal maybe?)
4. Revising my old idea for nightshade : Vipers in forest, add poison 1 to units. Can't be done if Orihalcon is, there is only one unused unit buff slot. I believe Orihalcon is a better way to use that slot.

I'm currently leaning towards doing Orihalcon only. (most interesting and easiest to do)
Reply

An interesting thing I discovered while digging around in the LBX file used by ores : city graphics for the overland map have two version, the one we know and another which shows the same city but without city walls around them. The latter isn't used by the game.
Reply

Would be cool to have it triggered by the presence of any kind of wall.
Reply



Forum Jump: