You must be logged in to post messages.
Please login or register

Caesar III: Scenario Design
Moderated by Granite Q, Gweilo

Hop to:    
Welcome! You are not logged in. Please Login or Register.10 replies
Caesar IV Heaven » Forums » Caesar III: Scenario Design » Map editor increase trade
Bottom
Topic Subject:Map editor increase trade
guane2009
Pleb
posted 08-17-17 09:29 ET (US)         
I can't find a way in the map editor to increase/decrease the amount of trade, there is an option to increase/decrease the value of the trade but not the quantities.
Do you know how to do it?
thanks
AuthorReplies:
Brugle
HG Alumnus
posted 08-17-17 09:49 ET (US)     1 / 10       
Hi guane2009 ,

The types of trade goods and amount of each is specified by the empire state chosen. I'm pretty sure that there is no way to change it (other than by using a binary editor on the map file, with some advanced knowledge).
guane2009
Pleb
posted 08-18-17 15:53 ET (US)     2 / 10       
Hello Brugle,
I was referring about how to create the event 'increase trade of good X on year Y' (or decrease trade of it). It seems that there is no way to do it after a lot of search in this and other forums. I asked the question just as my last hope.
Pecunia
CBH Seraph
posted 08-18-17 16:10 ET (US)     3 / 10       
There is only one way to do it: by editing the scenario file with a hex editor. Are you familiar with hex editing? I can look up the bytes where the trade changes are stored.

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
guane2009
Pleb
posted 08-19-17 10:32 ET (US)     4 / 10       
Hi Pecunia,
Sure I can figure out how to hex edit a binary file. If you could please find out which locations to edit, let me know.

I hope that turning ON the location for increasing/decreasing trade the program would start firing those predefined events although I am afraid we won't have much control on when and by how much. Unless those options show up on the GUI similar to the raise/lower price of goods.

thanks

[This message has been edited by guane2009 (edited 08-19-2017 @ 12:13 PM).]

Brugle
HG Alumnus
posted 08-19-17 13:22 ET (US)     5 / 10       
Reply #22 in Saved games tool (C3GameExplorer) describes how to modify some trade values in an uncompressed saved game file. (C3 game explorer is in our Downloads.)

I have no idea how to enable changing trade amounts during a mission. Pecunia might know.
Pecunia
CBH Seraph
posted 08-19-17 13:22 ET (US)     6 / 10       
Open the .map in a hex editor and go to the following offset: hex 0x33838 / decimal 211000.

You can schedule up to 20 trade changes, and they are stored as follows:








Offset (hex)SizeDescription
0x3383820x 2-byteyear, offset from start of the scenario, must be at least 1, little-endian
0x3386020x 1-bytemonth (filled in by the game, leave as 0)
0x3387420x 1-byteresource to change (see below)
0x3388820x 1-bytetrade route id (see below)
0x3389C20x 1-byteflag: 1 for increasing, 0 for decreasing trade


The price changes start just after the trade changes at hex 0x338B0 / decimal 211120 and have almost the same structure (they have amount instead of trade route), so you can use these as example.

Some things to note:
- You can decrease trade to 0 and later increase it to 15 again.
- Trade amounts are: 0, 15, 25, 40. Any changes above 40 or below 0 have no effect.
- The player only gets a notification if the trade route is open.
- If you schedule a change for a resource that the city is NOT already trading, you get a notification, but the city will not start trading the item, because the game doesn't know whether to buy or sell.


Resource IDs (hex):
01: Wheat
02: Vegetables
03: Fruit
04: Olives
05: Vines
06: Meat
07: Wine
08: Oil
09: Iron
0A: Timber
0B: Clay
0C: Marble
0D: Weapons
0E: Furniture
0F: Pottery


Trade route IDs:

Empire state 1
1: Lutetia
2: Mediolanum
3: Narbo
4: Massilia

Empire state 2
1: Athenae
2: Brundisium
3: Tarentum
4: Syracusae

Empire state 3
1: Calleva
2: Lindum
3: Lutetia
4: Augusta Trevorum

Empire state 4
1: Capua
2: Brundisium
4: Syracusae

Empire state 5
1: Calleva
2: Londinium
3: Lutetia
4: Augusta Trevorum

Empire state 6
1: Carthago Nova
2: Valentia
3: Tarraco

Empire state 7
1: Roma
2: Capua
3: Carthago Nova
4: Tarraco

Empire state 8
1: Valentia
2: Carthago Nova
3: Tingis
4: Volubilis

