How to edit terrain resource yields in Civ1?

Blake00

CFC Mod Archivist & Social Media Helper
Moderator
Supporter
Joined
Sep 24, 2016
Messages
2,571
Location
Australia
Hey guys anyone got an answer to @Jason Lee Blue 's question below of editing terrain resource yields in Civ1? I would have thought JCivEd included this but he's already tried that and found nothing. Was there some old editor or hex guide that allowed people to do this back in the day?

Rather cool to hear that he successfully did it in the SNES version of Civ1 though.
I am... wringing my sweater looking for a modding/editing program that can edit basic terrain yields.. and maybe also special-resource-tile yielding (like, make oasis' have 5 shields and 10 food for basic) or stuff like how much shields a mine would add to a hill... like 8 instead of 3 or whatever. ive been digging around all day and all the programs that (seem?) to have this feature won't run on my windows 7 home 64bit. I did get Jcived to work for civdos(thats what I have, civdos) but that program, dispite it's beauty, doesn't seem to have a yield/terrain resources editor in it either. :( extra cold tired and sad. so.. where do I go? I already have my own custom little map with custom edited unit attacks/defenses etc, just to fart around on my own map/mod. I love modding and haxoring games(mildly anyway. im no programmer, just have experience with hex editing old dos games and stuff. I even managed to find the land-value-hex alterations for snes simcity(rom) but anyway... where can I go? I think I tried just about every download program for civdos on here and all of em seem to want 32 bit? 16? *shrug*
 
There's a structure in memory about terrain properties. It writes into RAM from .exe data, so you can find it in exe file end edit. You can find it by terrain names (search, for example "Desert" or "Grassland" in some hex editor). Address: 0x24eb2 in .05 (packed exe).
12 bytes: name of terrain type.
1 byte: movement cost.
1 byte: defence bonus (grass/plain (0%) is 2, so, for example, for 150% bonus value should be 5)
1 byte: food production
1 byte: shields production
1 byte: trade bonus
After that, there's production from corresponding squares with special resources (and their names: Oasis, Horses...)

There's also table with irrigation and mining bonuses and time, but can't find it in exe just now.

EDIT: actually, Gowron documented this and many other data tables long time ago:
https://forums.civfanatics.com/threads/modding-civilization-i-data-tables.331078/
 
Last edited:
well, luckily I can find my way around with this awesome hex editor I got (freeware) called "HxD"

anyway, I saw the feature on one of the programs here: https://forums.civfanatics.com/resources/civhack-v1-0.2804/
claims to be able to do it. but when I try to open the program in windows 7 home 64 bit, it complains that I need a different bit version for windows 7
like 32 bit. -_-
it would be nice to figure out how to run this.. I tried to run a virtual machine for "virtual windows 98" and all of that-- program wont run, no luck. also tried to run
this editor in dosbox... still no luck *scratches head*

also, the snes version I meant was not for Civ but for snes SIMCITY, sorry I should've said it different. back in the day I had a game genie for my snes simcity cart and managed to find the landvalue alteration stuff, thanks to the fact I knew what I was looking for... just took patience and repetition digging for codes.

later on just a few years ago with the help of a friend online, managed to find an identical hex byte for landvalues by hex editing the ROM for simcity (english version) !!! anyway, tons of fun there yeah. I remember when me and my friend were doing that we also managed to find the hex-chunk of data for changing map squares, so we could for instance "steal" the map of tokyo from the scenario and cut-paste the map to a regular savegame. even more fun. I have lots of tricks for simcity it's one of my favorite games of all, as are the CIV games as well. anyhoo, if anyone wants to talk simcity with me thats another topic! lol!
 
I managed to get the "civhack" to work in dosbox just now, by launching manually instead of the auto-dosbox-launcher feature in dosbox 0.74-3 !!! but when I went to alter the values it's all weird and not right so I figure it's probably for civwin? *sigh* pthth! oh well, i'm grateful for those hex locations you showed me i'll just edit them raw for now.
 
I managed to get the "civhack" to work in dosbox just now, by launching manually instead of the auto-dosbox-launcher feature in dosbox 0.74-3 !!! but when I went to alter the values it's all weird and not right so I figure it's probably for civwin? *sigh* pthth! oh well, i'm grateful for those hex locations you showed me i'll just edit them raw for now.

I managed to successfully edit some terrain stuff, even coal and what not! it works but it's super tedious. lots of rows of 1's and 0's and... what does what! *gamecrash* etc! ;) ...would this be too hard to put into a simple editor of some kind? I can do simple hexediting but i'm no a programmer :/
 
Oh man I loved SimCity and SimCity2000 back in the day but unfortunately the discovery of Civ was the death of my obsession with SimCity games as I sadly never went back haha. I did hear about the leaked lost Sim City for NES being released a couple of years back which was cool.

I managed to get the "civhack" to work in dosbox just now, by launching manually instead of the auto-dosbox-launcher feature in dosbox 0.74-3 !!! but when I went to alter the values it's all weird and not right so I figure it's probably for civwin? *sigh* pthth! oh well, i'm grateful for those hex locations you showed me i'll just edit them raw for now.

Hmm well if you think the CivHack editor is for CivWin then this thread might interest you as I recently created a tour video and a step by step guide for people on how to get CivWin working on a modern machine (using a XP VM via Virtual Box) in modern HD resolutions and with CivDOS graphics and music using mods. If you get all that working you can try CivHack with a savegame form that. If there's a CivDOS savegame you're fond of that you want to you you can use CivCracker Editor by MountainMn10 to convert CivDOS savegames to CivWin which I also show off in the video:
https://forums.civfanatics.com/thre...ization-1-hd-tour-with-mods-scenarios.673292/

 
About irrigation/mining bonuses and time you can find all info in the first post here:
https://forums.civfanatics.com/threads/modding-civilization-i-data-tables.331078/

You can find this irrigation/mining data at 0x24FEB at packed exe ver .05 (0x2DBFA in unpacked .05)
It starts with FE FF 05 00 FE FF 05 00 00, you can find it by searching this sequence.

Some correction for the post by Gowron: "terrain ID of resulting terrain" is different from normal order (Desert, Plains, Grassland...) Instead, ID of corresponding color of the map data used here. 1: ocean, 2: forest 3: swamp 6: plains 7: tundra 9: river 0xA grassland 0xB jungle 0xC hills 0xD mountains 0xE desert 0xF arctic. Other colors are unused and I have no idea what will happen if you will try to add them. Even JCivED forbids to create such terrain (0,4,5 or 8).

Warning: game does not re-calculates terrain value for AI or "where are oceans and continents" maps after terraforming. It's so even for already existing terraforming in normal game: after you change swamp to grassland, AI anyway will think that cost of terrain is 0 and will never found a city here. And other way around, if you change grass/plains to forest, AI still can found a city in this tile (even if normally it never can found a city in a forest).

Interesting idea is to change all irrigation/mining time (in cases when AI can do it) to minimum, then you can get sort of effect of "fast settler cheat", but AI civ will also have it, so it will be more fair, I think.

Road/railroad time is defined by movement rate of terrain, you cannot change it manually.
And I have no idea about Fortresses. Probably fortress building time should be defined by movement speed too (darkpanda leave logic for that somewhere, I don't remember for sure, but I think that it depends on movement rate). But there's some bug or something and in actual game all Fortresses that have been started at the same turn always will be finished at same turn, and in some cases they will never be finished or at least it will take like forever.
 
Last edited:
Oh man I loved SimCity and SimCity2000 back in the day but unfortunately the discovery of Civ was the death of my obsession with SimCity games as I sadly never went back haha. I did hear about the leaked lost Sim City for NES being released a couple of years back which was cool.



Hmm well if you think the CivHack editor is for CivWin then this thread might interest you as I recently created a tour video and a step by step guide for people on how to get CivWin working on a modern machine (using a XP VM via Virtual Box) in modern HD resolutions and with CivDOS graphics and music using mods. If you get all that working you can try CivHack with a savegame form that. If there's a CivDOS savegame you're fond of that you want to you you can use CivCracker Editor by MountainMn10 to convert CivDOS savegames to CivWin which I also show off in the video:
https://forums.civfanatics.com/thre...ization-1-hd-tour-with-mods-scenarios.673292/


I got a working Oracle virtual machine running on my win-7 machine, and set up some basics (ram limits, a 4 gig virtual harddrive, etc.) but I have no idea how to really get it to emulate the win 98 i want it to. do you have to have a windows 98 cd and do a literal re-install? would you mind making a video on just how to set this up for a prime working CivWin machine/emulation??? im lucky enough that I got it to install right on this machine, lol. at least THAT didn't break. as for now i'm happy with some of my hex editing thanks to Tupi's first reply there and ive got some fun terrain values going on (I made mountains to be the ultimate/semi-ultimate prize terrain in the game; I made them have a default value of 20 shields, lol. and some other really fun tweaks with rivers and forest and stuff... I figure IRL that FOREST ought to be some prime resource real-estate being pine/fir/maple whatever, as wood should naturally be some of the most sought out resource, so I amped that up as well. and messed with some of my favorite units, making knights have 4 attack and 7 defense, etc etc. lol, lots of fun. ....as for your MOD here, I would need to get a virtual 98 box running first and install CivWin on the thing, I presume. so lets focus on that first I suppose? :p
 
You'd be better off setting up a Windows XP virtual machine as I don't think Windows 98 supports modern resolutions, or at least I wasn't able to get it to.

However if that's all you've got then yeah its a matter of setting up the virtual machine and telling it in settings to boot off the optical drive first (kind of like what we did in the bios back in the day haha). Then still in settings you set the virtual optical drive to either be your real life one (with your cd loaded into it) or a virtual one with a cd iso file loaded into it. Then you start the virtual machine it'll boot from the cd and you go through the good old classic cd windows install process.

There's plenty of videos out there which are much better to watch than reading written instructions.. you just type in "Windows 98 Virtualbox" or "Windows XP Virtualbox" into google and multiple videos will come up that show you how to set everything up.

eg win 98

Win XP
 
I may figure this out.... EVENTUALLY. lol. for now im gonna just chill with my mountains that produce 20 production and other fun tweaks i did with terrain and units just using the cold figures tupi gave me here! lol!
 
ok ive been farting around on this. I was not aware that you had to actually have a win XP DISC for this??? I thought it was just an emulator of somekind.. well, discs I have not. ISO's of windows XP I have not... so where do we go from here??
 
Top Bottom