JCivED - a toolbox for Civilization

:bump: Bringing back a topic from a month ago...
Can you change the equation for the luxury rate to ignore the science and tax rates? With this you can change the tax and science to 100%, and still have happy citizens..
 
Wow this is really good! :worship:

yes it is :)
I wish I had more free time on my hands.
Actually, I don't... I love my job and have several other hobbies, but you know what I mean. (careful what you wish, you just might get it)

But something tells me that by the time I retire I still love and play this game. :D
 
:bump: Bringing back a topic from a month ago...
Can you change the equation for the luxury rate to ignore the science and tax rates? With this you can change the tax and science to 100%, and still have happy citizens..

Unfortunately, I am not working on that right now, although my current task may result in much better support for all kinds of patches, or even "mods"...

Just to give you an idea, I have re-implemented the "uncompress" routine that transforms the native CIV.EXE into a clear CIV.EXE that is manageable with a disassembler (IDA). In other words, I have re-implemented "unp.exe" into JCivED.

While doing so, I added my own features, which means that JCivED is now able to make a direct byte-to-byte mapping between IDA-based addresses and segments and the native CIV.EXE.

I have already designed a raw, single "data" patch for CIV.EXE, that basically enables you to modify almost everything from its "data segments", that means:
  • default Civ/Nation/Leaders names,
  • terrain name and stats,
  • science advances name and setup,
  • default unit types setup,
  • city improvements and wonder setup (name, cost, tech requirements, etc. but not effect though)
  • leader characteristics,
  • earth starting positions,
  • Civ colors,
  • and last but not least nearly all text within CIV.EXE: short messages, menus, hall of fame names, diplomacy text, etc...

The data mapping is in place (for 474.01), and there is a very basic UI to support the above, which is really not friendly at all:

data_mod_1.png data_mod_2.png data_mod_3.png

To give such a patch any value, I am also currently investigating possibilities to "export" customized patches, that means to enable distributable mods. Of course, it would be even better to combine CIV.EXE customized modding with PIC modding, for example, and be able for whoever has time or will to create entire mods, easy to create and install... But that's a long shot here.

Anyways, virtually all patches designed so far, and in the future, can rely on this kind of mapping, so that will be my basis to create further patches, such as the one you request here.

Also, my other major priority CIV-wise lies in the direction of other threads around here, relating to "cloning" and "moddability"...
 
Really great work darkpanda! I tip my tophat to you.

I have been working with civ.exe in IDA as well, but my progress is nowhere near yours. I think what I'm struggling with are the address changes from the packed exe to the unpacked exe (i can't find any xref's to data in the unpacked, and i'm guessing that's why).

I think it is a shame you use 474.01 as a basis for your work. I consider playing this version almost like cheating because it's so significantly easier than 474.05.
 
I do have one question, when you click revert patch, does it take your code back to civ's original code or what it was before you patched the file (if it wasn't the original code..)?

Along these same lines, would it be possible to include a button to restore default values? For example, you make a lot of changes to your exe, and then one day you want to play the game with the original values. Instead of looking for the original exe, it would be quite helpful to have a restore defaults option for each section. Something to consider.
Thanks.
 
That sounds great. It also sounds like a large project. :crazyeye:
What language is civ written in?

This cannot be determined by looking at the CIV.EXE assembly - unless for very expert compiler gurus I suppose... My best guess, though, is that it was written in C, since I don't see what other practical language could be used at that time to write programs and games, and I guess a portion of native ASM as well.

Really great work darkpanda! I tip my tophat to you.

I have been working with civ.exe in IDA as well, but my progress is nowhere near yours. I think what I'm struggling with are the address changes from the packed exe to the unpacked exe (i can't find any xref's to data in the unpacked, and i'm guessing that's why).

I think it is a shame you use 474.01 as a basis for your work. I consider playing this version almost like cheating because it's so significantly easier than 474.05.

I think I mentioned it somewhere else, but my main reasons for using 474.01 are: 1) it is the first released version, so all other versions are just variations from this one and 2) the fact that it contains the DEBUG mode (Shift+56) definitely helped deciphering many data elements and code.

I do have one question, when you click revert patch, does it take your code back to civ's original code or what it was before you patched the file (if it wasn't the original code..)?

Along these same lines, would it be possible to include a button to restore default values? For example, you make a lot of changes to your exe, and then one day you want to play the game with the original values. Instead of looking for the original exe, it would be quite helpful to have a restore defaults option for each section. Something to consider.
Thanks.

Since JCivED does not maintain backup copies of your CIV.EXE, the Revert button changes the bytes back to their original value from the original CIV.EXE, not to the values that you had before.
 
I think I mentioned it somewhere else, but my main reasons for using 474.01 are: 1) it is the first released version, so all other versions are just variations from this one and 2) the fact that it contains the DEBUG mode (Shift+56) definitely helped deciphering many data elements and code.