Empire state 9
1: Thamugadi
2: Caesarea
3: Syracusae

Empire state 10
1: Leptis Magna
2: Syracusae
3: Miletus
4: Corinthus

Empire state 11
1: Roma
2: Capua
3: Carthago Nova
4: Mediolanum

Empire state 12
1: Damascus
2: Heliopolis
3: Antiocha
4: Ephesus

Empire state 13
1: Massilia
2: Capua
3: Narbo
4: Tarentum
5: Syracusae
6: Tingis

Empire state 14
1: Roma
2: Tarentum
3: Capua
4: Carthago
5: Corinthus
6: Brundisium
7: Athenae

Empire state 15
1: Roma
2: Capua
3: Carthago Nova
4: Mediolanum

Empire state 16
1: Miletus
2: Alexandria
3: Hierosolyma
4: Damascus
5: Antiocha

Empire state 17
1: Carthago Nova
2: Caesarea
3: Volubilis
4: Valentia
5: Tarraco

Empire state 18
1: Lugdunum
2: Argentoratum
3: Lutetia
4: Londinium
5: Narbo

Empire state 19
1: Valentia
2: Caesarea
3: Tingis
4: Volubilis
5: Toletum

Empire state 20
1: Thamugadi
2: Carthago
3: Syracusae
4: Athenae

Empire state 21
1: Ephesus
2: Miletus
3: Pergamum
4: Tarentum

Empire state 22
1: Capua

Empire state 23
1: Tarentum
2: Syracusae
3: Brundisium

Empire state 24
1: Capua
2: Syracusae

Empire state 25
1: Tarentum
2: Capua
3: Brundisium
4: Syracusae

Empire state 26
1: Capua
2: Tarentum
3: Brundisium

Empire state 27
1: Corinthus
2: Athenae

Empire state 28
1: Massilia
2: Capua

Empire state 29
1: Massilia
2: Mediolanum

Empire state 30
1: Thamugadi
2: Caesarea
3: Syracusae

Empire state 31
1: Miletus
2: Alexandria
3: Hierosolyma
4: Damascus

Empire state 32
1: Carthago Nova
2: Caesarea

Empire state 33
1: Carthago Nova
2: Carthago
3: Tingis

Empire state 34
1: Lugdunum
2: Mediolanum

Empire state 35
1: Valentia
2: Carthago Nova
3: Tingis
4: Volubilis

Empire state 36
1: Mediolanum
2: Athenae

Empire state 37
1: Calleva
2: Lutetia
3: Augusta Trevorum
4: Lindum

Empire state 38
1: Tarsus
2: Hierosolyma

Empire state 39
1: Valentia
2: Tarraco
3: Lugdunum
4: Mediolanum

Empire state 40
1: Calleva
2: Londinium
3: Lutetia
4: Augusta Trevorum

Angel Pecunia | HG Downloads programmer and techie
Caesar IV Heaven | Children of the Nile Heaven | Citadel of Poseidon (Zeus/Poseidon) | The Great Wall (Emperor)
guane2009
Pleb
posted 08-19-17 21:17 ET (US)     7 / 10       
Pecunia,
Your info is pure gold! thank you.
guane2009
Pleb
posted 09-01-17 20:36 ET (US)     8 / 10       
I uploaded a tool to schedule up to 20 trade changes in a .map file.
The application front window looks like this:



I ran a test on a custom map using the Empire State 26 Syracusae. These pictures shows the initial open route to Capua buying 15 weapons, on a 2nd year came out the message about increasing trade of weapons and the final picture shows the increase to be 25 weapons:



The tool can handle a few empire states and a newer version would be able to support all 40 states.
I am planning to extend the tool to handle saved games based on this first version.

The uploaded tool could be found under C3 Trade Change in the download section "Utility Programs".

Thanks to Pecunia for the info that enticed me to write the application.

[This message has been edited by guane2009 (edited 09-01-2017 @ 08:37 PM).]

guane2009
Pleb
posted 09-05-17 22:24 ET (US)     9 / 10       
A final version is now available at the download section 'Utility Programs' named C3 Trade Change. It can process any of the 40 empire states.

Here is a screenshot of the application:


jaroslav80
Pleb
posted 09-11-17 12:29 ET (US)     10 / 10       
Thank you very much. Nice utility.
The Pecunia's file-structure knowledges were used very well.
You must be logged in to post messages.
Please login or register

Hop to:    

Caesar IV Heaven | HeavenGames