Good point. I had almost forgot about the debug mode. And I suppose once you identify what a portion of code does in 474.01 it's a small task to find the corresponding code in 474.05 since it will be the exact same sequence of bytes in most cases.
 
I remember that Terraform has the ability to read a text file and create map out of it.
For example 'o' represents ocean and 'g' grassland.
I would request to have this feature in the JCived. But it's nothing very important... I don't know if anyone else really needs it.
 
I remember that Terraform has the ability to read a text file and create map out of it.
For example 'o' represents ocean and 'g' grassland.
I would request to have this feature in the JCived. But it's nothing very important... I don't know if anyone else really needs it.

My intentions with JCivED are definitely to support anything TerraForm would support, and more... Lately I'm focused on other things, but what you're asking should be really straightforward to implement - just like the map loading from color bitmap I demonstrated in the past, but actually did not deliver in JCivED.

I'll have a look at it.

For the record: expressing your requirements in this thread, for what you'd like to see in JCivED is absolutely the right way to see them eventually make their way into JCivED :)
So please, do not hesitate to ask.
 
Is it possible to run JCivED in Linux - Wine (= generic win(xp) enviroment more or less, contributes for example the use of different directX versions) ?
OR:
Has anybody here experience to run JCivED or TERRAFORM with winXP, installed within wine? (I have less hope)

... since years now i play civ1 just with dosbox within linux ...
( that's why i'm not able to use *.msi - Terraform anymore :sad:
i would have to set up an own older pc just to work/edit with that...)

- and i don't like to buy win7 / win8.1 (well - never say never, but not in nearest future).
 
Well, I suggest you try to run JCivED directly in linux, since it's a Pure Java application.

Provided you have Java 7 installed on your Linux (I didn't try with the recently released Java 8, yet, but it should be ok too), just open a console to where you unzipped JCivED and execute the following command:
Code:
java -jar jcived.jar

I don't have a Linux with Java 7 at hand, so if you meet any issues, please share.
 
Well, I suggest you try to run JCivED directly in linux, since it's a Pure Java application. ...
...
I don't have a Linux with Java 7 at hand, so if you meet any issues, please share.
Oh great, i will try this next.

.
.

i just found
I have about twenty different civ.exe files with various different tile yields, unit abilities, etc. it's still fun to try something new in Civ I. The mechanics are so straightforward that it makes for really flexible modding. ...
in another thread.

Is it possible to share JCivED-patched civ.exes ?
I remember (and did see Dacks link yesterday)
at apollyton forums 474.05 is shared as latest fix 'by microprose in 1991' -
so why not share (confirmed, tested, with description what is changed) civ.exe mods of 2014 (if possible)?
 
...
Provided you have Java 7 installed on your Linux (I didn't try with the recently released Java 8, yet, but it should be ok too), just open a console to where you unzipped JCivED and execute the following command:
Code:
java -jar jcived.jar
...

I did install JAVA_7 now and it seems to work...

...output
Code:
goldberg@goldberg:~/JCivED$ java -jar jcived.jar
Loading PIC sprites.............................................. 909 sprites loaded
Loading SVE data models:
  DM_SVE_EN.txt... OK
  DM_SVE_FR.txt... OK
  memory_map_SVE_header.txt... OK
Loading and pre-rendering FONTS.CV...................................................... OK
Launching JCivED...

okay
i can load maps, change, re-paint and save them

...done
 
What i found out:
I am unable to remove the startposition = 'first city' of the Germans and the Babylonians in complete.
i did move both cities to the desired location,
( = did alter the x and y of those cities in the DATA screen|tab,
the x in the startlocations tabs at the correct new location, too)
(and all tried what i found, that might help, too)
(after i wrote the posting above)
¹ recalculate the map with new settings (-->"NO")
² repaint the mini-map
³ did load the game in 474.05 and save it again (changes map or sve file-size civ1-internal) before doing any gameplay
i know this from TERRAFORM and EXCEL editor back in the stone-age of civ editors... ;)
etc.


But i was unable to remove 'the road debris' (the brown dot) of the removed cities -
and ingame civ1 entering those squares did cause the INTEGER ERROR / overflow.

Additional there is a black line at (earth)map east-west joining ends.


My workaround now is to make this both squares to an "inland sea" = lake
- so nobody steps on it -
i put mountains around it to make the whole sight non-attractive to unit-building for the lake.

Now all works (for this special case) ;)
I did play two large hour-long test games with many units and up to all techs without any error.

But a FAQ / Manual for JCivED would be nice.

Edit 2014-05-15
The files are now located in the 2014 - 2020 CONQUEST
http://forums.civfanatics.com/showpost.php?p=13222679&postcount=1
 
Top Bottom